This function implements the Kuwahara filter, a 2D nonlinear filter that reduces noise in an image while at the same time preserving edge content. A code example follows:
RGB = imread('saturn.png');
I = rgb2gray(RGB);
J = imnoise(I,'gaussian',0,0.005);
Y = kuwahara(J,5,true);
Arthur Barnes (2020). Kuwahara filter (https://www.mathworks.com/matlabcentral/fileexchange/8171-kuwahara-filter), MATLAB Central File Exchange. Retrieved .
Good but slow
BUG: Output image is misaligned
Y(i,j) = m(k);
Y(i-PADDING,j-PADDING) = m(k);
Good filter, but very slow.