Page 2 of 2

Re: How does -unsharp work?

Posted: 2014-04-27T15:34:36-07:00
by fmw42
Drazick wrote:I think the documentation isn't updated since I clearly see that GIMP is close to Photoshop.

I promise you Photoshop does what I wrote above.

I just don't know why.

That may be true, but you still need to know how to interpret PS radius into IM.

Re: How does -unsharp work?

Posted: 2014-04-27T16:20:32-07:00
by fmw42
Here is a unix IM command line to do what you suggest and comparisons with PS at rad 3(rad=sigma) and 7 (rad=2*sigma+1 as suggested by GIMP). Results are closer but still not a perfect match.

Code: Select all

thresh=9.8
sigma=3
convert lena3.png \
\( -clone 0 -gaussian-blur 0x$sigma \) \
\( -clone 0 -clone 1 +swap -compose minus -composite \) \
\( -clone 1 -negate \) \
\( -clone 0 -clone 3 +swap -compose plus -composite -negate \) \
-delete 1,3 \
\( -clone 1 -clone 2 -compose plus -composite \) \
-delete 1,2 \
\( -clone 1 -threshold $thresh% -negate \) \
-compose plus -composite lena3_im_us_script2_3gx9p8x1.png
Image


PS r=3, amount=100, thresh=25
Image


PS r=7, amount=100, thresh=25
Image

Re: How does -unsharp work?

Posted: 2014-04-28T00:03:17-07:00
by fmw42
Please do not double post to two different forums in the future. It breaks up the discussion.