PANDORE Version 6 GREYC-IMAGE

pnagaofiltering



Performs Nagao filtering on image.



Synopsis

pnagaofiltering [-m mask] [im_in|-] [im_out|-]

Description

pnagaofiltering applies the Nagao filter algorithm on the input image im_in.

The Nagoa filter proceeds by partitioning the neighborhood into distinct domains from which an homogeneous criterion is calculated. The more homogeneous domain is chosen and then central pixel is replaced by the mean value of the domain. Nagao filter uses 9 domains of size 5x5: the basis matrix and its 8 rotations:

   rotation 0:
     |0,1,1,1,0|
     |0,1,1,1,0|
     |0,0,1,0,0|
     |0,0,0,0,0|
     |0,0,0,0,0|

   rotation 1:
     |0,0,0,1,1|
     |0,0,0,1,1|
     |0,0,1,1,1|
     |0,0,0,0,0|
     |0,0,0,0,0| etc.

The image border (of size halfsize) is not considered for processing. The output image border is just a copy of the input image border.

Inputs

Outputs

Result

Returns SUCCESS or FAILURE.

Examples

Applies a Nagao filter to tangram.pan:

   pnagaofiltering tangram.pan out.pan

See also

Filtering

C++ prototype

Errc PNagaoFiltering( const Img2duc &im_in, Img2duc &im_out );

Version française

Lissage par maximum d'homogénéité selon le masque de Nagao.


Author: Régis Clouard