OpenCV shows LAB TIF picture in weird colors

235 Views Asked by At

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:

enter image description here

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:

enter image description here

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:

enter image description here

I also tried RGB2LAB or LAB2BGR, and the result outputs are all weird.

Any suggestions? Thanks.

0

There are 0 best solutions below