mi_recognition Class Reference
[Public interface]

Recognition class. More...

#include <mi_recognition.hh>

Inheritance diagram for mi_recognition:

Inheritance graph
[legend]
Collaboration diagram for mi_recognition:

Collaboration graph
[legend]
List of all members.

Public Member Functions

 mi_recognition (const mimas::mm_xml_reference< XalanElement > &configuration, bool _verbose)
 Constructor.
void recognise (const mimas::mm_image< unsigned char > &image, double timestamp, mi_scene_ptr scene) const
 Perform recognition/tracking.
calibration_ptr get_calibration (void)
 Access calibration object.
std::map< std::string, mi_object_type_ptr > & get_object_types (void)
 Access list with types of micro-objects.
virtual bool human_vision (const std::string &type, const mimas::mm_image< unsigned char > &image, double timestamp, double *angle, int *x, int *y) const
 Human vision.

Protected Member Functions

void remove_objects (const std::string &method, mi_scene_ptr scene) const
 Remove some objects from the tracking-list.
void reschedule (const std::string &method, mi_scene_ptr scene) const
 Remove some objects from the tracking-list.
void take_best_matches (std::vector< match > &matches, double timestamp, mi_scene_ptr scene, vision_type method) const
 Take best recognition-results.

Protected Attributes

calibration_ptr calib
 Calibration object.
std::map< std::string, recognition_method_ptr > methods
 Initial recognition.
std::map< std::string, mi_object_type_ptrobject_types
 General information about the different type of micro-objects.
bool verbose

Detailed Description

Recognition class.

The recognition class hides the use of different recognition- and tracking-methods from the calling program.

This class is part of the public interface.

Author:
Jan Wedekind (j.wedekind@shu.ac.uk)


Constructor & Destructor Documentation

mi_recognition::mi_recognition const mimas::mm_xml_reference< XalanElement > &  configuration,
bool  _verbose
 

Constructor.

Initialise the recognition algorithms and the database of micro-objects.

Parameters:
configuration XML-tree with configuration.
_verbose Set to true, if you want to get verbose information from the vision-algorithms on stdout.


Member Function Documentation

calibration_ptr mi_recognition::get_calibration void   )  [inline]
 

Access calibration object.

Get access to parameters of camera-calibration

Returns:
Pointer to camera-calibration object.

std::map< std::string, mi_object_type_ptr >& mi_recognition::get_object_types void   )  [inline]
 

Access list with types of micro-objects.

A map is returned, which maps strings on pointers to mi_object_type objects.

Returns:
Reference to the map.
See also:
mi_object_type

virtual bool mi_recognition::human_vision const std::string &  type,
const mimas::mm_image< unsigned char > &  image,
double  timestamp,
double *  angle,
int *  x,
int *  y
const [virtual]
 

Human vision.

Recognise objects using a human. If you want to recognise an object with human-vision, you need to override this method and modify the configuration-file (see f.e. gripper.xml).

Parameters:
type Type of object to be recognised.
image Image to recognise object in.
timestamp Timestamp of image.
angle Angle of object.
x x-coordinate of object.
y y-coordinate of object.
Returns:
true, if recognition was successful.
See also:
human_vision_plugin

void mi_recognition::recognise const mimas::mm_image< unsigned char > &  image,
double  timestamp,
mi_scene_ptr  scene
const
 

Perform recognition/tracking.

The micro-objects known to the scene object are being tracked. Any new recognition-jobs, being specified in scene, are attempted. The model contained in scene is updated accordingly then.

Parameters:
image Image to recognise/track micro-objects in.
timestamp Time of image-capture.
scene Object encapsulating the state of vision.
See also:
Units

void mi_recognition::remove_objects const std::string &  method,
mi_scene_ptr  scene
const [protected]
 

Remove some objects from the tracking-list.

All entries of micro-objects being tracked with a specific vision-method are removed.

Parameters:
method Tracking-method responsible for this object.
scene Scene-object with tracking-list.

void mi_recognition::reschedule const std::string &  method,
mi_scene_ptr  scene
const [protected]
 

Remove some objects from the tracking-list.

All entries of micro-objects being tracked/recognised with a specific vision-method are rescheduled for recognition and removed from the tracking-list.

Parameters:
method Tracking-method responsible for this object.
scene Scene-object with tracking-list and job-list.

void mi_recognition::take_best_matches std::vector< match > &  matches,
double  timestamp,
mi_scene_ptr  scene,
vision_type  method
const [protected]
 

Take best recognition-results.

Parameters:
matches List of matches.
timestamp Timestamp of image.
scene Scene-object to be updated with new recognition-results.
method Type of vision-method (tracking or recognition).


The documentation for this class was generated from the following file:
doxygen-1.4.5 documentation for micron-vision - Tue Jan 17 15:29:15 2006