Fix ALPR Batch and memory leak

This commit is contained in:
2026-04-15 23:00:19 +10:00
parent b05c49ad93
commit 808df4656d
8 changed files with 1846 additions and 54 deletions

View File

@@ -3656,7 +3656,7 @@ int ALPR_OCR_Test() {
ANSCENTER::ANSALPR* infHandle = nullptr;
std::string licenseKey = "";
std::string modelFilePath = "C:\\Projects\\ANSVIS\\Models\\ANS_GenericALPR_v2.0.zip";
std::string imagePath = "C:\\Programs\\ModelTraining\\JLPD\\data\\test3.jpg";
std::string imagePath = "C:\\Programs\\ModelTraining\\JLPD\\data\\test6.jpg";
int engineType = 2; // ANSALPR_OCR
double detectionThreshold = 0.3;
@@ -3830,7 +3830,7 @@ int ALPR_OCR_VideoTest() {
}
// Step 2: Set country (JAPAN = 5 — adjust to match the dataset if needed)
ANSALPR_SetCountry(&infHandle, 5);
ANSALPR_SetCountry(&infHandle, 1);
std::cout << "Country set to JAPAN" << std::endl;
// Step 3: Load engine