Ask Your Question

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

1 answer

Sort by ยป oldest newest most voted

answered 2015-07-08 03:40:06 -0500

Prem gravatar image

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

edit flag offensive delete link more

Question Tools

1 follower


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

Seen: 857 times

Last updated: Jul 07 '15