mirror of
https://github.com/kerberos-io/openalpr-base.git
synced 2025-10-06 11:46:53 +08:00
Added country to API results
This commit is contained in:
@@ -84,6 +84,9 @@ namespace alpr
|
||||
// The number requested is always >= the topNPlates count
|
||||
int requested_topn;
|
||||
|
||||
// The country (training data code) that was used to recognize the plate
|
||||
std::string country;
|
||||
|
||||
// the best plate is the topNPlate with the highest confidence
|
||||
AlprPlate bestPlate;
|
||||
|
||||
|
@@ -276,6 +276,8 @@ namespace alpr
|
||||
{
|
||||
AlprPlateResult plateResult;
|
||||
|
||||
plateResult.country = config->country;
|
||||
|
||||
// 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];
|
||||
|
Reference in New Issue
Block a user