新增待纸扫描退出时间设置,调整紫光文本方向识别不生效问题
This commit is contained in:
parent
ad0c14a5ba
commit
18f17686df
|
@ -140,25 +140,25 @@ static std::string bmp_821(unsigned char* bits/*bits data*/, int w, int h, int*
|
|||
static bool is_firstopen_ = true; //第二次打开设备就不在去获取和设置设备锁定状态
|
||||
/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
// hg_scanner
|
||||
hg_scanner::hg_scanner(ScannerSerial serial, const char* dev_name, usb_io* io,int pid)
|
||||
: name_(dev_name ? dev_name : ""), io_(io), status_(SCANNER_ERR_NOT_START), serial_(serial)
|
||||
, scan_count_(-1), run_(true), paper_size_(TwSS::A4), erase_bkg_range_(10), read_over_with_no_data_(false)
|
||||
, noise_range_(30), omit_empty_level_(50), resolution_(200), rid_hole_range_(10.0f)
|
||||
, bright_(128), contrast_(4), gamma_(1.0f), threshold_(40), anti_noise_(8), margin_(5)
|
||||
, fractate_level_(50), ui_ev_cb_(ui_default_callback), scan_life_(NULL)
|
||||
, notify_setting_result_(false), user_cancel_(false), cb_mem_(true), test_1_paper_(false)
|
||||
, img_type_(""), online_(false),is_quality_(-1),is_color_fill(false),is_multiout(false),save_multiout(hg_log::lang_load(ID_OPTION_VALUE_DLSCLX_CS_HD_HB))
|
||||
, final_img_index_(0), custom_area_(false),save_sizecheck(false), bw_threshold_(128), custom_gamma_(false)
|
||||
, double_paper_handle_(0), keep_watermark_(false), save_feedmode_type_(false), feedmode_(1), sleeptime_(-1),split3399_(0)
|
||||
, async_io_(false), is_white_0_(true), isremove_left_hole(false), isremove_right_hole(false), isremove_top_hole(false), isremove_low_hole(false)
|
||||
, isremove_left_hole_threshold(0), isremove_right_hole_threshold(0), isremove_top_hole_threshold(0), isremove_low_hole_threshold(0)
|
||||
, dump_usb_path_(""),is_kernelsnap_211209_(false),dump_img_(&hg_scanner::dump_image_empty), is_kernelsnap_220830_(false),is_kernelsnap3288_221106_(false)
|
||||
, is_kernelsnap_221027_(false), memory_size_(2000/*USB+JPEG压缩及图像处理图队列,总共1GB*/), isx86_Advan_(true), stop_fatal_(SCANNER_ERR_OK), is_auto_paper_scan(false)
|
||||
, size_check(false), save_sleeptime_type_(false), is_kernelsnap_devsislock(false), is_checksum_strat_scan(false), is_cis_image(false)
|
||||
, is_dpi_color_check(false),save_dpi_color_check_val(0.0f), is_auto_falt(false),HGVersion_mgr_(NULL), HGVersion_Init_(NULL)
|
||||
, HGVersion_Islock_(NULL), HGVersion_Postlog_(NULL), HGVersion_Free_(NULL), Dynamicopen_HGVersion_pHandle_(NULL),pid_(pid), fetching_id_(-1)
|
||||
, is_kernelsnap3288_230210_(false), color_correction_(false), is_kernelsnap_3C_cccc(false), is_kernelsnap_220500_(false), is_kernelsnap3288_230303_(false)
|
||||
, is_kernelsnap_211227_(false)
|
||||
hg_scanner::hg_scanner(ScannerSerial serial, const char* dev_name, usb_io* io, int pid)
|
||||
: name_(dev_name ? dev_name : ""), io_(io), status_(SCANNER_ERR_NOT_START), serial_(serial)
|
||||
, scan_count_(-1), run_(true), paper_size_(TwSS::A4), erase_bkg_range_(10), read_over_with_no_data_(false)
|
||||
, noise_range_(30), omit_empty_level_(50), resolution_(200), rid_hole_range_(10.0f)
|
||||
, bright_(128), contrast_(4), gamma_(1.0f), threshold_(40), anti_noise_(8), margin_(5)
|
||||
, fractate_level_(50), ui_ev_cb_(ui_default_callback), scan_life_(NULL)
|
||||
, notify_setting_result_(false), user_cancel_(false), cb_mem_(true), test_1_paper_(false)
|
||||
, img_type_(""), online_(false), is_quality_(-1), is_color_fill(false), is_multiout(false), save_multiout(hg_log::lang_load(ID_OPTION_VALUE_DLSCLX_CS_HD_HB))
|
||||
, final_img_index_(0), custom_area_(false), save_sizecheck(false), bw_threshold_(128), custom_gamma_(false)
|
||||
, double_paper_handle_(0), keep_watermark_(false), save_feedmode_type_(false), feedmode_(1), sleeptime_(-1), split3399_(0)
|
||||
, async_io_(false), is_white_0_(true), isremove_left_hole(false), isremove_right_hole(false), isremove_top_hole(false), isremove_low_hole(false)
|
||||
, isremove_left_hole_threshold(0), isremove_right_hole_threshold(0), isremove_top_hole_threshold(0), isremove_low_hole_threshold(0)
|
||||
, dump_usb_path_(""), is_kernelsnap_211209_(false), dump_img_(&hg_scanner::dump_image_empty), is_kernelsnap_220830_(false), is_kernelsnap3288_221106_(false)
|
||||
, is_kernelsnap_221027_(false), memory_size_(2000/*USB+JPEG压缩及图像处理图队列,总共1GB*/), isx86_Advan_(true), stop_fatal_(SCANNER_ERR_OK), is_auto_paper_scan(false)
|
||||
, size_check(false), save_sleeptime_type_(false), is_kernelsnap_devsislock(false), is_checksum_strat_scan(false), is_cis_image(false)
|
||||
, is_dpi_color_check(false), save_dpi_color_check_val(0.0f), is_auto_falt(false), HGVersion_mgr_(NULL), HGVersion_Init_(NULL)
|
||||
, HGVersion_Islock_(NULL), HGVersion_Postlog_(NULL), HGVersion_Free_(NULL), Dynamicopen_HGVersion_pHandle_(NULL), pid_(pid), fetching_id_(-1)
|
||||
, is_kernelsnap3288_230210_(false), color_correction_(false), is_kernelsnap_3C_cccc(false), is_kernelsnap_220500_(false), is_kernelsnap3288_230303_(false)
|
||||
, is_kernelsnap_211227_(false),is_auto_paper_scan_exit_time(60)
|
||||
{
|
||||
#if !defined(_WIN32) && !defined(_WIN64) &&defined(x86_64)
|
||||
isx86_Advan_ = false;
|
||||
|
@ -606,6 +606,7 @@ void hg_scanner::init_setting_func_map(void)
|
|||
setting_map_[SANE_STD_OPT_NAME_SEARCH_HOLE_RANGE_B] = &hg_scanner::setting_isremove_low_hole_threshold;
|
||||
setting_map_[SANE_STD_OPT_NAME_FOLD_TYPE] = &hg_scanner::setting_fold_type;
|
||||
setting_map_[SANE_STD_OPT_NAME_COLOR_CORRECTION] = &hg_scanner::setting_color_correction;
|
||||
setting_map_[SANE_STD_OPT_NAME_WAIT_SCAN_EXIT] = &hg_scanner::setting_auto_paper_scan_exit_time;
|
||||
}
|
||||
std::string hg_scanner::setting_name_from(const char* n_or_id, int* id)
|
||||
{
|
||||
|
@ -2247,6 +2248,11 @@ int hg_scanner::setting_color_correction(void* data)
|
|||
}
|
||||
return 0;
|
||||
}
|
||||
int hg_scanner::setting_auto_paper_scan_exit_time(void* data)
|
||||
{
|
||||
is_auto_paper_scan_exit_time = *((int*)data);
|
||||
return 0;
|
||||
}
|
||||
int hg_scanner::on_color_mode_changed(int& color_mode)
|
||||
{
|
||||
return SCANNER_ERR_DEVICE_NOT_SUPPORT;
|
||||
|
|
|
@ -255,11 +255,13 @@ protected:
|
|||
int setting_isremove_low_hole_threshold(void* data);
|
||||
int setting_fold_type(void* data);
|
||||
int setting_color_correction(void* data);
|
||||
int setting_auto_paper_scan_exit_time(void* data);
|
||||
|
||||
|
||||
|
||||
virtual void on_device_reconnected(void);
|
||||
virtual int on_scanner_closing(bool force);
|
||||
|
||||
|
||||
virtual int on_color_mode_changed(int& color_mode) = 0; // COLOR_MODE_xxx
|
||||
virtual int on_paper_changed(int& paper) = 0; // PAPER_xxx
|
||||
virtual int on_paper_check_changed(bool& check)=0;
|
||||
|
@ -352,6 +354,7 @@ protected:
|
|||
float save_dpi_color_check_val; //保存纵向DPI、色差检测 ,畸变自动计算 的值
|
||||
bool is_auto_falt; //是否进行平场校正
|
||||
bool color_correction_; //是否色彩校正
|
||||
int is_auto_paper_scan_exit_time; //待纸扫描退出时间
|
||||
|
||||
SANE_DISTORTION_VAL distortion_val; //畸变修正结构体保存
|
||||
|
||||
|
|
File diff suppressed because one or more lines are too long
|
@ -379,7 +379,9 @@ namespace hg_imgproc
|
|||
#elif defined(OEM_CANGTIAN)
|
||||
string libname = "libctsdriver.so";
|
||||
#elif defined(OEM_ZHONGJING)
|
||||
string libname = "libzjdriver.so";
|
||||
string libname = "libzjdriver.so";.
|
||||
#elif defined(OEM_ZIGUANG)
|
||||
string libname = "libzgdriver.so";
|
||||
#else
|
||||
string libname = "libhgdriver.so";
|
||||
#endif
|
||||
|
|
Loading…
Reference in New Issue