Squares Class Reference

VisionBehavior 's implementation of an heavy algorithm which finds squares in an image. More...

#include <squares.hh>

Inheritance diagram for Squares:

VisionBehavior< CvSeq >

List of all members.

Public Member Functions

 Squares ()
virtual ~Squares ()
virtual void writeOn (IplImage &img) const
 This function draws the results of the computations on the picture. It means that 'writeOn()' is called more often than 'compute()'.
virtual void actOnKeyPressed (char &key)
 This function is used to change the 'writeOn' behaviour.
virtual CvSeq & getResult ()
 Returns the results of the computations.

Private Member Functions

double angle (CvPoint *, CvPoint *, CvPoint *)
 helper function: finds a cosine of angle between vectors from pt0->pt1 and from pt0->pt2
virtual void emptyResult ()
virtual void compute (const IplImage &img)
 Fullfill this function which would be called according to the delay of the Vision class.

Private Attributes

CvMemStorage * storage
CvSeq * result
int thresh


Detailed Description

VisionBehavior 's implementation of an heavy algorithm which finds squares in an image.

Constructor & Destructor Documentation

Squares::Squares (  ) 

Squares::~Squares (  )  [virtual]


Member Function Documentation

void Squares::writeOn ( IplImage &  img  )  const [virtual]

This function draws the results of the computations on the picture. It means that 'writeOn()' is called more often than 'compute()'.

Implements VisionBehavior< CvSeq >.

void Squares::actOnKeyPressed ( char &  key  )  [virtual]

This function is used to change the 'writeOn' behaviour.

Reimplemented from VisionBehavior< CvSeq >.

CvSeq & Squares::getResult (  )  [virtual]

Returns the results of the computations.

Implements VisionBehavior< CvSeq >.

double Squares::angle ( CvPoint *  pt1,
CvPoint *  pt2,
CvPoint *  pt0 
) [private]

helper function: finds a cosine of angle between vectors from pt0->pt1 and from pt0->pt2

void Squares::emptyResult (  )  [private, virtual]

Implements VisionBehavior< CvSeq >.

void Squares::compute ( const IplImage &  img  )  [private, virtual]

Fullfill this function which would be called according to the delay of the Vision class.

Implements VisionBehavior< CvSeq >.


Member Data Documentation

CvMemStorage* Squares::storage [private]

CvSeq* Squares::result [private]

int Squares::thresh [private]


The documentation for this class was generated from the following files:
Generated on Mon Dec 31 13:33:37 2007 for Vision by  doxygen 1.5.3