#include "HxImageRep.h"
Go to the source code of this file.
Functions | |
HxImageRep L_HXIMAGEREP | HxKuwahara (HxImageRep im, int width, int height) |
Performs the Kuwahara Filter. More... |
|
Performs the Kuwahara Filter. This filter is an edge-preserving filter. ( a a ab b b) ( a a ab b b) (ac ac abcd bd bd) ( c c cd d d) ( c c cd d d) In each of the four regions (a, b, c, d), the mean brightness and the variance are calculated. The output value of the center pixel (abcd) in the window is the mean value of that region that has the smallest variance. This filter is an edge-preserving filter, which smoothes the images without disturbing the sharpness and the position of edges.
00012 { 00013 //the window width and height have to be ODD 00014 HxTagList tags; 00015 HxAddTag(tags, "windowW", width); 00016 HxAddTag(tags, "windowH", height); 00017 00018 return im.neighbourhoodOp("kuwahara", tags); 00019 } |