OpenCV  3.0.0
Open Source Computer Vision
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
Classes | Public Member Functions | Static Public Member Functions | List of all members
cv::lsvm::LSVMDetector Class Referenceabstract

This is a C++ abstract class, it provides external user API to work with Latent SVM. More...

#include "latentsvm.hpp"

Classes

struct  ObjectDetection
 

Public Member Functions

virtual ~LSVMDetector ()
 
virtual void detect (cv::Mat const &image, std::vector< ObjectDetection > &objects, float overlapThreshold=0.5f)=0
 Find rectangular regions in the given image that are likely to contain objects of loaded classes (models) and corresponding confidence levels. More...
 
virtual size_t getClassCount () const =0
 Return a count of loaded models (classes). More...
 
virtual std::vector
< std::string > const & 
getClassNames () const =0
 Return the class (model) names that were passed in constructor or method load or extracted from models filenames in those methods. More...
 
virtual bool isEmpty () const =0
 

Static Public Member Functions

static cv::Ptr< LSVMDetectorcreate (std::vector< std::string > const &filenames, std::vector< std::string > const &classNames=std::vector< std::string >())
 Load the trained models from given .xml files and return cv::Ptr<LSVMDetector>. More...
 

Detailed Description

This is a C++ abstract class, it provides external user API to work with Latent SVM.

Constructor & Destructor Documentation

virtual cv::lsvm::LSVMDetector::~LSVMDetector ( )
inlinevirtual

Member Function Documentation

static cv::Ptr<LSVMDetector> cv::lsvm::LSVMDetector::create ( std::vector< std::string > const &  filenames,
std::vector< std::string > const &  classNames = std::vector< std::string >() 
)
static

Load the trained models from given .xml files and return cv::Ptr<LSVMDetector>.

Parameters
filenamesA set of filenames storing the trained detectors (models). Each file contains one model. See examples of such files here /opencv_extra/testdata/cv/LSVMDetector/models_VOC2007/.
classNamesA set of trained models names. If it's empty then the name of each model will be constructed from the name of file containing the model. E.g. the model stored in "/home/user/cat.xml" will get the name "cat".
virtual void cv::lsvm::LSVMDetector::detect ( cv::Mat const &  image,
std::vector< ObjectDetection > &  objects,
float  overlapThreshold = 0.5f 
)
pure virtual

Find rectangular regions in the given image that are likely to contain objects of loaded classes (models) and corresponding confidence levels.

Parameters
imageAn image.
objectsThe detections: rectangulars, scores and class IDs.
overlapThresholdThreshold for the non-maximum suppression algorithm.
virtual size_t cv::lsvm::LSVMDetector::getClassCount ( ) const
pure virtual

Return a count of loaded models (classes).

virtual std::vector<std::string> const& cv::lsvm::LSVMDetector::getClassNames ( ) const
pure virtual

Return the class (model) names that were passed in constructor or method load or extracted from models filenames in those methods.

virtual bool cv::lsvm::LSVMDetector::isEmpty ( ) const
pure virtual

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