Hi,

I've written a program that continuously pools a webcam to grab image
frames through opencv library. Sporadically, when converting the frame to a
QImage object, I get the message: QImage: out of memory, returning null
image.

def takePicture(self):

frame = self.camcapture.read()
image = QImage(frame[1].data, 1920, 1080,
QImage.Format_RGB888).rgbSwapped()#.mirrored(True, False)
self.pixmap = QPixmap.fromImage(image)


As you can see, the image is 1920x1080 pixels big and it uses around 6MB of
memory space (3 bytes per pixel * 1920 * 1080), I suppose.

How to solve this problem? Is it possible python is leaking memory? Any
suggestion is welcome.

Thanks!
_______________________________________________
PySide mailing list
[email protected]
http://lists.qt-project.org/mailman/listinfo/pyside

Reply via email to