#include <ObjectDetectorProvider.h>
Definition at line 58 of file ObjectDetectorProvider.h.
typedef std::map<std::string, ObjectDetectorMethod*> ObjectDetectorProvider::tAlgorithmMap [protected] |
Definition at line 237 of file ObjectDetectorProvider.h.
typedef std::map<std::string, ObjectModel*> ObjectDetectorProvider::tModelMap [protected] |
Definition at line 233 of file ObjectDetectorProvider.h.
ObjectDetectorProvider::ObjectDetectorProvider | ( | const ros::NodeHandle & | node_handle | ) |
Creates the provider with the name of the topic to listen to to obtain the camera parameters
node_handle |
Definition at line 66 of file ObjectDetectorProvider.cpp.
ObjectDetectorProvider::ObjectDetectorProvider | ( | const ros::NodeHandle & | node_handle, |
const CameraBridge & | camera | ||
) |
Creates the provider with a predefined camera
node_handle | |
camera | predefined camera parameters |
Definition at line 77 of file ObjectDetectorProvider.cpp.
ObjectDetectorProvider::~ObjectDetectorProvider | ( | ) | [virtual] |
Definition at line 233 of file ObjectDetectorProvider.cpp.
void ObjectDetectorProvider::createDetectionAlgorithms | ( | ) | [inline, protected] |
Instantiates the object detection algorithms
Definition at line 88 of file ObjectDetectorProvider.cpp.
bool ObjectDetectorProvider::debugMode | ( | ) | const [inline, protected] |
Definition at line 176 of file ObjectDetectorProvider.h.
void ObjectDetectorProvider::detectObjects | ( | const std::vector< std::string > & | objects, |
const cv::Mat & | image, | ||
int | max_points_per_object, | ||
std::vector< re_msgs::DetectedObject * > & | ret | ||
) | [protected] |
Definition at line 442 of file ObjectDetectorProvider.cpp.
void ObjectDetectorProvider::emptyResponse | ( | const re_vision::SearchFor::Request & | req, |
re_vision::SearchFor::Response & | res | ||
) | const [inline, protected] |
Definition at line 362 of file ObjectDetectorProvider.cpp.
const CameraBridge& ObjectDetectorProvider::getCamera | ( | ) | const [inline, protected] |
Definition at line 179 of file ObjectDetectorProvider.h.
cv::Mat ObjectDetectorProvider::getImage | ( | const re_vision::SearchFor::Request & | req | ) | [protected] |
Definition at line 373 of file ObjectDetectorProvider.cpp.
void ObjectDetectorProvider::getValidObjects | ( | const std::vector< std::string > & | objects, |
std::vector< std::string > & | valid_objects, | ||
std::vector< re_msgs::DetectedObject > & | detections, | ||
std::vector< re_msgs::DetectedObject * > & | pointers | ||
) | const [protected] |
Definition at line 253 of file ObjectDetectorProvider.cpp.
void ObjectDetectorProvider::init | ( | ) |
Definition at line 172 of file ObjectDetectorProvider.cpp.
void ObjectDetectorProvider::learnNewModel | ( | const std::string & | path | ) | [protected] |
Adds the model located in the given path to the list of models
path |
Definition at line 399 of file ObjectDetectorProvider.cpp.
void ObjectDetectorProvider::processRequest | ( | const re_vision::SearchFor::Request & | req, |
const cv::Mat & | image, | ||
re_vision::SearchFor::Response & | res | ||
) | [protected] |
Definition at line 291 of file ObjectDetectorProvider.cpp.
void ObjectDetectorProvider::rectifyDetections | ( | std::vector< re_msgs::DetectedObject > & | detections, |
int | W, | ||
int | H, | ||
int | max_points_per_object | ||
) | const [protected] |
Distorts the 2d points detected in the rectified image to match the location of the points in the original input image. This also removes those points whose distorted (x,y) end up outside the image
detections | detections |
W | |
H,: | width and height of the input image |
Definition at line 494 of file ObjectDetectorProvider.cpp.
void ObjectDetectorProvider::removeModel | ( | const std::string & | name | ) | [protected] |
Removes the given object from the list of recognizable objects
name |
Definition at line 429 of file ObjectDetectorProvider.cpp.
void ObjectDetectorProvider::removeSomePoints | ( | re_msgs::DetectedObject & | detection, |
int | max_points | ||
) | const [protected] |
Removes from detection some points if there are more than max_points
detection | |
max_points |
Definition at line 565 of file ObjectDetectorProvider.cpp.
bool ObjectDetectorProvider::ServiceSearchFor | ( | re_vision::SearchFor::Request & | req, |
re_vision::SearchFor::Response & | res | ||
) |
Callback function of the SearchFor service
Definition at line 96 of file ObjectDetectorProvider.cpp.
void ObjectDetectorProvider::SetDebugMode | ( | bool | onoff, |
const std::string & | dir = "" |
||
) |
Sets the debug mode
onoff | debug mode iif true |
dir | if given, directory to store debug files (must exist) |
Definition at line 220 of file ObjectDetectorProvider.cpp.
void ObjectDetectorProvider::SetVisualizationMode | ( | bool | onoff | ) |
Sets the visualization mode
onoff |
Definition at line 197 of file ObjectDetectorProvider.cpp.
void ObjectDetectorProvider::showRequestInformation | ( | const re_vision::SearchFor::Request & | req, |
const cv::Mat & | image | ||
) | const [protected] |
Definition at line 531 of file ObjectDetectorProvider.cpp.
void ObjectDetectorProvider::TopicCameraInfo | ( | const sensor_msgs::CameraInfo::ConstPtr & | caminfo | ) |
Callback function of the camera_info topic
Definition at line 124 of file ObjectDetectorProvider.cpp.
void ObjectDetectorProvider::TopicNewModel | ( | const std_msgs::String::ConstPtr & | msg | ) |
Callback function of the new_model topic
Definition at line 115 of file ObjectDetectorProvider.cpp.
tAlgorithmMap ObjectDetectorProvider::m_algorithms [protected] |
Definition at line 238 of file ObjectDetectorProvider.h.
Definition at line 216 of file ObjectDetectorProvider.h.
CameraBridge ObjectDetectorProvider::m_camera [protected] |
Definition at line 220 of file ObjectDetectorProvider.h.
bool ObjectDetectorProvider::m_camera_info_got [protected] |
Definition at line 221 of file ObjectDetectorProvider.h.
ros::Subscriber* ObjectDetectorProvider::m_camera_info_sub [protected] |
Definition at line 214 of file ObjectDetectorProvider.h.
bool ObjectDetectorProvider::m_debug [protected] |
Definition at line 224 of file ObjectDetectorProvider.h.
tModelMap ObjectDetectorProvider::m_models [protected] |
Definition at line 234 of file ObjectDetectorProvider.h.
Definition at line 213 of file ObjectDetectorProvider.h.
ros::NodeHandle ObjectDetectorProvider::m_node_handle [protected] |
Definition at line 211 of file ObjectDetectorProvider.h.
ros::ServiceServer ObjectDetectorProvider::m_service [protected] |
Definition at line 212 of file ObjectDetectorProvider.h.
bool ObjectDetectorProvider::m_visualization [protected] |
Definition at line 228 of file ObjectDetectorProvider.h.
Definition at line 215 of file ObjectDetectorProvider.h.
VisualizationManager* ObjectDetectorProvider::m_visualizer [protected] |
Definition at line 227 of file ObjectDetectorProvider.h.