Open Detection  1.0
od::l2d::ODCADRecognizer2DLocal Class Reference

Simple RANSAC based 3D object recognizer. More...

#include <ODCADRecognizer2DLocal.h>

Inheritance diagram for od::l2d::ODCADRecognizer2DLocal:
Collaboration diagram for od::l2d::ODCADRecognizer2DLocal:

Public Member Functions

string const & getCameraIntrinsicFile () const
 
void setCameraIntrinsicFile (string const &camera_intrinsic_file)
 
int getNumKeyPoints () const
 
void setNumKeyPoints (int numKeyPoints)
 
float getRatioTest () const
 
void setRatioTest (float ratioTest)
 
bool isFast_match () const
 
void setFast_match (bool fast_match)
 
bool isUse_gpu () const
 
void setUse_gpu (bool use_gpu)
 
bool isUse_gpu_match () const
 
void setUse_gpu_match (bool use_gpu_match)
 
bool isMetainfo () const
 
void setMetainfo (bool metainfo)
 
int getIterationsCount () const
 
void setIterationsCount (int iterationsCount)
 
float getReprojectionError () const
 
void setReprojectionError (float reprojectionError)
 
double getConfidence () const
 
void setConfidence (double confidence)
 
int getMinInliers () const
 
void setMinInliers (int minInliers)
 
int getPnpMethod () const
 
void setPnpMethod (int pnpMethod)
 
 ODCADRecognizer2DLocal (string const &trained_data_location_=0)
 
void parseParameterString (string parameter_string)
 
void init ()
 
ODDetectionsdetect (ODSceneImage *scene)
 Function for performing detection on a segmented scene. More...
 
ODDetections3DdetectOmni (ODSceneImage *scene)
 Function for performing detection on an entire scene. More...
 
- Public Member Functions inherited from od::l2d::ODImageLocalMatchingDetector
 ODImageLocalMatchingDetector (std::string const &training_data_location_)
 
- Public Member Functions inherited from od::ODDetector2DComplete
 ODDetector2DComplete (std::string const &trained_data_location_)
 
- Public Member Functions inherited from od::ODDetector
 ODDetector (std::string const &training_data_location_)
 
virtual ODDetectionsdetect (ODScene *scene)
 
virtual ODDetectionsdetectOmni (ODScene *scene)
 
- Public Member Functions inherited from od::ODDetectorCommon
 ODDetectorCommon (std::string const &trained_data_location_="")
 
std::string getTrainingInputLocation () const
 Gets/Sets the directory containing the data for training. More...
 
void setTrainingInputLocation (std::string training_input_location_)
 Gets/Sets the directory containing the data for training. More...
 
std::string getTrainedDataLocation () const
 Gets/Sets the base directory for trained data. More...
 
virtual void setTrainedDataLocation (std::string trained_data_location_)
 The base directory for trained data. More...
 
std::string getSpecificTrainingDataLocation ()
 Gets the specific directory for a Trainer or a Detector inside trained_data_location_. More...
 
std::string getSpecificTrainingData ()
 
std::string const & getTrainedDataID () const
 
void setTrainedDataID (std::string const &trainedDataID)
 

Protected Member Functions

bool detectSingleModel (ODSceneImage *scene, Model const &model, ODDetection3D *&pD, cv::Mat &frame_viz)
 

Protected Attributes

string camera_intrinsic_file
 
cv::Scalar red
 
cv::Scalar green
 
cv::Scalar blue
 
cv::Scalar yellow
 
int numKeyPoints
 
float ratioTest
 
bool fast_match
 
bool use_gpu
 
bool use_gpu_match
 
int iterationsCount
 
float reprojectionError
 
double confidence
 
int minInliers
 
int pnpMethod
 
vector< string > model_names
 
vector< Model > models
 
PnPProblem pnp_detection
 
std::string f_type_default
 
boost::shared_ptr
< ODFeatureDetector2D
featureDetector
 
- Protected Attributes inherited from od::ODDetectorCommon
std::string training_input_location_
 
std::string trained_data_location_
 
std::string TRAINED_DATA_ID_
 
std::string TRAINED_LOCATION_DENTIFIER_
 

Additional Inherited Members

- Public Attributes inherited from od::ODDetector
bool metainfo_
 

Detailed Description

Simple RANSAC based 3D object recognizer.

A recognizer which uses local features like SIFT/SURF to perform object recognition. Given a 'trained model' trained by ODCADRecogTrainerSnapshotBased or trained externally (manually augmenting features in 3D cad models), this class performs a complete detection in an image. It first extracts 2D features from the scene, matches them with all the feature augmented models (the trained data) and in the end solves PnP under RANSAC.

Author
Kripasindhu Sarkar
Examples:
objectdetector/od_image_cadrecog_camera.cpp, and objectdetector/od_image_cadrecog_files.cpp.

Definition at line 71 of file ODCADRecognizer2DLocal.h.

Constructor & Destructor Documentation

