笔记
在树莓派下使用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)