#include <squares.hh>
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 |
Squares::Squares | ( | ) |
Squares::~Squares | ( | ) | [virtual] |
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] |
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 >.
CvMemStorage* Squares::storage [private] |
CvSeq* Squares::result [private] |
int Squares::thresh [private] |