#include <OmniAlgoSimpleDetection.hh>
Inheritance diagram for OmniAlgoSimpleDetection< ConverterT, AngleT, ImageT, PointT >:


| ConverterT | Conversion concrete class. For example OmniFastLookupTable or OmniGCardConverter | |
| AngleT | Base unit used for angle. It can be for example "int" or "double". | |
| ImageT | Usually IplImage, the OpenCV standard. | |
| PointT | Usually CvPoint, the OpenCV standard. |
Definition at line 47 of file OmniAlgoSimpleDetection.hh.
Public Member Functions | |
| OmniAlgoSimpleDetection (OmniConversion< ConverterT, AngleT, ImageT, PointT > *conversion_klass, IplImage *first_frame, const char **cascade_file_array, int cascade_length, int freeze_frame_bound, double track_window_hitrate) | |
| Constructor. | |
| virtual | ~OmniAlgoSimpleDetection () |
| void | loop_next_frame (IplImage *frame) |
| Main loop for this class. | |
| void | loop_stop () |
| Stop the looping. | |
| void | register_image_callbacks (on_create_image_context_cb *create_image_context, on_image_do_action_cb *image_show, on_destroy_image_context_cb *destroy_image_context, void *callback_data) |
| The default display system is give to OpenCV capabilities. | |
| void | register_all_image_callbacks (on_create_image_context_cb *create_image_context, on_image_do_action_cb *image_show, on_destroy_image_context_cb *destroy_image_context, void *callback_data) |
| The default display system is give to OpenCV capabilities. | |
Static Public Member Functions | |
| static void | on_window_trackable_wannabe (IplImage *omni_frame, int theta_start, int theta_end, int win_length, void *callback_data) |
| This function will check for window availability, then will manage the face detecting and the tracking. | |
Private Attributes | |
| on_create_image_context_cb * | create_image_context |
| Image display callback. | |
| on_image_do_action_cb * | image_show |
| Image display callback. | |
| on_destroy_image_context_cb * | destroy_image_context |
| Image display callback. | |
| void * | _callback_data_image_cb |
| HaarFaceDetecting * | _face_det |
| OmniTracking< ConverterT, AngleT, ImageT, PointT > * | _tracking |
| OmniConversion< ConverterT, AngleT, ImageT, PointT > * | _conv_table |
| OmniMotionDetecting< ConverterT, AngleT > * | _motion_det |
| bool | _is_running |
| Describes if the looping is active or not. | |
| OmniAlgoSimpleDetection< ConverterT, AngleT, ImageT, PointT >::OmniAlgoSimpleDetection | ( | OmniConversion< ConverterT, AngleT, ImageT, PointT > * | conversion_klass, | |
| IplImage * | first_frame, | |||
| const char ** | cascade_file_array, | |||
| int | cascade_length, | |||
| int | freeze_frame_bound, | |||
| double | track_window_hitrate | |||
| ) |
| conversion_klass | Conversion class. | |
| first_frame | First frame used to initialize some internal stuff like width e height. | |
| cascade_file_array | Array of chars* where you should put absolute paths to cascade files. These are mainly used with the HaarFaceDetecting algorithm. | |
| cascade_length | Lenght of the cascade array. | |
| freeze_frame_bound | Number of frames to freeze before removing the window. | |
| track_window_hitrate | Percentage of free hits a window must have against a tracking table to be able to be tracked. |
Definition at line 163 of file OmniAlgoSimpleDetection.hh.
References OmniAlgoSimpleDetection< ConverterT, AngleT, ImageT, PointT >::_callback_data_image_cb, OmniAlgoSimpleDetection< ConverterT, AngleT, ImageT, PointT >::_conv_table, OmniAlgoSimpleDetection< ConverterT, AngleT, ImageT, PointT >::_face_det, OmniAlgoSimpleDetection< ConverterT, AngleT, ImageT, PointT >::_is_running, OmniAlgoSimpleDetection< ConverterT, AngleT, ImageT, PointT >::_motion_det, OmniAlgoSimpleDetection< ConverterT, AngleT, ImageT, PointT >::_tracking, NULL, omnistuff_create_image_context(), omnistuff_destroy_image_context(), omnistuff_image_do_action(), OmniAlgoSimpleDetection< ConverterT, AngleT, ImageT, PointT >::on_window_trackable_wannabe(), and OmniAlgoSimpleDetection< ConverterT, AngleT, ImageT, PointT >::register_image_callbacks().
Here is the call graph for this function:

