#ifndef MYCVDIGITPROC_H
#define MYCVDIGITPROC_H

// Debug
#define DEBUG_DIGIT

#include "opencv2/core/core.hpp"
#include "opencv2/highgui/highgui.hpp"
#include "opencv2/imgproc/imgproc.hpp"
#include "opencv2/features2d/features2d.hpp"

using namespace std;
using namespace cv;

class mycvDigitProcGeometric
{
private:
/// Matching by shape
    vector<vector<Point>> mPatternsContours;  // contours of ideal numbers 0-9
    vector<int> mPatternHoles;
    vector<double> mPatternConvexity;

/// Private functions
    int holesNumber(const Mat &aSrc);   // number of holes
    double convexity(const Mat &aSrc);     // convexity = orig area / hull area

public:
    mycvDigitProcGeometric();
    ~mycvDigitProcGeometric();

    void loadPattern(Mat &aPattern);
    float match(Mat &aDigit);
};

#endif // MYCVDIGITPROC_H