od::l2d::ODCADRecognizer2DLocal::ODCADRecognizer2DLocal ( string const &  trained_data_location_ = 0)
inline

Member Function Documentation

ODDetections* od::l2d::ODCADRecognizer2DLocal::detect ( ODSceneImage scene)
virtual

Function for performing detection on a segmented scene.

The purpose of this function is to perform detection on a segmented scene or an 'object candidate'. i.e. the entire scene is considered as an 'object' or an detection. It is possible for a scene to trigger multiple detections.

Parameters
[in]sceneAn instance of 2D scene
Returns
A number of detections as an ODDetections instance.

Implements od::ODDetector2DComplete.

ODDetections3D* od::l2d::ODCADRecognizer2DLocal::detectOmni ( ODSceneImage scene)
virtual

Function for performing detection on an entire scene.

The purpose of this function is to detect an object in an entire scene. Thus, other than the type of detection we also have information about the location of the detection w.r.t. the scene.

Parameters
[in]sceneAn instance of 2D scene
Returns
A number of detections as an ODDetections3D instance containing information about the detection and its pose in 3D.

Implements od::ODDetector2DComplete.

Examples:
objectdetector/od_image_cadrecog_camera.cpp, and objectdetector/od_image_cadrecog_files.cpp.
bool od::l2d::ODCADRecognizer2DLocal::detectSingleModel ( ODSceneImage scene,
Model const &  model,
ODDetection3D *&  pD,
cv::Mat &  frame_viz 
)
protected
string const& od::l2d::ODCADRecognizer2DLocal::getCameraIntrinsicFile ( ) const
inline

Definition at line 74 of file ODCADRecognizer2DLocal.h.

References camera_intrinsic_file.

double od::l2d::ODCADRecognizer2DLocal::getConfidence ( ) const
inline

Definition at line 164 of file ODCADRecognizer2DLocal.h.

References confidence.

int od::l2d::ODCADRecognizer2DLocal::getIterationsCount ( ) const
inline

Definition at line 144 of file ODCADRecognizer2DLocal.h.

References iterationsCount.

int od::l2d::ODCADRecognizer2DLocal::getMinInliers ( ) const
inline

Definition at line 174 of file ODCADRecognizer2DLocal.h.

References minInliers.

int od::l2d::ODCADRecognizer2DLocal::getNumKeyPoints ( ) const
inline

Definition at line 84 of file ODCADRecognizer2DLocal.h.

References numKeyPoints.

int od::l2d::ODCADRecognizer2DLocal::getPnpMethod ( ) const
inline

Definition at line 184 of file ODCADRecognizer2DLocal.h.

References pnpMethod.

float od::l2d::ODCADRecognizer2DLocal::getRatioTest ( ) const
inline

Definition at line 94 of file ODCADRecognizer2DLocal.h.

References ratioTest.

float od::l2d::ODCADRecognizer2DLocal::getReprojectionError ( ) const
inline

Definition at line 154 of file ODCADRecognizer2DLocal.h.

References reprojectionError.

void od::l2d::ODCADRecognizer2DLocal::init ( )
virtual
bool od::l2d::ODCADRecognizer2DLocal::isFast_match ( ) const
inline

Definition at line 104 of file ODCADRecognizer2DLocal.h.

References fast_match.

bool od::l2d::ODCADRecognizer2DLocal::isMetainfo ( ) const
inline

Definition at line 134 of file ODCADRecognizer2DLocal.h.

References od::ODDetector::metainfo_.

bool od::l2d::ODCADRecognizer2DLocal::isUse_gpu ( ) const
inline

Definition at line 114 of file ODCADRecognizer2DLocal.h.

References use_gpu.

bool od::l2d::ODCADRecognizer2DLocal::isUse_gpu_match ( ) const
inline

Definition at line 124 of file ODCADRecognizer2DLocal.h.

References use_gpu_match.

void od::l2d::ODCADRecognizer2DLocal::parseParameterString ( string  parameter_string)
void od::l2d::ODCADRecognizer2DLocal::setCameraIntrinsicFile ( string const &  camera_intrinsic_file)
inline
void od::l2d::ODCADRecognizer2DLocal::setConfidence ( double  confidence)
inline

Definition at line 169 of file ODCADRecognizer2DLocal.h.

References confidence.

void od::l2d::ODCADRecognizer2DLocal::setFast_match ( bool  fast_match)
inline

Definition at line 109 of file ODCADRecognizer2DLocal.h.

References fast_match.

void od::l2d::ODCADRecognizer2DLocal::setIterationsCount ( int  iterationsCount)
inline

Definition at line 149 of file ODCADRecognizer2DLocal.h.

References iterationsCount.

void od::l2d::ODCADRecognizer2DLocal::setMetainfo ( bool  metainfo)
inline

Definition at line 139 of file ODCADRecognizer2DLocal.h.

References od::ODDetector::metainfo_.

void od::l2d::ODCADRecognizer2DLocal::setMinInliers ( int  minInliers)
inline

Definition at line 179 of file ODCADRecognizer2DLocal.h.

