目录
效果图
可视化代码
import os
import time
import numpy as np
from PyQt5 import QtOpenGL, QtWidgets, QtCore, QtGui
from OpenGL.GL import *
from OpenGL.GLU import *
import math
import argparse
from PyQt5.QtCore import Qt, QTimer, QSize
from PyQt5.QtGui import QPixmap, QMouseEvent, QImage, QPainter, QColor, QFont
from PyQt5.QtWidgets import QSplitter, QLabel, QWidget, QVBoxLayout
from img_read import ImgReader
from OpenGL.GLUT import *
def mat_to_pixmap(cv_image):
height, width, channel = cv_image.shape
bytes_per_line = 3 * width
q_img = QImage(cv_image.data, width, height, bytes_per_line, QImage.Format_RGB888)
pixmap = QPixmap.fromImage(q_img.rgbSwapped())
re