diff --git a/src/openalpr/alpr.h b/src/openalpr/alpr.h index 2e88961..5f249a1 100644 --- a/src/openalpr/alpr.h +++ b/src/openalpr/alpr.h @@ -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; diff --git a/src/openalpr/alpr_impl.cpp b/src/openalpr/alpr_impl.cpp index 5690b2f..02ae42b 100644 --- a/src/openalpr/alpr_impl.cpp +++ b/src/openalpr/alpr_impl.cpp @@ -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];