mirror of
https://github.com/MaaAssistantArknights/MaaAssistantArknights.git
synced 2026-07-16 01:40:46 +08:00
refactor: 合并ocrBinThreshold (#13635)
This commit is contained in:
@@ -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,
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user