PANDORE Version 6 GREYC-IMAGE

pcontrastaggregation



Performs pixel aggregation based on contrast criterion.



Synopsis

pcontrastaggregation connexity threshold [-m mask] [rg_in|-] [im_in|-] [rg_out|-]

Description

pcontrastaggregation builds a new region map from aggregation of pixels to regions of the input region map rg_in. A pixel p is aggregated to a region R if:

The contrast is approximated by:

   contrast(R)=MAX(r)-MIN(R)

The contrast of the region is not updated with the new pixel to avoid moving away too much from the initial situation. One prefer iterative executions of the operator to update the inner contrast. For example, operator can be iterated until pstatus returns 0.

The output region map rg_out has the same number of labels than the input region map.

Parameters

Inputs

Outputs

Result

Returns the number of aggregation or FAILURE.

Examples

Aggregates pixels to tangram pieces:

   pbinarization 96 1e30 tangram.pan a.pan
   plabeling 8 a.pan b.pan
   pcontrastaggregation 8 20 b.pan tangram.pan out.pan

See also

Segmentation

C++ prototype

Errc PContrastAggregation( const Reg2d &rg_in, const Img2duc &im_in, Reg2d &rg_out, int connexity, Uchar threshold );

Version française

Croissance des régions d'une carte selon le contraste intérieur.


Author: Régis Clouard