mirror of
https://github.com/kerberos-io/openalpr-base.git
synced 2025-10-07 10:30:52 +08:00
Moved prewarp initialization higher, initializing detector with prewarp
This commit is contained in:
@@ -45,6 +45,8 @@ namespace alpr
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
prewarp = new PreWarp(config);
|
||||||
|
|
||||||
loadRecognizers();
|
loadRecognizers();
|
||||||
|
|
||||||
setNumThreads(0);
|
setNumThreads(0);
|
||||||
@@ -53,8 +55,6 @@ namespace alpr
|
|||||||
this->topN = DEFAULT_TOPN;
|
this->topN = DEFAULT_TOPN;
|
||||||
setDefaultRegion("");
|
setDefaultRegion("");
|
||||||
|
|
||||||
prewarp = new PreWarp(config);
|
|
||||||
|
|
||||||
timespec endTime;
|
timespec endTime;
|
||||||
getTimeMonotonic(&endTime);
|
getTimeMonotonic(&endTime);
|
||||||
if (config->debugTiming)
|
if (config->debugTiming)
|
||||||
@@ -716,7 +716,7 @@ namespace alpr
|
|||||||
{
|
{
|
||||||
// Country training data has not already been loaded. Load it.
|
// Country training data has not already been loaded. Load it.
|
||||||
AlprRecognizers recognizer;
|
AlprRecognizers recognizer;
|
||||||
recognizer.plateDetector = createDetector(config);
|
recognizer.plateDetector = createDetector(config, prewarp);
|
||||||
recognizer.ocr = new OCR(config);
|
recognizer.ocr = new OCR(config);
|
||||||
|
|
||||||
#ifndef SKIP_STATE_DETECTION
|
#ifndef SKIP_STATE_DETECTION
|
||||||
|
Reference in New Issue
Block a user