New Kuwahara edge preserving noise filter IM 6.8.9.9

Announcements pertaining to ImageMagick, or ImageMagick related software. This list is moderated. No discussions here, instead post to the users group instead.
Post Reply
User avatar
fmw42
Posts: 25562
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

New Kuwahara edge preserving noise filter IM 6.8.9.9

Post by fmw42 »

IM 6.8.9.9 now has a new edge preserving noise filter, the Kuwahara filter.

See http://en.wikipedia.org/wiki/Kuwahara_filter for reference to the original method.


The Imagemagick syntax is as follows:

Code: Select all

convert inputimage -kuwahara Radius resultimage
or

Code: Select all

convert inputimage -kuwahara RadiusxSigma resultimage
The use of Radius x Sigma here is slightly different from the normal use in -blur, -sharpen, etc. In -kuwahara, the radius is the defining factor and the sigma is computed automatically as radius-0.5. (In -blur, etc, sigma is more important and if the radius is set to 0, the radius would be computed from the sigma.)

In the Imagemagick implementation sigma is optional and provides a bit of smoothing control that the original method does not include. In the Imagemagick implementation radius+1 is equivalent to the original method's quadrant width.

Examples:

Input:
Image

Code: Select all

convert peppers_colornoise_gauss2.png -kuwahara 2 peppers_kuw_gauss_2.png
Image

Code: Select all

convert peppers_colornoise_gauss2.png -kuwahara 3 peppers_kuw_gauss_3.png
Image

Code: Select all

convert peppers_colornoise_gauss2.png -kuwahara 4 peppers_kuw_gauss_4.png
Image

Code: Select all

convert peppers_colornoise_gauss2.png -kuwahara 5 peppers_kuw_gauss_5.png
Image

Code: Select all

convert peppers_colornoise_gauss2.png -kuwahara 7 peppers_kuw_gauss_7.png
Image

Code: Select all

convert peppers_colornoise_gauss2.png -kuwahara 9 peppers_kuw_gauss_9.png
Image
User avatar
anthony
Posts: 8883
Joined: 2004-05-31T19:27:03-07:00
Authentication code: 8675308
Location: Brisbane, Australia

Re: New Kuwahara edge preserving noise filter IM 6.8.9.9

Post by anthony »

Nice addition.
Anthony Thyssen -- Webmaster for ImageMagick Example Pages
https://imagemagick.org/Usage/
Post Reply