PANDORE Version 6 GREYC-IMAGE

pregiondensity



Measures region density degree.



Synopsis

pregiondensity name [rg_in|-] [im_in|-] [col_out|-]

Description

pregiondensity measures the density of the regions inside the region map rg_in. Each region density is stored as a float in the array named name inside the collection col_out. The ith item in the array corresponds to the i+1th region because the region 0 is not considered.

Density measures the rationbetween the number of pixels in the region given in image im_in and the surface of region given in rg_in.

density = number of pxiel / surafce area.

Parameters

Inputs

Outputs

Result

Returns SUCCESS or FAILURE.

Examples

Displays density of the regions yielded by a simple binarization of tangram.pan:

   pbinarization 100 1e30 tangram.pan a.pan
   plabeling 8 a.pan b.pan
   pregiondensity density b.pan tangram.pan c.pan
   pcol2txt c.pan

See also

Region Features Extraction

C++ prototype

Errc PRegionDensity( const Reg2d &rg_in, const Img2duc &s; ims, Collection &cold, const std::string &name );

Version française

Calcul de la sphéricité des régions.


Author: Régis Clouard