#include <vision.hpp>
Public Member Functions | |
Vision (int delay=0, bool night=false) | |
Vision (VisionBehaviors &behaviors, int delay=0, bool night=false) | |
~Vision () | |
template<class T> | |
void | addBehavior (T *v) |
Add a VisionBehavior on the fly. | |
IplImage & | workOn (const IplImage &) |
Use the Vision driver on a single Image. | |
void | workAndDisplay (CvCapture &) |
Use an OpenCv CvCapture to get frames, do the computations on them, and then show the results on a window. | |
void | setDelay (int) |
void | setNight (bool) |
Private Member Functions | |
IplImage & | workOn2 (IplImage &) |
void | actOnKeyPressed () |
void | die (std::string) |
void | freeResult () |
Private Attributes | |
IplImage * | result |
int | delay |
int | wait |
char | keyPressed |
VisionBehaviors | behaviors |
bool | night |
Static Private Attributes | |
static std::string | window_name = "window_name" |
It can work with a single image or with a OpenCv capture device (CvCapture): It means it works with a camera. It can show the result of the VisionBehavior instances on a window (it is still using OpenCv).
Vision::Vision | ( | int | delay = 0 , |
|
bool | night = false | |||
) |
Vision::Vision | ( | VisionBehaviors & | behaviors, | |
int | delay = 0 , |
|||
bool | night = false | |||
) |
Vision::~Vision | ( | ) |
void Vision::addBehavior | ( | T * | v | ) | [inline] |
Add a VisionBehavior on the fly.
I would prefer use addBehavior(VisionBehavior<T>*) but it causes problem when I called it. Nevertheless, it won't ever compile if it is not this kind of type.
IplImage & Vision::workOn | ( | const IplImage & | src | ) |
void Vision::workAndDisplay | ( | CvCapture & | camera | ) |
Use an OpenCv CvCapture to get frames, do the computations on them, and then show the results on a window.
void Vision::setDelay | ( | int | delay | ) |
void Vision::setNight | ( | bool | b | ) |
IplImage & Vision::workOn2 | ( | IplImage & | result | ) | [private] |
void Vision::actOnKeyPressed | ( | ) | [private] |
void Vision::die | ( | std::string | str | ) | [private] |
void Vision::freeResult | ( | ) | [private] |
IplImage* Vision::result [private] |
int Vision::delay [private] |
int Vision::wait [private] |
char Vision::keyPressed [private] |
VisionBehaviors Vision::behaviors [private] |
bool Vision::night [private] |
std::string Vision::window_name = "window_name" [static, private] |