MAN page from RedHat Other XITE-3.3-3.i386.rpm
REGIONMOMENT
Section: C Library Functions (3)
Updated: 16 Mar 1998
Index
NAME
regionMoment, regionCMoment, regionPMoment - the moment ofone or more regions
SYNTAX
#include <
xite/region.h>
#include <
xite/region.h>
int regionMoment( IBAND band, region* reg,
int p, int q, int loop, double* moment );
int regionCMoment( IBAND band, region* reg,
int p, int q, int loop, double* moment );
int regionPMoment( IBAND band, region* reg,
int p, int q, double xc, double yc,
int loop, double* moment );
DESCRIPTION
If the band argument is nil,
regionMomentcalculatesthe moment of order p+q around origo of one or severalregions.
moment = SUM SUM (x**p * y**q)
(x,y)in reg
regionCMomentcalculates the central moment of order p+qof one or several regions.
moment = SUM SUM ((x-xmean)**p * (y-ymean)**q)
(x,y)in reg
regionPMomentcalculates the moment of order p+q arounda given point (xc, yc) of one or several regions.
moment = SUM SUM ((x-xc)**p (y-yc)**q)
(x,y)in reg
If "loop" is false, the moment of "reg" is measured.If true, the next pointer in reg is followed untilnil, and the moment of the whole region set iscalculated.
If the band argument specifies a band, then the pixelvalues are used to calculate the moments:
moment = SUM SUM (x**p * y**q * band[x,y])
(x,y)in reg
moment = SUM SUM ((x-xmean)**p * (y-ymean)**q
* band[x,y])
(x,y)in reg
moment = SUM SUM ((x-xc)**p (y-yc)**q * band[x,y])
(x,y)in reg
The result is returned through the momentparameter.
RETURN VALUE
0 => ok
1 => bad pixel type in band, accepts only unsigned byte
2 => "reg" points to nil. Area is set to 0.
3 => p or q is negative.
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),
regionXmean(3),
regionYmean(3),
regionMean(3),
regionXmin(3),
regionXmax(3),
regionYmin(3),
regionYmax(3),
regionMinMax(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
EXAMPLE
#include <
xite/biff.h>
#include <
xite/region.h>
region* reg;
double moment;
...
regionMoment(0, reg, 1, 2, FALSE, &moment);
ID
$Id: regionMoment.c,v 1.20 1997/01/29 10:45:13 svein Exp $
Index
- NAME
- SYNTAX
- DESCRIPTION
- RETURN VALUE
- SEE ALSO
- AUTHOR
- EXAMPLE
- ID
This document was created byman2html,using the manual pages.