c - OpenCV : How to use cvWaitKey() form a different thread other than the one created the window? -
i have problem here , need help. i've been trying capture keyboard strokes created window using cvwaitkey() function. function works fine if called cvwaitkey same thread created window, when create window thread , call cvwaitkey() thread doesn't return correct key, blocks cvwaitkey(0) , returns -1 timeout grater zero.
yes, cannot work. cvwaitkey() implemented calling peekmessage() api function. can see messages on message queue associated thread. thread created doesn't have windows.
there no obvious workaround this, have call on thread created window. calling getasynckeystate() work, different approach though.
Comments
Post a Comment