waitkey alternate

asked 2015-07-07 08:58:32 -0500

Prem gravatar image

My code is already slow and processing takes some time once some frame is captured and processed from camera. When I use imshow ( "name", processedframe ). i don't want to wait even for 1 ms and continue to next loop. If I don't include waitkey(somevalue) after imshow the window is gray. Is there any solution for this? or i must use waitkey to display the feed correctly.

edit retag flag offensive close merge delete



you must use waitKey() with imshow() (no, there's no alternative)

(also, the 1ms invested there will most probably not be your bottleneck. profile more carefully, please)

berak gravatar imageberak ( 2015-07-07 08:59:49 -0500 )edit

@berak thanks for the info. Can you please mark it as answer.

Prem gravatar imagePrem ( 2015-07-08 03:40:06 -0500 )edit