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

  PUBLIC
EdgeC::EdgeC(void)
EdgeC::EdgeC(const BVertexC &,const CrackCodeC &)
EdgeC::EdgeC(const BVertexC &,const BVertexC &)
EdgeC::EdgeC(const Index2dC &,const CrackCodeC &)
EdgeC::operator ==(const EdgeC &) const
EdgeC::operator !=(const EdgeC &) const
EdgeC::RPixel(void) const
EdgeC::LPixel(void) const
EdgeC::Begin(void) const
EdgeC::Begin(void)
EdgeC::End(void) const
EdgeC::Reverse(void)
BVertexC::BVertex(void) const
BVertexC::BVertex(void)
CrackCodeC::Code(void) const
CrackCodeC::operator ==(const CrackCodeC &) const
CrackCodeC::operator !=(const CrackCodeC &) const
CrackCodeC::operator +=(const CrackCodeC &)
CrackCodeC::operator -=(const CrackCodeC &)
CrackCodeC::operator =(const CrackCodeC &)
CrackCodeC::operator =(const CrackCodeT &)
CrackCodeC::TurnClock(void)
CrackCodeC::TurnCClock(void)
CrackCodeC::TurnBack(void)
CrackCodeC::Next(const Index2dC &) const
Index2dC::Index2dC(SizeT)
Index2dC::Set(IndexC,IndexC)
Index2dC::Step(const NeighbourOrderT &)
Index2dC::Swapped(void) const
Index2dC::Abs(void)
Index2dC::Row(void) const
Index2dC::Col(void) const
Index2dC::Row(void)
Index2dC::Col(void)
Index2dC::IsInside(const IndexRange2dC &) const
Index2dC::IsMoreUpperLeft(const Index2dC &) const
Index2dC::operator <(const Index2dC &) const
Index2dC::Right(void)
Index2dC::Left(void)
Index2dC::Up(void)
Index2dC::Down(void)
Index2dC::RightN(void) const
Index2dC::LeftN(void) const
Index2dC::UpN(void) const
Index2dC::DownN(void) const
Index2dC::LowerLeftN(void) const
Index2dC::LowerRightN(void) const
Index2dC::UpperLeftN(void) const
Index2dC::UpperRightN(void) const
Index2dC::Neighbour(NeighbourOrderT) const
Index2dC::IsRelNeighbour8(void) const
Index2dC::IsNeighbour8(const Index2dC &) const
Index2dC::NeighbourOrder(void) const
Index2dC::NeighbourOrder(const Index2dC &) const
Index2dC::SumSqr(void) const
Index2dC::Distance(const Index2dC &,GridMetricT) const
Index2dC::Area2(const Index2dC &,const Index2dC &) const
FIndexC::Hash(void) const
FIndexC::operator *=(IntT)
FIndexC::operator *=(RealT)
FIndexC::operator /=(IntT)
FIndexC::operator /=(RealT)
FIndexC::operator *(IntT) const
FIndexC::operator *(RealT) const
FIndexC::operator /(IntT) const
FIndexC::operator /(RealT) const
TFVectorC::Size(void) const
TFVectorC::Contains(UIntT) const
TFVectorC::operator [](UIntT)
TFVectorC::operator [](UIntT) const
TFVectorC::operator ==(const TFVectorC &) const
TFVectorC::operator !=(const TFVectorC &) const
TFVectorC::Fill(const DataT &)
TFVectorC::Abs(void) const
TFVectorC::operator +=(const TFVectorC &)
TFVectorC::operator -=(const TFVectorC &)
TFVectorC::operator *=(const TFVectorC &)
TFVectorC::operator /=(const TFVectorC &)
TFVectorC::operator +(const TFVectorC &) const
TFVectorC::operator -(const TFVectorC &) const
TFVectorC::operator *(const TFVectorC &) const
TFVectorC::operator /(const TFVectorC &) const
TFVectorC::operator -(void) const
TFVectorC::operator *=(const DataT &)
TFVectorC::operator /=(const DataT &)
TFVectorC::operator *(const DataT &) const
TFVectorC::operator /(const DataT &) const
TFVectorC::Dot(const TFVectorC &) const
TFVectorC::OuterProduct(const TFVectorC &,TFMatrixC &) const
TFVectorC::OuterProduct(TFMatrixC &) const
TFVectorC::Limit(const DataT &,const DataT &)
TFVectorC::MaxValueDistance(const TFVectorC &) const
TFVectorC::CityBlockDistance(const TFVectorC &) const
TFVectorC::SqrEuclidDistance(const TFVectorC &) const
TFVectorC::Sum(void) const
TFVectorC::SumSqr(void) const
TFVectorC::T(void) const
TFVectorC::operator >>(istream &,TFVectorC &)
TFVectorC::operator <<(ostream &,const TFVectorC &)
TFVectorC::operator >>(BinIStreamC &,TFVectorC &)
TFVectorC::operator <<(BinOStreamC &,const TFVectorC &)

   EdgeC   
 
Elementary boundary edge
 
include "Ravl/Edge.hh"
Created:26.10.1995 
User Level:Normal
Library:RavlMath
In Scope:RavlN

Comments:
The class EdgeC represent an elementary edge of discrete image. Elementary edge is located between two pixels. Edge is represented by its origin and its direction. This definition implies only 4 possible directions represented by Freeman code. Four elementary edges around a pixel are oriented counter-clockwise according to the center of the pixel. For example, the top edge has the direction to the left and its origin is upper-right corner of the pixel.

Parent Classes: Methods:

Constructors, copies, assigment, and destructor.

EdgeC()
Creates an edge
The value is undefined.

EdgeC(const BVertexC & px,const CrackCodeC & cc)
Create the edge with origin in the boundary vertex 'px' and with direction 'cc'.

EdgeC(const BVertexC & begin,const BVertexC & end)
Create the edge with origin in the boundary vertex 'begin' pointing towards the boudary vertex 'end'. The direction is automatically generated.

EdgeC(const Index2dC & pxl,const CrackCodeC & cc)
Creates the edge which starts at one corner of the pixel 'pxl' and has the direction 'cc'. The corner of the pixel is chosen in such way that the elementary edge is an elementary edge of the pixel.

Logical operators.

bool operator ==(const EdgeC & edg) const
Returns true if both edge are equivalent.

bool operator !=(const EdgeC & edg) const
Returns true if edges are different.

Access to elements of an elementary edge.

Index2dC RPixel() const
Returns the pixel on the right side of the edge.

Index2dC LPixel() const
Returns the pixel on the left side of the edge.

const BVertexC & Begin() const
Returns the boundary vertex from which the elementary edge starts from.

BVertexC & Begin()
Returns the boundary vertex from which the elementary edge starts from.

BVertexC End() const
Returns the boundary vertex to which the elementary edge points to.

const EdgeC & Reverse()
Reverse the direction of this edge.

#include "Ravl/BVertex.hh"
const BVertexC & BVertex() const
Access to the constant object

BVertexC & BVertex()
Access to the object

#include "Ravl/CrackCode.hh"
CrackCodeT Code() const
Returns the crack code.

bool operator ==(const CrackCodeC & cc) const
Equality test

bool operator !=(const CrackCodeC & cc) const
Returns true if the object content is not equal to 'cc'.

const CrackCodeC & operator +=(const CrackCodeC & cc)
The crackcode 'cc' is taken as a relative crackcode. The relative crackcode is added to this crackcode.

const CrackCodeC & operator -=(const CrackCodeC & cc)
The crackcode 'cc' is taken as a relative crackcode. The relative crackcode is subtracted from this crackcode.

const CrackCodeC & operator =(const CrackCodeC & cc)
Assignment.

const CrackCodeC & operator =(const CrackCodeT & cc)
Assignment.
---------- turning -----------------------

CrackCodeC & TurnClock()
Turns the crackcode clockwise.
This is an inplace operation.

CrackCodeC & TurnCClock()
Turns the crackcode counterclockwise.
This is an inplace operation.

CrackCodeC & TurnBack()
Turns the crackcode backward.
This is an inplace operation.

Index2dC Next(const Index2dC & pixel) const
Get pixel in the direction of the crack code.

#include "Ravl/Index2d.hh"
explicit Index2dC(SizeT dim)
Creates an index
This is for compatibilty with N-D indexes, which need to be told there dimentionality.

