Post date: Jul 16, 2016 4:21:24 PM
Some points I need to get down so that I can remember what I did to get OpenCV HighGui to work on multi-threads.
First point, if the same parameter gets passed to multiple parallel threads, make copies of the parameter and pass single copies to each of the threads. This will avoid race conditions where the same data is accessed or updated at the same time.
Second point is HighGui imshow's only work when they hit the WaitKey. So as a general rule, place the waitKey's close to the imshow's in terms of code in the same thread. If you want multiple imshow's and not needing to press the keyboard on every display, then put the imshow's in the main thread and one waitKey after that. Do not put waitKey's on a different thread from the imshow's.
Vocabulary is getting so bizarre I hope I can understand this when next I read it.