fix: 修修ocr bin threshold 被task info 错误覆盖

This commit is contained in:
status102
2025-08-13 16:04:43 +08:00
parent 427f2996e0
commit 646424347e
2 changed files with 3 additions and 3 deletions

View File

@@ -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");

View File

@@ -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()) {