ilikecats567 / pyopencv

Automatically exported from code.google.com/p/pyopencv
0 stars 0 forks source link

Destructor overload #29

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Load video with grab() and retrieve()
2. Convert CV image to QImage (using QImage constructor)
3. Convert QImage to QPixmap
4. Display QPixmap on a QLabel
5. Add QLabel to QWidget (or whatever)
6. Execute application, then close the window

What is the expected output? What do you see instead?
Should close properly, but instead there is a memory error message.

What version of the product are you using? On what operating system?
pyopencv-2.1.0.wr1.1.0-py2.6 on Windows XP 32bits

Please provide any additional information below.
The only way I found to avoid this bug was to overload closeEvent() on my 
custom Widget to put a release(), which is un-pythonic.

Original issue reported on code.google.com by moo...@msn.com on 21 Oct 2010 at 2:22

GoogleCodeExporter commented 9 years ago
Sorry for my late response. I've been too busy with work.

I'm not too sure if this is PyOpenCV's problem though. When you converted a CV 
image into a QImage, did both QImage and CV image share the same data? If so, 
did you have any guarantee that if the CV image is destroyed, the data is still 
preserved for the QImage?

Cheers,
Minh-Tri

Original comment by pmtri80@gmail.com on 7 Nov 2010 at 8:28