ViSP  2.9.0
vpFernClassifier Class Reference

#include <vpFernClassifier.h>

+ Inheritance diagram for vpFernClassifier:

Public Member Functions

 vpFernClassifier ()
 
 vpFernClassifier (const std::string &_dataFile, const std::string &_objectName)
 
virtual ~vpFernClassifier ()
 
virtual unsigned int buildReference (const vpImage< unsigned char > &I)
 
virtual unsigned int buildReference (const vpImage< unsigned char > &I, const vpImagePoint &iP, const unsigned int height, const unsigned int width)
 
virtual unsigned int buildReference (const vpImage< unsigned char > &I, const vpRect &rectangle)
 
virtual unsigned int matchPoint (const vpImage< unsigned char > &I)
 
virtual unsigned int matchPoint (const vpImage< unsigned char > &I, const vpImagePoint &iP, const unsigned int height, const unsigned int width)
 
virtual unsigned int matchPoint (const vpImage< unsigned char > &I, const vpRect &rectangle)
 
virtual void display (const vpImage< unsigned char > &Iref, const vpImage< unsigned char > &Icurrent, unsigned int size=3)
 
virtual void display (const vpImage< unsigned char > &Icurrent, unsigned int size=3, const vpColor &color=vpColor::green)
 
void load (const std::string &_dataFile, const std::string &)
 
void record (const std::string &_objectName, const std::string &_dataFile)
 
void setBlurSetting (const bool _blur)
 
void setBlurSettings (const bool _blur, int _sigma, int _size)
 
bool getBlurSetting ()
 
int getBlurSigma ()
 
int getBlurSize ()
 
const std::vector< cv::Point2f > & getRefPt () const
 
const std::vector< cv::Point2f > & getCurPt () const
 
cv::Rect getModelROI () const
 
bool referenceBuilt () const
 
const vpImagePointgetAllPointsInReferenceImage ()
 
void getReferencePoint (const unsigned int index, vpImagePoint &referencePoint)
 
void getMatchedPoints (const unsigned int index, vpImagePoint &referencePoint, vpImagePoint &currentPoint)
 
unsigned int getIndexInAllReferencePointList (const unsigned int indexInMatchedPointList)
 
unsigned int getReferencePointNumber () const
 
unsigned int getMatchedPointNumber () const
 
const std::vector< vpImagePoint > & getReferenceImagePointsList () const
 
const std::vector< vpImagePoint > & getCurrentImagePointsList () const
 
const std::vector< unsigned int > & getMatchedReferencePoints () const
 

Protected Member Functions

void setImage (const vpImage< unsigned char > &_I)
 
void train ()
 
virtual void init ()
 

Protected Attributes

cv::LDetector ldetector
 
cv::FernClassifier fernClassifier
 
cv::PatchGenerator gen
 
bool hasLearn
 
int threshold
 
int nbView
 
int dist
 
int nbClassfier
 
int ClassifierSize
 
int nbOctave
 
int patchSize
 
int radius
 
int nbPoints
 
bool blurImage
 
int radiusBlur
 
int sigmaBlur
 
unsigned int nbMinPoint
 
IplImage * curIplImg
 
std::vector< cv::KeyPoint > objKeypoints
 
cv::Rect modelROI_Ref
 
cv::Rect modelROI
 
std::vector< cv::KeyPoint > modelPoints
 
std::vector< cv::KeyPoint > imgKeypoints
 
std::vector< cv::Point2f > refPt
 
std::vector< cv::Point2f > curPt
 
std::vector< vpImagePointreferenceImagePointsList
 
std::vector< vpImagePointcurrentImagePointsList
 
std::vector< unsigned int > matchedReferencePoints
 
bool _reference_computed
 

Detailed Description

Class that implements the Fern classifier and the YAPE detector thanks to the OpenCV library.

This class provides a way to detect and match point using the YAPE and a Fern Classifiers, thanks to the OpenCV library (version >= 2.0)

This class provides a tool to match points between a model and the current image. The points of interests belonging to the model and the points detected in the current image are given in pixels thanks to the vpImagePoint class.

