基础代码更新
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
#ifndef Hd_CameraModule_3DKeyence_H
|
||||
#ifndef Hd_CameraModule_3DKeyence_H
|
||||
#define Hd_CameraModule_3DKeyence_H
|
||||
|
||||
#include <QtCore/qglobal.h>
|
||||
@@ -31,7 +31,15 @@ typedef struct {
|
||||
float z_pitch_um;
|
||||
} LJXA_ACQ_GETPARAM;
|
||||
|
||||
|
||||
const int MAX_LJXA_DEVICENUM = 6;
|
||||
const int MAX_LJXA_XDATANUM = 3200;
|
||||
const unsigned int BUFFER_FULL_COUNT = 30000;
|
||||
|
||||
static int _imageAvailable[MAX_LJXA_DEVICENUM] = { 0 };
|
||||
static unsigned short* _luminanceBuf[MAX_LJXA_DEVICENUM] = { 0 };
|
||||
static unsigned short* _heightBuf[MAX_LJXA_DEVICENUM] = { 0 };
|
||||
static int _lastImageSizeHeight[MAX_LJXA_DEVICENUM];
|
||||
|
||||
class Hd_CameraModule_3DKeyence :public Base
|
||||
{
|
||||
@@ -43,18 +51,18 @@ public:
|
||||
bool readData(std::vector<cv::Mat>& mats, QByteArray& data);
|
||||
//实例对象把数据写入到类
|
||||
bool writeData(std::vector<cv::Mat>& mat, QByteArray& data);
|
||||
bool initParas(QByteArray&);
|
||||
bool initParas(QByteArray& initData);
|
||||
bool run();
|
||||
|
||||
int LJXA_ACQ_OpenDevice(int lDeviceId, LJX8IF_ETHERNET_CONFIG* EthernetConfig, int HighSpeedPortNo);
|
||||
int LJXA_ACQ_StartAsync(int lDeviceId, LJXA_ACQ_SETPARAM* setParam);
|
||||
int LJXA_ACQ_AcquireAsync(int lDeviceId, unsigned short* heightImage, unsigned short* luminanceImage, LJXA_ACQ_SETPARAM* setParam, LJXA_ACQ_GETPARAM* getParam);
|
||||
//int LJXA_ACQ_StartAsync(int lDeviceId, LJXA_ACQ_SETPARAM* setParam);
|
||||
//int LJXA_ACQ_AcquireAsync(int lDeviceId, unsigned short* heightImage, unsigned short* luminanceImage, LJXA_ACQ_SETPARAM* setParam, LJXA_ACQ_GETPARAM* getParam);
|
||||
void LJXA_ACQ_CloseDevice(int lDeviceId);
|
||||
|
||||
bool decodeInitData(QByteArray byte,QVector<QByteArray> &vector_data);
|
||||
bool InitHighSpeed();
|
||||
private:
|
||||
int LJXA_ACQ_Acquire(int lDeviceId, unsigned short* heightImage, unsigned short* luminanceImage, LJXA_ACQ_SETPARAM* setParam, LJXA_ACQ_GETPARAM* getParam);
|
||||
//int LJXA_ACQ_Acquire(int lDeviceId, unsigned short* heightImage, unsigned short* luminanceImage, LJXA_ACQ_SETPARAM* setParam, LJXA_ACQ_GETPARAM* getParam);
|
||||
LJX8IF_HIGH_SPEED_PRE_START_REQ *startReq_ptr = nullptr;
|
||||
LJX8IF_PROFILE_INFO *profileInfo_ptr = nullptr;
|
||||
|
||||
@@ -69,7 +77,7 @@ private:
|
||||
int yImageSize = 0; // Number of Y lines.
|
||||
float y_pitch_um = 0; // Data pitch of Y data. (e.g. your encoder setting)
|
||||
int timeout_ms = 0; // Timeout value for the acquiring image (in milisecond).
|
||||
int use_external_batchStart = 0; // Set "1" if you controll the batch start timing externally. (e.g. terminal input) 0内部触发,1外部触发
|
||||
int use_external_batchStart = 1; // Set "1" if you controll the batch start timing externally. (e.g. terminal input) 0内部触发,1外部触发
|
||||
std::string outputFilePath1 = "sample_height.csv";
|
||||
std::string outputFilePath2 = "sample_height.tif";
|
||||
std::string outputFilePath3 = "sample_luminance.tif";
|
||||
|
||||
Reference in New Issue
Block a user