#include "mainwindow.h"
#include "ui_mainwindow.h"
#include <QLibrary>
#include <QDebug>
#include"RWbmpfile.h"
MainWindow::MainWindow(QWidget *parent) :
QMainWindow(parent),
ui(new Ui::MainWindow)
{
ui->setupUi(this);
}
MainWindow::~MainWindow()
{
delete ui;
}
void MainWindow::on_pushButton_clicked()
{
uint8_t img[92160];
const char *path="C:\\Users\\Administrator\\Desktop\\iqf\\iqf153\\iqf-executables\\iqf-Win.exe";
ReadTemplateFile("C:\\Users\\Administrator\\Desktop\\iqf\\iqf153\\iqf-executables\\01.bmp",img,92160);
typedef int(*FUN1)(int);
typedef int(*FUN2)(unsigned char*);
typedef int(*FUN3)();
typedef int(*FUN4)();
typedef int(*FUN5)(unsigned char*,const char*);
QLibrary lib("D:\\vsdemo\\CsDetImgQlty\\Release\\CsDetImgQlty.dll");
qDebug() <<"\r\n//log start/"<<endl;
if(lib.load())
{
FUN1 F1 = (FUN1)lib.resolve("InitDetVersion");
FUN2 F2 = (FUN2)lib.resolve("InitDetParam");
FUN3 F3 = (FUN3)lib.resolve("DetGrayAvgVal");
FUN4 F4 = (FUN4)lib.resolve("DetLocGrayEven");
FUN5 F5 = (FUN5)lib.resolve("DetFgrIqfScore");
ReadTemplateFile("C:\\Users\\Administrator\\Desktop\\iqf\\iqf153\\iqf-executables\\01.bmp",img,92160);
if (F1) {
qDebug() <<"InitDetVersion��"<<F1(400)<<endl;
}
if (F2) {
qDebug() <<"InitDetParam"<<F2(img)<<endl;
}
if (F3) {
qDebug() <<"DetGrayAvgVal"<<F3()<<endl;
}
if (F4) {
qDebug() <<"DetLocGrayEven"<<F4()<<endl;
}
if (F5) {
qDebug() <<"DetFgrIqfScore"<<F5(img,path)<<endl;
}
}
else
{
qDebug() <<"//log error/"<<endl;
}
qDebug() <<"log finish"<<endl;
}
05-10
379
06-17
1953
“相关推荐”对你有帮助么?
-
非常没帮助
-
没帮助
-
一般
-
有帮助
-
非常有帮助
提交