PANDORE Version 6 | GREYC-IMAGE |
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.
Returns SUCCESS or FAILURE.
Applies a 5x5 mean filter to tangram.pan:
pmeanfiltering 2 tangram.pan out.pan
Lissage d'une image par un filtre moyenneur linéaire.