python opencv Mat pyqt5 QPixmap

self.depth_img = cv2.resize(depth_colormap, (640, 480))
self.depth_img = cv2.cvtColor(self.depth_img, cv2.COLOR_BGR2RGB)
self.depth_showImage = QtGui.QImage(self.depth_img.data, self.depth_img.shape[1], self.depth_img.shape[0], QtGui.QImage.Format_RGB888)
self.vc_ui.label_2.setPixmap(QtGui.QPixmap.fromImage(self.depth_showImage))

 

posted @ 2020-04-24 19:58  西北逍遥  阅读(703)  评论(0编辑  收藏  举报