For more details about the Ferns Classifier and the point detector, see [22] and [14].

To use this class, you first have to detect points in the model and train the associated Fern classifier. Then, for each new grabbed image, You can detect points and try to match them with the model.

As training can requires up to several minutes, it is possible to save (in a file) and load the classifier.

The following small example shows how to use the class.

#include <visp/vpConfig.h>
#include <visp/vpImage.h>
#include <visp/vpFernClassifier.h>
#if VISP_HAVE_OPENCV_VERSION >= 0x020000 // Fern classifier only available since OpenCV-2.0.0
int main()
{
//First grab the reference image Ireference
//Build the reference points.
fern.buildReference(Ireference);
//Then grab another image which represents the current image Icurrent
//Match points between the reference points and the points detected in the current image.
fern.matchPoint(Icurrent);
//Display the matched points
fern.display(Ireference, Icurrent);
return (0);
}
#else
int main() {}
#endif

It is also possible to create the reference thanks to only a part of the reference image (not the whole image) and find points to match in only a part of the current image. The small following example shows how to do this.

#include <visp/vpConfig.h>
#include <visp/vpImage.h>
#include <visp/vpDisplay.h>
#include <visp/vpFernClassifier.h>
#if VISP_HAVE_OPENCV_VERSION >= 0x020000 // Fern classifier only available since OpenCV-2.0.0
int main()
{
//First grab the reference image Ireference
//Select a part of the image by clicking on two points which define a rectangle
vpImagePoint corners[2];
for (int i=0 ; i < 2 ; i++)
{
vpDisplay::getClick(Ireference, corners[i]);
}
//Build the reference points.
int nbrRef;
unsigned int height, width;
height = (unsigned int)(corners[1].get_i() - corners[0].get_i());
width = (unsigned int)(corners[1].get_j() - corners[0].get_j());
nbrRef = fern.buildReference(Ireference, corners[0], height, width);
//Then grab another image which represents the current image Icurrent
//Select a part of the image by clincking on two points which define a rectangle
for (int i=0 ; i < 2 ; i++)
{
vpDisplay::getClick(Icurrent, corners[i]);
}
//Match points between the reference points and the points detected in the current image.
int nbrMatched;
height = (unsigned int)(corners[1].get_i() - corners[0].get_i());
width = (unsigned int)(corners[1].get_j() - corners[0].get_j());
nbrMatched = fern.matchPoint(Icurrent, corners[0], height, width);
//Display the matched points
fern.display(Ireference, Icurrent);
return(0);
}
#else
int main() {}
#endif
Examples:
fernClassifier.cpp.

Definition at line 177 of file vpFernClassifier.h.

Constructor & Destructor Documentation

vpFernClassifier::vpFernClassifier ( )

Basic constructor

Definition at line 57 of file vpFernClassifier.cpp.

vpFernClassifier::vpFernClassifier ( const std::string &  _dataFile,
const std::string &  _objectName 
)

Constructor using the provided data file to load the object given by its name.

If the name of the object does not correspond in the file, a vpException::ioError is thrown.

Parameters
_dataFile: the name of the file saved after a training (with the record methods).
_objectName: the name of the object to load

Definition at line 77 of file vpFernClassifier.cpp.

References load().

vpFernClassifier::~vpFernClassifier ( )
virtual

Basic destructor

Definition at line 92 of file vpFernClassifier.cpp.

References curIplImg.

Member Function Documentation

unsigned int vpFernClassifier::buildReference ( const vpImage< unsigned char > &  _I)
virtual

Build the list of reference points. The computation of the points is made all over the image I. It also includes the training of the fern classifier.

Warning
thie method can take up to several minutes depending on the parameters of the classifier and on the size of the image.
Parameters
_I: The gray scaled image where the reference points are computed.
Returns
the number of reference points.

Implements vpBasicKeyPoint.

Examples:
fernClassifier.cpp.

Definition at line 193 of file vpFernClassifier.cpp.

References vpBasicKeyPoint::_reference_computed, objKeypoints, setImage(), and train().

Referenced by vpPlanarObjectDetector::buildReference(), and buildReference().

unsigned int vpFernClassifier::buildReference ( const vpImage< unsigned char > &  _I,
const vpImagePoint _iP,
const unsigned int  _height,
const unsigned int  _width 
)
virtual

Build the list of reference points. The computation of the points is made only on a part of the image. This part is a rectangle defined by its top left corner, its height and its width. The parameters of this rectangle must be given in pixel. It also includes the training of the fern classifier.

Warning
the method can take up to several minutes depending on the parameters of the classifier and on the size of the image.
Parameters
_I: The gray scaled image where the reference points are computed.
_iP: The top left corner of the rectangle.
_height: height of the rectangle (in pixel).
_width: width of the rectangle (in pixel).
Returns
the number of reference points.

Implements vpBasicKeyPoint.

Definition at line 222 of file vpFernClassifier.cpp.

References vpImageTools::createSubImage(), vpImagePoint::get_i(), vpImagePoint::get_j(), vpImagePoint::get_u(), vpImagePoint::get_v(), vpImage< Type >::getHeight(), vpImage< Type >::getWidth(), modelROI_Ref, vpImageException::notInTheImage, objKeypoints, setImage(), train(), and vpTRACE.

unsigned int vpFernClassifier::buildReference ( const vpImage< unsigned char > &  _I,
const vpRect _rectangle 
)
virtual

Build the list of reference points. The computation of the points is made only on a part of the image. This part is a rectangle. The parameters of this rectangle must be given in pixel. It also includes the training of the fern classifier.

Warning
the method can take up to several minutes depending on the parameters of the classifier and on the size of the image.
Parameters
_I: The gray scaled image where the reference points are computed.
_rectangle: The rectangle which defines the interesting part of the image.
Returns
The number of reference points.

Implements vpBasicKeyPoint.

Definition at line 269 of file vpFernClassifier.cpp.

References buildReference(), vpRect::getHeight(), vpRect::getLeft(), vpRect::getTop(), vpRect::getWidth(), vpImagePoint::set_i(), and vpImagePoint::set_j().

void vpFernClassifier::display ( const vpImage< unsigned char > &  _Iref,
const vpImage< unsigned char > &  _Icurrent,
unsigned int  size = 3 
)
virtual

This function displays the matched reference points and the matched points computed in the current image. The reference points are displayed in the image Ireference and the matched points coming from the current image are displayed in the image Icurrent. It is possible to set Ireference and Icurrent with the same image when calling the method.

Parameters
_Iref: The image where the matched reference points are displayed.
_Icurrent: The image where the matched points computed in the current image are displayed.
size: Size in pixels of the cross that is used to display matched points.

Implements vpBasicKeyPoint.

Examples:
fernClassifier.cpp.

Definition at line 434 of file vpFernClassifier.cpp.

References vpBasicKeyPoint::currentImagePointsList, vpDisplay::displayCross(), vpColor::green, vpBasicKeyPoint::matchedReferencePoints, vpColor::red, and vpBasicKeyPoint::referenceImagePointsList.

void vpFernClassifier::display ( const vpImage< unsigned char > &  _Icurrent,
unsigned int  size = 3,
const vpColor color = vpColor::green 
)
virtual

This function displays only the matched points computed in the current image. They are displayed in the image Icurrent.

Parameters
_Icurrent: the gray scaled image for the display
size: Size in pixels of the cross that is used to display matched points.
color: Color used to display the matched points.

Implements vpBasicKeyPoint.

Definition at line 456 of file vpFernClassifier.cpp.

References vpBasicKeyPoint::currentImagePointsList, vpDisplay::displayCross(), and vpBasicKeyPoint::matchedReferencePoints.

const vpImagePoint* vpBasicKeyPoint::getAllPointsInReferenceImage ( )
inlineinherited

Get the pointer to the complete list of reference points. The pointer is const. Thus the points can not be modified

Returns
The pointer to the complete list of reference points.

Definition at line 115 of file vpBasicKeyPoint.h.

bool vpFernClassifier::getBlurSetting ( )
inline