References minInliers.

void od::l2d::ODCADRecognizer2DLocal::setNumKeyPoints ( int  numKeyPoints)
inline

Definition at line 89 of file ODCADRecognizer2DLocal.h.

References numKeyPoints.

void od::l2d::ODCADRecognizer2DLocal::setPnpMethod ( int  pnpMethod)
inline

Definition at line 189 of file ODCADRecognizer2DLocal.h.

References pnpMethod.

void od::l2d::ODCADRecognizer2DLocal::setRatioTest ( float  ratioTest)
inline

Definition at line 99 of file ODCADRecognizer2DLocal.h.

References ratioTest.

void od::l2d::ODCADRecognizer2DLocal::setReprojectionError ( float  reprojectionError)
inline

Definition at line 159 of file ODCADRecognizer2DLocal.h.

References reprojectionError.

void od::l2d::ODCADRecognizer2DLocal::setUse_gpu ( bool  use_gpu)
inline

Definition at line 119 of file ODCADRecognizer2DLocal.h.

References use_gpu.

void od::l2d::ODCADRecognizer2DLocal::setUse_gpu_match ( bool  use_gpu_match)
inline

Definition at line 129 of file ODCADRecognizer2DLocal.h.

References use_gpu_match.

Member Data Documentation

cv::Scalar od::l2d::ODCADRecognizer2DLocal::blue
protected

Definition at line 238 of file ODCADRecognizer2DLocal.h.

Referenced by ODCADRecognizer2DLocal().

string od::l2d::ODCADRecognizer2DLocal::camera_intrinsic_file
protected
double od::l2d::ODCADRecognizer2DLocal::confidence
protected

Definition at line 251 of file ODCADRecognizer2DLocal.h.

Referenced by getConfidence(), ODCADRecognizer2DLocal(), and setConfidence().

std::string od::l2d::ODCADRecognizer2DLocal::f_type_default
protected

Definition at line 263 of file ODCADRecognizer2DLocal.h.

Referenced by ODCADRecognizer2DLocal().

bool od::l2d::ODCADRecognizer2DLocal::fast_match
protected

Definition at line 244 of file ODCADRecognizer2DLocal.h.

Referenced by isFast_match(), ODCADRecognizer2DLocal(), and setFast_match().

boost::shared_ptr<ODFeatureDetector2D> od::l2d::ODCADRecognizer2DLocal::featureDetector
protected

Definition at line 264 of file ODCADRecognizer2DLocal.h.

Referenced by ODCADRecognizer2DLocal().

cv::Scalar od::l2d::ODCADRecognizer2DLocal::green
protected

Definition at line 237 of file ODCADRecognizer2DLocal.h.

Referenced by ODCADRecognizer2DLocal().

int od::l2d::ODCADRecognizer2DLocal::iterationsCount
protected
int od::l2d::ODCADRecognizer2DLocal::minInliers
protected

Definition at line 254 of file ODCADRecognizer2DLocal.h.

Referenced by getMinInliers(), ODCADRecognizer2DLocal(), and setMinInliers().

vector<string> od::l2d::ODCADRecognizer2DLocal::model_names
protected

Definition at line 260 of file ODCADRecognizer2DLocal.h.

vector<Model> od::l2d::ODCADRecognizer2DLocal::models
protected

Definition at line 261 of file ODCADRecognizer2DLocal.h.

int od::l2d::ODCADRecognizer2DLocal::numKeyPoints
protected
PnPProblem od::l2d::ODCADRecognizer2DLocal::pnp_detection
protected

Definition at line 262 of file ODCADRecognizer2DLocal.h.

int od::l2d::ODCADRecognizer2DLocal::pnpMethod
protected

Definition at line 257 of file ODCADRecognizer2DLocal.h.

Referenced by getPnpMethod(), ODCADRecognizer2DLocal(), and setPnpMethod().

float od::l2d::ODCADRecognizer2DLocal::ratioTest
protected

Definition at line 243 of file ODCADRecognizer2DLocal.h.

Referenced by getRatioTest(), ODCADRecognizer2DLocal(), and setRatioTest().

cv::Scalar od::l2d::ODCADRecognizer2DLocal::red
protected

Definition at line 236 of file ODCADRecognizer2DLocal.h.

Referenced by ODCADRecognizer2DLocal().

float od::l2d::ODCADRecognizer2DLocal::reprojectionError
protected
bool od::l2d::ODCADRecognizer2DLocal::use_gpu
protected

Definition at line 245 of file ODCADRecognizer2DLocal.h.

Referenced by isUse_gpu(), ODCADRecognizer2DLocal(), and setUse_gpu().

bool od::l2d::ODCADRecognizer2DLocal::use_gpu_match
protected
cv::Scalar od::l2d::ODCADRecognizer2DLocal::yellow
protected

Definition at line 239 of file ODCADRecognizer2DLocal.h.

Referenced by ODCADRecognizer2DLocal().


The documentation for this class was generated from the following file: