Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

magic: add a waitkey(30); after the imshow()

long answer: imshow() just copies a pointer to the image. the waitKey() call is required, because it actually handles the native message queue, which will blit the image to your current window. the argument passed there (in milliseconds) is the time to give back to your os for other processes ( think a 1 cpu celeron system)

  • magic: add a waitkey(30); after the imshow()

  • long answer: imshow() just copies a pointer to the image. the waitKey() call is required, because it actually handles the native message queue, which will blit the image to your current window. the argument passed there (in milliseconds) is the time to give back to your os for other processes ( think a 1 cpu celeron system)

  • magic: add a waitkey(30);cv::waitkey(30); after the imshow()cv::imshow()

  • long answer: imshow() just copies a pointer to the image. the waitKey() call is required, because it actually handles the native message queue, which will blit the image to your current window. the argument passed there (in milliseconds) is the time to give back to your os for other processes ( think a 1 cpu celeron system)