I\'m trying to display a PNG file using matplotlib and of course, python. For this test, I\'ve generated the following image:
Color image loaded by OpenCV is in BGR mode. However, Matplotlib displays in RGB mode. So we need to convert the image from BGR to RGB:
plt.imshow(cv2.cvtColor(cube, cv2.COLOR_BGR2RGB))