regionMean

[ XITE Reference Manual | XITE home ]

Name

regionMean, regionXmean, regionYmean - calculate xmean or ymean of one or more regions

Syntax

 #include <xite/region.h>

 int regionXmean( IBAND band, region* reg,
    int loop, double* xmean );

 int regionYmean( IBAND band, region* reg,
    int loop, double* ymean );

 int regionMean( IBAND band, region* reg,
    int loop, double* xmean, double* ymean );

Description

Calculates xmean (ymean) of one or several regions. If "loop" is false, xmean (ymean) of "reg" is measured. If true, the next pointer in reg is followed until nil, and xmean (ymean) of the whole region set is calculated. If "band" is nil, the simple mean of the region is calculated. If "band" is a band, the pixel values are used as weights.

Return value

 0 => ok
 1 => bad pixeltype, accepts only unsigned byte
 2 => "reg" points to nil. Area is set to 0.

See also

regionAnalyse(1), regionArea(3), regionConvexHull(3), regionCreate(3), regionDraw(3), regionFree(3), regionHisto(3), regionHistoUpdate(3), regionImoment(3), regionInsertYline(3), regionDeleteYline(3) regionEndInsert(3), regionXmin(3), regionXmax(3), regionYmin(3), regionYmax(3), regionMinMax(3), regionCMoment(3), regionPMoment(3), regionMoment(3), regionPerform(3), regionPerimeter(3), regionIsPoint(3), regionPoint(3), regionSearch(3), regionSort(3), regionCopy(3), regionUnion(3), regionOverlap(3), regionNeighbor(3), regionVolume(3), regionYline(3)

Author

Tor Lønnestad, BLAB, Ifi, UiO

Id

$Id: regionMean.c,v 1.24 1997/01/29 10:45:11 svein Exp $