PANDORE Version 6 GREYC-IMAGE

pgeodesicerosion



Performs geodesic erosion.



Synopsis

pgeodesicerosion num_se halfsize iteration [-m mask] [im_in|-] [im_msq|-] [im_out|-]

Description

pgeodesicerosion performs the erosion of the pixels of the image im_in as long as those pixels belong to a null area specified in the image im_msq. im_msq is an image of bytes or a region map used as a binary mask. All the non null pixels correspond to a true value for the mask. The structuring element is specified by its type num_se and its size halfsize.

Geodesic erosion of point p corresponds to the operation:

   if im_msq (p)=0
      erosion(p) = MIN(neighbors of p specified by the structuring element)
   else
      erosion(p) = im_in(p).

Whereas, conditional erosion is defined as :

   pinverse msq.pan i1.pan
   por in.pan i1.pan i2.pan
   perosion hs i2.pan i3.pan
   pmask i3.pan msq.pan out.pan 

For the color images, the lexicographic order is used: initially by using band X, in the event of equality by using the band Y then band Z.

Parameters

Inputs

Outputs

Result

Returns SUCCESS or FAILURE.

Examples

See also

Morphology, pgeodesicdilation

C++ prototype

Errc PGeodesicErosion( const Img2duc &im_in, const Img2duc &im_msq, Img2duc &im_out, int num_se, int halfsize, int iteration );

Author: Régis Clouard