PANDORE Version 6 |
GREYC-IMAGE |
puniformityquadtree
Performs quadtree (or octree) segmentation based on uniformity degree.
Synopsis
puniformityquadtree threshold [-m mask] [im_in|-] [rg_out|-]
Description
puniformityquadtree segments the input image im_in
into homogeneous regions. Homogeneous regions are regions that have
an inner uniformity degree ≤ threshold.
Output regions are rectangular.
The principle of the algorithm is as follows:
- At the begin consider the image as the first block.
- If the block violates the uniformity predicate (i.e. inner uniformity ≤ threshold)
then split the block into four equally sized sub-blocks and
then apply the algorithm recursively on each sub-blocks.
Therefore, the result is composed of rectangular regions.
The uniformity degree is calculated from:
uniformity(R)= 1 - ( variance(R) / (mean(R)^2) )
For 3D image, the output region map is composed of octree regions.
Parameters
- threshold is the maximum uniformity value
to decide if a region is homogeneous or not.
Values are from the interval [0..1] where:
- 1 corresponds to highly uniform regions.
- 0 corresponds to non uniform regions.
Inputs
- im_in: a grayscale image.
Outputs
Result
Returns the number of regions.
Examples
Builds the quadtree of tangram.pan:
puniformityquadtree 0.9 tangram.pan a.pan
See also
Segmentation
C++ prototype
Errc PUniformityQuadtree( const Img2duc &im_in, Reg2d &rg_out, float threshold );
Version française
Segmentation d'une image par quadtree (ou octree) selon l'uniformité.
Author: Laurent Quesnel