24#ifndef _FIREVISION_CLASSIFIERS_SURF_H_
25#define _FIREVISION_CLASSIFIERS_SURF_H_
28# error SURF not available, you may not use the SurfClassifier
31#include <fvclassifiers/classifier.h>
36#include <surf/image.h>
37#include <surf/ipoint.h>
40#include <utils/time/clock.h>
41#include <utils/time/tracker.h>
44#define OFFLINE_SURF true
45#define MIN_MATCH_RATIO 0.05
58void saveIpoints(std::string sFileName,
59 const std::vector<surf::Ipoint> &ipts,
64void loadIpoints(std::string sFileName, std::vector<surf::Ipoint> &ipts,
bool bVerbose,
int &);
71 unsigned int min_match = 5,
72 float min_match_ratio = MIN_MATCH_RATIO,
76 bool doubleImageSize =
false,
79 bool extended =
false,
84 unsigned int min_match = 5,
85 float min_match_ratio = MIN_MATCH_RATIO,
89 bool doubleImageSize =
false,
92 bool extended =
false,
100 unsigned int num_obj_;
103 int findMatch(
const surf::Ipoint &ip1,
const std::vector<surf::Ipoint> &ipts);
106 double distSquare(
double *v1,
double *v2,
int n);
109 surf::Image * obj_img_;
110 std::vector<std::vector<surf::Ipoint>> obj_features_;
111 std::vector<std::string> obj_names_;
112 int obj_num_features_;
115 surf::Image * image_;
116 std::vector<surf::Ipoint> img_features_;
117 int img_num_features_;
120 unsigned int min_match_;
122 float min_match_ratio_;
131 bool doubleImageSize_;
146 unsigned int loop_count_;
147 unsigned int ttc_objconv_;
148 unsigned int ttc_objfeat_;
149 unsigned int ttc_imgconv_;
150 unsigned int ttc_imgfeat_;
151 unsigned int ttc_matchin_;
152 unsigned int ttc_roimerg_;
Classifier to extract regions of interest.
SurfClassifier(std::string keypoints_descriptor_txt_file, unsigned int min_match=5, float min_match_ratio=MIN_MATCH_RATIO, int samplingStep=2, int octaves=4, double thres=4.0, bool doubleImageSize=false, int initLobe=3, bool upright=false, bool extended=false, int indexSize=4)
Constructor.
virtual ~SurfClassifier()
Destructor.
virtual std::list< ROI > * classify()
Classify image.
Fawkes library namespace.