New Kuwahara edge preserving noise filter IM 6.8.9.9
Posted: 2014-11-01T10:44:47-07:00
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:
or
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:
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
Code: Select all
convert inputimage -kuwahara RadiusxSigma resultimage
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:
Code: Select all
convert peppers_colornoise_gauss2.png -kuwahara 2 peppers_kuw_gauss_2.png
Code: Select all
convert peppers_colornoise_gauss2.png -kuwahara 3 peppers_kuw_gauss_3.png
Code: Select all
convert peppers_colornoise_gauss2.png -kuwahara 4 peppers_kuw_gauss_4.png
Code: Select all
convert peppers_colornoise_gauss2.png -kuwahara 5 peppers_kuw_gauss_5.png
Code: Select all
convert peppers_colornoise_gauss2.png -kuwahara 7 peppers_kuw_gauss_7.png
Code: Select all
convert peppers_colornoise_gauss2.png -kuwahara 9 peppers_kuw_gauss_9.png