As I'm lead to believe, OpenCV reads images in BGR colorspace ordering and we usually have to convert it back to RGB like this:
img = cv2.cvtColor(img, cv2.COLOR_BGR2RGB)
But when I try to simply read an image and show it, the coloring seems fine (without the need to convert BGR to RGB):
img_bgr = cv2.imread(image_path)
cv2.imshow('BGR Image',img_bgr)
img_rgb = cv2.cvtColor(img_bgr, cv2.COLOR_BGR2RGB)
cv2.imshow('RGB Image',img_rgb )
cv2.waitkey(0)
So is imshow()
changing the ordering within the function automatically (from BGR to RGB) or the ordering has been BGR all along?