hahnec / color-matcher

automatic color-grading
https://hahnec.github.io/color-matcher/
GNU General Public License v3.0
454 stars 32 forks source link

[ Feature Request ] CLUT Output #2

Open torridgristle opened 3 years ago

torridgristle commented 3 years ago

The ability to save a CLUT of the color transformation would be useful for applying the transformation to other scenes / videos / games, and for tweaking the transformation with other tools for artistic purposes with color-matcher's output as the starting point.

Look I got the early morning lightheadedness and I wanna gush about this program, this has saved me such a hassle trying to white balance the most fucked up of photos with purple skin, absolutely marvelous. Software intended for auto white-balance just made em all green, but this matched it to a collage of similar faces in better lighting and damn if it isn't just the best outcome I could imagine for the material. I could overhaul an entire dataset and augment the shit out of it if I wanted. This is baller.

hahnec commented 3 years ago

Thanks for the affirmative feedback! The Color Look-Up Table (CLUT) sounds like a valuable feature. Do you have a good source for its specs?

torridgristle commented 3 years ago

No, but I know you can generate a neutral HaldCLUT PNG with ImageMagick using commands like magick hald:12 -depth 16 -colorspace sRGB hald12_16bit.png and that can be used as-is in many programs.

hahnec commented 3 years ago

I am totally convinced that it is useful. I just wonder how the color information is encoded and what the standard looks like. So, I am still looking for an official specsheet. Just let me know if you find some.

torridgristle commented 3 years ago

For the HaldCLUT specifically I don't know the details of the pattern for creating it, but for saving a color transformation to it you just apply the color transformation to it like you're editing any other image. The input RGB values are used as the coordinates on the image with some transformation I'm not sure of.

fosterbuster commented 3 years ago

The format for Adobe's Cube LUT is rather simple, and widely supported (afaik)

https://wwwimages2.adobe.com/content/dam/acom/en/products/speedgrade/cc/pdfs/cube-lut-specification-1.0.pdf

Now i'm not an expert, and what I'm saying might be dumb - But a minor twist might that photographers work in a linear color space, whilst videographers usually work in a logarithmic color space - And I guess that the resulting LUT would look different depending on the color space used - And one or the other might be dissapointed with the result of applying it to their medium.

torridgristle commented 3 years ago

Typically people using LUTs for these things would be aware of working in log or linear or sRGB etc, as long as it says what the conversion is in folks can convert.

ambustion commented 1 year ago

I realize this is a bit old, but another fantastic use of this would be a CDL. American society of cinematographers can be emailed directly for this documentation but it is widely available. There are a few formats but it is XML formatted with three floats for slope, offset, power and saturation. It is the main delivery method for color changes shot to shot on feature films and television. Typically it is applied before a 'show lut' that stays the same for the most part between major looks for a show.