OpenCV显示实验室Tif图片中的怪异颜色
我正在尝试使用python的OpenCV显示图像,但它以不同的颜色显示。
原始图像(实验室颜色空间,tif文件扩展名)看起来像:
代码看起来像这样:
import cv2 as cv
img = cv.imread('Photos/example.tif') # read the image
当我使用cv.imshow('title',img)输出它时代码> 图片看起来像这样:
代码
LAB_img = cv.cvtColor(img, cv.COLOR_BGR2LAB)
cv.imshow('Title', LAB_img) # show the LAB version
所以我尝试了以下
我也尝试了rgb2lab或lab2bgr,结果输出都是诡异的。
有什么建议吗?谢谢。
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.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论