35 #ifndef vpFernClassifier_H
36 #define vpFernClassifier_H
38 #include <visp3/core/vpConfig.h>
42 #if (VISP_HAVE_OPENCV_VERSION >= 0x020408) && \
43 (VISP_HAVE_OPENCV_VERSION < 0x030000)
44 #include <opencv2/features2d/features2d.hpp>
45 #include <opencv2/imgproc/imgproc.hpp>
46 #include <opencv2/legacy/legacy.hpp>
48 #include <visp3/vision/vpBasicKeyPoint.h>
168 cv::LDetector ldetector;
171 cv::FernClassifier fernClassifier;
174 cv::PatchGenerator gen;
210 unsigned int nbMinPoint;
216 std::vector<cv::KeyPoint> objKeypoints;
218 cv::Rect modelROI_Ref;
222 std::vector<cv::KeyPoint> modelPoints;
224 std::vector<cv::KeyPoint> imgKeypoints;
226 std::vector<cv::Point2f> refPt, curPt;
230 vpFernClassifier(
const std::string &_dataFile,
const std::string &_objectName);
231 virtual ~vpFernClassifier();
236 unsigned int _width);
242 unsigned int _width);
247 unsigned int size = 3);
252 void load(
const std::string &_dataFile,
const std::string & );
253 void record(
const std::string &_objectName,
const std::string &_dataFile);
262 inline void setBlurSetting(
const bool _blur) { blurImage = _blur; }
263 inline void setBlurSettings(
const bool _blur,
int _sigma,
int _size);
272 inline bool getBlurSetting() {
return blurImage; }
279 inline int getBlurSigma() {
return this->sigmaBlur; }
286 inline int getBlurSize() {
return this->radiusBlur; }
293 const std::vector<cv::Point2f> &getRefPt()
const {
return refPt; }
300 const std::vector<cv::Point2f> &getCurPt()
const {
return curPt; }
305 cv::Rect getModelROI()
const {
return modelROI; }
class that defines what is a keypoint. This class provides all the basic elements to implement classe...
virtual unsigned int buildReference(const vpImage< unsigned char > &I)=0
virtual unsigned int matchPoint(const vpImage< unsigned char > &I)=0
virtual void display(const vpImage< unsigned char > &Iref, const vpImage< unsigned char > &Icurrent, unsigned int size=3)=0
Class to define RGB colors available for display functionalities.
static const vpColor green
Class that defines a 2D point in an image. This class is useful for image processing and stores only ...
Defines a rectangle in the plane.