Closed mutenroshi2 closed 7 years ago
If anyone having the same issue, please import qimage2ndarray this library and add the following changes to the function display_video_stream
`def display_video_stream(self):
"""Read frame from camera and repaint QLabel widget.
"""
_, frame = self.capture.read()
frame = cv2.cvtColor(frame, cv2.COLOR_BGR2RGB)
# frame = cv2.flip(frame, 1)
image = qimage2ndarray.array2qimage(frame) #Solution for the memory leak
self.image_label.setPixmap(QPixmap.fromImage(image))`
Hello, I am using Pyside 1.2.2, Pycharm Community Edition, Python 3.4.4, Opencv 3.1.0
I have just built a simple GUI , which displays a HD video streaming (1920x1080) but I lose about 6GB of memory in about a minute, if the timer which is set to 30 milliseconds is set to 250, the video streaming is a little slow and even the memory leak here is the code
`