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.