mirror of http://192.168.1.51:8099/lmh188/twain3.0
1.修正灰度颜色模式下图片进行二值化的问题。
This commit is contained in:
parent
6add56a846
commit
564d1d94a3
|
@ -63,7 +63,7 @@ void CImageProcPage::ImageProcPageUpdate(int val,bool is_Crop)
|
|||
{
|
||||
((CButton*)GetDlgItem(IDC_ADVANCEDSET))->EnableWindow(false);
|
||||
}
|
||||
if (0 == val)//彩色
|
||||
if (0 == val||val==3)//彩色
|
||||
{
|
||||
m_temp->SetCurSel(0);
|
||||
m_temp->EnableWindow(FALSE);
|
||||
|
|
|
@ -555,7 +555,7 @@ void CTwainUI::GetGScanCap(GScanCap & cap)
|
|||
|
||||
void CTwainUI::UpdateUi()
|
||||
{
|
||||
m_pageImageProc->m_cmBoxFilter.EnableWindow(m_pageBasic->m_cmBoxColorMode->GetCurSel() != 0);
|
||||
m_pageImageProc->m_cmBoxFilter.EnableWindow((m_pageBasic->m_cmBoxColorMode->GetCurSel() != 0) && (m_pageBasic->m_cmBoxColorMode->GetCurSel() != 3));
|
||||
INT dupindex = m_pageBasic->m_cmBoxDuplex->GetCurSel();
|
||||
BOOL enableback = dupindex == 0 || dupindex == 4;
|
||||
if (enableback)
|
||||
|
|
|
@ -414,7 +414,7 @@ void ImageMatQueue::proc()
|
|||
if (scanParam.pixtype == 1 && scanParam.hsvcorrect)
|
||||
if (mats[i].channels() == 3)
|
||||
cvtColor(mats[i], mats[i], cv::COLOR_BGR2GRAY);
|
||||
idata = (scanParam.pixtype == 0 || ((scanParam.automaticcolortype == 0) && (mats[i].channels() == 1))) ? (IMat2Bmp)Mat2BmpBw(mats[i], scanParam.resolution_dst) : Mat2Bmp(mats[i], scanParam.resolution_dst);
|
||||
idata = (scanParam.pixtype == 0 || (((scanParam.automaticcolortype == 0)&&(scanParam.automaticcolor==true)) && (mats[i].channels() == 1))) ? (IMat2Bmp)Mat2BmpBw(mats[i], scanParam.resolution_dst) : Mat2Bmp(mats[i], scanParam.resolution_dst);
|
||||
if (!scanParam.multi_output_red)
|
||||
mats[i].release();
|
||||
|
||||
|
|
|
@ -20,60 +20,60 @@ using namespace std;
|
|||
*************************************/
|
||||
|
||||
//<!基本选项卡
|
||||
#define PIXTYPE "iPixType"
|
||||
#define AUTOMATICCOLOR "iautomaticcolor"
|
||||
#define AUTOMATICCOLORTYPR "iautomaticcolortype"
|
||||
#define PAPARSIZE "iPaparSize"
|
||||
#define ENSIZECHECK "iEnSizeCheck"
|
||||
#define PAPERALIGN "iPaperAlign"
|
||||
#define RESOLUTION "iResolution"
|
||||
#define DUPLEX "iDuplex"
|
||||
#define DISCARBLANK "bDiscardBlank"
|
||||
#define DISCARBLANKVINCE "bDiscardBlankVince"
|
||||
#define DISCARBLANK_VALUE "discardblank_percent"
|
||||
#define DB_AREANUM "iAreaNum"
|
||||
#define DB_DEVNMAX "iDevnMax"
|
||||
#define FLOD "bFlod"
|
||||
#define AUTOCROP "bAuotCrop"
|
||||
#define SWITCHFRONTBACK "bSwitchFrontBack"
|
||||
const std::string PIXTYPE = "iPixType";
|
||||
const std::string AUTOMATICCOLOR = "iautomaticcolor";
|
||||
const std::string AUTOMATICCOLORTYPR = "iautomaticcolortype";
|
||||
const std::string PAPARSIZE = "iPaparSize";
|
||||
const std::string ENSIZECHECK = "iEnSizeCheck";
|
||||
const std::string PAPERALIGN = "iPaperAlign";
|
||||
const std::string RESOLUTION = "iResolution";
|
||||
const std::string DUPLEX = "iDuplex";
|
||||
const std::string DISCARBLANK = "bDiscardBlank";
|
||||
const std::string DISCARBLANKVINCE = "bDiscardBlankVince";
|
||||
const std::string DISCARBLANK_VALUE = "discardblank_percent";
|
||||
const std::string DB_AREANUM = "iAreaNum";
|
||||
const std::string DB_DEVNMAX = "iDevnMax";
|
||||
const std::string FLOD = "bFlod";
|
||||
const std::string AUTOCROP = "bAuotCrop";
|
||||
const std::string SWITCHFRONTBACK = "bSwitchFrontBack";
|
||||
|
||||
|
||||
//<!亮度对比度选项卡
|
||||
#define AUTOCONTRAST "bAutoContrast"
|
||||
#define BRIGHTNESS "iBrightness"
|
||||
#define CONTRAST "iContrast"
|
||||
#define GAMMA_ "dGamma"
|
||||
const std::string AUTOCONTRAST = "bAutoContrast";
|
||||
const std::string BRIGHTNESS = "iBrightness";
|
||||
const std::string CONTRAST = "iContrast";
|
||||
const std::string GAMMA_ = "dGamma";
|
||||
|
||||
|
||||
//<!图像处理选项卡
|
||||
#define FILTERTYPE "iFilter"
|
||||
#define ENHANCECOLOR "iEnhance"
|
||||
#define SHARPENTYPE "iSharpen"
|
||||
#define FILLBLACK "bFillBlcak"
|
||||
#define AUTODESCREW "bAutoDescrew"
|
||||
#define MULTIOUTPUT "iMultiOutPut"
|
||||
#define OUTHOLE "bOutHole"
|
||||
#define OUTHOLERATIO "iOutHoleRatio"
|
||||
#define DETACHNOISE "detachnoise"
|
||||
#define DETACHNOISEVALUE "detachnoisevalue"
|
||||
#define HSVCORRECT "bHsvCorrect"
|
||||
const std::string FILTERTYPE = "iFilter";
|
||||
const std::string ENHANCECOLOR = "iEnhance";
|
||||
const std::string SHARPENTYPE = "iSharpen";
|
||||
const std::string FILLBLACK = "bFillBlcak";
|
||||
const std::string AUTODESCREW = "bAutoDescrew";
|
||||
const std::string MULTIOUTPUT = "iMultiOutPut";
|
||||
const std::string OUTHOLE = "bOutHole";
|
||||
const std::string OUTHOLERATIO = "iOutHoleRatio";
|
||||
const std::string DETACHNOISE = "detachnoise";
|
||||
const std::string DETACHNOISEVALUE = "detachnoisevalue";
|
||||
const std::string HSVCORRECT = "bHsvCorrect";
|
||||
|
||||
//<!送纸选项卡
|
||||
#define ULTRADETECT "bUltrasonicDetect"
|
||||
#define BINDINGDETECT "bBindingDetect"
|
||||
#define SCANCOUNT "ScanCount"
|
||||
#define DOCORIENTATION "bOrientation"
|
||||
#define AUTO_TEXT "bAutoText"
|
||||
#define BACKROTATE180 "iBackRotate180"
|
||||
#define DOGEAR_DETECTION "dogeardetection"
|
||||
#define SCREWDETECT "bScrewDetect"
|
||||
#define SCREWLEVEL "iScrewLevel"
|
||||
#define ITEMCAPTION "Caption"
|
||||
#define SAVEPATH "SavePath"
|
||||
#define ISCONVEX "isConvex"
|
||||
#define INDENT "Indent"
|
||||
#define AUTOCROP_THRESHOLD "AutoCrop_Threshold"
|
||||
#define NOISE "Noise"
|
||||
const std::string ULTRADETECT = "bUltrasonicDetect";
|
||||
const std::string BINDINGDETECT = "bBindingDetect";
|
||||
const std::string SCANCOUNT = "ScanCount";
|
||||
const std::string DOCORIENTATION = "bOrientation";
|
||||
const std::string AUTO_TEXT = "bAutoText";
|
||||
const std::string BACKROTATE180 = "iBackRotate180";
|
||||
const std::string DOGEAR_DETECTION = "dogeardetection";
|
||||
const std::string SCREWDETECT = "bScrewDetect";
|
||||
const std::string SCREWLEVEL = "iScrewLevel";
|
||||
const std::string ITEMCAPTION = "Caption";
|
||||
const std::string SAVEPATH = "SavePath";
|
||||
const std::string ISCONVEX = "isConvex";
|
||||
const std::string INDENT = "Indent";
|
||||
const std::string AUTOCROP_THRESHOLD = "AutoCrop_Threshold";
|
||||
const std::string NOISE = "Noise";
|
||||
|
||||
|
||||
/******************
|
||||
|
@ -184,7 +184,7 @@ struct GScanCap
|
|||
{
|
||||
byte papertype; /**< the current paper source ADF or Flatbed*/
|
||||
PaperAlign paperAlign;
|
||||
byte en_sizecheck;
|
||||
byte en_sizecheck; /**< ³ß´ç¼ì²â*/
|
||||
float imageRotateDegree;
|
||||
byte is_duplex; /**< True to use duplex false for simplex, ignored if flatbed*/
|
||||
byte en_fold;
|
||||
|
|
|
@ -1742,8 +1742,6 @@ Result HuagaoDs::identityOpenDs(const Identity&) {
|
|||
m_caps[(CapType)(CapTypeEx::TwEx_CroporDesaskewIndent)] = [this](Msg msg, Capability& data)->Result {
|
||||
switch (msg) {
|
||||
case Msg::Get:
|
||||
data = Capability::createEnumeration<UInt8>((CapType)(CapTypeEx::TwEx_CroporDesaskewIndent), m_scanparam->indent);
|
||||
return success();
|
||||
case Msg::GetCurrent:
|
||||
data = Capability::createOneValue<UInt8>((CapType)(CapTypeEx::TwEx_CroporDesaskewIndent), m_scanparam->indent);
|
||||
return success();
|
||||
|
@ -1769,8 +1767,6 @@ Result HuagaoDs::identityOpenDs(const Identity&) {
|
|||
m_caps[(CapType)(CapTypeEx::TwEx_CropNoise)] = [this](Msg msg, Capability& data)->Result {
|
||||
switch (msg) {
|
||||
case Msg::Get:
|
||||
data = Capability::createEnumeration<UInt8>((CapType)(CapTypeEx::TwEx_CropNoise), m_scanparam->noise);
|
||||
return success();
|
||||
case Msg::GetCurrent:
|
||||
data = Capability::createOneValue<UInt8>((CapType)(CapTypeEx::TwEx_CropNoise), m_scanparam->noise);
|
||||
return success();
|
||||
|
@ -1796,8 +1792,6 @@ Result HuagaoDs::identityOpenDs(const Identity&) {
|
|||
m_caps[(CapType)(CapTypeEx::TwEx_CroporDesaskewThreshold)] = [this](Msg msg, Capability& data)->Result {
|
||||
switch (msg) {
|
||||
case Msg::Get:
|
||||
data = Capability::createEnumeration<UInt8>((CapType)(CapTypeEx::TwEx_CroporDesaskewThreshold), m_scanparam->AutoCrop_threshold);
|
||||
return success();
|
||||
case Msg::GetCurrent:
|
||||
data = Capability::createOneValue<UInt8>((CapType)(CapTypeEx::TwEx_CroporDesaskewThreshold), m_scanparam->AutoCrop_threshold);
|
||||
return success();
|
||||
|
|
Binary file not shown.
BIN
huagao/stdafx.h
BIN
huagao/stdafx.h
Binary file not shown.
Loading…
Reference in New Issue