Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

How to actualize windows events without cvWaitKey

Hello,

I read on this page than cvWaitKey has two actions :

  1. It waits for x milliseconds for a key press. If a key was pressed during that time, it returns the key's ASCII code. Otherwise, it returns -1.

  2. It handles any windowing events, such as creating windows with cv::namedWindow(), or showing images with cv::imshow()..

I have to use cvWaitKey to execute the second action, but I don't want the first (I've a multithreaded program and it's taking the input focus, which I don't want).

Is there a function to execute only the second action ? The thread can wait with a usleep.

Thanks for your help,

Best regards