| OmniAlgoSimpleDetection< ConverterT, AngleT, ImageT, PointT >::~OmniAlgoSimpleDetection | ( | ) | [virtual] |
Definition at line 202 of file OmniAlgoSimpleDetection.hh.
References OmniAlgoSimpleDetection< ConverterT, AngleT, ImageT, PointT >::_conv_table, OmniAlgoSimpleDetection< ConverterT, AngleT, ImageT, PointT >::_face_det, OmniAlgoSimpleDetection< ConverterT, AngleT, ImageT, PointT >::_motion_det, and OmniAlgoSimpleDetection< ConverterT, AngleT, ImageT, PointT >::_tracking.
| void OmniAlgoSimpleDetection< ConverterT, AngleT, ImageT, PointT >::loop_next_frame | ( | IplImage * | frame | ) |
Subsequent frames to the first should be passed here. It will manage the HaarFaceDetecting class, and the OmniTracking, OmniMotionDetecting and so on.
| frame | The next frame in the stream. |
Definition at line 272 of file OmniAlgoSimpleDetection.hh.
References OmniAlgoSimpleDetection< ConverterT, AngleT, ImageT, PointT >::_callback_data_image_cb, OmniAlgoSimpleDetection< ConverterT, AngleT, ImageT, PointT >::_is_running, OmniAlgoSimpleDetection< ConverterT, AngleT, ImageT, PointT >::_motion_det, OmniAlgoSimpleDetection< ConverterT, AngleT, ImageT, PointT >::_tracking, OmniAlgoSimpleDetection< ConverterT, AngleT, ImageT, PointT >::create_image_context, and OmniAlgoSimpleDetection< ConverterT, AngleT, ImageT, PointT >::image_show.
Referenced by ReceiverCtrlThread::doOmniStuffParsing(), and StreamerCtrlThread::onParsableImage().
Here is the caller graph for this function:

| void OmniAlgoSimpleDetection< ConverterT, AngleT, ImageT, PointT >::loop_stop | ( | ) |
Definition at line 299 of file OmniAlgoSimpleDetection.hh.
References OmniAlgoSimpleDetection< ConverterT, AngleT, ImageT, PointT >::_callback_data_image_cb, OmniAlgoSimpleDetection< ConverterT, AngleT, ImageT, PointT >::_is_running, and OmniAlgoSimpleDetection< ConverterT, AngleT, ImageT, PointT >::destroy_image_context.
Referenced by MainFrame::OnReceiverCtrlThreadEnd().
Here is the caller graph for this function:

| void OmniAlgoSimpleDetection< ConverterT, AngleT, ImageT, PointT >::on_window_trackable_wannabe | ( | IplImage * | omni_frame, | |
| int | theta_start, | |||
| int | theta_end, | |||
| int | win_length, | |||
| void * | callback_data | |||
| ) | [static] |
It's the core of all the algorithm. It's quite "simple" in its writing but also very useful coz let you understand how all this stuff works. It's a static func. Will be called by the motion detector class OmniMotionDetecting.
| omni_frame | Omnidirectional frame on which you wanna perform the descripted tasks | |
| theta_start | The start angle of a range in which some motion has occurred. | |
| theta_end | The end angle of a range in which some motion has occurred. | |
| win_length | Lenght of the angle, it's size or it's range. Call it as you want... | |
| callback_data | Usually the "this" pointer, so that private members can be accessed too. |
Definition at line 215 of file OmniAlgoSimpleDetection.hh.
References OmniAlgoSimpleDetection< ConverterT, AngleT, ImageT, PointT >::_callback_data_image_cb, OmniAlgoSimpleDetection< ConverterT, AngleT, ImageT, PointT >::_conv_table, OmniAlgoSimpleDetection< ConverterT, AngleT, ImageT, PointT >::_face_det, OmniAlgoSimpleDetection< ConverterT, AngleT, ImageT, PointT >::_tracking, OmniAngle< TypeT >::angle_end, OmniAngle< TypeT >::angle_start, OmniAlgoSimpleDetection< ConverterT, AngleT, ImageT, PointT >::create_image_context, HaarFaceDetecting::face_detected(), OmniAlgoSimpleDetection< ConverterT, AngleT, ImageT, PointT >::image_show, and OmniAngle< TypeT >::range.
Referenced by OmniAlgoSimpleDetection< ConverterT, AngleT, ImageT, PointT >::OmniAlgoSimpleDetection().
Here is the call graph for this function:

