mirror of
https://github.com/kerberos-io/openalpr-base.git
synced 2025-10-06 18:52:49 +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
|
// The number requested is always >= the topNPlates count
|
||||||
int requested_topn;
|
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
|
// the best plate is the topNPlate with the highest confidence
|
||||||
AlprPlate bestPlate;
|
AlprPlate bestPlate;
|
||||||
|
|
||||||
|
@@ -276,6 +276,8 @@ namespace alpr
|
|||||||
{
|
{
|
||||||
AlprPlateResult plateResult;
|
AlprPlateResult plateResult;
|
||||||
|
|
||||||
|
plateResult.country = config->country;
|
||||||
|
|
||||||
// If there's only one pattern for a country, use it. Otherwise use the default
|
// If there's only one pattern for a country, use it. Otherwise use the default
|
||||||
if (country_recognizers.ocr->postProcessor.getPatterns().size() == 1)
|
if (country_recognizers.ocr->postProcessor.getPatterns().size() == 1)
|
||||||
plateResult.region = country_recognizers.ocr->postProcessor.getPatterns()[0];
|
plateResult.region = country_recognizers.ocr->postProcessor.getPatterns()[0];
|
||||||
|
Reference in New Issue
Block a user