Object modification

void Set(IndexC r,IndexC c)
Sets this index to be .

const Index2dC & Step(const NeighbourOrderT & dir)
Translates index in direction 'dir'.

Index2dC Swapped() const
Returns the 2-dimensional index with swapped value I() and J().

Index2dC & Abs()
Changes both indexes to their absolute values.

Access to the member items

const IndexC & Row() const
Constant access to the row index

const IndexC & Col() const
Constant access to the column index

IndexC & Row()
Access to the row index

IndexC & Col()
Access to the column index

Logical conditions

bool IsInside(const IndexRange2dC & range) const
Returns true, if this index is in the 'range'.

bool IsMoreUpperLeft(const Index2dC & i) const
Returns true, if Row() < i.Row() or (Row() == i.Row() and Col() < i.Col()).

bool operator <(const Index2dC & i) const
A nick name for the member function IsMoreUpperLeft(i).

Operations on the neighbourhood

Index2dC & Right()
Shifts the index to the right.

Index2dC & Left()
Shifts the index to the left.

Index2dC & Up()
Shifts the index to the up.

Index2dC & Down()
Shifts the index to the down.

Index2dC RightN() const
Returns the index of the right neighbour.

Index2dC LeftN() const
Returns the index of the left neighbour.

Index2dC UpN() const
Returns the index of the upper neighbour.

Index2dC DownN() const
Returns the index of the down neighbour.

Index2dC LowerLeftN() const
Returns the coordinates of the downleft neighbouring pixel

Index2dC LowerRightN() const
Returns the coordinates of the downright neighbouring pixel

Index2dC UpperLeftN() const
Returns the coordinates of the upperleft neighbouring pixel

Index2dC UpperRightN() const
Returns the coordinates of the upperright neighbouring pixel

Index2dC Neighbour(NeighbourOrderT dir) const
Returns the index of the neighbour in the direction 'dir'.

bool IsRelNeighbour8() const
Is '*this' a relative index from 8-neighbourhood?

bool IsNeighbour8(const Index2dC & pxl) const
Is the 'pxl' a neighbouring index of '*this'?

IndexC NeighbourOrder() const
Returns the order of the relative index.

IndexC NeighbourOrder(const Index2dC & ind) const
Returns the order of the neighbouring index 'ind'.

Distance calculations

UIntT SumSqr() const
Returns the sum of coordinate squares.

UIntT Distance(const Index2dC & i,GridMetricT m) const
Returns the distance of two indexes in the specified metric 'm'.

Special member functions

IntT Area2(const Index2dC & second,const Index2dC & third) const
Returns twice the signed area of the triangle determined by this, the second, and the third points. Positive if 'this', 'second', 'third' are oriented counter-clockwise, and negative if clockwise.

Ref.: - O'Rourke,J.: Computatinal geometry in C; Cambridge University Press, 1994, pp. 19-20


#include "Ravl/FIndex.hh"
UIntT Hash(void) const
Generates a randomised hash value for this index.

Arithmetic operations

const FIndexC<2> & operator *=(IntT alpha)
Multiplies this index by number 'alpha'.

const FIndexC<2> & operator *=(RealT alpha)
Multiplies this index by real number 'alpha'.

const FIndexC<2> & operator /=(IntT alpha)
Divides this index by number 'alpha'.

const FIndexC<2> & operator /=(RealT alpha)
Divides this index by real number 'alpha'.

FIndexC<2> operator *(IntT alpha) const
Multiplies this index by number 'alpha'.

FIndexC<2> operator *(RealT alpha) const
Multiplies this index by real number 'alpha'.

FIndexC<2> operator /(IntT alpha) const
Divides this index by number 'alpha'.

FIndexC<2> operator /(RealT alpha) const
Divides this index by real number 'alpha'.

#include "Ravl/TFVector.hh"
UIntT Size() const
Get size of array
Used by some templates.

bool Contains(UIntT i) const
Test if array contains index i·

IndexC & operator [](UIntT ind)
Access item.

const IndexC & operator [](UIntT ind) const
Access item.

