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

Error when correcting video #1

Closed LukasK13 closed 1 year ago

LukasK13 commented 1 year ago

Unfortunately I am unable to correct videos from my gopro. I'm getting the following error. Do you have any ideas?

$ python3 correct.py video /Users/lukas/Downloads/Seychellen/GoPro/GH010137.MP4 /Users/lukas/Downloads/out.MP4

Analyzing...
Traceback (most recent call last):
  File "correct.py", line 281, in <module>
    [x for x in process_video(video_data, yield_preview=False)]
  File "correct.py", line 281, in <listcomp>
    [x for x in process_video(video_data, yield_preview=False)]
  File "correct.py", line 208, in process_video
    filter_matrix_size = len(filter_matrices[0])
IndexError: index 0 is out of bounds for axis 0 with size 0
bornfree commented 1 year ago

@LukasK13 Can you share the video file so that I can take a look? Maybe a Dropbox or GDrive link.

LukasK13 commented 1 year ago

Thank you for having a look at this. You can find a smaller video here: https://www.cloud.lklass.de/s/gLrKTH9gXRNtMFA

bornfree commented 1 year ago

It looks like the cap.read was returning false before all frames were read. I tried fixing it and it seems to now be working with the video you shared. Please try and let me know so that I can mark this as closed.

2

But the color correction itself doesn't seem to be doing a good job. The original video is a little overexposed IMO.

LukasK13 commented 1 year ago

Cool, thank you a lot for the quick fix. It's working as intended. I think you are right with the video overexposition. I will have to work on that.