Replies: 7 comments 7 replies
|
Yes, saw your topic there and was about to suggest the answer probably lies in converting to |
|
vibrance (not including compensation for skin tones) is something like this: {:ok, vibranced} =
Image.with_colorspace(image, :hsv, fn hsv ->
# Apply a tone curve to the saturation band. See the docs for the options
{:ok, mapped} = Image.apply_tone_curve(hsv[1])
# Rejoin the bands to create a new :hsv image
Image.join_bands([hsv[0], mapped, hsv[2]])
end)The defaults for I'm not sure that it's straight forward - or even appropriate - to derive an individual value for driving vibrance but I'm open to suggestions. If you find a combination of parameters to |
|
I've implemented Image.vibrance/3. Would you consider giving that a test run before I release it? Just configure |
|
The next thing I plan to do is look at skin tone masking. Basically it will use Image.chroma_mask/2 - I just need to work out how to best select skin tones. Which are of course a wide range. I'm going to use this research as a guide. |
|
Chroma masking, including skin tone masking, will be separate from vibrance. I'm pretty sure there are other reasons for it. Basically you can apply a mask to any image. Therefore the approach will be, like a lot of image processing, to compose the vibrance image with the mask and the base image. I'm not trying to replace Lightroom or photoshop - just provide composable image processing primatives at one level higher than libvips. |
|
I've changed the default threshold to 60 as you suggest. And the vibrance now is adjusted to be -1.0 to +1.0. Both changes are now on the main branch so |
Uh oh!
There was an error while loading. Please reload this page.
Hi!
I'm looking for this feature but not sure about the path to travel,
I've asked for it in libvips first so it can bubble up here.
In other case here's a interesting link on a method relying on HSV
https://stackoverflow.com/a/71744334/5506671
Best regards
All reactions