You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
72 lines
2.0 KiB
72 lines
2.0 KiB
#ifndef __SURF_HEADERS__
|
|
#define __SURF_HEADERS__
|
|
|
|
#include "../../../components/base/basicVideoAnalyzer.h"
|
|
#include "../filter/filterImage.h"
|
|
#define MAX_SURF_COUNT 400
|
|
|
|
using namespace cv::detail;
|
|
/*
|
|
typedef struct S_BlobInfo {
|
|
unsigned int id;
|
|
int weight;
|
|
point location, origin; // current location and origin for defining a drag vector
|
|
CvRect box; // to define our axis-aligned bounding box
|
|
float area;
|
|
int event; // event type: one of BLOB_NULL, BLOB_DOWN, BLOB_MOVE, BLOB_UP
|
|
bool tracked; // a flag to indicate this blob has been processed
|
|
Scalar color;
|
|
float dir;
|
|
}BlobInfo;
|
|
*/
|
|
|
|
typedef vector< U8 > tArrayU8;
|
|
typedef vector<float> tArrayFloat;
|
|
typedef vector<KeyPoint> tArrayKeypoint;
|
|
//typedef vector<DMatch> tArrayMatches;
|
|
typedef MatchesInfo tArrayMatches;
|
|
//typedef vector<BlobInfo> tArrayBlobInfo;
|
|
|
|
class surfDetector : public basicVideoAnalyzer, public BestOf2NearestMatcher, public SurfFeaturesFinder{
|
|
private:
|
|
// int m_iWidth;
|
|
// int m_iHeight;
|
|
double m_dArea;
|
|
filterImage *m_oFilter;
|
|
|
|
Mat m_oMat;
|
|
//tArrayU8 m_vStatus;
|
|
//tArrayFloat m_vErr;
|
|
tArrayKeypoint m_aNewKeyPoints;
|
|
tArrayKeypoint m_aOldKeyPoints;
|
|
tArrayMatches m_aMatches;
|
|
tArrayMatches m_aGoodMatches;
|
|
|
|
//Mat m_oNewDescriptors;
|
|
//Mat m_oOldDescriptors;
|
|
ImageFeatures m_oNewImageFutures;
|
|
ImageFeatures m_oOldImageFutures;
|
|
|
|
tPoints2F m_vOldPOI;
|
|
tPoints2F m_vCurrentPOI;
|
|
|
|
//tContours m_vContours;
|
|
//tHierarhy m_vHierarchy;
|
|
//TermCriteria *m_pDetectionCriteria;
|
|
|
|
//SurfFeatureDetector *m_pSurfDetector;
|
|
//DenseFeatureDetector *m_pSurfDetector;
|
|
SimpleBlobDetector *m_pBlobDetector;
|
|
//SurfDescriptorExtractor *m_pSurfExtractor;
|
|
//FlannBasedMatcher *m_pFlannMatcher;
|
|
|
|
protected:
|
|
bool m_fImageAnalyzer(Mat &Picture);
|
|
public:
|
|
surfDetector();
|
|
surfDetector(double Area);
|
|
~surfDetector();
|
|
void markup( Mat &Picture );
|
|
};
|
|
|
|
#endif
|