mirror of
https://github.com/kerberos-io/openalpr-base.git
synced 2025-10-07 04:30:51 +08:00
Resolves issue #150 Automatically apply pattern matching for countries with only one pattern
This commit is contained in:
@@ -277,7 +277,13 @@ namespace alpr
|
||||
if (!pipeline_data.disqualified)
|
||||
{
|
||||
AlprPlateResult plateResult;
|
||||
plateResult.region = defaultRegion;
|
||||
|
||||
// If there's only one pattern for a country, use it. Otherwise use the default
|
||||
if (country_recognizers.ocr->postProcessor.getPatterns().size() == 1)
|
||||
plateResult.region = country_recognizers.ocr->postProcessor.getPatterns()[0];
|
||||
else
|
||||
plateResult.region = defaultRegion;
|
||||
|
||||
plateResult.regionConfidence = 0;
|
||||
plateResult.plate_index = platecount++;
|
||||
|
||||
|
Reference in New Issue
Block a user