I am trying to show an image using OpenCV with Python, but it appears with different colors.
The original image (LAB color space, TIF file extension) looks like this:
The code looks like this:
import cv2 as cv
img = cv.imread('Photos/example.tif') # read the image
When I output it using cv.imshow('Title', img)
The picture looks like this:
So I tried this line of code:
LAB_img = cv.cvtColor(img, cv.COLOR_BGR2LAB)
cv.imshow('Title', LAB_img) # show the LAB version
and the output looks like this:
I also tried RGB2LAB or LAB2BGR, and the result outputs are all weird.
Any suggestions? Thanks.