Page 1 of 1

New Kuwahara edge preserving noise filter IM 6.8.9.9

Posted: 2014-11-01T10:44:47-07:00
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

Re: New Kuwahara edge preserving noise filter IM 6.8.9.9

Posted: 2014-11-16T18:25:21-07:00
by anthony
Nice addition.