0
点赞
收藏
分享

微信扫一扫

树莓派下OpenCv没有QImage.Format_BGR888导致显示的色彩翻转不能正确显示色彩的问题

_鱼与渔_ 2022-04-14 阅读 133
python

在树莓派下使用opencv显示图像色彩的时候,QImage()方法没有QImage.Format_BGR888,我使用了QImage.Format_RGB888,然后颜色是翻转色

showImage = QImage(self.image, self.image.shape[1],self.image.shape[0], QImage.Format_RGB888)

原题

请添加图片描述

# 显示画面
self.image = cv.cvtColor(self.image, cv.COLOR_BGR2RGB)

showImage = QImage(self.image.data, self.image.shape[1], self.image.shape[0],self.image.shape[1] * 3, QImage.Format_RGB888)
举报

相关推荐

0 条评论