1 | initial version |
add a
cv::waitKey(10);
after the imshow(); else nothing will get drawn ever.
2 | No.2 Revision |
add a
cv::waitKey(10);
after the imshow(); else nothing will get drawn ever.
(imshow() only copies an image pointer, waitKey() holds the internal event loop, which will trigger the drawing/update finally)
3 | No.3 Revision |
add a
cv::waitKey(10);
after the imshow(); else nothing will get drawn ever.
(imshow() only copies an image pointer, waitKey() holds the internal event loop, which will trigger the drawing/update finally)
also note: if you ever get here:
if (frame.empty()) {
when playing a video file, it means , that you reached the last frame (and you should probably return, or break out of the loop)