mirror of
https://github.com/MaaAssistantArknights/MaaAssistantArknights.git
synced 2026-07-15 17:30:27 +08:00
fix: 修修ocr bin threshold 被task info 错误覆盖
This commit is contained in:
@@ -270,8 +270,8 @@ std::optional<int> asst::MedicineCounterTaskPlugin::get_target_of_sanity(const c
|
||||
ranges::copy(ocr_replace, std::back_inserter(merged_replace));
|
||||
|
||||
RegionOCRer ocr(image);
|
||||
ocr.set_bin_threshold(100, 255);
|
||||
ocr.set_task_info(ocr_task);
|
||||
ocr.set_bin_threshold(100, 255);
|
||||
ocr.set_replace(merged_replace);
|
||||
if (!ocr.analyze()) [[unlikely]] {
|
||||
Log.error(__FUNCTION__, "unable to ocr");
|
||||
@@ -294,8 +294,8 @@ std::optional<int> asst::MedicineCounterTaskPlugin::get_maximun_of_sanity(const
|
||||
ranges::copy(task_replace, std::back_inserter(merge_map));
|
||||
|
||||
RegionOCRer ocr(image);
|
||||
ocr.set_bin_threshold(100, 255);
|
||||
ocr.set_task_info(ocr_task);
|
||||
ocr.set_bin_threshold(100, 255);
|
||||
ocr.set_replace(merge_map);
|
||||
if (!ocr.analyze()) [[unlikely]] {
|
||||
Log.error(__FUNCTION__, "unable to ocr");
|
||||
|
||||
@@ -160,8 +160,8 @@ bool asst::ReclamationCraftTaskPlugin::calc_craft_amount(int& value)
|
||||
const std::string& theme = m_config->get_theme();
|
||||
|
||||
RegionOCRer craft_amount_analyzer(ctrler()->get_image());
|
||||
craft_amount_analyzer.set_bin_threshold(200, 255);
|
||||
craft_amount_analyzer.set_task_info(theme + "@RA@PIS-CraftAmountOcr");
|
||||
craft_amount_analyzer.set_bin_threshold(200, 255);
|
||||
|
||||
std::string value_str;
|
||||
if (craft_amount_analyzer.analyze()) {
|
||||
|
||||
Reference in New Issue
Block a user