Horus Doc || C++ Reference || Class Overview   Pixels   Images   Detector   Geometry   Registry || Doxygen's quick Index  

HxKuwahara.h File Reference

More...

#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...


Detailed Description


Function Documentation

HxImageRep L_HXIMAGEREP HxKuwahara HxImageRep    im,
int    width,
int    height
 

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 }


Generated on Tue Feb 3 14:18:49 2004 for C++Reference by doxygen1.2.12 written by Dimitri van Heesch, © 1997-2001