Moved prewarp initialization higher, initializing detector with prewarp

This commit is contained in:
Matt Hill
2016-03-14 22:26:49 -04:00
parent 9b27f5084e
commit 7db326522c

View File

@@ -45,6 +45,8 @@ namespace alpr
return;
}
prewarp = new PreWarp(config);
loadRecognizers();
setNumThreads(0);
@@ -53,8 +55,6 @@ namespace alpr
this->topN = DEFAULT_TOPN;
setDefaultRegion("");
prewarp = new PreWarp(config);
timespec endTime;
getTimeMonotonic(&endTime);
if (config->debugTiming)
@@ -716,7 +716,7 @@ namespace alpr
{
// Country training data has not already been loaded. Load it.
AlprRecognizers recognizer;
recognizer.plateDetector = createDetector(config);
recognizer.plateDetector = createDetector(config, prewarp);
recognizer.ocr = new OCR(config);
#ifndef SKIP_STATE_DETECTION