Giter Club home page Giter Club logo

muhcolors's Introduction

Simple script to create color grading / color correction presets and export them to a 3DLUT. The goal is to then use it on videos.

Capabilities and qualities:

  • white-balance when testing on images;
  • hue-to-hue maps for dark and bright tones separately;
  • functions use the cylindrical CIEluv colorspace, which focus on keeping the same perceived luminosity of each color after hue shifts;
  • saturation map with respect to brightness;
  • lightness map with respect to brightness;
  • locally boost or decrease the lightness within an interval of hue and lightness;
  • locally boost or decrease the saturation within an interval of hue and lightness;
  • considerably good performance;

Usage

Change the parameters in arguments.py to tweak the colors. The presets are all given by RGB and HSV/L values, since these are very simple to colorpick and understand. The HSV/L (range: hue from 0° to 360°, saturation and value/lightness from 0% to 100%) numbers are all converted to cylindrical CIEluv. Run

python makeLUT.py

to generate a new LUT file in .cube format. This will ignore any white-balance presets in arguments.py. Ideally, you should apply the LUTs generated by this script on footage that's already white-balanced. To test on an image, run

python makeLUT.py --test=/path/to/image.png

on your terminal.

Apply the 3DLUT to video:

If you use any video editor, you should be able to import the 3DLUT file with ease. Here I included the vapoursynth script cc.py to accomplish this. To avoid artefacting due to possible extreme transformations the 3DLUT might do, a fast denoiser is applied to separate any noise or film grain from the footage. The noise is added back to the video after the color correction, and finally a deband filter is applied. To preview the cc.py script, run on your terminal:

./vspipepreview.sh /path/to/video.avi

You can edit vspipepreview.sh to pipe the script to a raw y4m file or to ffmpeg to get a proper encode.

Examples:

( untouched | white-balance + 3DLUT exported by the script )

muhcolors's People

Contributors

dombito avatar

Stargazers

 avatar  avatar

Watchers

 avatar  avatar

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.