refactor: 合并ocrBinThreshold (#13635)

This commit is contained in:
Status102
2025-08-11 18:12:41 +08:00
committed by GitHub
parent 08dd08ff46
commit 24a92b4a01
11 changed files with 48 additions and 70 deletions

View File

@@ -792,15 +792,9 @@ asst::TaskPtr asst::TaskData::generate_ocr_task_info(
utils::get_and_check_value_or(
name,
task_json,
"binThresholdLower",
ocr_task_info_ptr->bin_threshold_lower,
default_ptr->bin_threshold_lower);
utils::get_and_check_value_or(
name,
task_json,
"binThresholdUpper",
ocr_task_info_ptr->bin_threshold_upper,
default_ptr->bin_threshold_upper);
"binThreshold",
ocr_task_info_ptr->bin_threshold,
default_ptr->bin_threshold);
utils::get_and_check_value_or(name, task_json, "useRaw", ocr_task_info_ptr->use_raw, default_ptr->use_raw);
return ocr_task_info_ptr;
}
@@ -1072,7 +1066,7 @@ bool asst::TaskData::syntax_check(std::string_view task_name, const json::value&
// specific
"cache", "fullMatch", "isAscii", "ocrReplace", "rectMove",
"replaceFull", "roi", "text", "withoutDet", "useRaw",
"binThresholdLower", "binThresholdUpper",
"binThreshold",
} },
{ AlgorithmType::FeatureMatch,
{