WaitKey without waiting?
Is there a way to call WaitKey without incurring a (minimum) 1 millisecond block?
Suppose I have a 300 frames/sec camera & display - to display each frame I need to call waitkey(1) 300 times each second (because you have to call waitkey to get imshow to work), which consumes 30% of my entire CPU.
Most of that time is just sitting there waiting for the keyboard, at 1 ms per call.
This seems like a huge waste of CPU time.
Is there some way to call WaitKey without the needless wait-for-keyboard delay?
WaitKey(0.0000000001) I suppose would do it, but WaitKey only takes integers...
Do you necessarily need to display all frames?
imho, you're making up a problem where none exists.
no, you don't have to care about 300 fps. an average webcam won't be faster than 30 fps, an expensive one maybe 100.
the time spent there is used to blit/update the image ( no, that does not happen in imshow ), and that will be already more than a millisecond
you don't even have to use the highgui api for showing your images, just build something with qt/winforms, whatever