Answer the question
In order to leave comments, you need to log in
How to replicate the result of a Vibrance/Saturation filter from Photoshop in ImageMagick?
Hello!
The task was to automatically "improve" the images, namely to increase the saturation.
I took photoshop and started experimenting.
Original image
There are 2 filters in Photoshop to increase the saturation of the image:
Hue/Saturation and Vibrance .
Here is the result of the first filter:
( together with the settings )
Here is the second :
( together with the settings )
It can be seen with the naked eye that there is a significant difference (just compare both options in adjacent tabs). In the second case, the colors are richer, softer, less artifacts and "acidity". Azure sky, blue sea, green grass, pale yellow sand... It's like being in paradise!
At higher values in the first variant, the acidity only increases, the colors are distorted, and artifacts fill the entire image plane.
But secondly - even with the value "100" there are practically no artifacts.
Although it would seem - the same name, the same range of values - but still the result is different.
And this Saturation from the Vibrance filter sunk into my soul. Yes, so much so that the usual hs(+40)l is no longer happy at all.
I took ImageMagick and tried to repeat the result.
And no matter how much I fought, no matter how much I googled, nothing like that even came close.
And tried like this :
convert tmp.jpg -colorspace HSL \
-channel B -evaluate multiply 1 \
-channel G -evaluate multiply 1.40 \
+channel -colorspace sRGB result.jpg
convert tmp.jpg -set option:modulate:colorspace hsl -modulate 100,140 result.jpg
convert i.jpg -sigmoidal-contrast 1x10% -alpha off i_contrast.jpg
convert -set option:modulate:colorspace HSB \( i_contrast.jpg -modulate 100,140,100 \) \
\( -clone 0 \( -clone 0 -modulate 100,100,100 \) -compose difference -composite -auto-level -negate \) \
-compose CopyOpacity -composite i_saturation_mask.jpg
composite i_saturation_mask.jpg i_contrast.jpg result.jpg
convert tmp.jpg -color-matrix "1.329212 -0.32496 -0.004252 -0.070788 1.07504 -0.004252 -0.070788 -0.32496 1.395748" result.jpg
Answer the question
In order to leave comments, you need to log in
I advise you to use the site of these guys https://filtruem.ru everyone will tell, everyone will show)
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question