割と最近のQ&Aがあったので貼っておこう。
How to update cv::namedwindow in multi-threading environment? - OpenCV Q&A Forum
If 1 callback receives an image and performs some image-processing. How can the output image be shown in multi-threading environment? By multi-threading I mean, if that particular callback(depthCallback) can be invoked by more than one thread. And, one more query: Is using waitkey(1), optimal for real-time application?
ウィンドウの更新はメインスレッドで実施するというのが常識だそうな。