bool operator ==(const TFVectorC<IndexC,2> & ind) const
is equal

bool operator !=(const TFVectorC<IndexC,2> & ind) const
is not equal

void Fill(const IndexC & dat)
Fill array with value 'dat'.

TFVectorC<IndexC,2> Abs() const
Get an vector with Abs(x) run on all it values.

const TFVectorC<IndexC,2> & operator +=(const TFVectorC<IndexC,2> & ind)
Add an array to this one, inplace.

const TFVectorC<IndexC,2> & operator -=(const TFVectorC<IndexC,2> & ind)
Returns this index multiplied by index 'ind' item by item.

const TFVectorC<IndexC,2> & operator *=(const TFVectorC<IndexC,2> & ind)
Multiplies this index by index 'ind' item by item.

const TFVectorC<IndexC,2> & operator /=(const TFVectorC<IndexC,2> & ind)
Divides this index by index 'ind' item by item.

TFVectorC<IndexC,2> operator +(const TFVectorC<IndexC,2> & ind) const
Adds this index and 'ind'.

TFVectorC<IndexC,2> operator -(const TFVectorC<IndexC,2> & ind) const
Subtracts index 'ind' from this index.

TFVectorC<IndexC,2> operator *(const TFVectorC<IndexC,2> & ind) const
Returns this object multiplied by index 'ind' item by item.

TFVectorC<IndexC,2> operator /(const TFVectorC<IndexC,2> & ind) const
Returns this object devided by index 'ind' item by item.

TFVectorC<IndexC,2> operator -() const
Returns opposite elements (unary minus operator).

const TFVectorC<IndexC,2> & operator *=(const IndexC & alpha)
Multiplies this index by number 'alpha'.

const TFVectorC<IndexC,2> & operator /=(const IndexC & alpha)
Divides this index by number 'alpha'.

TFVectorC<IndexC,2> operator *(const IndexC & alpha) const
Returns this object mutliplied by alpha.

TFVectorC<IndexC,2> operator /(const IndexC & alpha) const
Returns this object devided by alpha.

IndexC Dot(const TFVectorC<IndexC,2> & oth) const
Calculate the dot product of this and 'oth' vector.

TFMatrixC<IndexC,2,2> & OuterProduct(const TFVectorC<IndexC,2> & av,TFMatrixC<IndexC,2,2> & result) const
Calculate the outer product of this vector with av.
The output is assigned to 'result'. A reference to 'result' is returned.

The implementation is in "Ravl/FMatrix.hh", it must be included to use this function.


TFMatrixC<IndexC,2,2> & OuterProduct(TFMatrixC<IndexC,2,2> & result) const
Calculate the outer product of this vector with itsself.
The output is assigned to 'result'. A reference to 'result' is returned.

The implementation is in "Ravl/FMatrix.hh", it must be included to use this function.


bool Limit(const IndexC & min,const IndexC & max)
Limit all values in this vector to between min and max.
Returns true if all values in the vector are between the limits. Distance calculations ---------------------

IndexC MaxValueDistance(const TFVectorC<IndexC,2> & i) const
Returns the distance of two indexes in maximum value metric.

IndexC CityBlockDistance(const TFVectorC<IndexC,2> & i) const
Returns the distance of two indexes in absolute value metric.

IndexC SqrEuclidDistance(const TFVectorC<IndexC,2> & i) const
Returns the distance of two indexes in square Euclid metric.

IndexC Sum() const
Calculate the sum of all the vector elements.

IndexC SumSqr() const
Calculate the sum of the squares of all the vector elements.

const TFMatrixC<IndexC,1,2> & T() const
Transpose vector.
The implementation for this can be found in "Ravl/TFMatrix.hh"

istream & operator >>(istream & in,TFVectorC<IndexC,2> & dat)

ostream & operator <<(ostream & in,const TFVectorC<IndexC,2> & dat)

BinIStreamC & operator >>(BinIStreamC & in,TFVectorC<IndexC,2> & dat)

BinOStreamC & operator <<(BinOStreamC & in,const TFVectorC<IndexC,2> & dat)


Maintainer:Radek Marik, Created: 26.10.1995, Documentation by CxxDoc: Tue Aug 13 09:59:02 2002