Many many moons ago in B&W printing we did a little trick with blurring during printing. The paper was exposed partly with a blurring filter, partley without. This gives the effect of dark tones bleeding into the lighter ones. One of many paths I tried and that illustrates the (overdone) result:
magick in.png -negate ( +clone -blur 15x7 ) -compose Lighten -composite -negate out.png
One other path I thought of was a variable blurring radius, or sigma, depending on the density of the current pixel. I have no clue how to acheive that.
To illustrate my line of thought:
magick in.png ( +clone -blur [map density 0-1 to radius 15-0]x7 ) -compose Lighten -composite out.png
TIA,
ingo
(ImageMagick 7.0.8-42 Q16 x64 2019-04-24 win10)
blur variable radius
-
- Posts: 12159
- Joined: 2010-01-23T23:01:33-07:00
- Authentication code: 1151
- Location: England, UK
Re: blur variable radius
The required magick is "-compose Blur". I show examples at Selective blur.ingo wrote:One other path I thought of was a variable blurring radius, or sigma, depending on the density of the current pixel. I have no clue how to acheive that.
See also related topics:
Soft focus: spreading the light
Adaptive blur and sharpen
Adaptive contour blur and sharpen
snibgo's IM pages: im.snibgo.com
-
- Posts: 12159
- Joined: 2010-01-23T23:01:33-07:00
- Authentication code: 1151
- Location: England, UK
Re: blur variable radius
Yes. The blur is greatest where the mask is lightest. If you want the opposite, negate the mask. For example, using the input image as the mask:
Negating the mask:
Code: Select all
magick toes.png -sigmoidal-contrast 5x50% ( +clone ) -compose Blur -set option:compose:args 5x5 -composite compbl.jpg
Negating the mask:
Code: Select all
magick toes.png -sigmoidal-contrast 5x50% ( +clone -negate ) -compose Blur -set option:compose:args 5x5 -composite compbl2.jpg
snibgo's IM pages: im.snibgo.com
Re: blur variable radius
Insightful, thanks,
ingo
ingo