Imshow MultiThreading

asked 2019-03-13 13:46:54 -0500

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?


edit retag flag offensive close merge delete


No that's not possible. You have a multithread example here

LBerger gravatar imageLBerger ( 2019-03-13 15:14:44 -0500 )edit