0
votes

I am working with OpenCV with Visual "C++." I am new to OpenCV.

What I am hoping to find is an Image Viewer that works like a modeless dialog box so that I can display a continuous stream of images in it.

I was trying to use the OpenCV namedwindow function for this but it does not appear to be suitable for this task for the following reason:

Any viewer created with namedwindow goes out of scope when the invoking function exits and the user has to block with waitKey in order to prevent the viewer from closing immediately.

What would be really helpful is if there was a viewer window in OpenCV that persists until the user explicitly closes it and to which images can be streamed sequentially using imshow or a similar mechanism. Or perhaps, there is a way of using namedwindow like this that I have not discovered.

1

1 Answers

0
votes

Just create the window in a scope that ends later.
Calling cv::waitKey(1) will give the window just enough time to update and continue running.