images from opencv displayed in blue

Solutions on MaxInterview for images from opencv displayed in blue by the best coders in the world

showing results for - "images from opencv displayed in blue"
Theo
04 Jan 2021
1# matplotlib interprets images in RGB format, but OpenCV uses BGR format
2
3# so to convert the image so that it's properly loaded, convert it before loading
4
5img = cv2.imread('filename.ext')		# this is read in BGR format
6rgb_img = cv2.cvtColor(img, cv2.COLOR_BGR2RGB)		# this converts it into RGB
7
8plt.imshow(rgb_img)
9plt.show()
10
queries leading to this page
cv2 normal colourinhhow to show image in jupyter notebook using cv2cv2 imread image looks weirdjupyter notebook plot cv2 imageshow cv2 image in jupyter notebookshow opencv image in jupyter notebookcv2 show image jupyerpython cv2 show image jupyteropen display image jupyter notebook cv show imagehow to make cv2 draw an image inside jupyter notebookcv2 display image in jupyteropencv show image jupyterjupyter opencv show imagecv2 image with clor and not yellowshow image in jupyter notebook opencvshow image with cv2 in jupyter notebookshow image cv2 jupyterdisplay opencv images ipythonweird colors in image pythonimage in jupyter notebook from opencvjupyter open cv display imageimshow jupyterplt imshow colors wrongplt imshow 28img back 29 oringal coloropencv not working in jupyter notebook imshowpython cv2 show image in jupyter notebookdisplay image using cv2 jupyter notebookshow image output in jupyter notebook using cv2how to show image in jupyter notebook opencvdisplay cv2 image in jupyter notebookcolor correct cv2 imagesdisplay image in jupyter notebook opencvshow figures opencv python jupyter notebookopencv show image in jupyter notebookopencv display image jupyter notebookcv2 imshow jupyterhow to read image in python cv2 notebookopencv display image in jupyter notebookhow to show an image cv2 jupyterjupyter notebook display opencv imageopen cv2 open image in jupyter notebookcv2 display image jupytercv2 show image jupyterimages from opencv displayed in blue