Ask Your Question
0

[Solved] QT5 opencv3.1 ubuntu 16.04 cv::destroyAllWindows

asked 2017-07-06 09:13:59 -0500

gfx gravatar image

updated 2017-07-12 04:48:04 -0500

I have a Qt5 Gui app with some camera regulation & transform. For code semplicity I use imshow("mywin", myMatimage) for show every transform used. If all It is as desired, I save the sequence of transformation, convert cv::Mat into QImage and show the image/video onto QT5 gui. All ok but for close thw imshow windows, I must release their matimage (it is all ok again), but after these I must manually close the opencv opened windows because I'm not able to detect and close these.

For sure I can connect a bool var on every imshow command, and when I want to close the windows use an if statement on every bool var ... if(myboolvarMy1imshowWindows){ destroyWindows("windows_myboolvarMy1imshowWindows");}

but there are a more eleegant way to do these?

regards gfx

edit retag flag offensive close merge delete

1 answer

Sort by ยป oldest newest most voted
0

answered 2017-07-12 04:46:47 -0500

gfx gravatar image
namedWindow( "Display image", WINDOW_AUTOSIZE ); 
imshow( "Display image", image );

If I use both commands instead of imgshow only you can use

destroyWindows("Display image")

with success... so there are no issue about destroyWindows.

gfx

edit flag offensive delete link more
Login/Signup to Answer

Question Tools

1 follower

Stats

Asked: 2017-07-06 09:13:59 -0500

Seen: 240 times

Last updated: Jul 12 '17