Open Detection  1.0
od::g2d::ODCascadeDetector Class Reference

A class for detection using Cascade classifiers. More...

#include <ODCascadeDetector.h>

Inheritance diagram for od::g2d::ODCascadeDetector:
Collaboration diagram for od::g2d::ODCascadeDetector:

Public Member Functions

 ODCascadeDetector (std::string const &trained_data_location="", double scaleFactor=1.1, int minNeighbors=3, int flags=0, cv::Size minSize=cv::Size(), cv::Size maxSize=cv::Size())
 
void init ()
 
ODDetections2DdetectOmni (ODSceneImage *scene)
 Function for performing detection on an entire scene. More...
 
ODDetectionsdetect (ODSceneImage *scene)
 Function for performing detection on a segmented scene. More...
 
- Public Member Functions inherited from od::ODDetector2D
 ODDetector2D (std::string const &trained_data_location_)
 
ODDetectionsdetect (ODScene *scene)
 
- Public Member Functions inherited from od::ODDetector
 ODDetector (std::string const &training_data_location_)
 
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)
 

Additional Inherited Members

- Public Attributes inherited from od::ODDetector
bool metainfo_
 
- 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_
 

Detailed Description

A class for detection using Cascade classifiers.

Given a scene and a cascade classifier, this class performs a classification and returns detections. The training is not supported in OD currently but is compatible to the cascade training of OpenCV. Train your cascade classifiers using OpenCV's opencv_traincascade utility (http://docs.opencv.org/master/dc/d88/tutorial_traincascade.html#gsc.tab=0). It is a great tool for traning your cascade. Paste the generated xml in trained_data_location_/TD_CASCADE/*.cascade.xml to use your trained cascade.

Author
Kripasindhu Sarkar

Definition at line 54 of file ODCascadeDetector.h.

Constructor & Destructor Documentation

od::g2d::ODCascadeDetector::ODCascadeDetector ( std::string const &  trained_data_location = "",
double  scaleFactor = 1.1,
int  minNeighbors = 3,
int  flags = 0,
cv::Size  minSize = cv::Size(),
cv::Size  maxSize = cv::Size() 
)
inline

Member Function Documentation

ODDetections* od::g2d::ODCascadeDetector::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
[out] detections A number of detections as an ODDetections instance.

Implements od::ODDetector2D.

ODDetections2D* od::g2d::ODCascadeDetector::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
[out] detections A number of detections as an ODDetections2D instance containing information about the detection and its 2D location.

Implements od::ODDetector2D.

void od::g2d::ODCascadeDetector::init ( )
inlinevirtual

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