PANDORE Version 6 GREYC-IMAGE

pmeanfiltering



Performs mean filtering on image or graph.



Synopsis

pmeanfiltering halfsize [-m mask] [im_in|-] [im_out|-]

Description

pmeanfiltering applies a mean filter to the input image im_in. Each pixel of the input image is replaced by the mean of its neighbors. The neighborhood size is defined by the parameter halfsize. For example, pmeanfiltering with halfsize=1 corresponds to a 3x3 filter and the central pixel is replaced by the convolution with the follows kernel:

	1/9  1/9  1/9
	1/9  1/9  1/9
	1/9  1/9  1/9

Each neighbor is multiplied by 1/9 and the central pixel is replaced by the sum.

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

For graph, pmeanfiltering is applied on node values.

Parameters

Inputs

Outputs

Result

Returns SUCCESS or FAILURE.

Examples

Applies a 5x5 mean filter to tangram.pan:

   pmeanfiltering 2 tangram.pan out.pan

See also

Filtering

C++ prototype

Errc PMeanFiltering( const Img2duc &im_in, Img2duc &im_out, int halfsize );

Version française

Lissage d'une image par un filtre moyenneur linéaire.


Author: Régis Clouard