alvinleetya
alvinleetya

Reputation: 464

OpenCV, how to display a series of images without reinitializing a window

I'm currently working on a segmentation tools for medical images. It's basically a contour that evolves on each iteration of the algorithm.

What I want to do is display the contour on the image each 20 iterations. At the moment I'm doing that by creating a window, using the cvDrawContour function and using imshow. 20 iterations later, I destroy the window and do these steps again.

Is there a way to create a window that won't be destroyed and where you can change the image that it displays?

Upvotes: 2

Views: 1841

Answers (1)

Chris
Chris

Reputation: 4983

Absolutely. Just don't destroy your window every time. Your image is stored in some cv::Mat mat, just use cv::imshow("My Window", mat); every time, no need to destroy it.

Upvotes: 3

Related Questions