2020-11-19, 06:42 AM
Just something I was working on:
https://github.com/TomArrow/ColorMatch3D/releases
Give it an input and output image. Hit the red button, wait, then click the export button.
Benefits over DrDre's colormatch:
- Blazing fast. Depending on image size and your CPU, it can be less than a second
- Should be able to deal with more complex changes in theory due to a completely different algorithm
Downsides over DrDre:
- Doesn't generalize well. It will only match the colors in the image and no others, so applying the LUT to any other image will result in garbage. It might not even generalize well across an entire scene, so its use currently is to match single frames and maybe very similar frames.
Todo for the future:
- Try to integrate some interpolation option to make the 3D LUTS generalize better.
- Create an AVISynth plugin
The algorithm is childishly simple: Create an RGB cube in the size of the output LUT (32x32x32 atm). Take each color in the source image and create a vector to the color in the output image. Average all these vectors and place them in the RGB cube. Export RGB cube as LUT. Profit.
As you can see, the algorithm explains both the downsides and upsides. If I manage to do some interpolation (or maybe extrapolation is a better word), it would probably slow it down quite a bit, but maybe it could be made optional and controlled somehow, aka you could choose how much interpolation is to be done. We'll see.
Important note: Most of the options in the tool don't actually do anything, so don't bother with them. They are stuff I wanted to implement or might implement some day. The only option that really does anything currently is the "Aggregation Variable" being set to Absolute or Vector. Absolute is the old algorithm I had for months but it wasn't precise enough. Instead of averaging vectors, it was averaging absolute values, which gave decent results but in some situations the results were disappointing. The Vector algorithm is default now and solves that issue.
Edit: Since this is open source, feel free to contribute if you want to ofc.
https://github.com/TomArrow/ColorMatch3D/releases
Give it an input and output image. Hit the red button, wait, then click the export button.
Benefits over DrDre's colormatch:
- Blazing fast. Depending on image size and your CPU, it can be less than a second
- Should be able to deal with more complex changes in theory due to a completely different algorithm
Downsides over DrDre:
- Doesn't generalize well. It will only match the colors in the image and no others, so applying the LUT to any other image will result in garbage. It might not even generalize well across an entire scene, so its use currently is to match single frames and maybe very similar frames.
Todo for the future:
- Try to integrate some interpolation option to make the 3D LUTS generalize better.
- Create an AVISynth plugin
The algorithm is childishly simple: Create an RGB cube in the size of the output LUT (32x32x32 atm). Take each color in the source image and create a vector to the color in the output image. Average all these vectors and place them in the RGB cube. Export RGB cube as LUT. Profit.
As you can see, the algorithm explains both the downsides and upsides. If I manage to do some interpolation (or maybe extrapolation is a better word), it would probably slow it down quite a bit, but maybe it could be made optional and controlled somehow, aka you could choose how much interpolation is to be done. We'll see.
Important note: Most of the options in the tool don't actually do anything, so don't bother with them. They are stuff I wanted to implement or might implement some day. The only option that really does anything currently is the "Aggregation Variable" being set to Absolute or Vector. Absolute is the old algorithm I had for months but it wasn't precise enough. Instead of averaging vectors, it was averaging absolute values, which gave decent results but in some situations the results were disappointing. The Vector algorithm is default now and solves that issue.
Edit: Since this is open source, feel free to contribute if you want to ofc.