Git Product home page Git Product logo

dive-color-corrector's Introduction

Dive and underwater image and video color correction

Sample images

Example

Sample video

Video

Setup

$ pip install -r requirements.txt

For images

$ python correct.py image /my/raw.png /my/corrected.png

For videos

$ python correct.py video /my/raw.mp4 /my/corrected.mp4

GUI

You can either download the desktop softwares or build one yourself.

GUI

Building the GUI

Uncomment the libraries needed for GUI in requirements.txt and re-run pip install.

MacOS (via Py2App)

$ py2applet --make-setup dcc.py
$ python setup.py py2app

Windows (via PyInstaller)

$ python -m PyInstaller -n "Dive Color Corrector" -F -w -i .\logo\logo.ico dcc.py

Linux (via PyInstaller)

$ pyinstaller -n "Dive Color Corrector" -F -w -i ./logo/logo.png dcc.py

Final builds will be available in 'dist' folder

Share

If this repo was useful, please considering sharing the word on Twitter.

Inspiration

This repo was inspired by the algorithm at https://github.com/nikolajbech/underwater-image-color-correction.

dive-color-corrector's People

Contributors

bornfree avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

dive-color-corrector's Issues

Error while convert

Hello,

I got an error, but i don't have enough details to fix it
Can you help please ?

Thank you
image

Cannot convert videos

I try to convert a video (one 120 MB, the other 800 MB) and all I get is a 1 kB file which obviously is not the video. The correction works for a picture.

Error when correcting video

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

error with MacOs binary

Hello. I get this error with the macos binary:

/Users/mwgilbert/Downloads/MacOS\ arm64/Dive\ Color\ Corrector.app/Contents/MacOS/Dive\ Color\ Corrector ; exit;
mwgilbert@MacBook-Pro ~ % /Users/mwgilbert/Downloads/MacOS\ arm64/Dive\ Color\ Corrector.app/Contents/MacOS/Dive\ Color\ Corrector ; exit;
Traceback (most recent call last):
File "/Users/mwgilbert/Downloads/MacOS arm64/Dive Color Corrector.app/Contents/Resources/boot.py", line 161, in
_run()
File "/Users/mwgilbert/Downloads/MacOS arm64/Dive Color Corrector.app/Contents/Resources/boot.py", line 84, in _run
exec(compile(source, path, "exec"), globals(), globals())
File "/Users/mwgilbert/Downloads/MacOS arm64/Dive Color Corrector.app/Contents/Resources/dcc.py", line 2, in
import PySimpleGUI as sg
File "/Users/mwgilbert/Downloads/MacOS arm64/Dive Color Corrector.app/Contents/Resources/lib/python3.10/PySimpleGUI/init.py", line 2, in
from .PySimpleGUI import *
File "/Users/mwgilbert/Downloads/MacOS arm64/Dive Color Corrector.app/Contents/Resources/lib/python3.10/PySimpleGUI/PySimpleGUI.py", line 144, in
tclversion_detailed = tkinter.Tcl().eval('info patchlevel')
File "tkinter/init.pyc", line 2401, in Tcl
File "tkinter/init.pyc", line 2299, in init
_tkinter.TclError: Can't find a usable init.tcl in the following directories:
/opt/homebrew/Cellar/tcl-tk/8.6.12_1/lib/tcl8.6 {/Users/mwgilbert/Downloads/MacOS arm64/Dive Color Corrector.app/Contents/lib/tcl8.6} {/Users/mwgilbert/Downloads/MacOS arm64/Dive Color Corrector.app/lib/tcl8.6} {/Users/mwgilbert/Downloads/MacOS arm64/Dive Color Corrector.app/Contents/library} {/Users/mwgilbert/Downloads/MacOS arm64/Dive Color Corrector.app/library} {/Users/mwgilbert/Downloads/MacOS arm64/Dive Color Corrector.app/tcl8.6.12/library} {/Users/mwgilbert/Downloads/MacOS arm64/tcl8.6.12/library}

This probably means that Tcl wasn't installed properly.

2024-03-08 17:28:12.760 Dive Color Corrector[31799:605760] Launch error
2024-03-08 17:28:12.760 Dive Color Corrector[31799:605760] Launch error
See the py2app website for debugging launch issues

Saving session...
...copying shared history...
...saving history...truncating history files...
...completed.

[Process completed]

Any help appreciated, thanks!!

With redfilter extreme reds

I was using a redfilter on my camera and the corrections produces extreme red saturation. Unfortunately there are no adjustment possibilities at all.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.