Ask Your Question

Revision history [back]

Imshow MultiThreading

I have multiple threads (one for each camera) that needs to imshow images. However, I run into an error with the second NamedWindow command. I read some of the previous Q/A and realize that highgui and multithreading don't go too well together, however, in this case I need to run it from a thread. I'm ok with displaying one of the image streams (and then press a button to get to the next one). I'm not too inclined to concatenate images together and pass it to the main function as I don't want to use any more resources than I have to. Moreover, imshow in a separate thread works fine for me (for a single camera). I tried running separate programs in different shells (not threads but processes this time) and it seemed to work - is there a way to create a separate process in OpenCV for displaying image streams simultaneously?

Thanks!