Support analysis for multiple training data sets in a single pass.

Iterate over each training data set and choose the best scoring plate when there are overlaps
This is useful when countries may have multiple different plate styles (e.g., EU single line and EU multi-line)
This commit is contained in:
Matt Hill
2015-09-15 23:10:41 -04:00
parent 5889ec6109
commit 8bb3264072
11 changed files with 618 additions and 206 deletions

View File

@@ -66,6 +66,13 @@ namespace alpr
AlprResults results;
};
struct AlprRecognizers
{
Detector* plateDetector;
StateDetector* stateDetector;
OCR* ocr;
};
class AlprImpl
{
@@ -83,6 +90,8 @@ namespace alpr
void applyRegionTemplate(AlprPlateResult* result, std::string region);
AlprFullDetails analyzeSingleCountry(cv::Mat colorImg, cv::Mat grayImg, std::vector<cv::Rect> regionsOfInterest);
void setDetectRegion(bool detectRegion);
void setTopN(int topn);
void setDefaultRegion(std::string region);
@@ -99,9 +108,8 @@ namespace alpr
private:
Detector* plateDetector;
StateDetector* stateDetector;
OCR* ocr;
std::map<std::string, AlprRecognizers> recognizers;
PreWarp* prewarp;
int topN;