除3399设备,增加色散算法处理
This commit is contained in:
parent
6a0fd39747
commit
eaa0fb02a6
|
@ -5284,6 +5284,12 @@ bool hg_scanner::image_process(std::shared_ptr<tiny_buffer>& buffer, uint32_t id
|
|||
(this->*dump_img_)(ImagePrc_pHandle_, "auto_crop");
|
||||
}
|
||||
|
||||
if (pid_ != 0x239 && pid_ != 0x439 && image_prc_param_.bits.color_mode == COLOR_MODE_24_BITS)
|
||||
{
|
||||
ret = hg_imgproc::dispersion(ImagePrc_pHandle_);
|
||||
(this->*dump_img_)(ImagePrc_pHandle_, "dispersion");
|
||||
}
|
||||
|
||||
if (is_quality_ == IMG_SPEED && resolution_ >= 300)//239
|
||||
{
|
||||
VLOG_MINI_1(LOG_LEVEL_DEBUG_INFO, "set resolution_ is :%d\n", resolution_)
|
||||
|
|
|
@ -854,6 +854,26 @@ namespace hg_imgproc
|
|||
}
|
||||
return SCANNER_ERR_OK;
|
||||
}
|
||||
int dispersion()
|
||||
{
|
||||
int ret = SCANNER_ERR_OK;
|
||||
std::vector<cv::Mat> mats(mats_);
|
||||
mats_.clear();
|
||||
|
||||
CImageApplyDispersion disp;
|
||||
|
||||
for (int i = 0; i < mats.size(); ++i)
|
||||
{
|
||||
disp.apply(mats[i], 0);
|
||||
mats_.push_back(mats[i]);
|
||||
}
|
||||
|
||||
if (mats_.empty())
|
||||
{
|
||||
return SCANNER_ERR_NO_DATA;
|
||||
}
|
||||
return SCANNER_ERR_OK;
|
||||
}
|
||||
int fillhole(float top,float low,float l,float r)
|
||||
{
|
||||
int ret = SCANNER_ERR_OK;
|
||||
|
@ -1989,6 +2009,10 @@ namespace hg_imgproc
|
|||
{
|
||||
return ((imgproc*)himg)->auto_crop(dpi);
|
||||
}
|
||||
int dispersion(HIMGPRC himg)
|
||||
{
|
||||
return ((imgproc*)himg)->dispersion();
|
||||
}
|
||||
int fillhole(HIMGPRC himg, float top, float low, float l, float r)
|
||||
{
|
||||
return ((imgproc*)himg)->fillhole(top, low, l,r);
|
||||
|
|
|
@ -186,6 +186,7 @@ namespace hg_imgproc
|
|||
int multi_out_red(HIMGPRC himg);
|
||||
int auto_matic_color(HIMGPRC himg,int color_type);
|
||||
int auto_crop(HIMGPRC himg, float dpi);
|
||||
int dispersion(HIMGPRC himg);
|
||||
int fillhole(HIMGPRC himg, float top, float low, float r, float l);
|
||||
int resolution_change(HIMGPRC himg,float dpi3288);
|
||||
int croprect(HIMGPRC himg);
|
||||
|
|
Loading…
Reference in New Issue