Here is the caller graph for this function:

| void OmniAlgoSimpleDetection< ConverterT, AngleT, ImageT, PointT >::register_all_image_callbacks | ( | on_create_image_context_cb * | create_image_context, | |
| on_image_do_action_cb * | image_show, | |||
| on_destroy_image_context_cb * | destroy_image_context, | |||
| void * | callback_data | |||
| ) |
Unfortunately this is not really performant and bug free on a multiplatform fashion. This is because we can set the display callbacks to act like we want with other libraries. With this function you will call the "register_image_callbacks" of the classes that support this and are included in this class.
| create_image_context | Create window [with a title] where to display the images. | |
| image_show | Perform the call to the show function. | |
| destroy_image_context | Destroy the display window and it's context. | |
| callback_data | Callback data to image_show function. |
Definition at line 340 of file OmniAlgoSimpleDetection.hh.
References OmniAlgoSimpleDetection< ConverterT, AngleT, ImageT, PointT >::_motion_det, and OmniAlgoSimpleDetection< ConverterT, AngleT, ImageT, PointT >::_tracking.
Referenced by StreamerCtrlThread::initializeOmniStuff(), and ReceiverCtrlThread::initializeOmniStuff().
Here is the caller graph for this function:

| void OmniAlgoSimpleDetection< ConverterT, AngleT, ImageT, PointT >::register_image_callbacks | ( | on_create_image_context_cb * | create_image_context, | |
| on_image_do_action_cb * | image_show, | |||
| on_destroy_image_context_cb * | destroy_image_context, | |||
| void * | callback_data | |||
| ) |
Unfortunately this is not really performant and bug free on a multiplatform fashion. This is because we can set the display callbacks to act like we want with other libraries.
| create_image_context | Create window [with a title] where to display the images. | |
| image_show | Perform the call to the show function. | |
| callback_data_on_image_do_action | Callback data to image_show function. | |
| destroy_image_context | Destroy the display window and it's context. |
Definition at line 323 of file OmniAlgoSimpleDetection.hh.
References OmniAlgoSimpleDetection< ConverterT, AngleT, ImageT, PointT >::_callback_data_image_cb.
Referenced by OmniAlgoSimpleDetection< ConverterT, AngleT, ImageT, PointT >::OmniAlgoSimpleDetection().
Here is the caller graph for this function:

