PANDORE Version 6 GREYC-IMAGE

pregionenergy



Measures region energy value.



Synopsis

pregionenergy name [-m mask] [rg_in|-] [im_in|-] [col_out|-]

Description

pregionenergy measures the energy value of the regions inside the region map rg_in. Each region energy value 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.

Energy is measure as follows:

energy = SUM { im_in[p] * im_in[p]} / N

Parameters

Inputs

Outputs

Result

Returns SUCCESS or FAILURE.

Examples

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

   pbinarization 100 1e30 tangram.pan a.pan
   plabeling 8 a.pan b.pan
   pregionenergy energy b.pan tangram.pan c.pan
   pcol2txt c.pan

See also

Region Features Extraction

C++ prototype

Errc PRegionEnergy( const Reg2d &rg_in, const Img2duc &im_in, Collection &cold, const std::string &name );

Version française

Calcul de l'énergie des régions.


Author: Alexandre Duret-Lutz