PANDORE Version 6 GREYC-IMAGE

pvariancemerging



Performs priority region merging based on variance criterion.


Synopsis

pvariancemerging number threshold [-m mask] [rg_in|-] [gr_in|-] [im_in|-] [rg_out|-] [gr_out|-]

Description

pvariancemerging merges connected regions of the input image rg_in if the difference between the variance of the region is lower than the specified threshold.

Two regions are connected if there exits a link between the related nodes in the input graph gr_in.

The principle of the algorithm is as follows:

The algorithm uses the priority merging that consists in merging regions with the lower difference.

The output region map reg_out defines the new regions and the output graph gr_out defines the new relationship between regions.

The variance is calculated as follows:

    variance(R)= SUM((im_in[i] - mean(R))^2, i in R) / N

where im_in[i] are pixels of the region R, and N is the number of pixels of the region R.

Parameters

Inputs

Outputs

Result

Returns the number of merging.

Examples

Merges regions yielded by a quadtree splitting process:

   puniformityquadtree 0.9 tangram.pan a.pan
   prg2gr a.pan b.pan
   pvariancemerging -1 45 a.pan b.pan tangram.pan c.pan d.pan

See also

Segmentation

C++ prototype

Errc PVarianceMerging( const Reg2d &rg_in, Graph2d &gr_in, Img2duc &im_in, Reg2d &rg_out, Graph2d &gr_out, long number, float threshold );

Version française

Fusion prioritaire de régions selon le critère de la variance.


Author: Laurent Quesnel