【发布时间】:2016-05-31 18:17:51
【问题描述】:
为了将 numpy 矩阵转换为 QPixmap,我使用了这个函数:
def np2qpixmap(np_img):
frame = cv2.cvtColor(np_img, cv2.COLOR_BGR2RGB)
img = QtGui.QImage(frame, frame.shape[1], frame.shape[0], QtGui.QImage.Format_RGB888)
return QtGui.QPixmap.fromImage(img)
现在怎么做逆运算?
【问题讨论】: