 |
Visual Servoing Platform
version 3.3.0
|
40 #ifndef vpFernClassifier_H
41 #define vpFernClassifier_H
43 #include <visp3/core/vpConfig.h>
47 #if (VISP_HAVE_OPENCV_VERSION >= 0x020000) && \
48 (VISP_HAVE_OPENCV_VERSION < 0x030000) // Require opencv >= 2.0.0 and < 3.0.0
49 #if (VISP_HAVE_OPENCV_VERSION >= 0x020101) // Require opencv >= 2.1.1
50 #include <opencv2/features2d/features2d.hpp>
51 #include <opencv2/imgproc/imgproc.hpp>
52 #include <opencv2/legacy/legacy.hpp>
53 #elif (VISP_HAVE_OPENCV_VERSION >= 0x020000) // Require opencv >= 2.0.0
58 #include <visp3/vision/vpBasicKeyPoint.h>
223 #if (VISP_HAVE_OPENCV_VERSION >= 0x020408)
240 std::vector<cv::Point2f>
refPt, curPt;
244 vpFernClassifier(
const std::string &_dataFile,
const std::string &_objectName);
250 unsigned int height,
unsigned int width);
261 unsigned int size = 3);
266 void load(
const std::string &_dataFile,
const std::string & );
267 void record(
const std::string &_objectName,
const std::string &_dataFile);
277 inline void setBlurSettings(
const bool _blur,
int _sigma,
int _size);
307 const std::vector<cv::Point2f> &
getRefPt()
const {
return refPt; }
314 const std::vector<cv::Point2f> &
getCurPt()
const {
return curPt; }
int dist
Minimal distance between two points.
std::vector< cv::Point2f > refPt
vector in the OpenCV format to be used by the detector.
class that defines what is a Keypoint. This class provides all the basic elements to implement classe...
cv::FernClassifier fernClassifier
The Fern classifier.
int nbOctave
Number of octave for the multi scale.
const std::vector< cv::Point2f > & getCurPt() const
virtual unsigned int buildReference(const vpImage< unsigned char > &I)=0
cv::Mat curImg
The current image in the OpenCV format.
int ClassifierSize
Size of the classifier.
cv::Rect modelROI
the ROI for the reference image.
std::vector< cv::KeyPoint > modelPoints
the vector containing the points in the model.
std::vector< cv::KeyPoint > imgKeypoints
the vector containing the points in the current image.
Class that implements the Fern classifier and the YAPE detector thanks to the OpenCV library.
cv::Rect getModelROI() const
virtual unsigned int matchPoint(const vpImage< unsigned char > &I)=0
int threshold
Threshold to accept or reject points (usually around 20)
cv::Rect modelROI_Ref
the ROI in the reference image.
int radiusBlur
Radius of the kernel used to blur the image.
static const vpColor green
void setBlurSetting(const bool _blur)
int radius
Radius for the detector.
Class that defines a 2D point in an image. This class is useful for image processing and stores only ...
bool hasLearn
Flag to indicate whether the classifier has been trained or not.
int patchSize
Size of the patch.
const std::vector< cv::Point2f > & getRefPt() const
int nbClassfier
Number of classifier.
int sigmaBlur
Sigma of the kernel used to blur the image.
int nbView
Number of view to generate for the training.
Class to define colors available for display functionnalities.
std::vector< cv::KeyPoint > objKeypoints
keypoints detected in the reference image.
cv::LDetector ldetector
The points of interest detector.
int nbPoints
Maximal number of points.
Defines a rectangle in the plane.
cv::PatchGenerator gen
The patch generator (OpenCV format).
virtual void display(const vpImage< unsigned char > &Iref, const vpImage< unsigned char > &Icurrent, unsigned int size=3)=0