/underwater-images-color-correction

A little webapp that allow to correct the colors of underwater images.

Primary LanguageTypeScript

banner

Underwater Images Color Correction

A web application that lets you magically correct the colour of photos you've taken underwater!

⚠️ This project is under construction. It is not currently available nor finished.

TODO

  • support mobile devices
  • support video load / preview
    • conditional UI
  • allow to reupload a new photo easily (without reloading the page)
  • allow double click to reset sliders
  • re-implement the matrix generation algorithm in rust
  • use the rust version of the algorithm with WASM
  • add loading status bar
    • for file reading
    • for matrixes generation
    • for download / export
  • support video export
  • support multiple file uploads
  • add metadata to generated files
    • metadata support for JPG files
      • drop the thumbnail in metadata
    • partial metadata support for other files
    • use exiv2 wasm ?
    • support video metadata
  • add option for unique / multiple matrix in videos
  • support video audio
  • support unsupported file format (ffmpeg.wasm transcoding for video, HEIC convert for images)
  • setup PWA
  • support scrolling / zooming in the image

Why ?

When you take photos underwater, colours disappear quickly because the water absorbs certain wavelengths of light (depending on your depth). So colours like red will quickly disappear. This programme will try to restore the original colours.

Warning: the result will not be the same as if you had used a flash. It's more like cheating, but it can give very good results.

Sources: [wikipedia](https://fr.m.wikipedia.org/wiki/Fichier:Absorption_des_couleurs_sous_l%27eau.svg)

How to use ?

Online versions available at:

How it works ?

Using javascript, webgl (PIXI.js), rust and webassembly (all transformations are done in your browser, nothing is uploaded to any server).

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

Examples :

src: https://github.com/nikolajbech/underwater-image-color-correction

image