User Documentation
RAVL, Recognition And Vision Library
DEVELOP HOME PAGE CLASS LIST CONTENTS
Ravl - Math - Geometry - 2D - Moments2d2C
 

  PUBLIC
Moments2d2C::Moments2d2C(void)
Moments2d2C::Moments2d2C(RealT,RealT,RealT,RealT,RealT,RealT)
Moments2d2C::AddPixel(const Index2dC &)
Moments2d2C::AddPixel(const Point2dC &,RealT)
Moments2d2C::operator +=(const Index2dC &)
Moments2d2C::operator +=(const Point2dC &)
Moments2d2C::PrincipalAxis(void) const
Moments2d2C::Elongatedness(const Vector2dC &)
Moments2d2C::Moments2d2(void) const
Moments2d2C::Moments2d2(void)
Moments2d2C::M00(void) const
Moments2d2C::M10(void) const
Moments2d2C::M01(void) const
Moments2d2C::M20(void) const
Moments2d2C::M11(void) const
Moments2d2C::M02(void) const
Moments2d2C::M00(void)
Moments2d2C::M10(void)
Moments2d2C::M01(void)
Moments2d2C::M20(void)
Moments2d2C::M11(void)
Moments2d2C::M02(void)
Moments2d2C::Area(void) const
Moments2d2C::CentroidX(void) const
Moments2d2C::CentroidY(void) const
Moments2d2C::Covariance(void) const
Moments2d2C::Centroid(void)
Moments2d2C::operator +(const Moments2d2C &) const
Moments2d2C::operator -(const Moments2d2C &) const
Moments2d2C::operator +=(const Moments2d2C &)
Moments2d2C::operator -=(const Moments2d2C &)

   Moments2d2C   
 
The first two moments in 2D space
 
include "Ravl/Moments2d2.hh"
Created:6/8/1995 
User Level:Normal
Library:RavlMath
In Scope:RavlN

Variables:
Methods:
Moments2d2C()
Default constructor
Creates the moment object with all moments set to be zero.

Moments2d2C(RealT nm00,RealT nm10,RealT nm01,RealT nm20,RealT nm11,RealT nm02)
Constructor from a set of values.

void AddPixel(const Index2dC & pxl)
Adds a pixel to the object and updates sums.

void AddPixel(const Point2dC & pxl,RealT weight = 1)
Adds a position with a weight to the object and updates sums.

const Moments2d2C & operator +=(const Index2dC & pxl)
Add pixel to set.

const Moments2d2C & operator +=(const Point2dC & point)
Add pixel to set.

Vector2dC PrincipalAxis() const
Calculate the size of the principle axis.
It returns the new values for M02 and M20, the largest is the first element of the vector.

static RealT Elongatedness(const Vector2dC & principalAxis)
Returns the ratio of the difference and the sum of moments m02 and m20.
The value 0 means that objects is a symmetrical object, the value 1 corresponds to a one-dimensional object.

const Moments2d2C & Moments2d2() const
Access moments.

Moments2d2C & Moments2d2()
Access moments.

RealT M00() const
Access 00 component.

RealT M10() const
Access 10 component.

RealT M01() const
Access 01 component.

RealT M20() const
Access 20 component.

RealT M11() const
Access 11 component.

RealT M02() const
Access 02 component.

RealT & M00()
Access 00 component.

RealT & M10()
Access 10 component.

RealT & M01()
Access 01 component.

RealT & M20()
Access 20 component.

RealT & M11()
Access 11 component.

RealT & M02()
Access 02 component.

RealT Area() const
Returns the moment m00, ie the area of the 2 dimensional object.

RealT CentroidX() const
Returns the x co-ordinate of the centroid.
The M00 moment must be different 0.

RealT CentroidY() const
Returns the y co-ordinate of the centroid.
The M00 moment must be different 0.

Matrix2dC Covariance() const
Return the covariance matrix.

Point2dC Centroid()
Calculate the centroid.

Moments2d2C operator +(const Moments2d2C & m) const
Add to sets of moments together.

Moments2d2C operator -(const Moments2d2C & m) const
Subtract one set of moments from another.

const Moments2d2C & operator +=(const Moments2d2C & m)
Add to sets of moments to this one.

const Moments2d2C & operator -=(const Moments2d2C & m)
Subtract a set of moments to this one.


Maintainer:Radek Marik, Created: 6/8/1995, Documentation by CxxDoc: Tue Aug 13 09:59:02 2002