V20251125-2.2.6
修改了CLS切图函数的逻辑,现在会按最初图像的中心点开始切图。 修改算法NG(halconNg)时存图的文件夹名字为algoNG。 修复基恩士相机可能出现丢亮度图的问题。
This commit is contained in:
@@ -124,8 +124,15 @@ void myCallbackFunc(LJX8IF_PROFILE_HEADER* pProfileHeaderArray, WORD* pHeightPro
|
||||
}
|
||||
if (_luminanceBuf[dwUser] <= pLuminanceProfileArray || (unsigned short*)_luminanceBuf[dwUser] >= (WORD*)pLuminanceProfileArray + dwProfileDataCount * dwCount * 2)
|
||||
memcpy(&_luminanceBuf[dwUser][0], pLuminanceProfileArray, dwProfileDataCount * dwCount * 2);
|
||||
else
|
||||
qDebug() << __FUNCTION__ << " line:" << __LINE__ << "memcpy _luminanceBuf error";
|
||||
else {
|
||||
try {
|
||||
memcpy(&_luminanceBuf[dwUser][0], pLuminanceProfileArray, dwProfileDataCount * dwCount * 2);
|
||||
}
|
||||
catch (...) {
|
||||
qCritical() << __FUNCTION__ << " line:" << __LINE__ << "Get luminanceBuf failed!";
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
_imageAvailable[dwUser] = 1; // 图像获取成功 dwUser 和 deviceId 一致
|
||||
_lastImageSizeHeight[dwUser] = dwCount; // 扫描的行数, dwCount 和 yImageSize 一致
|
||||
@@ -414,9 +421,10 @@ bool Hd_CameraModule_3DKeyence::initParas(QByteArray& initData)
|
||||
}
|
||||
|
||||
// Initialize
|
||||
if (!InitHighSpeed())
|
||||
{
|
||||
if (!InitHighSpeed()){
|
||||
qDebug() << __FUNCTION__ << " line:" << __LINE__ << " InitHighSpeed error! " ;
|
||||
lastError = "初始化高速通讯失败!";
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
@@ -476,6 +484,7 @@ bool Hd_CameraModule_3DKeyence::run()
|
||||
|
||||
try
|
||||
{
|
||||
_imageAvailable[deviceId] = 0;
|
||||
while (imgTakeNum != imgTarget)
|
||||
{
|
||||
int sleepMs = 10;
|
||||
@@ -486,8 +495,8 @@ bool Hd_CameraModule_3DKeyence::run()
|
||||
QThread::msleep(10);
|
||||
if (cnt++ >= timeoutCnt)
|
||||
{
|
||||
heightMatS.push_back(cv::Mat(G_yImageSize, G_xImageSize, CV_8UC1, cv::Scalar(0, 0, 0)));
|
||||
luminanceMatS.push_back(cv::Mat(G_yImageSize, G_xImageSize, CV_8UC1, cv::Scalar(0, 0, 0)));
|
||||
heightMatS.push_back(cv::Mat(1000, 1000, CV_8UC1, cv::Scalar(0)));
|
||||
luminanceMatS.push_back(cv::Mat(1000, 1000, CV_8UC1, cv::Scalar(0)));
|
||||
imgTakeNum++;
|
||||
qDebug() << "imgGetERROR insert blank img cameraID:" << camera_name;
|
||||
continue;
|
||||
|
||||
Reference in New Issue
Block a user