Add ANSALPR country format

This commit is contained in:
2026-04-28 19:23:46 +10:00
parent cd5d6f1923
commit e1f37ec767
4 changed files with 206 additions and 4 deletions

View File

@@ -3953,9 +3953,14 @@ int ALPR_OCR_VideoTest() {
return -1;
}
// Step 2: Set country (JAPAN = 5 — adjust to match the dataset if needed)
ANSALPR_SetCountry(&infHandle, 1);
std::cout << "Country set to JAPAN" << std::endl;
// Step 2: Set country (VIETNAM = 0 — adjust to match the dataset if needed).
// Country codes match country.txt parsing in ANSALPR_OCR::Initialize:
// 0 = VIETNAM, 1 = CHINA, 2 = AUSTRALIA, 3 = USA, 4 = INDONESIA, 5 = JAPAN.
// Setting VIETNAM here also activates ANSALPR_OCR's Vietnam-only
// post-processing (alnum filter + uppercase + plate-format validation
// against the 11 standard Vietnam patterns).
ANSALPR_SetCountry(&infHandle, 0);
std::cout << "Country set to VIETNAM" << std::endl;
// Step 3: Load engine
auto engineStart = std::chrono::high_resolution_clock::now();