hahnec / color-matcher

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

Is it possible to add a mask to the color matcher module #6

Open Ir1d opened 1 year ago

Ir1d commented 1 year ago

Hi!

Thanks for the great work! I'm wondering if I can add a mask onto the color matcher module to perform a local/regional color transfer.

hahnec commented 1 year ago

Hello,

I can see the idea behind this. Wouldn't it be sufficient to mask with an alpha channel (e.g., using a png image), then let the algorithm do the job and combine masked regions afterwards?

Ir1d commented 1 year ago

Thanks for the prompt reply. I'm running it on some png images with transparent regions, and it sometimes seems the result color overflows and is not very stable. I've implemented a masked version of color-matcher (mkl solver) on my side. If the result is promising, I'll do a pr, but it's still not very good for now.