更新json 调整对折模式
This commit is contained in:
parent
7ed7ce0ca3
commit
4b9c433179
|
@ -560,7 +560,7 @@ typedef struct _scan_conf
|
|||
unsigned char en_sizecheck; /**< 尺寸检测>*/
|
||||
float imageRotateDegree; /**< 旋转>*/
|
||||
unsigned char is_duplex; /**< 是否双面*/
|
||||
unsigned char en_fold; /**< 对折>*/
|
||||
unsigned char en_fold; /**< 是否对折>*/
|
||||
int pixtype; /**< 颜色模式>*/
|
||||
int automaticcolor; /**< 顔色自動識別>*/
|
||||
int automaticcolortype; /**< 顔色自動識別后非彩色上傳類型>*/
|
||||
|
@ -612,7 +612,8 @@ typedef struct _scan_conf
|
|||
int fillholeratio_down; /**< 下侧除穿孔比率,0为不除。[0,50],added on 2022-09-12>*/
|
||||
int fillholeratio_left; /**< 左侧除穿孔比率,0为不除。[0,50],added on 2022-09-12>*/
|
||||
int fillholeratio_right; /**< 右侧除穿孔比率,0为不除。[0,50],added on 2022-09-12>*/
|
||||
uint32_t reserve[1024]; /**< 预留4096字节做协议扩展*/
|
||||
uint8_t fold_concatmode; /**< 对折拼接模式 0左右,1上下,2自动对折>*/
|
||||
uint32_t reserve[1024]; /**< 预留4096字节做协议扩展*/
|
||||
}SCANCONF ,*LPSCANCONF;
|
||||
|
||||
//图像参数设置 -OVER
|
||||
|
|
|
@ -98,7 +98,7 @@ hg_scanner::hg_scanner(ScannerSerial serial
|
|||
, 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), pid_(0), dump_img_(&hg_scanner::dump_image_empty)
|
||||
, dump_usb_path_(""),is_kernelsnap_211209_(false), pid_(0), dump_img_(&hg_scanner::dump_image_empty), is_kernelsnap_220830_(false)
|
||||
{
|
||||
final_path_ = hg_log::ini_get("paths", "final_img");
|
||||
if(final_path_.empty())
|
||||
|
@ -390,7 +390,7 @@ void hg_scanner::set_setting_map(int sn, const char* name)
|
|||
setting_map_[sn] = &hg_scanner::setting_set_isremove_low_hole;
|
||||
else if (val == SANE_STD_OPT_NAME_SEARCH_HOLE_RANGE_B)
|
||||
setting_map_[sn] = &hg_scanner::setting_set_isremove_low_hole_threshold;
|
||||
else if (val == SANE_STD_OPT_NAME_SEARCH_HOLE_RANGE_B)
|
||||
else if (val == SANE_STD_OPT_NAME_FOLD_TYPE)
|
||||
setting_map_[sn] = &hg_scanner::setting_set_fold_type;
|
||||
|
||||
}
|
||||
|
@ -3713,7 +3713,7 @@ void hg_scanner::image_process(std::shared_ptr<tiny_buffer>& buffer)
|
|||
(this->*dump_img_)(handle, "errorextention");
|
||||
}
|
||||
|
||||
if ((img_conf_.en_fold) && (pid_ != 0x239 && pid_ != 0x439))
|
||||
if ((img_conf_.en_fold && pid_ != 0x239 && pid_ != 0x439))
|
||||
{
|
||||
hg_imgproc::fold(handle);
|
||||
(this->*dump_img_)(handle, "fold");
|
||||
|
|
|
@ -255,9 +255,10 @@ protected:
|
|||
int fold_type_; //对折类型
|
||||
|
||||
|
||||
|
||||
|
||||
int split3399_; //3399设备正面和反面图像是相对的,所以对折时反面需要进行特殊处理
|
||||
int pid_;
|
||||
int pid_;
|
||||
bool is_kernelsnap_220830_; //此版本支持待纸扫描,手动睡眠唤醒,分纸强度
|
||||
bool is_kernelsnap_211209_; //获取固件版本号是否是新旧版本
|
||||
|
||||
SCANCONF img_conf_; //此参数外部不做任何改变,请在writedown_image_configuration做修改
|
||||
|
|
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
|
@ -48,7 +48,7 @@ class hg_scanner_239 : public hg_scanner
|
|||
int get_device_sleep_stautus();
|
||||
int get_device_paperon_stautus(void);
|
||||
|
||||
int writedown_device_configuration(setting_hardware::HGSCANCONF_3399*dev_conf = NULL);
|
||||
int writedown_device_configuration(setting_hardware::HGSCANCONF_3399* dev_conf = NULL);
|
||||
int writedown_image_configuration(void);
|
||||
int pop_first_image(void);
|
||||
|
||||
|
|
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
|
@ -745,6 +745,7 @@ int hg_scanner_439::writedown_image_configuration(void)
|
|||
ic.dogeardistabce = fractate_level_;
|
||||
ic.fadeback = image_prc_param_.bits.erase_bakground;
|
||||
ic.fadebackrange = erase_bkg_range_;
|
||||
ic.fold_concatmode = fold_type_;
|
||||
|
||||
int filter_clr[] = { 3, 0, 1, 2, 5, 6, 7 };
|
||||
if(image_prc_param_.bits.color_mode == COLOR_MODE_24_BITS || image_prc_param_.bits.color_mode == COLOR_MODE_AUTO_MATCH)
|
||||
|
|
|
@ -916,7 +916,7 @@ namespace hg_imgproc
|
|||
std::vector<cv::Mat> mats(mats_);
|
||||
mats_.clear();
|
||||
|
||||
CImageApplyConcatenation fold(CImageApplyConcatenation::horizontal);
|
||||
CImageApplyConcatenation fold((CImageApplyConcatenation::ConcatMode)img_conf_.fold_concatmode);
|
||||
fold.apply(mats,img_conf_.is_duplex);
|
||||
mats_= mats;
|
||||
|
||||
|
|
Loading…
Reference in New Issue