Return the blur option. The Blur option is used to activate a filter used to blur the input image. The blurring can improve the robustness of the detection.

Returns
the value of the blur option.

Definition at line 291 of file vpFernClassifier.h.

Referenced by matchPoint(), and train().

int vpFernClassifier::getBlurSigma ( )
inline

Return the blur sigma (for the filter) option.

Returns
The value of the sigma for the blur filter.

Definition at line 298 of file vpFernClassifier.h.

Referenced by matchPoint(), and train().

int vpFernClassifier::getBlurSize ( )
inline

return the blur size (for the filter) option

Returns
the value of the radius for the blur filter

Definition at line 305 of file vpFernClassifier.h.

Referenced by matchPoint(), and train().

const std::vector<cv::Point2f>& vpFernClassifier::getCurPt ( ) const
inline

Return a reference on the vector of current points in the OpenCV format

Returns
the list of current points

Definition at line 319 of file vpFernClassifier.h.

Referenced by vpPlanarObjectDetector::matchPoint().

const std::vector<vpImagePoint>& vpBasicKeyPoint::getCurrentImagePointsList ( ) const
inlineinherited

Return the vector of current image point.

Warning
Should not be modified.
Returns
Vector of the current image point.

Definition at line 212 of file vpBasicKeyPoint.h.

unsigned int vpBasicKeyPoint::getIndexInAllReferencePointList ( const unsigned int  indexInMatchedPointList)
inlineinherited

Get the nth matched reference point index in the complete list of reference point.

In the code below referencePoint1 and referencePoint2 correspond to the same matched reference point.

//Here the code to compute the reference points and the current points.
vpImagePoint referencePoint1;
vpImagePoint currentPoint;
surf.getMatchedPoints(1, referencePoint1, currentPoint); //Get the first matched points
vpImagePoint referencePoint2;
const vpImagePoint* referencePointsList = surf.getAllPointsInReferenceImage();
int index = surf.getIndexInAllReferencePointList(1); //Get the first matched reference point index in the complete reference point list
referencePoint2 = referencePointsList[index]; //Get the first matched reference point

Definition at line 173 of file vpBasicKeyPoint.h.

References vpException::fatalError, and vpTRACE.

unsigned int vpBasicKeyPoint::getMatchedPointNumber ( ) const
inlineinherited

Get the number of matched points.

Returns
the number of matched points.

Definition at line 194 of file vpBasicKeyPoint.h.

void vpBasicKeyPoint::getMatchedPoints ( const unsigned int  index,
vpImagePoint referencePoint,
vpImagePoint currentPoint 
)
inlineinherited

Get the nth couple of reference point and current point which have been matched. These points are copied in the vpImagePoint instances given in argument.

Parameters
index: The index of the desired couple of reference point and current point . The index must be between 0 and the number of matched points - 1.
referencePoint: The coordinates of the desired reference point are copied here.
currentPoint: The coordinates of the desired current point are copied here.
Examples:
tutorial-matching-surf-homography.cpp, and tutorial-matching-surf.cpp.

Definition at line 143 of file vpBasicKeyPoint.h.

References vpException::fatalError, vpImagePoint::set_ij(), and vpTRACE.

const std::vector<unsigned int>& vpBasicKeyPoint::getMatchedReferencePoints ( ) const
inlineinherited

Return the index of the matched associated to the current image point i. The ith element of the vector is the index of the reference image point matching with the current image point.

Warning
Should not be modified.
Returns
The vector of matching index.

Definition at line 223 of file vpBasicKeyPoint.h.

cv::Rect vpFernClassifier::getModelROI ( ) const
inline

Return the region of interest in the OpenCV format

Definition at line 324 of file vpFernClassifier.h.

Referenced by vpPlanarObjectDetector::load().

const std::vector<vpImagePoint>& vpBasicKeyPoint::getReferenceImagePointsList ( ) const
inlineinherited

Return the vector of reference image point.

Warning
Should not be modified.
Returns
Vector of reference image point.

Definition at line 203 of file vpBasicKeyPoint.h.

void vpBasicKeyPoint::getReferencePoint ( const unsigned int  index,
vpImagePoint referencePoint 
)
inlineinherited

Get the nth reference point. This point is copied in the vpImagePoint instance given in argument.

Parameters
index: The index of the desired reference point. The index must be between 0 and the number of reference points - 1.
referencePoint: The coordinates of the desired reference point are copied there.

Definition at line 125 of file vpBasicKeyPoint.h.

References vpException::fatalError, vpImagePoint::set_ij(), and vpTRACE.

unsigned int vpBasicKeyPoint::getReferencePointNumber ( ) const
inlineinherited

Get the number of reference points.

Returns
the number of reference points.

Definition at line 187 of file vpBasicKeyPoint.h.

const std::vector<cv::Point2f>& vpFernClassifier::getRefPt ( ) const
inline

Return a reference on the vector of reference points in the OpenCV format

Returns
the list of reference points

Definition at line 312 of file vpFernClassifier.h.

Referenced by vpPlanarObjectDetector::matchPoint().

void vpFernClassifier::init ( )
protectedvirtual

initialise any OpenCV parameters

The classifier need to be trained again or to be loaded from an external file.

Implements vpBasicKeyPoint.

Definition at line 111 of file vpFernClassifier.cpp.

References blurImage, ClassifierSize, curIplImg, dist, hasLearn, nbClassfier, nbMinPoint, nbOctave, nbPoints, nbView, patchSize, radius, radiusBlur, sigmaBlur, and threshold.

void vpFernClassifier::load ( const std::string &  _dataFile,
const std::string &   
)

load the Fern classifier

Load and initialize the Fern classifier and load the 3D and 2D keypoints. It can take up to sevral seconds.

Parameters
_dataFile: The name of the data filename (very large text file). It can have any file extension.
Examples:
fernClassifier.cpp.

Definition at line 475 of file vpFernClassifier.cpp.

References dist, fernClassifier, hasLearn, ldetector, modelPoints, modelROI, nbOctave, nbView, patchSize, radius, and threshold.

Referenced by vpPlanarObjectDetector::load(), and vpFernClassifier().

unsigned int vpFernClassifier::matchPoint ( const vpImage< unsigned char > &  _I)
virtual

Compute the points of interest in the current image and try to match them using the trained classifier. The matched pairs can be found with the getMatchedPointByRef function.

Exceptions
vpException::notInitialisedif the classifier has not been trained.
Parameters
_I: The gray scaled image where the points are computed.
Returns
The number of point which have been matched.

Implements vpBasicKeyPoint.

Examples:
fernClassifier.cpp.

Definition at line 292 of file vpFernClassifier.cpp.

References curIplImg, curPt, vpBasicKeyPoint::currentImagePointsList, fernClassifier, getBlurSetting(), getBlurSigma(), getBlurSize(), hasLearn, imgKeypoints, ldetector, vpBasicKeyPoint::matchedReferencePoints, modelPoints, vpException::notInitialized, refPt, setImage(), and vpERROR_TRACE.

Referenced by vpPlanarObjectDetector::matchPoint(), and matchPoint().

unsigned int vpFernClassifier::matchPoint ( const vpImage< unsigned char > &  _I,
const vpImagePoint _iP,
const unsigned int  _height,
const unsigned int  _width 
)
virtual

Compute the points of interest in the specified region of the current image and try to recognise them using the trained classifier. The matched pairs can be found with the getMatchedPointByRef function. The homography between the two planar surfaces is also computed.

Parameters
_I: The gray scaled image where the points are computed.
_iP: the top left corner of the rectangle defining the ROI
_height: the height of the ROI
_width: the width of the ROI
Returns
the number of point which have been matched.

Implements vpBasicKeyPoint.

Definition at line 372 of file vpFernClassifier.cpp.

References vpImageTools::createSubImage(), vpImagePoint::get_i(), vpImagePoint::get_j(), vpImage< Type >::getHeight(), vpImage< Type >::getWidth(), matchPoint(), vpImageException::notInTheImage, and vpTRACE.

unsigned int vpFernClassifier::matchPoint ( const vpImage< unsigned char > &  _I,
const vpRect _rectangle 
)
virtual

