Could not collect images for labeling and training

it can’t. the camera will produce frames regardless. when you wait, say 5 seconds, no matter how, you will get the next frame, which will be 5 seconds old, i.e. “stale”.

waitKey() is preferable to sleep because it doesn’t cause the GUI to lock up.