Vision Touch Surface Library
 All Classes Files Functions Variables Pages
fourierdescriptor.h
Go to the documentation of this file.
1 #ifndef FOURIERDESCRIPTOR_H
2 #define FOURIERDESCRIPTOR_H
3 
4 #include <fstream>
5 #include <iostream>
6 
7 #include "opencv2/highgui/highgui.hpp"
8 #include <opencv2/opencv.hpp>
9 
10 using namespace std;
11 using namespace cv;
12 
21 {
22 public:
24  FourierDescriptor(const string &fileName);
25  void loadDictionary(const string &fileName);
26  int findMatchInDictionary(vector<Point2i> &boundary, string &distMetric, double &distance, int numFDtoUse=0, int newBoundaryLength=64);
27  void calcCentroidDistFD(vector<Point2i> &boundary, int numFD, Mat &dst, int newBoundaryLength=64);
28  int findMatchInDictionary(Mat &testFD, string &distMetric, double &distance );
30 
31 
32 private:
33  int sizeDict,numFDdict;
34  Mat *FDdict;
35  vector<int> dictClass;
36 
37 };
38 
39 #endif // FOURIERDESCRIPTOR_H