Compute the points of interest in the specified region of the current image and try to recognise them using the trained classifier. The matched pairs can be found with the getMatchedPointByRef function. The homography between the two planar surfaces is also computed.

Parameters
_I: The gray scaled image where the points are computed.
_rectangle: the rectangle defining the ROI
Returns
the number of point which have been matched.

Implements vpBasicKeyPoint.

Definition at line 405 of file vpFernClassifier.cpp.

References vpRect::getHeight(), vpRect::getLeft(), vpRect::getTop(), vpRect::getWidth(), matchPoint(), vpImagePoint::set_i(), and vpImagePoint::set_j().

void vpFernClassifier::record ( const std::string &  _objectName,
const std::string &  _dataFile 
)

record the Ferns classifier in the text file

Parameters
_objectName: The name of the object to store in the data file.
_dataFile: The name of the data filename (very large text file). It can have any file extension.
Examples:
fernClassifier.cpp.

Definition at line 505 of file vpFernClassifier.cpp.

References fernClassifier, ldetector, modelPoints, and modelROI_Ref.

Referenced by vpPlanarObjectDetector::recordDetector().

bool vpBasicKeyPoint::referenceBuilt ( ) const
inlineinherited

Indicate wether the reference has been built or not.

Returns
True if the reference of the current instance has been built.

Definition at line 108 of file vpBasicKeyPoint.h.

void vpFernClassifier::setBlurSetting ( const bool  _blur)
inline

The image is blurred before being processed. This solution can lead to a better recognition rate.

Parameters
_blur: the new option for the blur

Definition at line 281 of file vpFernClassifier.h.

void vpFernClassifier::setBlurSettings ( const bool  _blur,
int  _sigma,
int  _size 
)
inline
void vpFernClassifier::setImage ( const vpImage< unsigned char > &  _I)
protected

Set the current image. This method allows to convert a image from the ViSP format to the OpenCV one.

Parameters
_I: the input image.

Definition at line 534 of file vpFernClassifier.cpp.

References vpImage< Type >::bitmap, vpImageConvert::convert(), curIplImg, vpImage< Type >::getHeight(), vpImage< Type >::getWidth(), vpException::memoryAllocationError, and vpException::notInitialized.

Referenced by buildReference(), and matchPoint().

Member Data Documentation

bool vpBasicKeyPoint::_reference_computed
protectedinherited

flag to indicate if the reference has been built.

Definition at line 249 of file vpBasicKeyPoint.h.

Referenced by vpKeyPointSurf::buildReference(), and buildReference().

bool vpFernClassifier::blurImage
protected

Flag to specify whether the reference image have to be blurred or not in order to improve the recognition rate.

Definition at line 215 of file vpFernClassifier.h.

Referenced by init().

int vpFernClassifier::ClassifierSize
protected

Size of the classifier.

Definition at line 203 of file vpFernClassifier.h.

Referenced by init().

IplImage* vpFernClassifier::curIplImg
protected

The current image in the OpenCV format.

Definition at line 225 of file vpFernClassifier.h.

Referenced by init(), matchPoint(), setImage(), train(), and ~vpFernClassifier().

std::vector<cv::Point2f> vpFernClassifier::curPt
protected

Definition at line 238 of file vpFernClassifier.h.

Referenced by matchPoint().

std::vector<vpImagePoint> vpBasicKeyPoint::currentImagePointsList
protectedinherited

List of the points which belong to the current image and have been matched with points belonging to the reference.

Definition at line 238 of file vpBasicKeyPoint.h.

Referenced by vpKeyPointSurf::display(), display(), vpKeyPointSurf::matchPoint(), and matchPoint().

int vpFernClassifier::dist
protected

Minimal distance between two points.

Definition at line 199 of file vpFernClassifier.h.

Referenced by init(), load(), and train().

cv::FernClassifier vpFernClassifier::fernClassifier
protected

The Fern classifier.

Definition at line 184 of file vpFernClassifier.h.

Referenced by load(), matchPoint(), record(), and train().

