Can we display a camera feed in Pyqt? I can only display a simple view through the opencv window in python. I want to add some more options while displaying the pyqt window.
Yes, you can do it using QLabel
and setting the label's QPixmap
. Something vaguely along the lines of:
label = QtGui.QLabel()
image = QtGui.QImage(
frame,
frame.shape[1],
frame.shape[0],
frame.shape[1] * 3,
QtGui.QImage.Format_RGB888
)
label.setPixmap(QtGui.QPixmap.fromImage(image))
where frame
is your camera frame data.