PANDORE Version 6 |
GREYC-IMAGE |
puniformitymerging
Performs priority region merging based on uniformity criterion.
Synopsis
puniformitymerging number threshold [-m mask] [rg_in|-] [gr_in|-] [im_in|-] [rg_out|-] [gr_out|-]
Description
puniformitymerging merges connected regions of the input
image rg_in if the difference between
the uniformity
of the region is lower than the specified threshold.
Two regions are connected if there exists a link between
the related nodes in the input graph gr_in.
The principle of the algorithm is as follows:
- For each region of the input region map rg_in,
- If the difference between the criterion value of the two connected regions ≤ threshold
then merge them into one region.
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 graph_out defines the new relationship between regions.
The uniformity criterion is calculated from:
uniformity(R)= 1 - ( variance(R) / (mean(R)^2) )
Parameters
- number specifies the number of allowed merging.
If number = -1 then all possible merging are done.
- threshold specifies the maximum difference
allowed between two regions to decide to merge them.
Values are from [0..1], where 0 corresponds to non uniform regions,
and 1 corresponds to highly uniform regions. A typical value
is 0.95.
Inputs
- rg_in: a region map.
- gr_in: a graph.
- im_in: a grayscale image.
Outputs
- rg_out: a region map.
- gr_out: a graph.
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
puniformitymerging -1 0.99 a.pan b.pan tangram.pan c.pan d.pan
See also
Segmentation
C++ prototype
Errc PUniformityMerging( const Reg2d &rg_in, const 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 d'uniformité.
Author: Laurent Quesnel