cv::PatchGenerator vpFernClassifier::gen
protected

The patch generator (OpenCV format).

Definition at line 187 of file vpFernClassifier.h.

Referenced by train().

bool vpFernClassifier::hasLearn
protected

Flag to indicate whether the classifier has been trained or not.

Definition at line 191 of file vpFernClassifier.h.

Referenced by init(), load(), matchPoint(), and train().

std::vector<cv::KeyPoint> vpFernClassifier::imgKeypoints
protected

the vector containing the points in the current image.

Definition at line 236 of file vpFernClassifier.h.

Referenced by matchPoint().

cv::LDetector vpFernClassifier::ldetector
protected

The points of interest detector.

Definition at line 181 of file vpFernClassifier.h.

Referenced by load(), matchPoint(), record(), and train().

std::vector<unsigned int> vpBasicKeyPoint::matchedReferencePoints
protectedinherited

Array containing the index in the array "referenceImagePointsList" of the reference points which have been matched.

The first element of the "currentImagePointsList" array is matched with the nth element of the "referenceImagePointsList" array. The value of n is stored in the first element of the "matchedReferencePoints" array.

Definition at line 246 of file vpBasicKeyPoint.h.

Referenced by vpKeyPointSurf::display(), display(), vpKeyPointSurf::matchPoint(), and matchPoint().

std::vector<cv::KeyPoint> vpFernClassifier::modelPoints
protected

the vector containing the points in the model.

Definition at line 234 of file vpFernClassifier.h.

Referenced by load(), matchPoint(), record(), and train().

cv::Rect vpFernClassifier::modelROI
protected

the ROI for the reference image.

Definition at line 232 of file vpFernClassifier.h.

Referenced by load(), and train().

cv::Rect vpFernClassifier::modelROI_Ref
protected

the ROI in the reference image.

Definition at line 230 of file vpFernClassifier.h.

Referenced by buildReference(), record(), and train().

int vpFernClassifier::nbClassfier
protected

Number of classifier.

Definition at line 201 of file vpFernClassifier.h.

Referenced by init().

unsigned int vpFernClassifier::nbMinPoint
protected

Number of minimum point below which the homography is not estimated (must be at least four)

Definition at line 222 of file vpFernClassifier.h.

Referenced by init().

int vpFernClassifier::nbOctave
protected

Number of octave for the multi scale.

Definition at line 205 of file vpFernClassifier.h.

Referenced by init(), load(), and train().

int vpFernClassifier::nbPoints
protected

Maximal number of points.

Definition at line 211 of file vpFernClassifier.h.

Referenced by init().

int vpFernClassifier::nbView
protected

Number of view to generate for the training.

Definition at line 197 of file vpFernClassifier.h.

Referenced by init(), load(), and train().

std::vector<cv::KeyPoint> vpFernClassifier::objKeypoints
protected

keypoints detected in the reference image.

Definition at line 228 of file vpFernClassifier.h.

Referenced by buildReference(), and train().

int vpFernClassifier::patchSize
protected

Size of the patch.

Definition at line 207 of file vpFernClassifier.h.

Referenced by init(), load(), and train().

int vpFernClassifier::radius
protected

Radius for the detector.

Definition at line 209 of file vpFernClassifier.h.

Referenced by init(), load(), and train().

int vpFernClassifier::radiusBlur
protected

Radius of the kernel used to blur the image.

Definition at line 217 of file vpFernClassifier.h.

Referenced by init().

std::vector<vpImagePoint> vpBasicKeyPoint::referenceImagePointsList
protectedinherited
std::vector<cv::Point2f> vpFernClassifier::refPt
protected

vector in the OpenCV format to be used by the detector.

Definition at line 238 of file vpFernClassifier.h.

Referenced by matchPoint().

int vpFernClassifier::sigmaBlur
protected

Sigma of the kernel used to blur the image.

Definition at line 219 of file vpFernClassifier.h.

Referenced by init().

int vpFernClassifier::threshold
protected

Threshold to accept or reject points (usually around 20)

Definition at line 195 of file vpFernClassifier.h.

Referenced by init(), load(), and train().