Added support in support for onigurama and utf8

This commit is contained in:
Matt Hill
2015-05-03 14:02:06 -04:00
parent be5c3b307c
commit c5324258f4
5 changed files with 226 additions and 116 deletions

View File

@@ -20,7 +20,7 @@
#ifndef OPENALPR_POSTPROCESS_H
#define OPENALPR_POSTPROCESS_H
#include "support/regex/oniguruma.h"
#include "regexrule.h"
#include "constants.h"
#include "utility.h"
#include <fstream>
@@ -53,23 +53,7 @@ namespace alpr
bool wordCompare( const PPResult &left, const PPResult &right );
bool letterCompare( const Letter &left, const Letter &right );
class RegexRule
{
public:
RegexRule(std::string region, std::string pattern);
bool match(std::string text);
std::string filterSkips(std::string text);
private:
int numchars;
TRexpp trexp;
std::string original;
std::string regex;
std::string region;
std::vector<int> skipPositions;
};
class PostProcess
{
public: