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))

猜你喜欢

转载自www.cnblogs.com/herd/p/12769769.html