调整不同分辨率扫描的测试项

This commit is contained in:
yangjiaxuan 2024-10-19 16:49:31 +08:00
parent 9a0a560090
commit 9afb4f1f00
4 changed files with 417 additions and 351 deletions

View File

@ -282,7 +282,10 @@ void Form_mainInterface::updateDistortionItem(bool pass)
if (item != nullptr) if (item != nullptr)
{ {
QString name = m_map_title_name.value(m_curItemName).name; QString name = m_map_title_name.value(m_curItemName).name;
if (m_curItemName== item->text() && HGPDTTOOLDB_NAME_VERIFY_DISTORTION_VAL == name) if (m_curItemName== item->text() &&
(HGPDTTOOLDB_NAME_VERIFY_DISTORTION_VAL_200DPI == name ||
HGPDTTOOLDB_NAME_VERIFY_DISTORTION_VAL_300DPI == name ||
HGPDTTOOLDB_NAME_VERIFY_DISTORTION_VAL_600DPI == name))
{ {
ui->tableWidget->item(i, 2)->setTextAlignment(Qt::AlignHCenter | Qt::AlignVCenter); ui->tableWidget->item(i, 2)->setTextAlignment(Qt::AlignHCenter | Qt::AlignVCenter);
ui->tableWidget->item(i, 2)->setBackgroundColor(pass ? QColor(0,255,0) : QColor(255,0,0)); ui->tableWidget->item(i, 2)->setBackgroundColor(pass ? QColor(0,255,0) : QColor(255,0,0));
@ -294,7 +297,8 @@ void Form_mainInterface::updateDistortionItem(bool pass)
writeTestLog(tr("Tester: %1, Test item: %2, Test result: Pass!") writeTestLog(tr("Tester: %1, Test item: %2, Test result: Pass!")
.arg(m_accountName).arg(m_curItemName)); .arg(m_accountName).arg(m_curItemName));
on_pbtn_nextStep_clicked(); if (HGPDTTOOLDB_NAME_VERIFY_DISTORTION_VAL_600DPI != name)
on_pbtn_nextStep_clicked();
break; break;
} }
} }
@ -493,7 +497,7 @@ void Form_mainInterface::on_testGetDevCpuDisk(int cpu, int disk)
void Form_mainInterface::on_testOpenCacheFile(QString name) void Form_mainInterface::on_testOpenCacheFile(QString name)
{ {
if (name == HGPDTTOOLDB_NAME_IMAGE_GRAY_QUALITY && m_curDpi == 600) if ((name == HGPDTTOOLDB_TITLE_IMAGER_QUALITY_PHOTO_GRAY_600DPI || name == HGPDTTOOLDB_TITLE_IMAGE_QUALITY_GRAY_600DPI) && m_curDpi == 600)
{ {
if (m_multiIndex != -1) if (m_multiIndex != -1)
{ {
@ -663,7 +667,7 @@ void Form_mainInterface::initTableWidgetUi()
AnalysisJson analysisJson(m_deviceConfig); AnalysisJson analysisJson(m_deviceConfig);
std::vector<AnalysisJson::json_node> list_jsonNode = analysisJson.GetNode(); std::vector<AnalysisJson::json_node> list_jsonNode = analysisJson.GetNode();
int count = list_jsonNode.size(); int count = (int)list_jsonNode.size();
ui->tableWidget->setRowCount(count); ui->tableWidget->setRowCount(count);
int index = 0; int index = 0;
for(int i = 0; i < count; ++i) for(int i = 0; i < count; ++i)
@ -1087,7 +1091,7 @@ void Form_mainInterface::on_pbtn_start_clicked()
{ {
resetCorrectItems(); resetCorrectItems();
} }
if (name == HGPDTTOOLDB_NAME_VERIFY_DISTORTION_VAL && title.contains("200dpi")) if (name == HGPDTTOOLDB_NAME_VERIFY_DISTORTION_VAL_200DPI)
{ {
ui->label_imgInfo->clear(); ui->label_imgInfo->clear();
ui->label_destortionInfo_200dpi->clear(); ui->label_destortionInfo_200dpi->clear();
@ -1107,7 +1111,6 @@ void Form_mainInterface::on_pbtn_start_clicked()
if (dpi > 0) if (dpi > 0)
{ {
m_curDpi = dpi; m_curDpi = dpi;
swprintf(buf, L"%d", dpi);
} }
std::string correctData = m_map_title_name.value(title).dynamic_correct_data.toStdString(); std::string correctData = m_map_title_name.value(title).dynamic_correct_data.toStdString();
@ -1124,7 +1127,7 @@ void Form_mainInterface::on_pbtn_start_clicked()
m_mainwnd->addTestingRef(); m_mainwnd->addTestingRef();
int ret = 0; int ret = 0;
if (buf != nullptr || (dpi > 0)) if (buf != nullptr)
{ {
ret = func_test_go(name.toStdWString().c_str(), (const wchar_t*)buf); ret = func_test_go(name.toStdWString().c_str(), (const wchar_t*)buf);
} }

View File

@ -32,7 +32,9 @@ parameter* hgscanner::get_user_input(data_from from, value_type type, const wcha
if (from == DATA_FROM_USER) if (from == DATA_FROM_USER)
{ {
Dialog_UserInput dlg(type, QString::fromStdWString(title), desc, m_interface); Dialog_UserInput dlg(type, QString::fromStdWString(title), desc, m_interface);
if (wcscmp(L"SET_DISTORTION_VAL", title) == 0) if (wcscmp(L"SET_DISTORTION_VAL_200DPI", title) == 0 ||
wcscmp(L"SET_DISTORTION_VAL_300DPI", title) == 0 ||
wcscmp(L"SET_DISTORTION_VAL_600DPI", title) == 0)
{ {
dlg.setDistortValue(m_distortValue); dlg.setDistortValue(m_distortValue);
} }
@ -197,7 +199,9 @@ void hgscanner::test_callback(const wchar_t* name, test_event ev, void* data, si
float distortion = value->scaleXY; float distortion = value->scaleXY;
bool verify = false; bool verify = false;
if (wcscmp(name, HGPDTTOOLDB_NAME_VERIFY_DISTORTION_VAL) == 0) if (wcscmp(name, HGPDTTOOLDB_NAME_VERIFY_DISTORTION_VAL_200DPI) == 0 ||
wcscmp(name, HGPDTTOOLDB_NAME_VERIFY_DISTORTION_VAL_300DPI) == 0 ||
wcscmp(name, HGPDTTOOLDB_NAME_VERIFY_DISTORTION_VAL_600DPI) == 0)
verify = true; verify = true;
emit m_interface->testDistortion(width, height, distortion, verify); emit m_interface->testDistortion(width, height, distortion, verify);

View File

@ -32,14 +32,37 @@ static struct Test_Map
{HGPDTTOOLDB_NAME_SCANNING_SENSOR ,HGPDTTOOLDB_TITLE_SCANNING_SENSOR}, {HGPDTTOOLDB_NAME_SCANNING_SENSOR ,HGPDTTOOLDB_TITLE_SCANNING_SENSOR},
{HGPDTTOOLDB_NAME_PLACE_CORRECTION_PAPER ,HGPDTTOOLDB_TITLE_PLACE_CORRECTION_PAPER}, {HGPDTTOOLDB_NAME_PLACE_CORRECTION_PAPER ,HGPDTTOOLDB_TITLE_PLACE_CORRECTION_PAPER},
{HGPDTTOOLDB_NAME_AUTO_FLAT_FIELD ,HGPDTTOOLDB_TITLE_AUTO_FLAT_FIELD}, {HGPDTTOOLDB_NAME_AUTO_FLAT_FIELD ,HGPDTTOOLDB_TITLE_AUTO_FLAT_FIELD},
{HGPDTTOOLDB_NAME_IMAGE_COLOR_QUALITY ,HGPDTTOOLDB_TITLE_IMAGE_QUALITY}, {HGPDTTOOLDB_NAME_PRESSUER_TEST_RGB_200DPI ,HGPDTTOOLDB_TITLE_PRESSUER_TEST_RGB_200DPI},
{HGPDTTOOLDB_NAME_IMAGE_GRAY_QUALITY ,HGPDTTOOLDB_TITLE_IMAGE_QUALITY}, {HGPDTTOOLDB_NAME_PRESSUER_TEST_GRAY_200DPI ,HGPDTTOOLDB_TITLE_PRESSUER_TEST_RGB_300DPI},
{HGPDTTOOLDB_NAME_IMAGE_COLOR_QUALITY_PHOTO ,HGPDTTOOLDB_TITLE_IMAGE_QUALITY_PHOTO }, {HGPDTTOOLDB_NAME_PRESSUER_TEST_RGB_300DPI ,HGPDTTOOLDB_TITLE_PRESSUER_TEST_RGB_600DPI},
{HGPDTTOOLDB_NAME_IMAGE_GRAY_QUALITY_PHOTO ,HGPDTTOOLDB_TITLE_IMAGE_QUALITY_PHOTO }, {HGPDTTOOLDB_NAME_PRESSUER_TEST_GRAY_300DPI ,HGPDTTOOLDB_TITLE_PRESSUER_TEST_GRAY_200DPI},
{HGPDTTOOLDB_NAME_PRESSUER_TEST_RGB_600DPI ,HGPDTTOOLDB_TITLE_PRESSUER_TEST_GRAY_300DPI},
{HGPDTTOOLDB_NAME_PRESSUER_TEST_GRAY_600DPI ,HGPDTTOOLDB_TITLE_PRESSUER_TEST_GRAY_600DPI},
{HGPDTTOOLDB_NAME_IMAGE_QUALITY_RGB_200DPI ,HGPDTTOOLDB_TITLE_IMAGE_QUALITY_RGB_200DPI},
{HGPDTTOOLDB_NAME_IMAGE_QUALITY_GRAY_200DPI ,HGPDTTOOLDB_TITLE_IMAGE_QUALITY_GRAY_200DPI},
{HGPDTTOOLDB_NAME_IMAGE_QUALITY_RGB_300DPI ,HGPDTTOOLDB_TITLE_IMAGE_QUALITY_RGB_300DPI},
{HGPDTTOOLDB_NAME_IMAGE_QUALITY_GRAY_300DPI ,HGPDTTOOLDB_TITLE_IMAGE_QUALITY_GRAY_300DPI},
{HGPDTTOOLDB_NAME_IMAGE_QUALITY_RGB_600DPI ,HGPDTTOOLDB_TITLE_IMAGE_QUALITY_RGB_600DPI},
{HGPDTTOOLDB_NAME_IMAGE_QUALITY_GRAY_600DPI ,HGPDTTOOLDB_TITLE_IMAGE_QUALITY_GRAY_600DPI},
{HGPDTTOOLDB_NAME_IMAGE_QUALITY_PHOTO_RGB_200DPI ,HGPDTTOOLDB_TITLE_IMAGE_QUALITY_PHOTO_RGB_200DPI},
{HGPDTTOOLDB_NAME_IMAGE_QUALITY_PHOTO_GRAY_200DPI ,HGPDTTOOLDB_TITLE_IMAGE_QUALITY_PHOTO_GRAY_200DPI},
{HGPDTTOOLDB_NAME_IMAGE_QUALITY_PHOTO_RGB_300DPI ,HGPDTTOOLDB_TITLE_IMAGE_QUALITY_PHOTO_RGB_300DPI},
{HGPDTTOOLDB_NAME_IMAGE_QUALITY_PHOTO_GRAY_300DPI ,HGPDTTOOLDB_TITLE_IMAGE_QUALITY_PHOTO_GRAY_300DPI},
{HGPDTTOOLDB_NAME_IMAGE_QUALITY_PHOTO_RGB_600DPI ,HGPDTTOOLDB_TITLE_IMAGE_QUALITY_PHOTO_RGB_600DPI},
{HGPDTTOOLDB_NAME_IMAGER_QUALITY_PHOTO_GRAY_600DPI ,HGPDTTOOLDB_TITLE_IMAGER_QUALITY_PHOTO_GRAY_600DPI},
{HGPDTTOOLDB_NAME_COLORCARD_IMAGEING_QUALITY ,HGPDTTOOLDB_TITLE_COLORCARD_IMAGEING_QUALITY}, {HGPDTTOOLDB_NAME_COLORCARD_IMAGEING_QUALITY ,HGPDTTOOLDB_TITLE_COLORCARD_IMAGEING_QUALITY},
{HGPDTTOOLDB_NAME_COLORCARD_BIAS_IMAGEING_QUALITY ,HGPDTTOOLDB_TITLE_COLORCARD_BIAS_IMAGEING_QUALITY}, {HGPDTTOOLDB_NAME_COLORCARD_BIAS_IMAGEING_QUALITY ,HGPDTTOOLDB_TITLE_COLORCARD_BIAS_IMAGEING_QUALITY},
{HGPDTTOOLDB_NAME_CLARITY_QUALITY ,HGPDTTOOLDB_TITLE_CLARITY_QUALITY}, {HGPDTTOOLDB_NAME_CLARITY_QUALITY ,HGPDTTOOLDB_TITLE_CLARITY_QUALITY},
{HGPDTTOOLDB_NAME_GET_DISTORTION_VAL ,HGPDTTOOLDB_TITLE_DISTORTION}, {HGPDTTOOLDB_NAME_GET_DISTORTION_VAL_200DPI ,HGPDTTOOLDB_TITLE_GET_DISTORTION_VAL_200DPI},
{HGPDTTOOLDB_NAME_GET_DISTORTION_VAL_300DPI ,HGPDTTOOLDB_TITLE_GET_DISTORTION_VAL_300DPI},
{HGPDTTOOLDB_NAME_GET_DISTORTION_VAL_600DPI ,HGPDTTOOLDB_TITLE_GET_DISTORTION_VAL_600DPI},
{HGPDTTOOLDB_NAME_SET_DISTORTION_VAL_200DPI ,HGPDTTOOLDB_TITLE_SET_DISTORTION_VAL_200DPI},
{HGPDTTOOLDB_NAME_SET_DISTORTION_VAL_300DPI ,HGPDTTOOLDB_TITLE_SET_DISTORTION_VAL_300DPI},
{HGPDTTOOLDB_NAME_SET_DISTORTION_VAL_600DPI ,HGPDTTOOLDB_TITLE_SET_DISTORTION_VAL_600DPI},
{HGPDTTOOLDB_NAME_CONFIRM_DISTORTION_VAL ,HGPDTTOOLDB_TITLE_CONFIRM_DISTORTION_VAL},
{HGPDTTOOLDB_NAME_VERIFY_DISTORTION_VAL_200DPI ,HGPDTTOOLDB_TITLE_VERIFY_DISTORTION_VAL_200DPI},
{HGPDTTOOLDB_NAME_VERIFY_DISTORTION_VAL_300DPI ,HGPDTTOOLDB_TITLE_VERIFY_DISTORTION_VAL_300DPI},
{HGPDTTOOLDB_NAME_VERIFY_DISTORTION_VAL_600DPI ,HGPDTTOOLDB_TITLE_VERIFY_DISTORTION_VAL_600DPI},
{HGPDTTOOLDB_NAME_SEPARATER_MOTOR ,HGPDTTOOLDB_TITLE_SEPARATER_MOTOR}, {HGPDTTOOLDB_NAME_SEPARATER_MOTOR ,HGPDTTOOLDB_TITLE_SEPARATER_MOTOR},
{HGPDTTOOLDB_NAME_CLEAR_PAPER_PATH ,HGPDTTOOLDB_TITLE_CLEAR_PAPER_PATH}, {HGPDTTOOLDB_NAME_CLEAR_PAPER_PATH ,HGPDTTOOLDB_TITLE_CLEAR_PAPER_PATH},
{HGPDTTOOLDB_NAME_SKEW_DETECTION ,HGPDTTOOLDB_TITLE_SKEW_DETECTION}, {HGPDTTOOLDB_NAME_SKEW_DETECTION ,HGPDTTOOLDB_TITLE_SKEW_DETECTION},
@ -405,9 +428,13 @@ static int sane_ex_callback(SANE_Handle hdev, int code, void* data, unsigned int
wcscpy(buf, L"平场校正失败, 原因--->"); wcscpy(buf, L"平场校正失败, 原因--->");
} }
} }
else if (wcscmp(set_test_name_.c_str(), HGPDTTOOLDB_NAME_GET_DISTORTION_VAL) == 0 || else if (wcscmp(set_test_name_.c_str(), HGPDTTOOLDB_NAME_GET_DISTORTION_VAL_200DPI) == 0 ||
wcscmp(set_test_name_.c_str(), HGPDTTOOLDB_NAME_GET_DISTORTION_VAL_300DPI) == 0 ||
wcscmp(set_test_name_.c_str(), HGPDTTOOLDB_NAME_GET_DISTORTION_VAL_600DPI) == 0 ||
wcscmp(set_test_name_.c_str(), HGPDTTOOLDB_NAME_CONFIRM_DISTORTION_VAL) == 0 || wcscmp(set_test_name_.c_str(), HGPDTTOOLDB_NAME_CONFIRM_DISTORTION_VAL) == 0 ||
wcscmp(set_test_name_.c_str(), HGPDTTOOLDB_NAME_VERIFY_DISTORTION_VAL) == 0) wcscmp(set_test_name_.c_str(), HGPDTTOOLDB_NAME_VERIFY_DISTORTION_VAL_200DPI) == 0 ||
wcscmp(set_test_name_.c_str(), HGPDTTOOLDB_NAME_VERIFY_DISTORTION_VAL_300DPI) == 0 ||
wcscmp(set_test_name_.c_str(), HGPDTTOOLDB_NAME_VERIFY_DISTORTION_VAL_600DPI) == 0)
{ {
if (strcmp((char*)data, STATU_DESC_SCAN_STOPPED) != 0 || strcmp((char*)data, STATU_DESC_SCANNER_ERR_DEVICE_DISTORTION) == 0) if (strcmp((char*)data, STATU_DESC_SCAN_STOPPED) != 0 || strcmp((char*)data, STATU_DESC_SCANNER_ERR_DEVICE_DISTORTION) == 0)
{ {
@ -425,10 +452,18 @@ static int sane_ex_callback(SANE_Handle hdev, int code, void* data, unsigned int
break; break;
} }
} }
else if (wcscmp(set_test_name_.c_str(), HGPDTTOOLDB_NAME_IMAGE_COLOR_QUALITY) == 0 || else if (wcscmp(set_test_name_.c_str(), HGPDTTOOLDB_NAME_IMAGE_QUALITY_RGB_200DPI) == 0 ||
wcscmp(set_test_name_.c_str(), HGPDTTOOLDB_NAME_IMAGE_GRAY_QUALITY) == 0 || wcscmp(set_test_name_.c_str(), HGPDTTOOLDB_NAME_IMAGE_QUALITY_GRAY_200DPI) == 0 ||
wcscmp(set_test_name_.c_str(), HGPDTTOOLDB_NAME_IMAGE_GRAY_QUALITY_PHOTO) == 0 || wcscmp(set_test_name_.c_str(), HGPDTTOOLDB_NAME_IMAGE_QUALITY_RGB_300DPI) == 0 ||
wcscmp(set_test_name_.c_str(), HGPDTTOOLDB_NAME_IMAGE_GRAY_QUALITY_PHOTO) == 0) wcscmp(set_test_name_.c_str(), HGPDTTOOLDB_NAME_IMAGE_QUALITY_GRAY_300DPI) == 0 ||
wcscmp(set_test_name_.c_str(), HGPDTTOOLDB_NAME_IMAGE_QUALITY_RGB_600DPI) == 0 ||
wcscmp(set_test_name_.c_str(), HGPDTTOOLDB_NAME_IMAGE_QUALITY_GRAY_600DPI) == 0 ||
wcscmp(set_test_name_.c_str(), HGPDTTOOLDB_NAME_IMAGE_QUALITY_PHOTO_RGB_200DPI) == 0 ||
wcscmp(set_test_name_.c_str(), HGPDTTOOLDB_NAME_IMAGE_QUALITY_PHOTO_GRAY_200DPI) == 0 ||
wcscmp(set_test_name_.c_str(), HGPDTTOOLDB_NAME_IMAGE_QUALITY_PHOTO_RGB_300DPI) == 0 ||
wcscmp(set_test_name_.c_str(), HGPDTTOOLDB_NAME_IMAGE_QUALITY_PHOTO_GRAY_300DPI) == 0 ||
wcscmp(set_test_name_.c_str(), HGPDTTOOLDB_NAME_IMAGE_QUALITY_PHOTO_RGB_600DPI) == 0 ||
wcscmp(set_test_name_.c_str(), HGPDTTOOLDB_NAME_IMAGER_QUALITY_PHOTO_GRAY_600DPI) == 0)
{ {
if (strcmp((char*)data, STATU_DESC_SCAN_STOPPED) != 0) if (strcmp((char*)data, STATU_DESC_SCAN_STOPPED) != 0)
{ {
@ -453,24 +488,6 @@ static int sane_ex_callback(SANE_Handle hdev, int code, void* data, unsigned int
} }
h->io_control(IO_CTRL_CODE_SET_CIS_IMAGE, &close, &closelen); h->io_control(IO_CTRL_CODE_SET_CIS_IMAGE, &close, &closelen);
} }
else if (wcscmp(set_test_name_.c_str(), HGPDTTOOLDB_NAME_PRESSUER_TEST_RGB_200DPI) == 0
|| wcscmp(set_test_name_.c_str(), HGPDTTOOLDB_NAME_PRESSUER_TEST_GRAY_200DPI) == 0
|| wcscmp(set_test_name_.c_str(), HGPDTTOOLDB_NAME_PRESSUER_TEST_RGB_300DPI) == 0
|| wcscmp(set_test_name_.c_str(), HGPDTTOOLDB_NAME_PRESSUER_TEST_GRAY_300DPI) == 0
|| wcscmp(set_test_name_.c_str(), HGPDTTOOLDB_NAME_PRESSUER_TEST_RGB_600DPI) == 0
|| wcscmp(set_test_name_.c_str(), HGPDTTOOLDB_NAME_PRESSUER_TEST_GRAY_600DPI) == 0)
{
if (strcmp((char*)data, STATU_DESC_SCAN_STOPPED) != 0)
{
type = false;
wcscpy(buf, L"压力测试失败, 原因--->");
}
else
{
type = true;
wcscpy(buf, L"压力测试完成--->");
}
}
else if (wcscmp(set_test_name_.c_str(), HGPDTTOOLDB_NAME_COLORCARD_IMAGEING_QUALITY) == 0) else if (wcscmp(set_test_name_.c_str(), HGPDTTOOLDB_NAME_COLORCARD_IMAGEING_QUALITY) == 0)
{ {
if (strcmp((char*)data, STATU_DESC_SCAN_STOPPED) != 0) if (strcmp((char*)data, STATU_DESC_SCAN_STOPPED) != 0)
@ -618,27 +635,32 @@ static int sane_ex_callback(SANE_Handle hdev, int code, void* data, unsigned int
case SANE_EVENT_IMAGE_OK: case SANE_EVENT_IMAGE_OK:
{ {
if (wcscmp(set_test_name_.c_str(), HGPDTTOOLDB_NAME_CIS_ORIGINAL_IMAGE) == 0 if (wcscmp(set_test_name_.c_str(), HGPDTTOOLDB_NAME_CIS_ORIGINAL_IMAGE) == 0
|| wcscmp(set_test_name_.c_str(), HGPDTTOOLDB_NAME_IMAGE_COLOR_QUALITY) == 0
|| wcscmp(set_test_name_.c_str(), HGPDTTOOLDB_NAME_IMAGE_GRAY_QUALITY) == 0
|| wcscmp(set_test_name_.c_str(), HGPDTTOOLDB_NAME_IMAGE_COLOR_QUALITY_PHOTO) == 0
|| wcscmp(set_test_name_.c_str(), HGPDTTOOLDB_NAME_IMAGE_GRAY_QUALITY_PHOTO) == 0
|| wcscmp(set_test_name_.c_str(), HGPDTTOOLDB_NAME_SCAN_WORKING_STATUS) == 0
|| wcscmp(set_test_name_.c_str(), HGPDTTOOLDB_NAME_SKEW_DETECTION) == 0
|| wcscmp(set_test_name_.c_str(), HGPDTTOOLDB_NAME_IMAGE_GRAY_QUALITY) == 0
|| wcscmp(set_test_name_.c_str(), HGPDTTOOLDB_NAME_GET_DISTORTION_VAL) == 0
|| wcscmp(set_test_name_.c_str(), HGPDTTOOLDB_NAME_CONFIRM_DISTORTION_VAL) == 0
|| wcscmp(set_test_name_.c_str(), HGPDTTOOLDB_NAME_VERIFY_DISTORTION_VAL) == 0
|| wcscmp(set_test_name_.c_str(), HGPDTTOOLDB_NAME_SCANNING_SENSOR) == 0
|| wcscmp(set_test_name_.c_str(), HGPDTTOOLDB_NAME_COLORCARD_IMAGEING_QUALITY) == 0
|| wcscmp(set_test_name_.c_str(), HGPDTTOOLDB_NAME_COLORCARD_BIAS_IMAGEING_QUALITY) == 0
|| wcscmp(set_test_name_.c_str(), HGPDTTOOLDB_NAME_CLARITY_QUALITY) == 0
|| wcscmp(set_test_name_.c_str(), HGPDTTOOLDB_NAME_SINGLE_PAGE_TEST) == 0
|| wcscmp(set_test_name_.c_str(), HGPDTTOOLDB_NAME_PRESSUER_TEST_RGB_200DPI) == 0 || wcscmp(set_test_name_.c_str(), HGPDTTOOLDB_NAME_PRESSUER_TEST_RGB_200DPI) == 0
|| wcscmp(set_test_name_.c_str(), HGPDTTOOLDB_NAME_PRESSUER_TEST_GRAY_200DPI) == 0 || wcscmp(set_test_name_.c_str(), HGPDTTOOLDB_NAME_PRESSUER_TEST_GRAY_200DPI) == 0
|| wcscmp(set_test_name_.c_str(), HGPDTTOOLDB_NAME_PRESSUER_TEST_RGB_300DPI) == 0 || wcscmp(set_test_name_.c_str(), HGPDTTOOLDB_NAME_PRESSUER_TEST_RGB_300DPI) == 0
|| wcscmp(set_test_name_.c_str(), HGPDTTOOLDB_NAME_PRESSUER_TEST_GRAY_300DPI) == 0 || wcscmp(set_test_name_.c_str(), HGPDTTOOLDB_NAME_PRESSUER_TEST_GRAY_300DPI) == 0
|| wcscmp(set_test_name_.c_str(), HGPDTTOOLDB_NAME_PRESSUER_TEST_RGB_600DPI) == 0 || wcscmp(set_test_name_.c_str(), HGPDTTOOLDB_NAME_PRESSUER_TEST_RGB_600DPI) == 0
|| wcscmp(set_test_name_.c_str(), HGPDTTOOLDB_NAME_PRESSUER_TEST_GRAY_600DPI) == 0 || wcscmp(set_test_name_.c_str(), HGPDTTOOLDB_NAME_PRESSUER_TEST_GRAY_600DPI) == 0
|| wcscmp(set_test_name_.c_str(), HGPDTTOOLDB_NAME_IMAGE_QUALITY_RGB_200DPI) == 0
|| wcscmp(set_test_name_.c_str(), HGPDTTOOLDB_NAME_IMAGE_QUALITY_GRAY_200DPI) == 0
|| wcscmp(set_test_name_.c_str(), HGPDTTOOLDB_NAME_IMAGE_QUALITY_RGB_300DPI) == 0
|| wcscmp(set_test_name_.c_str(), HGPDTTOOLDB_NAME_IMAGE_QUALITY_GRAY_300DPI) == 0
|| wcscmp(set_test_name_.c_str(), HGPDTTOOLDB_NAME_IMAGE_QUALITY_RGB_600DPI) == 0
|| wcscmp(set_test_name_.c_str(), HGPDTTOOLDB_NAME_IMAGE_QUALITY_GRAY_600DPI) == 0
|| wcscmp(set_test_name_.c_str(), HGPDTTOOLDB_NAME_IMAGE_QUALITY_PHOTO_RGB_200DPI) == 0
|| wcscmp(set_test_name_.c_str(), HGPDTTOOLDB_NAME_IMAGE_QUALITY_PHOTO_GRAY_200DPI) == 0
|| wcscmp(set_test_name_.c_str(), HGPDTTOOLDB_NAME_IMAGE_QUALITY_PHOTO_RGB_300DPI) == 0
|| wcscmp(set_test_name_.c_str(), HGPDTTOOLDB_NAME_IMAGE_QUALITY_PHOTO_GRAY_300DPI) == 0
|| wcscmp(set_test_name_.c_str(), HGPDTTOOLDB_NAME_IMAGE_QUALITY_PHOTO_RGB_600DPI) == 0
|| wcscmp(set_test_name_.c_str(), HGPDTTOOLDB_NAME_IMAGER_QUALITY_PHOTO_GRAY_600DPI) == 0
|| wcscmp(set_test_name_.c_str(), HGPDTTOOLDB_NAME_SCAN_WORKING_STATUS) == 0
|| wcscmp(set_test_name_.c_str(), HGPDTTOOLDB_NAME_SKEW_DETECTION) == 0
|| wcscmp(set_test_name_.c_str(), HGPDTTOOLDB_NAME_CONFIRM_DISTORTION_VAL) == 0
|| wcscmp(set_test_name_.c_str(), HGPDTTOOLDB_NAME_SCANNING_SENSOR) == 0
|| wcscmp(set_test_name_.c_str(), HGPDTTOOLDB_NAME_COLORCARD_IMAGEING_QUALITY) == 0
|| wcscmp(set_test_name_.c_str(), HGPDTTOOLDB_NAME_COLORCARD_BIAS_IMAGEING_QUALITY) == 0
|| wcscmp(set_test_name_.c_str(), HGPDTTOOLDB_NAME_CLARITY_QUALITY) == 0
|| wcscmp(set_test_name_.c_str(), HGPDTTOOLDB_NAME_SINGLE_PAGE_TEST) == 0
|| wcscmp(set_test_name_.c_str(), HGPDTTOOLDB_NAME_IMAGE_CORRECTION) == 0 || wcscmp(set_test_name_.c_str(), HGPDTTOOLDB_NAME_IMAGE_CORRECTION) == 0
|| wcscmp(set_test_name_.c_str(), HGPDTTOOLDB_NAME_IMAGE_CORRECTION_RGB_200DPI) == 0 || wcscmp(set_test_name_.c_str(), HGPDTTOOLDB_NAME_IMAGE_CORRECTION_RGB_200DPI) == 0
|| wcscmp(set_test_name_.c_str(), HGPDTTOOLDB_NAME_IMAGE_CORRECTION_GRAY_200DPI) == 0 || wcscmp(set_test_name_.c_str(), HGPDTTOOLDB_NAME_IMAGE_CORRECTION_GRAY_200DPI) == 0
@ -654,11 +676,19 @@ static int sane_ex_callback(SANE_Handle hdev, int code, void* data, unsigned int
|| wcscmp(set_test_name_.c_str(), HGPDTTOOLDB_NAME_IMAGE_CORRECTION_RGB_LONGTEXT_200DPI) == 0 || wcscmp(set_test_name_.c_str(), HGPDTTOOLDB_NAME_IMAGE_CORRECTION_RGB_LONGTEXT_200DPI) == 0
|| wcscmp(set_test_name_.c_str(), HGPDTTOOLDB_NAME_IMAGE_CORRECTION_GRAY_LONGTEXT_200DPI) == 0 || wcscmp(set_test_name_.c_str(), HGPDTTOOLDB_NAME_IMAGE_CORRECTION_GRAY_LONGTEXT_200DPI) == 0
|| wcscmp(set_test_name_.c_str(), HGPDTTOOLDB_NAME_IMAGE_CORRECTION_RGB_LONGTEXT_300DPI) == 0 || wcscmp(set_test_name_.c_str(), HGPDTTOOLDB_NAME_IMAGE_CORRECTION_RGB_LONGTEXT_300DPI) == 0
|| wcscmp(set_test_name_.c_str(), HGPDTTOOLDB_NAME_IMAGE_CORRECTION_GRAY_LONGTEXT_300DPI) == 0) || wcscmp(set_test_name_.c_str(), HGPDTTOOLDB_NAME_IMAGE_CORRECTION_GRAY_LONGTEXT_300DPI) == 0
|| wcscmp(set_test_name_.c_str(), HGPDTTOOLDB_NAME_GET_DISTORTION_VAL_200DPI) == 0
|| wcscmp(set_test_name_.c_str(), HGPDTTOOLDB_NAME_GET_DISTORTION_VAL_300DPI) == 0
|| wcscmp(set_test_name_.c_str(), HGPDTTOOLDB_NAME_GET_DISTORTION_VAL_600DPI) == 0
|| wcscmp(set_test_name_.c_str(), HGPDTTOOLDB_NAME_VERIFY_DISTORTION_VAL_200DPI) == 0
|| wcscmp(set_test_name_.c_str(), HGPDTTOOLDB_NAME_VERIFY_DISTORTION_VAL_300DPI) == 0
|| wcscmp(set_test_name_.c_str(), HGPDTTOOLDB_NAME_VERIFY_DISTORTION_VAL_600DPI) == 0)
{ {
g_imageCount++; g_imageCount++;
if (wcscmp(set_test_name_.c_str(), HGPDTTOOLDB_NAME_GET_DISTORTION_VAL) == 0) if (wcscmp(set_test_name_.c_str(), HGPDTTOOLDB_NAME_GET_DISTORTION_VAL_200DPI) == 0 ||
wcscmp(set_test_name_.c_str(), HGPDTTOOLDB_NAME_GET_DISTORTION_VAL_300DPI) == 0 ||
wcscmp(set_test_name_.c_str(), HGPDTTOOLDB_NAME_GET_DISTORTION_VAL_600DPI) == 0)
{ {
is_distortion_get_image = true; is_distortion_get_image = true;
} }
@ -713,16 +743,37 @@ void test::init_test_map_()
test_map_[HGPDTTOOLDB_NAME_AUTO_FLAT_FIELD] = &test::test_auto_flat_field; test_map_[HGPDTTOOLDB_NAME_AUTO_FLAT_FIELD] = &test::test_auto_flat_field;
test_map_[HGPDTTOOLDB_NAME_REBOOT_DEVICE] = &test::test_reboot_device; test_map_[HGPDTTOOLDB_NAME_REBOOT_DEVICE] = &test::test_reboot_device;
test_map_[HGPDTTOOLDB_NAME_IMAGE_COLOR_QUALITY] = &test::test_image_color_quality; test_map_[HGPDTTOOLDB_NAME_PRESSUER_TEST_RGB_200DPI] = &test::test_pressuer_test_rgb_200dpi;
test_map_[HGPDTTOOLDB_NAME_IMAGE_GRAY_QUALITY] = &test::test_image_gray_quality; test_map_[HGPDTTOOLDB_NAME_PRESSUER_TEST_GRAY_200DPI] = &test::test_pressuer_test_gray_200dpi;
test_map_[HGPDTTOOLDB_NAME_PRESSUER_TEST_RGB_300DPI] = &test::test_pressuer_test_rgb_300dpi;
test_map_[HGPDTTOOLDB_NAME_PRESSUER_TEST_GRAY_300DPI] = &test::test_pressuer_test_gray_300dpi;
test_map_[HGPDTTOOLDB_NAME_PRESSUER_TEST_RGB_600DPI] = &test::test_pressuer_test_rgb_600dpi;
test_map_[HGPDTTOOLDB_NAME_PRESSUER_TEST_GRAY_600DPI] = &test::test_pressuer_test_gray_600dpi;
test_map_[HGPDTTOOLDB_NAME_IMAGE_COLOR_QUALITY_PHOTO] = &test::test_image_color_quality_photo; test_map_[HGPDTTOOLDB_NAME_IMAGE_QUALITY_RGB_200DPI] = &test::test_image_quality_rgb_200dpi;
test_map_[HGPDTTOOLDB_NAME_IMAGE_GRAY_QUALITY_PHOTO] = &test::test_image_gray_quality_photo; test_map_[HGPDTTOOLDB_NAME_IMAGE_QUALITY_GRAY_200DPI] = &test::test_image_quality_gray_200dpi;
test_map_[HGPDTTOOLDB_NAME_IMAGE_QUALITY_RGB_300DPI] = &test::test_image_quality_rgb_300dpi;
test_map_[HGPDTTOOLDB_NAME_IMAGE_QUALITY_GRAY_300DPI] = &test::test_image_quality_gray_300dpi;
test_map_[HGPDTTOOLDB_NAME_IMAGE_QUALITY_RGB_600DPI] = &test::test_image_quality_rgb_600dpi;
test_map_[HGPDTTOOLDB_NAME_IMAGE_QUALITY_GRAY_600DPI] = &test::test_image_quality_gray_600dpi;
test_map_[HGPDTTOOLDB_NAME_IMAGE_QUALITY_PHOTO_RGB_200DPI] = &test::test_image_quality_photo_rgb_200dpi;
test_map_[HGPDTTOOLDB_NAME_IMAGE_QUALITY_PHOTO_GRAY_200DPI] = &test::test_image_quality_photo_gray_200dpi;
test_map_[HGPDTTOOLDB_NAME_IMAGE_QUALITY_PHOTO_RGB_300DPI] = &test::test_image_quality_photo_rgb_300dpi;
test_map_[HGPDTTOOLDB_NAME_IMAGE_QUALITY_PHOTO_GRAY_300DPI] = &test::test_image_quality_photo_gray_300dpi;
test_map_[HGPDTTOOLDB_NAME_IMAGE_QUALITY_PHOTO_RGB_600DPI] = &test::test_image_quality_photo_rgb_600dpi;
test_map_[HGPDTTOOLDB_NAME_IMAGER_QUALITY_PHOTO_GRAY_600DPI] = &test::test_image_quality_photo_gray_600dpi;
test_map_[HGPDTTOOLDB_NAME_GET_DISTORTION_VAL] = &test::test_get_auto_distortion; test_map_[HGPDTTOOLDB_NAME_GET_DISTORTION_VAL_200DPI] = &test::test_get_distortion_200dpi;
test_map_[HGPDTTOOLDB_NAME_SET_DISTORTION_VAL] = &test::test_set_auto_distortion; test_map_[HGPDTTOOLDB_NAME_GET_DISTORTION_VAL_300DPI] = &test::test_get_distortion_300dpi;
test_map_[HGPDTTOOLDB_NAME_GET_DISTORTION_VAL_600DPI] = &test::test_get_distortion_600dpi;
test_map_[HGPDTTOOLDB_NAME_SET_DISTORTION_VAL_200DPI] = &test::test_set_distortion_200dpi;
test_map_[HGPDTTOOLDB_NAME_SET_DISTORTION_VAL_300DPI] = &test::test_set_distortion_300dpi;
test_map_[HGPDTTOOLDB_NAME_SET_DISTORTION_VAL_600DPI] = &test::test_set_distortion_600dpi;
test_map_[HGPDTTOOLDB_NAME_CONFIRM_DISTORTION_VAL] = &test::test_confirm_auto_distortion; test_map_[HGPDTTOOLDB_NAME_CONFIRM_DISTORTION_VAL] = &test::test_confirm_auto_distortion;
test_map_[HGPDTTOOLDB_NAME_VERIFY_DISTORTION_VAL] = &test::test_verify_auto_distortion; test_map_[HGPDTTOOLDB_NAME_VERIFY_DISTORTION_VAL_200DPI] = &test::test_verify_distortion_200dpi;
test_map_[HGPDTTOOLDB_NAME_VERIFY_DISTORTION_VAL_300DPI] = &test::test_verify_distortion_300dpi;
test_map_[HGPDTTOOLDB_NAME_VERIFY_DISTORTION_VAL_600DPI] = &test::test_verify_distortion_600dpi;
test_map_[HGPDTTOOLDB_NAME_DORMANCY] = &test::test_dormancy; test_map_[HGPDTTOOLDB_NAME_DORMANCY] = &test::test_dormancy;
test_map_[HGPDTTOOLDB_NAME_PAPER_SEPARATION_STRENGTH] = &test::test_paper_separation_strength; test_map_[HGPDTTOOLDB_NAME_PAPER_SEPARATION_STRENGTH] = &test::test_paper_separation_strength;
test_map_[HGPDTTOOLDB_NAME_MECH_PAPER_FEEDING_INCLINATION] = &test::test_mech_paper_feeding_inclination; test_map_[HGPDTTOOLDB_NAME_MECH_PAPER_FEEDING_INCLINATION] = &test::test_mech_paper_feeding_inclination;
@ -735,12 +786,6 @@ void test::init_test_map_()
test_map_[HGPDTTOOLDB_NAME_COLORCARD_BIAS_IMAGEING_QUALITY] = &test::test_single_page_test; test_map_[HGPDTTOOLDB_NAME_COLORCARD_BIAS_IMAGEING_QUALITY] = &test::test_single_page_test;
test_map_[HGPDTTOOLDB_NAME_CLARITY_QUALITY] = &test::test_single_page_test; test_map_[HGPDTTOOLDB_NAME_CLARITY_QUALITY] = &test::test_single_page_test;
test_map_[HGPDTTOOLDB_NAME_PRESSUER_TEST_RGB_200DPI] = &test::test_pressuer_test_rgb_200dpi;
test_map_[HGPDTTOOLDB_NAME_PRESSUER_TEST_GRAY_200DPI] = &test::test_pressuer_test_gray_200dpi;
test_map_[HGPDTTOOLDB_NAME_PRESSUER_TEST_RGB_300DPI] = &test::test_pressuer_test_rgb_300dpi;
test_map_[HGPDTTOOLDB_NAME_PRESSUER_TEST_GRAY_300DPI] = &test::test_pressuer_test_gray_300dpi;
test_map_[HGPDTTOOLDB_NAME_PRESSUER_TEST_RGB_600DPI] = &test::test_pressuer_test_rgb_600dpi;
test_map_[HGPDTTOOLDB_NAME_PRESSUER_TEST_GRAY_600DPI] = &test::test_pressuer_test_gray_600dpi;
test_map_[HGPDTTOOLDB_NAME_GET_DEVICE_CONFIG] = &test::test_get_device_config; test_map_[HGPDTTOOLDB_NAME_GET_DEVICE_CONFIG] = &test::test_get_device_config;
test_map_[HGPDTTOOLDB_NAME_GET_DEVICE_CPU_DISK] = &test::test_get_device_cpu_disk; test_map_[HGPDTTOOLDB_NAME_GET_DEVICE_CPU_DISK] = &test::test_get_device_cpu_disk;
test_map_[HGPDTTOOLDB_NAME_BACKUP] = &test::test_backup; test_map_[HGPDTTOOLDB_NAME_BACKUP] = &test::test_backup;
@ -1249,186 +1294,12 @@ int test::test_reboot_device(void* data)
helper_->test_callback(set_test_name_.c_str(), ui_helper::TEST_EVENT_RESULT, (void*)L"设备重启中,请观察设备是否重启", true); helper_->test_callback(set_test_name_.c_str(), ui_helper::TEST_EVENT_RESULT, (void*)L"设备重启中,请观察设备是否重启", true);
return ret; return ret;
} }
/* 扫描图像彩色质量确认 */
int test::test_image_color_quality(void* data)
{
if (!data)
{
return SCANNER_ERR_DATA_DAMAGED;
}
wchar_t* p = (wchar_t*)data;
std::string str;
int ret = SCANNER_ERR_OK,
dpi = 0;
unsigned int len = sizeof(int);
size_t strl = 0;
ret = wchar_to_char(str, p, &strl);
if (ret == ERROR_INSUFFICIENT_BUFFER)
{
str.resize(strl);
ret = wchar_to_char(str, p, &strl);
if (str.empty())
{
return SCANNER_ERR_DATA_DAMAGED;
}
dpi = atoi(str.c_str());
}
if (dpi > 0)
{
ret = helper_->io_control(IO_CTRL_CODE_SET_DPI, &dpi, &len);
}
if (ret != SCANNER_ERR_OK)
{
return -1;
}
const char* color = OPTION_VALUE_YSMS_24WCS;
unsigned int colorlen = strlen(color);
helper_->io_control(IO_CTRL_CODE_SET_COLOR, (void*)color, &colorlen);
return helper_->io_control(IO_CTRL_CODE_GET_IMAGE, NULL, NULL); int test::public_calculate_distortion(int dpi, bool isVerify)
}
/* 扫描图像灰度质量确认 */
int test::test_image_gray_quality(void* data)
{ {
if (!data)
{
return SCANNER_ERR_DATA_DAMAGED;
}
wchar_t* p = (wchar_t*)data;
std::string str;
int ret = SCANNER_ERR_OK,
dpi = 0;
unsigned int len = sizeof(int);
size_t strl = 0;
ret = wchar_to_char(str, p, &strl);
if (ret == ERROR_INSUFFICIENT_BUFFER)
{
str.resize(strl);
ret = wchar_to_char(str, p, &strl);
if (str.empty())
{
return SCANNER_ERR_DATA_DAMAGED;
}
dpi = atoi(str.c_str());
}
if (dpi > 0)
{
ret = helper_->io_control(IO_CTRL_CODE_SET_DPI, &dpi, &len);
}
if (ret != SCANNER_ERR_OK)
{
return -1;
}
const char* color = OPTION_VALUE_YSMS_256JHD;
unsigned int colorlen = strlen(color);
helper_->io_control(IO_CTRL_CODE_SET_COLOR, (void*)color, &colorlen);
return helper_->io_control(IO_CTRL_CODE_GET_IMAGE, NULL, NULL);
}
int test::test_image_color_quality_photo(void* data)
{
if (!data)
{
return SCANNER_ERR_DATA_DAMAGED;
}
wchar_t* p = (wchar_t*)data;
std::string str;
int ret = SCANNER_ERR_OK,
dpi = 0;
unsigned int len = sizeof(int);
size_t strl = 0;
ret = wchar_to_char(str, p, &strl);
if (ret == ERROR_INSUFFICIENT_BUFFER)
{
str.resize(strl);
ret = wchar_to_char(str, p, &strl);
if (str.empty())
{
return SCANNER_ERR_DATA_DAMAGED;
}
dpi = atoi(str.c_str());
}
if (dpi > 0)
{
ret = helper_->io_control(IO_CTRL_CODE_SET_DPI, &dpi, &len);
bool photoMode = true;
ret = helper_->io_control(IO_CTRL_CODE_SET_PICTURE_PHOTO_MODE, &photoMode, &len);
}
if (ret != SCANNER_ERR_OK)
{
return -1;
}
const char* color = OPTION_VALUE_YSMS_24WCS;
unsigned int colorlen = strlen(color);
helper_->io_control(IO_CTRL_CODE_SET_COLOR, (void*)color, &colorlen);
return helper_->io_control(IO_CTRL_CODE_GET_IMAGE, NULL, NULL);
}
int test::test_image_gray_quality_photo(void* data)
{
if (!data)
{
return SCANNER_ERR_DATA_DAMAGED;
}
wchar_t* p = (wchar_t*)data;
std::string str;
int ret = SCANNER_ERR_OK,
dpi = 0;
unsigned int len = sizeof(int);
size_t strl = 0;
ret = wchar_to_char(str, p, &strl);
if (ret == ERROR_INSUFFICIENT_BUFFER)
{
str.resize(strl);
ret = wchar_to_char(str, p, &strl);
if (str.empty())
{
return SCANNER_ERR_DATA_DAMAGED;
}
dpi = atoi(str.c_str());
}
if (dpi > 0)
{
ret = helper_->io_control(IO_CTRL_CODE_SET_DPI, &dpi, &len);
bool photoMode = true;
ret = helper_->io_control(IO_CTRL_CODE_SET_PICTURE_PHOTO_MODE, &photoMode, &len);
}
if (ret != SCANNER_ERR_OK)
{
return -1;
}
const char* color = OPTION_VALUE_YSMS_256JHD;
unsigned int colorlen = strlen(color);
helper_->io_control(IO_CTRL_CODE_SET_COLOR, (void*)color, &colorlen);
return helper_->io_control(IO_CTRL_CODE_GET_IMAGE, NULL, NULL);
}
/* 获取自动计算畸变值 */
int test::test_get_auto_distortion(void* data)
{
if (!data)
{
return SCANNER_ERR_DATA_DAMAGED;
}
wchar_t* p = (wchar_t*)data;
std::string str;
int ret = SCANNER_ERR_OK,
dpi = 0;
SANE_Bool type = true; SANE_Bool type = true;
unsigned int len = sizeof(SANE_Bool), unsigned int len = 0;
llen = sizeof(int); int ret = helper_->io_control(IO_CTRL_CODE_GET_PAPER_ON, &type, &len);
size_t strl = 0;
ret = wchar_to_char(str, p, &strl);
if (ret == ERROR_INSUFFICIENT_BUFFER)
{
str.resize(strl);
ret = wchar_to_char(str, p, &strl);
if (str.empty())
{
return SCANNER_ERR_DATA_DAMAGED;
}
dpi = atoi(str.c_str());
}
ret = helper_->io_control(IO_CTRL_CODE_GET_PAPER_ON, &type, &llen);
if (!type) if (!type)
{ {
helper_->test_callback(set_test_name_.c_str(), ui_helper::TEST_EVENT_RESULT, (void*)L"自动计算畸变值获取失败: 无纸", false); helper_->test_callback(set_test_name_.c_str(), ui_helper::TEST_EVENT_RESULT, (void*)L"自动计算畸变值获取失败: 无纸", false);
@ -1437,14 +1308,18 @@ int test::test_get_auto_distortion(void* data)
if (dpi > 0) if (dpi > 0)
{ {
ret = helper_->io_control(IO_CTRL_CODE_SET_DPI, &dpi, &llen); ret = helper_->io_control(IO_CTRL_CODE_SET_DPI, &dpi, &len);
}
if (!isVerify) //验证畸变值无需初始化畸变值为1.0
{
float distortion = 1.0;
float getdistortion = 0;
ret = helper_->io_control(IO_CTRL_CODE_SET_DISTORTION_DEVS_CHECK_VAL, &distortion, &len);
ret = helper_->io_control(IO_CTRL_CODE_GET_DISTORTION_DEVS_CHECK_VAL, &getdistortion, &len);
} }
//先默认设置1
float distortion = 1.0;
float getdistortion = 0;
ret = helper_->io_control(IO_CTRL_CODE_SET_DISTORTION_DEVS_CHECK_VAL, &distortion, &len);
ret = helper_->io_control(IO_CTRL_CODE_GET_DISTORTION_DEVS_CHECK_VAL, &getdistortion, &len);
if (thread_distortion_handle.get() && thread_distortion_handle->joinable()) if (thread_distortion_handle.get() && thread_distortion_handle->joinable())
thread_distortion_handle->join(); thread_distortion_handle->join();
@ -1452,32 +1327,27 @@ int test::test_get_auto_distortion(void* data)
return SCANNER_ERR_OK; return SCANNER_ERR_OK;
} }
int test::test_set_auto_distortion(void* data)
int test::test_get_distortion_200dpi(void* data)
{ {
if (!data) return public_calculate_distortion(200, false);
{ }
return SCANNER_ERR_DATA_DAMAGED;
}
wchar_t* p = (wchar_t*)data;
std::string str;
int ret = SCANNER_ERR_OK, int test::test_get_distortion_300dpi(void* data)
dpi = 0; {
unsigned int len = sizeof(int); return public_calculate_distortion(300, false);
}
int test::test_get_distortion_600dpi(void* data)
{
return public_calculate_distortion(600, false);
}
int test::public_set_distortion(int dpi)
{
int ret = SCANNER_ERR_OK;
unsigned int len = 0;
float distortion = 0.0; float distortion = 0.0;
size_t strl = 0;
ret = wchar_to_char(str, p, &strl);
if (ret == ERROR_INSUFFICIENT_BUFFER)
{
str.resize(strl);
ret = wchar_to_char(str, p, &strl);
if (str.empty())
{
return SCANNER_ERR_DATA_DAMAGED;
}
dpi = atoi(str.c_str());
}
if (dpi > 0) if (dpi > 0)
{ {
ret = helper_->io_control(IO_CTRL_CODE_SET_DPI, &dpi, &len); ret = helper_->io_control(IO_CTRL_CODE_SET_DPI, &dpi, &len);
@ -1523,6 +1393,21 @@ int test::test_set_auto_distortion(void* data)
return ret; return ret;
} }
int test::test_set_distortion_200dpi(void* data)
{
return public_set_distortion(200);
}
int test::test_set_distortion_300dpi(void* data)
{
return public_set_distortion(300);
}
int test::test_set_distortion_600dpi(void* data)
{
return public_set_distortion(600);
}
int test::test_confirm_auto_distortion(void* data) int test::test_confirm_auto_distortion(void* data)
{ {
if (!data) if (!data)
@ -1557,52 +1442,22 @@ int test::test_confirm_auto_distortion(void* data)
} }
return ret; return ret;
} }
/* 扫描验证畸变值 */
int test::test_verify_auto_distortion(void* data) int test::test_verify_distortion_200dpi(void* data)
{ {
if (!data) return public_calculate_distortion(200, true);
{
return SCANNER_ERR_DATA_DAMAGED;
}
wchar_t* p = (wchar_t*)data;
std::string str;
int ret = SCANNER_ERR_OK,
dpi = 0;
SANE_Bool type = true;
unsigned int len = sizeof(SANE_Bool),
llen = sizeof(int);
size_t strl = 0;
ret = wchar_to_char(str, p, &strl);
if (ret == ERROR_INSUFFICIENT_BUFFER)
{
str.resize(strl);
ret = wchar_to_char(str, p, &strl);
if (str.empty())
{
return SCANNER_ERR_DATA_DAMAGED;
}
dpi = atoi(str.c_str());
}
ret = helper_->io_control(IO_CTRL_CODE_GET_PAPER_ON, &type, &llen);
if (!type)
{
helper_->test_callback(set_test_name_.c_str(), ui_helper::TEST_EVENT_RESULT, (void*)L"自动计算畸变值获取失败: 无纸", false);
return ret;
}
if (dpi > 0)
{
ret = helper_->io_control(IO_CTRL_CODE_SET_DPI, &dpi, &llen);
}
if (thread_distortion_handle.get() && thread_distortion_handle->joinable())
thread_distortion_handle->join();
thread_distortion_handle.reset(new std::thread(&test::thread_distortion, this));
return SCANNER_ERR_OK;
} }
int test::test_verify_distortion_300dpi(void* data)
{
return public_calculate_distortion(300, true);
}
int test::test_verify_distortion_600dpi(void* data)
{
return public_calculate_distortion(600, true);
}
/* 分纸强度检测 */ /* 分纸强度检测 */
int test::test_paper_separation_strength(void* data) int test::test_paper_separation_strength(void* data)
{ {
@ -1671,6 +1526,76 @@ int test::test_single_page_test(void* data)
{ {
return helper_->io_control(IO_CTRL_CODE_TEST_SINGLE, NULL, NULL); return helper_->io_control(IO_CTRL_CODE_TEST_SINGLE, NULL, NULL);
} }
int test::public_image_test(bool isRgb, int dpi, bool isPhotoMode)
{
const char* color = isRgb ? OPTION_VALUE_YSMS_24WCS : OPTION_VALUE_YSMS_256JHD;
unsigned int len = strlen(color);
helper_->io_control(IO_CTRL_CODE_SET_COLOR, (void*)color, &len);
helper_->io_control(IO_CTRL_CODE_SET_DPI, (void*)&dpi, &len);
helper_->io_control(IO_CTRL_CODE_SET_PICTURE_PHOTO_MODE, &isPhotoMode, &len);
return helper_->io_control(IO_CTRL_CODE_GET_IMAGE, NULL, NULL);
}
/*图像质量测试彩色_200dpi*/
int test::test_image_quality_rgb_200dpi(void* data)
{
return public_image_test(true, 200, false);
}
/*图像质量测试灰色_200dpi*/
int test::test_image_quality_gray_200dpi(void* data)
{
return public_image_test(false, 200, false);
}
/*图像质量测试彩色_300dpi*/
int test::test_image_quality_rgb_300dpi(void* data)
{
return public_image_test(true, 300, false);
}
/*图像质量测试灰色_300dpi*/
int test::test_image_quality_gray_300dpi(void* data)
{
return public_image_test(false, 300, false);
}
/*图像质量测试彩色_600dpi*/
int test::test_image_quality_rgb_600dpi(void* data)
{
return public_image_test(true, 600, false);
}
/*图像质量测试灰色_600dpi*/
int test::test_image_quality_gray_600dpi(void* data)
{
return public_image_test(false, 600, false);
}
/*照片模式图像质量测试彩色_200dpi*/
int test::test_image_quality_photo_rgb_200dpi(void* data)
{
return public_image_test(true, 200, true);
}
/*照片模式图像质量测试灰色_200dpi*/
int test::test_image_quality_photo_gray_200dpi(void* data)
{
return public_image_test(false, 200, true);
}
/*照片模式图像质量测试彩色_300dpi*/
int test::test_image_quality_photo_rgb_300dpi(void* data)
{
return public_image_test(true, 300, true);
}
/*照片模式图像质量测试灰色_300dpi*/
int test::test_image_quality_photo_gray_300dpi(void* data)
{
return public_image_test(false, 300, true);
}
/*照片模式图像质量测试彩色_600dpi*/
int test::test_image_quality_photo_rgb_600dpi(void* data)
{
return public_image_test(true, 600, true);
}
/*照片模式图像质量测试灰色_600dpi*/
int test::test_image_quality_photo_gray_600dpi(void* data)
{
return public_image_test(false, 600, true);
}
/*压力测试彩色_200dpi*/ /*压力测试彩色_200dpi*/
int test::test_pressuer_test_rgb_200dpi(void* data) int test::test_pressuer_test_rgb_200dpi(void* data)
{ {
@ -1731,6 +1656,7 @@ int test::test_pressuer_test_gray_600dpi(void* data)
helper_->io_control(IO_CTRL_CODE_SET_DPI, (void*)&dpi, &len); helper_->io_control(IO_CTRL_CODE_SET_DPI, (void*)&dpi, &len);
return helper_->io_control(IO_CTRL_CODE_GET_IMAGE, NULL, NULL); return helper_->io_control(IO_CTRL_CODE_GET_IMAGE, NULL, NULL);
} }
/*获取设备配置*/ /*获取设备配置*/
int test::test_get_device_config(void* data) int test::test_get_device_config(void* data)
{ {
@ -2350,8 +2276,12 @@ DECL_API(int) func_test_correct(bool isSuccess, int *currentIndex, bool *isCorre
DECL_API(int) func_test_distortion() DECL_API(int) func_test_distortion()
{ {
if (wcscmp(set_test_name_.c_str(), HGPDTTOOLDB_NAME_GET_DISTORTION_VAL) == 0 || if (wcscmp(set_test_name_.c_str(), HGPDTTOOLDB_NAME_GET_DISTORTION_VAL_200DPI) == 0 ||
wcscmp(set_test_name_.c_str(), HGPDTTOOLDB_NAME_VERIFY_DISTORTION_VAL) == 0) wcscmp(set_test_name_.c_str(), HGPDTTOOLDB_NAME_GET_DISTORTION_VAL_300DPI) == 0 ||
wcscmp(set_test_name_.c_str(), HGPDTTOOLDB_NAME_GET_DISTORTION_VAL_600DPI) == 0 ||
wcscmp(set_test_name_.c_str(), HGPDTTOOLDB_NAME_VERIFY_DISTORTION_VAL_200DPI) == 0 ||
wcscmp(set_test_name_.c_str(), HGPDTTOOLDB_NAME_VERIFY_DISTORTION_VAL_300DPI) == 0 ||
wcscmp(set_test_name_.c_str(), HGPDTTOOLDB_NAME_VERIFY_DISTORTION_VAL_600DPI) == 0)
{ {
test_->m_waitDistortion.notify_all(); test_->m_waitDistortion.notify_all();
} }

View File

@ -66,8 +66,30 @@
#define HGPDTTOOLDB_TITLE_COLORCARD_BIAS_IMAGEING_QUALITY L"色卡纸偏色成像质量评估" #define HGPDTTOOLDB_TITLE_COLORCARD_BIAS_IMAGEING_QUALITY L"色卡纸偏色成像质量评估"
/* 清晰度质量评估 */ /* 清晰度质量评估 */
#define HGPDTTOOLDB_TITLE_CLARITY_QUALITY L"清晰度质量评估" #define HGPDTTOOLDB_TITLE_CLARITY_QUALITY L"清晰度质量评估"
/* 畸变修正 */
#define HGPDTTOOLDB_TITLE_DISTORTION L"畸变修正" /* 计算畸变修正值200dpi */
#define HGPDTTOOLDB_TITLE_GET_DISTORTION_VAL_200DPI L"计算畸变修正值200DPI"
/* 计算畸变修正值300dpi */
#define HGPDTTOOLDB_TITLE_GET_DISTORTION_VAL_300DPI L"计算畸变修正值300DPI"
/* 计算畸变修正值600dpi */
#define HGPDTTOOLDB_TITLE_GET_DISTORTION_VAL_600DPI L"计算畸变修正值600DPI"
/* 设置畸变修正值200dpi */
#define HGPDTTOOLDB_TITLE_SET_DISTORTION_VAL_200DPI L"设置畸变修正值200DPI"
/* 设置畸变修正值300dpi */
#define HGPDTTOOLDB_TITLE_SET_DISTORTION_VAL_300DPI L"设置畸变修正值300DPI"
/* 设置畸变修正值600dpi */
#define HGPDTTOOLDB_TITLE_SET_DISTORTION_VAL_600DPI L"设置畸变修正值600DPI"
/* 获取畸变修正值 */
#define HGPDTTOOLDB_TITLE_CONFIRM_DISTORTION_VAL L"获取畸变修正值"
/* 扫描验证畸变修正值200dpi */
#define HGPDTTOOLDB_TITLE_VERIFY_DISTORTION_VAL_200DPI L"扫描验证畸变修正值_200DPI"
/* 扫描验证畸变修正值300dpi */
#define HGPDTTOOLDB_TITLE_VERIFY_DISTORTION_VAL_300DPI L"扫描验证畸变修正值_300DPI"
/* 扫描验证畸变修正值600dpi */
#define HGPDTTOOLDB_TITLE_VERIFY_DISTORTION_VAL_600DPI L"扫描验证畸变修正值_600DPI"
/* 设置休眠 */ /* 设置休眠 */
#define HGPDTTOOLDB_TITLE_DORMANCY L"设置休眠" #define HGPDTTOOLDB_TITLE_DORMANCY L"设置休眠"
/* 歪斜挡位检测 */ /* 歪斜挡位检测 */
@ -82,6 +104,7 @@
#define HGPDTTOOLDB_TITLE_CLEAR_ROLLER_COUNT L"清除滚轴计数" #define HGPDTTOOLDB_TITLE_CLEAR_ROLLER_COUNT L"清除滚轴计数"
/* 清除滚轴计数 */ /* 清除滚轴计数 */
#define HGPDTTOOLDB_TITLE_CLEAR_HISTORY_COUNT L"清除历史计数" #define HGPDTTOOLDB_TITLE_CLEAR_HISTORY_COUNT L"清除历史计数"
/*压力测试彩色+200dpi*/ /*压力测试彩色+200dpi*/
#define HGPDTTOOLDB_TITLE_PRESSUER_TEST_RGB_200DPI L"压力测试彩色_200dpi" #define HGPDTTOOLDB_TITLE_PRESSUER_TEST_RGB_200DPI L"压力测试彩色_200dpi"
/*压力测试彩色+300dpi*/ /*压力测试彩色+300dpi*/
@ -94,6 +117,31 @@
#define HGPDTTOOLDB_TITLE_PRESSUER_TEST_GRAY_300DPI L"压力测试灰色_300dpi" #define HGPDTTOOLDB_TITLE_PRESSUER_TEST_GRAY_300DPI L"压力测试灰色_300dpi"
/*压力测试灰色+600dpi*/ /*压力测试灰色+600dpi*/
#define HGPDTTOOLDB_TITLE_PRESSUER_TEST_GRAY_600DPI L"压力测试灰色_600dpi" #define HGPDTTOOLDB_TITLE_PRESSUER_TEST_GRAY_600DPI L"压力测试灰色_600dpi"
/*扫描图像彩色质量确认+200dpi*/
#define HGPDTTOOLDB_TITLE_IMAGE_QUALITY_RGB_200DPI L"图像质量测试彩色_200dpi"
/*扫描图像灰色质量确认+200dpi*/
#define HGPDTTOOLDB_TITLE_IMAGE_QUALITY_GRAY_200DPI L"图像质量测试灰色_200dpi"
/*扫描图像彩色质量确认+300dpi*/
#define HGPDTTOOLDB_TITLE_IMAGE_QUALITY_RGB_300DPI L"图像质量测试彩色_300dpi"
/*扫描图像灰色质量确认+300dpi*/
#define HGPDTTOOLDB_TITLE_IMAGE_QUALITY_GRAY_300DPI L"图像质量测试彩色_300dpi"
/*扫描图像彩色质量确认+600dpi*/
#define HGPDTTOOLDB_TITLE_IMAGE_QUALITY_RGB_600DPI L"图像质量测试彩色_600DPI"
/*扫描图像灰色质量确认+600dpi*/
#define HGPDTTOOLDB_TITLE_IMAGE_QUALITY_GRAY_600DPI L"图像质量测试灰色_600DPI"
/*照片模式图像彩色质量确认+200dpi*/
#define HGPDTTOOLDB_TITLE_IMAGE_QUALITY_PHOTO_RGB_200DPI L"照片模式图像彩色质量确认+200dpi"
/*照片模式图像灰色质量确认+200dpi*/
#define HGPDTTOOLDB_TITLE_IMAGE_QUALITY_PHOTO_GRAY_200DPI L"照片模式图像灰色质量确认+200dpi"
/*照片模式图像彩色质量确认+300dpi*/
#define HGPDTTOOLDB_TITLE_IMAGE_QUALITY_PHOTO_RGB_300DPI L"照片模式图像彩色质量确认_300DPI"
/*照片模式图像灰色质量确认+300dpi*/
#define HGPDTTOOLDB_TITLE_IMAGE_QUALITY_PHOTO_GRAY_300DPI L"照片模式图像灰色质量确认_300DPI"
/*照片模式图像彩色质量确认+600dpi*/
#define HGPDTTOOLDB_TITLE_IMAGE_QUALITY_PHOTO_RGB_600DPI L"照片模式图像彩色质量确认_600DPI"
/*照片模式图像灰色质量确认+600dpi*/
#define HGPDTTOOLDB_TITLE_IMAGER_QUALITY_PHOTO_GRAY_600DPI L"照片模式图像灰色质量确认_600DPI"
/*获取设备配置*/ /*获取设备配置*/
#define HGPDTTOOLDB_TITLE_GET_DEVICE_CONFIG L"获取设备配置" #define HGPDTTOOLDB_TITLE_GET_DEVICE_CONFIG L"获取设备配置"
/*获取设备内存和硬盘容量大小*/ /*获取设备内存和硬盘容量大小*/
@ -197,28 +245,37 @@
#define HGPDTTOOLDB_NAME_AUTO_FLAT_FIELD L"AUTO_FLAT_FIELD" #define HGPDTTOOLDB_NAME_AUTO_FLAT_FIELD L"AUTO_FLAT_FIELD"
/* 重启设备 */ /* 重启设备 */
#define HGPDTTOOLDB_NAME_REBOOT_DEVICE L"REBOOT_DEVICE" #define HGPDTTOOLDB_NAME_REBOOT_DEVICE L"REBOOT_DEVICE"
/* 扫描图像彩色质量确认 */
#define HGPDTTOOLDB_NAME_IMAGE_COLOR_QUALITY L"IMAGE_COLOR_QUALITY"
/* 扫描图像灰度质量确认 */
#define HGPDTTOOLDB_NAME_IMAGE_GRAY_QUALITY L"IMAGE_GRAY_QUALITY"
/* 照片模式图像彩色质量确认 */
#define HGPDTTOOLDB_NAME_IMAGE_COLOR_QUALITY_PHOTO L"IMAGE_COLOR_QUALITY_PHOTO"
/* 照片模式图像灰度质量确认 */
#define HGPDTTOOLDB_NAME_IMAGE_GRAY_QUALITY_PHOTO L"IMAGE_GRAY_QUALITY_PHOTO"
/* 色卡纸成像质量评估 */ /* 色卡纸成像质量评估 */
#define HGPDTTOOLDB_NAME_COLORCARD_IMAGEING_QUALITY L"COLORCARD_IMAGEING_QUALITY" #define HGPDTTOOLDB_NAME_COLORCARD_IMAGEING_QUALITY L"COLORCARD_IMAGEING_QUALITY"
/* 色卡纸偏色成像质量评估 */ /* 色卡纸偏色成像质量评估 */
#define HGPDTTOOLDB_NAME_COLORCARD_BIAS_IMAGEING_QUALITY L"COLORCARD_BIAS_IMAGEING_QUALITY" #define HGPDTTOOLDB_NAME_COLORCARD_BIAS_IMAGEING_QUALITY L"COLORCARD_BIAS_IMAGEING_QUALITY"
/* 清晰度质量评估 */ /* 清晰度质量评估 */
#define HGPDTTOOLDB_NAME_CLARITY_QUALITY L"CLARITY_QUALITY" #define HGPDTTOOLDB_NAME_CLARITY_QUALITY L"CLARITY_QUALITY"
/* 计算畸变修正值200dpi */
#define HGPDTTOOLDB_NAME_GET_DISTORTION_VAL_200DPI L"GET_DISTORTION_VAL_200DPI"
/* 计算畸变修正值300dpi */
#define HGPDTTOOLDB_NAME_GET_DISTORTION_VAL_300DPI L"GET_DISTORTION_VAL_300DPI"
/* 计算畸变修正值600dpi */
#define HGPDTTOOLDB_NAME_GET_DISTORTION_VAL_600DPI L"GET_DISTORTION_VAL_600DPI"
/* 设置畸变修正值200dpi */
#define HGPDTTOOLDB_NAME_SET_DISTORTION_VAL_200DPI L"SET_DISTORTION_VAL_200DPI"
/* 设置畸变修正值300dpi */
#define HGPDTTOOLDB_NAME_SET_DISTORTION_VAL_300DPI L"SET_DISTORTION_VAL_300DPI"
/* 设置畸变修正值600dpi */
#define HGPDTTOOLDB_NAME_SET_DISTORTION_VAL_600DPI L"SET_DISTORTION_VAL_600DPI"
/* 获取畸变修正值 */ /* 获取畸变修正值 */
#define HGPDTTOOLDB_NAME_GET_DISTORTION_VAL L"GET_DISTORTION_VAL"
/* 设置畸变修正值 */
#define HGPDTTOOLDB_NAME_SET_DISTORTION_VAL L"SET_DISTORTION_VAL"
/* 确认畸变修正值 */
#define HGPDTTOOLDB_NAME_CONFIRM_DISTORTION_VAL L"CONFIRM_DISTORTION_VAL" #define HGPDTTOOLDB_NAME_CONFIRM_DISTORTION_VAL L"CONFIRM_DISTORTION_VAL"
/* 扫描验证畸变修正值 */
#define HGPDTTOOLDB_NAME_VERIFY_DISTORTION_VAL L"VERIFY_DISTORTION_VAL" /* 扫描验证畸变修正值200dpi */
#define HGPDTTOOLDB_NAME_VERIFY_DISTORTION_VAL_200DPI L"VERIFY_DISTORTION_VAL_200DPI"
/* 扫描验证畸变修正值300dpi */
#define HGPDTTOOLDB_NAME_VERIFY_DISTORTION_VAL_300DPI L"VERIFY_DISTORTION_VAL_300DPI"
/* 扫描验证畸变修正值600dpi */
#define HGPDTTOOLDB_NAME_VERIFY_DISTORTION_VAL_600DPI L"VERIFY_DISTORTION_VAL_600DPI"
/* 设置休眠 */ /* 设置休眠 */
#define HGPDTTOOLDB_NAME_DORMANCY L"DORMANCY" #define HGPDTTOOLDB_NAME_DORMANCY L"DORMANCY"
/* 歪斜挡位检测 */ /* 歪斜挡位检测 */
@ -229,12 +286,11 @@
#define HGPDTTOOLDB_NAME_MECH_PAPER_FEEDING_INCLINATION L"MECH_PAPER_FEEDING_INCLINATION" #define HGPDTTOOLDB_NAME_MECH_PAPER_FEEDING_INCLINATION L"MECH_PAPER_FEEDING_INCLINATION"
/* 单张测试 */ /* 单张测试 */
#define HGPDTTOOLDB_NAME_SINGLE_PAGE_TEST L"SINGLE_PAGE_TEST" #define HGPDTTOOLDB_NAME_SINGLE_PAGE_TEST L"SINGLE_PAGE_TEST"
/* 压力测试2轮 */
#define HGPDTTOOLDB_NAME_PRESSUER_TEST L"PRESSUER_TEST"
/* 清除滚轴计数 */ /* 清除滚轴计数 */
#define HGPDTTOOLDB_NAME_CLEAR_ROLLER_COUNT L"CLEAR_ROLLER_COUNT" #define HGPDTTOOLDB_NAME_CLEAR_ROLLER_COUNT L"CLEAR_ROLLER_COUNT"
/* 清除历史计数 */ /* 清除历史计数 */
#define HGPDTTOOLDB_NAME_CLEAR_HISTORY_COUNT L"CLEAR_HISTORY_COUNT" #define HGPDTTOOLDB_NAME_CLEAR_HISTORY_COUNT L"CLEAR_HISTORY_COUNT"
/*压力测试彩色+200dpi*/ /*压力测试彩色+200dpi*/
#define HGPDTTOOLDB_NAME_PRESSUER_TEST_RGB_200DPI L"PRESSUER_TEST_RGB_200DPI" #define HGPDTTOOLDB_NAME_PRESSUER_TEST_RGB_200DPI L"PRESSUER_TEST_RGB_200DPI"
/*压力测试灰色+200dpi*/ /*压力测试灰色+200dpi*/
@ -247,6 +303,33 @@
#define HGPDTTOOLDB_NAME_PRESSUER_TEST_RGB_600DPI L"PRESSUER_TEST_RGB_600DPI" #define HGPDTTOOLDB_NAME_PRESSUER_TEST_RGB_600DPI L"PRESSUER_TEST_RGB_600DPI"
/*压力测试灰色+600dpi*/ /*压力测试灰色+600dpi*/
#define HGPDTTOOLDB_NAME_PRESSUER_TEST_GRAY_600DPI L"PRESSUER_TEST_GRAY_600DPI" #define HGPDTTOOLDB_NAME_PRESSUER_TEST_GRAY_600DPI L"PRESSUER_TEST_GRAY_600DPI"
/*扫描图像彩色质量确认+200dpi*/
#define HGPDTTOOLDB_NAME_IMAGE_QUALITY_RGB_200DPI L"IMAGE_QUALITY_RGB_200DPI"
/*扫描图像灰色质量确认+200dpi*/
#define HGPDTTOOLDB_NAME_IMAGE_QUALITY_GRAY_200DPI L"IMAGE_QUALITY_GRAY_200DPI"
/*扫描图像彩色质量确认+300dpi*/
#define HGPDTTOOLDB_NAME_IMAGE_QUALITY_RGB_300DPI L"IMAGE_QUALITY_RGB_300DPI"
/*扫描图像灰色质量确认+300dpi*/
#define HGPDTTOOLDB_NAME_IMAGE_QUALITY_GRAY_300DPI L"IMAGE_QUALITY_GRAY_300DPI"
/*扫描图像彩色质量确认+600dpi*/
#define HGPDTTOOLDB_NAME_IMAGE_QUALITY_RGB_600DPI L"IMAGE_QUALITY_RGB_600DPI"
/*扫描图像灰色质量确认+600dpi*/
#define HGPDTTOOLDB_NAME_IMAGE_QUALITY_GRAY_600DPI L"IMAGE_QUALITY_GRAY_600DPI"
/*照片模式图像彩色质量确认+200dpi*/
#define HGPDTTOOLDB_NAME_IMAGE_QUALITY_PHOTO_RGB_200DPI L"IMAGE_QUALITY_PHOTO_RGB_200DPI"
/*照片模式图像灰色质量确认+200dpi*/
#define HGPDTTOOLDB_NAME_IMAGE_QUALITY_PHOTO_GRAY_200DPI L"IMAGE_QUALITY_PHOTO_GRAY_200DPI"
/*照片模式图像彩色质量确认+300dpi*/
#define HGPDTTOOLDB_NAME_IMAGE_QUALITY_PHOTO_RGB_300DPI L"IMAGE_QUALITY_PHOTO_RGB_300DPI"
/*照片模式图像灰色质量确认+300dpi*/
#define HGPDTTOOLDB_NAME_IMAGE_QUALITY_PHOTO_GRAY_300DPI L"IMAGE_QUALITY_PHOTO_GRAY_300DPI"
/*照片模式图像彩色质量确认+600dpi*/
#define HGPDTTOOLDB_NAME_IMAGE_QUALITY_PHOTO_RGB_600DPI L"IMAGE_QUALITY_PHOTO_RGB_600DPI"
/*照片模式图像灰色质量确认+600dpi*/
#define HGPDTTOOLDB_NAME_IMAGER_QUALITY_PHOTO_GRAY_600DPI L"IMAGE_QUALITY_PHOTO_GRAY_600DPI"
/*获取设备配置*/ /*获取设备配置*/
#define HGPDTTOOLDB_NAME_GET_DEVICE_CONFIG L"GET_DEVICE_CONFIG" #define HGPDTTOOLDB_NAME_GET_DEVICE_CONFIG L"GET_DEVICE_CONFIG"
/*获取设备内存和硬盘容量大小*/ /*获取设备内存和硬盘容量大小*/
@ -459,19 +542,35 @@ private:
int test_auto_flat_field(void* data); int test_auto_flat_field(void* data);
/* 重启设备 */ /* 重启设备 */
int test_reboot_device(void* data); int test_reboot_device(void* data);
/* 扫描图像彩色质量确认 */
int test_image_color_quality(void* data); /*计算畸变修正值*/
/* 扫描图像灰度质量确认 */ int public_calculate_distortion(int dpi, bool isVerify);
int test_image_gray_quality(void* data); /* 计算畸变修正值200dpi */
/* 照片模式图像彩色质量确认 */ int test_get_distortion_200dpi(void* data);
int test_image_color_quality_photo(void* data); /* 计算畸变修正值300dpi */
/* 照片模式图像灰度质量确认 */ int test_get_distortion_300dpi(void* data);
int test_image_gray_quality_photo(void* data); /* 计算畸变修正值600dpi */
/* 获取自动计算畸变值 */ int test_get_distortion_600dpi(void* data);
int test_get_auto_distortion(void* data);
int test_set_auto_distortion(void* data); /*设置畸变修正值*/
int public_set_distortion(int dpi);
/* 设置畸变修正值200dpi */
int test_set_distortion_200dpi(void* data);
/* 设置畸变修正值300dpi */
int test_set_distortion_300dpi(void* data);
/* 设置畸变修正值600dpi */
int test_set_distortion_600dpi(void* data);
/*获取所有dpi模式的畸变修正值*/
int test_confirm_auto_distortion(void* data); int test_confirm_auto_distortion(void* data);
int test_verify_auto_distortion(void* data);
/*验证计算畸变修正值200dpi*/
int test_verify_distortion_200dpi(void* data);
/*验证计算畸变修正值300dpi*/
int test_verify_distortion_300dpi(void* data);
/*验证计算畸变修正值600dpi*/
int test_verify_distortion_600dpi(void* data);
/* 分纸强度检测 */ /* 分纸强度检测 */
int test_paper_separation_strength(void* data); int test_paper_separation_strength(void* data);
/* 机械走纸倾斜检测 */ /* 机械走纸倾斜检测 */
@ -482,6 +581,35 @@ private:
int test_clear_history_count(void* data); int test_clear_history_count(void* data);
/* 单张测试 */ /* 单张测试 */
int test_single_page_test(void* data); int test_single_page_test(void* data);
/*图像扫描*/
int public_image_test(bool isRgb, int dpi, bool isPhotoMode);
/*图像质量测试彩色_200dpi*/
int test_image_quality_rgb_200dpi(void* data);
/*图像质量测试灰色_200dpi*/
int test_image_quality_gray_200dpi(void* data);
/*图像质量测试彩色_300dpi*/
int test_image_quality_rgb_300dpi(void* data);
/*图像质量测试灰色_300dpi*/
int test_image_quality_gray_300dpi(void* data);
/*图像质量测试彩色_600dpi*/
int test_image_quality_rgb_600dpi(void* data);
/*图像质量测试灰色_600dpi*/
int test_image_quality_gray_600dpi(void* data);
/*照片模式图像质量测试彩色_200dpi*/
int test_image_quality_photo_rgb_200dpi(void* data);
/*照片模式图像质量测试灰色_200dpi*/
int test_image_quality_photo_gray_200dpi(void* data);
/*照片模式图像质量测试彩色_300dpi*/
int test_image_quality_photo_rgb_300dpi(void* data);
/*照片模式图像质量测试灰色_300dpi*/
int test_image_quality_photo_gray_300dpi(void* data);
/*照片模式图像质量测试彩色_600dpi*/
int test_image_quality_photo_rgb_600dpi(void* data);
/*照片模式图像质量测试灰色_600dpi*/
int test_image_quality_photo_gray_600dpi(void* data);
/*压力测试彩色_200dpi*/ /*压力测试彩色_200dpi*/
int test_pressuer_test_rgb_200dpi(void* data); int test_pressuer_test_rgb_200dpi(void* data);
/*压力测试灰色_200dpi*/ /*压力测试灰色_200dpi*/
@ -494,6 +622,7 @@ private:
int test_pressuer_test_rgb_600dpi(void* data); int test_pressuer_test_rgb_600dpi(void* data);
/*压力测试灰色_600dpi*/ /*压力测试灰色_600dpi*/
int test_pressuer_test_gray_600dpi(void* data); int test_pressuer_test_gray_600dpi(void* data);
/*获取设备配置*/ /*获取设备配置*/
int test_get_device_config(void* data); int test_get_device_config(void* data);
/*获取设备内存和硬盘容量大小*/ /*获取设备内存和硬盘容量大小*/