bornfree / dive-color-corrector

Dive and underwater image and video color correction
https://bornfree.github.io/dive-color-corrector/
GNU General Public License v3.0
91 stars 19 forks source link

Use reported frame count to ignore cap.read failures #2

Closed bornfree closed 1 year ago

bornfree commented 1 year ago

In a few videos cap.read returns false before we reach end of video. This contradicts what's stated in https://docs.opencv.org/4.x/dd/d43/tutorial_py_video_display.html

We now use cv2.CAP_PROP_FRAME_COUNT to check if we have indeed read all frames.

bornfree commented 1 year ago

1