除穿孔调整
This commit is contained in:
parent
613b000ad7
commit
aebdb26ae3
|
@ -558,22 +558,6 @@ void hg_scanner_200::image_process(std::shared_ptr<tiny_buffer>& buffer)
|
|||
hg_imgproc::load_buffer(handle, buffer);
|
||||
hg_imgproc::decode(handle,pid_);
|
||||
|
||||
if (!isremove_left_hole)
|
||||
{
|
||||
isremove_top_hole_threshold = 0;
|
||||
}
|
||||
if (!isremove_right_hole)
|
||||
{
|
||||
isremove_right_hole_threshold = 0;
|
||||
}
|
||||
if (!isremove_top_hole)
|
||||
{
|
||||
isremove_top_hole_threshold = 0;
|
||||
}
|
||||
if (!isremove_low_hole)
|
||||
{
|
||||
isremove_low_hole_threshold = 0;
|
||||
}
|
||||
if (isremove_left_hole || isremove_right_hole || isremove_top_hole || isremove_low_hole)
|
||||
{
|
||||
ret = hg_imgproc::fillhole(handle, isremove_top_hole_threshold, isremove_low_hole_threshold,isremove_left_hole_threshold,isremove_right_hole_threshold);
|
||||
|
|
|
@ -509,47 +509,15 @@ void hg_scanner_300::image_process(std::shared_ptr<tiny_buffer>& buffer)
|
|||
hg_imgproc::decode(handle,pid_);
|
||||
|
||||
|
||||
|
||||
/////////////////////////////////////111111111111111111111111111//////////////////////////////////
|
||||
ret = hg_imgproc::auto_crop(handle); //首次必须先调用这个算法
|
||||
|
||||
// if (img_conf_.en_sizecheck)
|
||||
// {
|
||||
// VLOG_MINI_1(LOG_LEVEL_DEBUG_INFO,"img_conf_.en_sizecheck :%d\r\n",img_conf_.en_sizecheck);
|
||||
// printf("img_conf_.en_sizecheck = %d\r\n",img_conf_.en_sizecheck);
|
||||
// ret = hg_imgproc::size_detection(handle);
|
||||
// VLOG_MINI_1(LOG_LEVEL_DEBUG_INFO,"img_conf_.en_sizecheck ret:%d\r\n",ret);
|
||||
// if (ret == SCANNER_ERR_DEVICE_SIZE_CHECK)
|
||||
// {
|
||||
|
||||
// status_ = SCANNER_ERR_DEVICE_SIZE_CHECK;
|
||||
// return ;
|
||||
// }
|
||||
|
||||
|
||||
// }
|
||||
|
||||
if (!isremove_left_hole)
|
||||
{
|
||||
isremove_top_hole_threshold = 0;
|
||||
}
|
||||
if (!isremove_right_hole)
|
||||
{
|
||||
isremove_right_hole_threshold = 0;
|
||||
}
|
||||
if (!isremove_top_hole)
|
||||
{
|
||||
isremove_top_hole_threshold = 0;
|
||||
}
|
||||
if (!isremove_low_hole)
|
||||
{
|
||||
isremove_low_hole_threshold = 0;
|
||||
}
|
||||
if (isremove_left_hole || isremove_right_hole || isremove_top_hole || isremove_low_hole)
|
||||
{
|
||||
ret = hg_imgproc::fillhole(handle, isremove_top_hole_threshold, isremove_low_hole_threshold, isremove_left_hole_threshold, isremove_right_hole_threshold);
|
||||
}
|
||||
|
||||
/////////////////////////////////////111111111111111111111111111//////////////////////////////////
|
||||
ret = hg_imgproc::auto_crop(handle); //首次必须先调用这个算法
|
||||
|
||||
|
||||
if (img_conf_.is_autodiscradblank_normal || img_conf_.is_autodiscradblank_vince)
|
||||
{
|
||||
ret = hg_imgproc::discardBlank(handle);
|
||||
|
|
|
@ -677,22 +677,7 @@ void hg_scanner_302::image_process(std::shared_ptr<tiny_buffer>& buff)
|
|||
err = hg_imgproc::decode(handle,pid_);
|
||||
|
||||
VLOG_MINI_3(LOG_LEVEL_DEBUG_INFO, "Image process parameter: 0x%x%08x, multi out: %s\n", ((unsigned int*)&image_prc_param_.value)[1], ((unsigned int*)&image_prc_param_.value)[0], is_multiout ? "true" : "false");
|
||||
if (!isremove_left_hole)
|
||||
{
|
||||
isremove_top_hole_threshold = 0;
|
||||
}
|
||||
if (!isremove_right_hole)
|
||||
{
|
||||
isremove_right_hole_threshold = 0;
|
||||
}
|
||||
if (!isremove_top_hole)
|
||||
{
|
||||
isremove_top_hole_threshold = 0;
|
||||
}
|
||||
if (!isremove_low_hole)
|
||||
{
|
||||
isremove_low_hole_threshold = 0;
|
||||
}
|
||||
|
||||
if (isremove_left_hole || isremove_right_hole || isremove_top_hole || isremove_low_hole)
|
||||
{
|
||||
err = hg_imgproc::fillhole(handle, isremove_top_hole_threshold, isremove_low_hole_threshold, isremove_left_hole_threshold, isremove_right_hole_threshold);
|
||||
|
|
|
@ -509,22 +509,7 @@ void hg_scanner_400::image_process(std::shared_ptr<tiny_buffer>& buffer)
|
|||
hg_imgproc::load_buffer(handle, buffer);
|
||||
hg_imgproc::decode(handle,pid_);
|
||||
|
||||
if (!isremove_left_hole)
|
||||
{
|
||||
isremove_top_hole_threshold = 0;
|
||||
}
|
||||
if (!isremove_right_hole)
|
||||
{
|
||||
isremove_right_hole_threshold = 0;
|
||||
}
|
||||
if (!isremove_top_hole)
|
||||
{
|
||||
isremove_top_hole_threshold = 0;
|
||||
}
|
||||
if (!isremove_low_hole)
|
||||
{
|
||||
isremove_low_hole_threshold = 0;
|
||||
}
|
||||
|
||||
if (isremove_left_hole || isremove_right_hole || isremove_top_hole || isremove_low_hole)
|
||||
{
|
||||
ret = hg_imgproc::fillhole(handle, isremove_top_hole_threshold, isremove_low_hole_threshold, isremove_left_hole_threshold, isremove_right_hole_threshold);
|
||||
|
|
|
@ -682,22 +682,7 @@ void hg_scanner_402::image_process(std::shared_ptr<tiny_buffer>& buff)
|
|||
err = hg_imgproc::decode(handle,pid_);
|
||||
|
||||
VLOG_MINI_3(LOG_LEVEL_DEBUG_INFO, "Image process parameter: 0x%x%08x, multi out: %s\n", ((unsigned int*)&image_prc_param_.value)[1], ((unsigned int*)&image_prc_param_.value)[0], is_multiout ? "true" : "false");
|
||||
if (!isremove_left_hole)
|
||||
{
|
||||
isremove_top_hole_threshold = 0;
|
||||
}
|
||||
if (!isremove_right_hole)
|
||||
{
|
||||
isremove_right_hole_threshold = 0;
|
||||
}
|
||||
if (!isremove_top_hole)
|
||||
{
|
||||
isremove_top_hole_threshold = 0;
|
||||
}
|
||||
if (!isremove_low_hole)
|
||||
{
|
||||
isremove_low_hole_threshold = 0;
|
||||
}
|
||||
|
||||
if (isremove_left_hole || isremove_right_hole || isremove_top_hole || isremove_low_hole)
|
||||
{
|
||||
err = hg_imgproc::fillhole(handle, isremove_top_hole_threshold, isremove_low_hole_threshold, isremove_left_hole_threshold, isremove_right_hole_threshold);
|
||||
|
|
Loading…
Reference in New Issue