void* OmniAlgoSimpleDetection< ConverterT, AngleT, ImageT, PointT >::_callback_data_image_cb [private] |
Definition at line 144 of file OmniAlgoSimpleDetection.hh.
Referenced by OmniAlgoSimpleDetection< ConverterT, AngleT, ImageT, PointT >::loop_next_frame(), OmniAlgoSimpleDetection< ConverterT, AngleT, ImageT, PointT >::loop_stop(), OmniAlgoSimpleDetection< ConverterT, AngleT, ImageT, PointT >::OmniAlgoSimpleDetection(), OmniAlgoSimpleDetection< ConverterT, AngleT, ImageT, PointT >::on_window_trackable_wannabe(), and OmniAlgoSimpleDetection< ConverterT, AngleT, ImageT, PointT >::register_image_callbacks().
OmniConversion<ConverterT, AngleT, ImageT, PointT>* OmniAlgoSimpleDetection< ConverterT, AngleT, ImageT, PointT >::_conv_table [private] |
Definition at line 147 of file OmniAlgoSimpleDetection.hh.
Referenced by OmniAlgoSimpleDetection< ConverterT, AngleT, ImageT, PointT >::OmniAlgoSimpleDetection(), OmniAlgoSimpleDetection< ConverterT, AngleT, ImageT, PointT >::on_window_trackable_wannabe(), and OmniAlgoSimpleDetection< ConverterT, AngleT, ImageT, PointT >::~OmniAlgoSimpleDetection().
HaarFaceDetecting* OmniAlgoSimpleDetection< ConverterT, AngleT, ImageT, PointT >::_face_det [private] |
Definition at line 145 of file OmniAlgoSimpleDetection.hh.
Referenced by OmniAlgoSimpleDetection< ConverterT, AngleT, ImageT, PointT >::OmniAlgoSimpleDetection(), OmniAlgoSimpleDetection< ConverterT, AngleT, ImageT, PointT >::on_window_trackable_wannabe(), and OmniAlgoSimpleDetection< ConverterT, AngleT, ImageT, PointT >::~OmniAlgoSimpleDetection().
bool OmniAlgoSimpleDetection< ConverterT, AngleT, ImageT, PointT >::_is_running [private] |
Definition at line 151 of file OmniAlgoSimpleDetection.hh.
Referenced by OmniAlgoSimpleDetection< ConverterT, AngleT, ImageT, PointT >::loop_next_frame(), OmniAlgoSimpleDetection< ConverterT, AngleT, ImageT, PointT >::loop_stop(), and OmniAlgoSimpleDetection< ConverterT, AngleT, ImageT, PointT >::OmniAlgoSimpleDetection().
OmniMotionDetecting<ConverterT, AngleT>* OmniAlgoSimpleDetection< ConverterT, AngleT, ImageT, PointT >::_motion_det [private] |
Definition at line 148 of file OmniAlgoSimpleDetection.hh.
Referenced by OmniAlgoSimpleDetection< ConverterT, AngleT, ImageT, PointT >::loop_next_frame(), OmniAlgoSimpleDetection< ConverterT, AngleT, ImageT, PointT >::OmniAlgoSimpleDetection(), OmniAlgoSimpleDetection< ConverterT, AngleT, ImageT, PointT >::register_all_image_callbacks(), and OmniAlgoSimpleDetection< ConverterT, AngleT, ImageT, PointT >::~OmniAlgoSimpleDetection().
OmniTracking<ConverterT, AngleT, ImageT, PointT>* OmniAlgoSimpleDetection< ConverterT, AngleT, ImageT, PointT >::_tracking [private] |
Definition at line 146 of file OmniAlgoSimpleDetection.hh.
Referenced by OmniAlgoSimpleDetection< ConverterT, AngleT, ImageT, PointT >::loop_next_frame(), OmniAlgoSimpleDetection< ConverterT, AngleT, ImageT, PointT >::OmniAlgoSimpleDetection(), OmniAlgoSimpleDetection< ConverterT, AngleT, ImageT, PointT >::on_window_trackable_wannabe(), OmniAlgoSimpleDetection< ConverterT, AngleT, ImageT, PointT >::register_all_image_callbacks(), and OmniAlgoSimpleDetection< ConverterT, AngleT, ImageT, PointT >::~OmniAlgoSimpleDetection().
on_create_image_context_cb* OmniAlgoSimpleDetection< ConverterT, AngleT, ImageT, PointT >::create_image_context [private] |
Definition at line 130 of file OmniAlgoSimpleDetection.hh.
Referenced by OmniAlgoSimpleDetection< ConverterT, AngleT, ImageT, PointT >::loop_next_frame(), and OmniAlgoSimpleDetection< ConverterT, AngleT, ImageT, PointT >::on_window_trackable_wannabe().
on_destroy_image_context_cb* OmniAlgoSimpleDetection< ConverterT, AngleT, ImageT, PointT >::destroy_image_context [private] |
Definition at line 136 of file OmniAlgoSimpleDetection.hh.
Referenced by OmniAlgoSimpleDetection< ConverterT, AngleT, ImageT, PointT >::loop_stop().
on_image_do_action_cb* OmniAlgoSimpleDetection< ConverterT, AngleT, ImageT, PointT >::image_show [private] |
Definition at line 133 of file OmniAlgoSimpleDetection.hh.
Referenced by OmniAlgoSimpleDetection< ConverterT, AngleT, ImageT, PointT >::loop_next_frame(), and OmniAlgoSimpleDetection< ConverterT, AngleT, ImageT, PointT >::on_window_trackable_wannabe().
1.4.7