This commit is contained in:
yangjiaxuan 2023-06-20 18:41:50 +08:00
commit 8a9b5343ad
6 changed files with 33 additions and 36 deletions

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -1318,7 +1318,7 @@ namespace hg_imgproc
//cv::imwrite(to_string(i) + "cis_test_image.jpg", mats[i]); //cv::imwrite(to_string(i) + "cis_test_image.jpg", mats[i]);
ColorCastCorrect.apply(mats,false); ColorCastCorrect.apply(mats,true);
mats_ = mats; mats_ = mats;
if (mats_.empty()) if (mats_.empty())

View File

@ -2093,13 +2093,12 @@ bool hg_sane_middleware::is_enable_and(scanner_handle hdev, const std::vector<MA
VLOG_MINI_1(LOG_LEVEL_WARNING, "option %s's current value is not found, other options depend it maybe in wrong status.\n", master[i].name.c_str()); VLOG_MINI_1(LOG_LEVEL_WARNING, "option %s's current value is not found, other options depend it maybe in wrong status.\n", master[i].name.c_str());
continue; continue;
} }
enabled &= master[i].compare_val(it->val.c_str(), master[i].limit_l.c_str(), master[i].limit_r.c_str());
if (enabled) // whether parent is enabled const SANE_Option_Descriptor* desc = hg_sane_middleware::instance()->find_stored_descriptor(hdev, master[i].name.c_str());
{ if (desc && (desc->cap & SANE_CAP_INACTIVE))
const SANE_Option_Descriptor* desc = hg_sane_middleware::instance()->find_stored_descriptor(hdev, master[i].name.c_str()); enabled = false;
if (desc && (desc->cap & SANE_CAP_INACTIVE)) else
enabled = false; enabled &= master[i].compare_val(it->val.c_str(), master[i].limit_l.c_str(), master[i].limit_r.c_str());
}
} }
return enabled; return enabled;
@ -2117,13 +2116,11 @@ bool hg_sane_middleware::is_enable_or(scanner_handle hdev, const std::vector<MAS
continue; continue;
} }
enabled |= master[i].compare_val(it->val.c_str(), master[i].limit_l.c_str(), master[i].limit_r.c_str()); const SANE_Option_Descriptor* desc = hg_sane_middleware::instance()->find_stored_descriptor(hdev, master[i].name.c_str());
if (enabled) // whether parent is enabled if (desc && (desc->cap & SANE_CAP_INACTIVE))
{ enabled = false;
const SANE_Option_Descriptor* desc = hg_sane_middleware::instance()->find_stored_descriptor(hdev, master[i].name.c_str()); else
if (desc && (desc->cap & SANE_CAP_INACTIVE)) enabled |= master[i].compare_val(it->val.c_str(), master[i].limit_l.c_str(), master[i].limit_r.c_str());
enabled = false;
}
} }
return enabled; return enabled;