Unify country and ocr mode on both ANSOCR and ANSALPR
This commit is contained in:
@@ -374,9 +374,9 @@ extern "C" ANSOCR_API int SetANSOCRMode(ANSCENTER::ANSOCRBase** Handle, int ocrM
|
||||
return 0;
|
||||
}
|
||||
|
||||
extern "C" ANSOCR_API int SetANSOCRALPRCountry(ANSCENTER::ANSOCRBase** Handle, int country) {
|
||||
extern "C" ANSOCR_API int SetANSOCRCountry(ANSCENTER::ANSOCRBase** Handle, int country) {
|
||||
if (!Handle || !*Handle) return -1;
|
||||
(*Handle)->SetALPRCountry(static_cast<ANSCENTER::ALPRCountry>(country));
|
||||
(*Handle)->SetCountry(static_cast<ANSCENTER::Country>(country));
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -386,7 +386,7 @@ extern "C" ANSOCR_API int SetANSOCRALPRFormat(ANSCENTER::ANSOCRBase** Handle, co
|
||||
nlohmann::json j = nlohmann::json::parse(formatJson);
|
||||
ANSCENTER::ALPRPlateFormat fmt;
|
||||
fmt.name = j.value("name", "CUSTOM");
|
||||
fmt.country = static_cast<ANSCENTER::ALPRCountry>(j.value("country", 99));
|
||||
fmt.country = static_cast<ANSCENTER::Country>(j.value("country", 99));
|
||||
fmt.numRows = j.value("num_rows", 2);
|
||||
fmt.rowSplitThreshold = j.value("row_split_threshold", 0.3f);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user