c - OpenCV : How to use cvWaitKey() form a different thread other than the one created the window? -
I have a problem here and need your help. I use the cvWaitKey () function to create a keyboard stroke I'm trying to capture the I function works fine if I call cvWaitKey from the same thread that the window was created, but when I create a window from a thread and call cvWaitKey () from the second thread The key does not return, it is for cvWaitKey (0) Locks and gives zero to zero for any time minus zero. Yes, this can not work, by executing the Sewifyic () by calling the incoming message () API function.
has been done. It can only see messages on the message queue which are associated with the thread, there are no windows in the thread that you have created.
There is no clear solution for this, you have to call it the thread which created the window. GetAsyncKeyState () Calling, although a very different approach can work.
Comments
Post a Comment