#ifndef __VIZUM_INTERNAL_HEADER__ #define __VIZUM_INTERNAL_HEADER__ /// @brief /// 公司内部使用的函数。 #include "VZNL_Types.h" #include "VZNL_Export.h" /// @breif /// 设置门限值 /// [in]设备句柄 /// [in]门限值 /// @return 返回0则表示成功,否则都是失败的 VZNLAPI int VzNL_ConfigThres(VZNLHANDLE hDevice, int nThres[2]); VZNLAPI int VzNL_GetDetectThres(VZNLHANDLE hDevice, int* pnThres1, int* pnThres2); /// @brief /// 设置眼睛ROI VZNLAPI int VzNL_EnableEyeROI(VZNLHANDLE hDevice, int bEnable); VZNLAPI int VzNL_IsEnableEyeROI(VZNLHANDLE hDevice, int* pbEnable); /// @brief /// 启用边缘图 VZNLAPI int VzNL_EnableEdgeImage(VZNLHANDLE hDevice, int bEnable); VZNLAPI int VzNL_IsEnableEdgeImage(VZNLHANDLE hDevice, int* pbEnable); /// @brief /// 设置曝光门限 VZNLAPI int VzNL_SetExposeThres(VZNLHANDLE hDevice, EVzExposeThresType eType, unsigned int nThresValue); VZNLAPI int VzNL_GetExposeThres(VZNLHANDLE hDevice, EVzExposeThresType* peType, unsigned int* pnThresValue); /// @brief /// 设置眼睛的MAC,IP和目标IP VZNLAPI int VzNL_ConfigEyeNetWork(VZNLHANDLE hDevice, const unsigned char byEyeIP[4], const unsigned char byEyeMAC[6], const unsigned char byEyeCBIP[4]); VZNLAPI int VzNL_GetConfigEyeNetWork(VZNLHANDLE hDevice, unsigned char byEyeIP[4], unsigned char byEyeMAC[6], unsigned char byEyeCBIP[4]); /// @brief /// 设置第三方网络信息 VZNLAPI int VzNL_ConfigThridNetWorkInfo(VZNLHANDLE hDevice, unsigned char byThridIP[4], unsigned int nThridPort, int bIsTransPic); VZNLAPI int VzNL_GetConfigThridNetWorkInfo(VZNLHANDLE hDevice, unsigned char byThridIP[4], unsigned int* pnThridPort, int* pbIsTransPic); /// @brief /// 配置Wifi VZNLAPI int VzNL_ConfigWifiInfo(VZNLHANDLE hDevice, const char szBSSID[32], const char szPassWd[32], const unsigned char szMAC[6], const char szCipher[32]); VZNLAPI int VzNL_GetConfigWifiInfo(VZNLHANDLE hDevice, char szBSSID[32], char szPassWd[32], unsigned char szMAC[6], char szCipher[32]); /// @brief /// Rename Device Name VZNLAPI int VzNL_RenameDeviceName(VZNLHANDLE hDevice, char szDeviceName[32]); /// @brief /// Reset Device VZNLAPI int VzNL_ResetDevice(VZNLHANDLE hDevice); /// @brief /// Translate Image Mode VZNLAPI int VzNL_EnableTransPicMode(VZNLHANDLE hDevice, VzBool bEnable); /// @brief /// Query Device VZNLAPI void* VzNL_QueryHandle(VZNLHANDLE hDevice); /// @brief /// 获取核心数据获取类(主要用于给3399用作算法解密用) VZNLAPI int VzNL_QueryDeviceData(VZNLHANDLE hDevice, void** ppUnknown); /// @brief /// 设置眼睛Gap VZNLAPI int VzNL_SetDeviceGap(VZNLHANDLE hDevice, unsigned short nGap); /// @brief /// 设置一次Trigger的次数 VZNLAPI int VzNL_SetDeviceTriggerN(VZNLHANDLE hDevice, int nMin, int nMax); /// @brief /// 创建算法句柄 VZNLAPI int VzNL_QueryAIObject(VZNLHANDLE hDevice, const char* lpszDll, void** pAIInterface); VZNLAPI int VzNL_QueryAIObjectEx(VZNLHANDLE hDevice, const char* lpszDll, void** pAIInterface, char szVersion[64]); /// @brief /// 修改算法核心 VZNLAPI void* VzNL_QueryAlgoCore(VZNLHANDLE hDevice, int nDetectType); /// @brief /// 获取接口 VZNLAPI int VzNL_QueryInterface(unsigned int nUnknownInterface, void** ppUnknownInterface); /// @brief 3399相关参数 /// @{ /// @brief /// 重置3399设备 VZNLAPI int VzNL_ResetEyeCBDevice(SVzNLEyeCBDeviceInfoEx* psEyeCBDeviceInfo); /// @brief /// 设置3399设备Debug码 VZNLAPI int VzNL_SetEyeCBDebugCode(VZNLHANDLE hDevice, double nDebugCode); /// @brief /// 设置3399设备LogType VZNLAPI int VzNL_SetEyeCBLogType(VZNLHANDLE hDevice, unsigned int nLogType); /// @brief /// 设置钢筋打标模式 VZNLAPI int VzNL_SetCounterDetectMode(VZNLHANDLE hDevice, EVzEyeCBDetectMode eDetectMode); /// @} /// @name 激光检测参数 /// @{ /// @brief /// 设置采集模式 VZNLAPI int VzNL_SetLocalLaserMode(VZNLHANDLE hDevice, EVzLaserCaptureMode eCaptureMode); /// @brief /// 开启本地检测 VZNLAPI int VzNL_EnableLocalDetect(VZNLHANDLE hDevice, VzBool bEnable); /// @brief /// 设置缓存帧数 VZNLAPI int VzNL_SetCacheSize(VZNLHANDLE hDevice, unsigned int nCacheSize); /// @} /// @brief /// 设置自定义数据 VZNLAPI int VzNL_WriteCustomData(VZNLHANDLE hDevice, unsigned char* pCustomData, unsigned int nDataLength); VZNLAPI int VzNL_ReadCustomData(VZNLHANDLE hDevice, unsigned char* pCustomData, unsigned int* pnDataLength); /// @brief /// 启用增强检测(3399支持) /// [in]设备 /// [in]启用/禁用 /// @return 返回0为正确,失败返回错误码 VZNLAPI int VzNL_EnableEnhancedDetection(VZNLHANDLE hDevice, VzBool bEnable); VZNLAPI VzBool VzNL_IsEnableEnhancedDetection(VZNLHANDLE hDevice, int* pnErrorCode); /// @brief /// 启用弱极光线检测(3399支持) /// [in]设备 /// [in]启用/禁用 /// @return 返回0为正确,失败返回错误码/200.3 VZNLAPI int VzNL_EnableDetectLowLevelLaser(VZNLHANDLE hDevice, VzBool bEnable); VZNLAPI VzBool VzNL_IsEnableDetectLowLevelLaser(VZNLHANDLE hDevice, int* pnErrorCode); /// @brief /// 停止采图时自动切换为数据采集状态 /// [in]设备 /// [in]True为图像模式/False数据模式 /// @return 返回0为正确,失败返回错误码 VZNLAPI int VzNL_EnableAutoSwitchMode(VZNLHANDLE hDevice, VzBool bEnable, EVzNLEyeDataWorkMode eStatus); /// @brief /// 停止采图时自动切换为数据采集状态 /// [in]设备 /// [in]True为图像模式/False数据模式 /// @return 返回0为正确,失败返回错误码 VZNLAPI int VzNL_ResetRobotCalibParam(VZNLHANDLE hDevice); VZNLAPI int VzNL_SetRobotCalibParam(VZNLHANDLE hDevice, double dMatrix[16]); VZNLAPI int VzNL_GetRobotCalibParam(VZNLHANDLE hDevice, double dMatrix[16]); /// @name 圆形检测 /// @brief /// 设置误差 VZNLAPI int VzNL_SetCircleMaxRDeviation(VZNLHANDLE hDevice, int nMaxReviation); /// @brief /// 获取眼睛Handle VZNLAPI void* VzNL_QueryEyeHandle(VZNLHANDLE hDevice); /// @brief /// 写3399第二个网卡IP VZNLAPI int VzNL_ConfigEyeCBNetWorkAdapterIP(VZNLHANDLE hDevice, int nAdapter, unsigned char byIP[4]); VZNLAPI int VzNL_GetEyeCBNetWorkAdapterIP(VZNLHANDLE hDevice, int nAdapter, unsigned char byIP[4]); /// @brief /// 设置自定义命令 VZNLAPI int VzNL_SetCustomCommand(VZNLHANDLE hDevice, unsigned short shAddress, unsigned short shCommand, unsigned int nSetValue); VZNLAPI int VzNL_GetCustomCommand(VZNLHANDLE hDevice, unsigned short shAddress, unsigned short shCommand, unsigned int* pnReadData); /// @brief /// 启用/禁用命令心跳 VZNLAPI int VzNL_EnableHeartBeat(VZNLHANDLE hDevice, VzBool bStreamOrCommand, VzBool bEnable, unsigned int nTimeOut, unsigned int nCmdInterval); /// @brief /// 启用/禁用SDK枚举 VZNLAPI int VzNL_EnableSDKEveryNetSearch(VzBool bEnable); /// @brief /// 获取3399设置的帧率 VZNLAPI int VzNL_Get3399FrameRate(VZNLHANDLE hDevice, unsigned int* pnFrameRate); /// @brief /// 设置煤流目标个数 VZNLAPI int VzNL_SetGangueTargetCount(VZNLHANDLE hDevice, unsigned int nTargetCount); /// @brief /// 发送SPI指令 VZNLAPI int VzNL_SetSPICustomData(VZNLHANDLE hDevice, unsigned char* pData, unsigned int nLength); /// @brief /// 启用Trigger状态检测 VZNLAPI int VzNL_EnableCheckTriggerStatus(VZNLHANDLE hDevice, VzBool bEnable); /// @brief /// 启用Trigger状态检测 VZNLAPI int VzNL_EnableStreamListener(VZNLHANDLE hDevice, VzBool bEnable, unsigned int nTimeOut); /// @brief /// 启用摆动机构时是否设置动态ROI /// [in]设备句柄 /// [in]是否启用摆动机构 /// [in]是否联动动态ROI VZNLAPI int VzNL_EnableSwingMotorEx(VZNLHANDLE hDevice, VzBool bEnableMotor, VzBool bLinkDynamicROI); /// @brief /// 切换图像/数据状态 /// [in]设备句柄 /// [in]数据/图像数据 /// @return 0为成功,非0为失败 VZNLAPI int VzNL_SwitchLaserEyeImageDataMode(VZNLHANDLE hDevice, EVzNLEyeDataWorkMode eMode); VZNLAPI EVzNLEyeDataWorkMode VzNL_GetLaserEyeImageDataMode(VZNLHANDLE hDevice, int* pnErrorCode); /// @brief 是否改变单次检测时的图像数据模式 /// [in]设备句柄 /// [in]VzTrue启用改变 VZNLAPI void VzNL_EnableLaserEyeSwitchModeWhenDetect(VZNLHANDLE hDevice, VzBool bEnable); VZNLAPI VzBool VzNL_IsEnableLaserEyeSwitchModeWhenDetect(VZNLHANDLE hDevice, int* pnErrorCode); /// @brief 存储激光结果 VZNLAPI void VzNL_SaveLaserResult(VZNLHANDLE hDevice, const char* lpszFIle); /// @brief 读取彩色相机标定数据 VZNLAPI int VzNL_ReadColorCalibInfo(VZNLHANDLE hDevice, unsigned char* byData, unsigned int nDataLength); /// @brief 注册Dump回调 VZNLAPI void VzNL_RegisterDumpCB(VzNL_CrashCallBack pFunCB); /// @brief 当在摆动机构相机时,自动切换ROI VZNLAPI void VzNL_EnableAutoChangeSwingROI(VZNLHANDLE hDevice, VzBool bEnable); /// @brief 写入多相机数据 /// [in]设备句柄 /// [in]设备Index,主设备0, 从设备1~xxx /// [in]转换矩阵 /// [in]Y过滤范围,默认-9999999~999999 /// [in]序号,用于数据排序 VZNLAPI int VzNL_WriteMultiDevData(VZNLHANDLE hDevice, unsigned int nDevIndex, double dConvertMatrix[3][4], double dYRange[2]); VZNLAPI int VzNL_ReadMultiDevData(VZNLHANDLE hDevice, unsigned int* pnDevIndex, double dConvertMatrix[3][4], double dYRange[2]); /// @brief 写入/读取多相机数据序号(配置顺序后,设备将按照这个顺序进行数据展示) /// [in]设备句柄 /// [in]设备顺序号 VZNLAPI int VzNL_WriteMultiDevOrder(VZNLHANDLE hDevice, int nOrderIdx); VZNLAPI int VzNL_ReadMultiDevOrder(VZNLHANDLE hDevice, int* pnOrderIdx); /// @brief /// DistVarth VZNLAPI int VzNL_SetDistVarth(VZNLHANDLE hDevice, unsigned int nDistVarth); VZNLAPI unsigned int VzNL_GetDistVarth(VZNLHANDLE hDevice, int* pnErrorCode); /// @brief /// 启用CalibBetterRgnPtNumTh VZNLAPI int VzNL_SetCalibBetterRgnPtNumTh(VZNLHANDLE hDevice, unsigned int nRgnPtNumTh); VZNLAPI unsigned int VzNL_GetCalibBetterRgnPtNumTh(VZNLHANDLE hDevice, int* pnErrorCode); /// @brief /// 设置最大线宽 VZNLAPI int VzNL_SetMaxLineWidth(VZNLHANDLE hDevice, unsigned int nLineWidth); VZNLAPI unsigned int VzNL_GetMaxLineWidth(VZNLHANDLE hDevice, int* pnErrorCode); /// @brief /// 设置测试图 VZNLAPI int VzNL_SetTestPatten(VZNLHANDLE hDevice, unsigned int nTestPatten); /// @brief 设置激光Y过滤值 VZNLAPI int VzNL_SetLaserFilterExceptYRange(VZNLHANDLE hDevice, double dYMin, double dYMax); /// @brief 读/写 激光引用位置 VZNLAPI int VzNL_Read3DRef(VZNLHANDLE hDevice, SVzNL3DPoint* ps3DPoint); VZNLAPI int VzNL_Write3DRef(VZNLHANDLE hDevice, SVzNL3DPoint* ps3DPoint); /* * @brief 获取温度信息 * @param hDevice [in] 设备句柄 * @param eChipInfo [in] 芯片信息 * @param pfMin [out] 最低温度 * @param pfMax [out] 最高温度 * @param pfCur [out] 当前温度 * @return 失败返回非0 */ VZNLAPI int VzNL_QueryChipInfo(VZNLHANDLE hDevice, EVzDevChipInfo eChipInfo, float* pfMin, float* pfMax, float* pfCur); /* * @brief 获取产品类型 * @param hDevice [in] 设备信息 * @return 产品类型。 */ VZNLAPI EVzProjectType VzNL_GetProjectType(VZNLHANDLE hDevice); /* * @brief 是否只显示结果? * @param hDevice [in] 设备信息 */ VZNLAPI VzBool VzNL_IsOnlyResult(VZNLHANDLE hDevice, int* pnErrorCode); /* * @brief 获取逆矩阵信息 * @param hDevice [in] 设备信息 * @param dInverseRT [in] 逆向矩阵(原点标定逆向矩阵) * @return 返回值为0则表明成功,其他返回值请查询错误信息。 */ VZNLAPI int VzNL_QueryInverseRT(VZNLHANDLE hDevice, double dInverseR[4][4]); /* * @brief 保存CircleMark文件 * @param hDevice [in] 设备信息 * @param lpszFile [in] 存储文件 * @return 返回值为0则表明成功,其他返回值请查询错误信息。 */ VZNLAPI int VzNL_SaveCircleMarkFile(VZNLHANDLE hDevice, const char* lpszFile); /** * @brief 保存激光线文件(智光眼专用) * @param hDevice [in] 设备Handle * @param bEnable [in] VzTrue启用/VzFalse禁用 * @return 关闭成功返回0,否则为错误码 */ VZNLAPI int VzNL_SaveLaserFile(VZNLHANDLE hDevice, const char* lpszFile); /** * @brief 获取逆矩阵(智光眼专用) * @param hDevice [in] 设备Handle * @param bEnable [in] VzTrue启用/VzFalse禁用 * @return 关闭成功返回0,否则为错误码 */ VZNLAPI int VzNL_QueryLogisticsInverseRT(VZNLHANDLE hDevice, double dInverseMatrix[4][4]); /** * @brief 设置仅传图像模式(智光眼专用) * @param hDevice [in] 设备Handle * @param bEnable [in] VzTrue启用/VzFalse禁用 * @return 关闭成功返回0,否则为错误码 */ VZNLAPI int VzNL_OnlyTransOriImage(VZNLHANDLE hDevice, VzBool bEnable); /** * @brief 获取原始分辨率 * @param hDevice [in] 设备Handle * @return 关闭成功返回0,否则为错误码 */ VZNLAPI int VzNL_GetOriResolution(VZNLHANDLE hDevice, SVzVideoResolution* psVideoRes); /** * @brief 设置中间Sensor图像格式 * @param hDevice [in] 设备Handle * @param bIsGray [in] VzTrue设置为灰度Sensor, VzFalse为彩色 * @return 关闭成功返回0,否则为错误码 */ VZNLAPI int VzNL_SetCenterSensorImageType(VZNLHANDLE hDevice, VzBool bIsGray); VZNLAPI VzBool VzNL_GetCenterSensorImageType(VZNLHANDLE hDevice, int* pnErrorCode); /** * @brief 是否下载过Map * @param hDevice [in] 设备Handle * @param pnErrorCode [out] 错误码 * @return VzTrue下载过Map */ VZNLAPI VzBool VzNL_IsDownloadMap(VZNLHANDLE hDevice, int* pnErrorCode); /** * @brief 获取Sensor状态 * @param hDevice [in] 设备Handle * @param bValidStatus [out] 0:左 1:右 2:中间Sensor VzTrue为存在 VzFalse为不存在 * @return 关闭成功返回0,否则为错误码 */ VZNLAPI int VzNL_GetSensorStatus(VZNLHANDLE hDevice, VzBool bValidStatus[3]); /** * @brief 写入用户数据 * @param hDevice [in] 设备Handle */ VZNLAPI int VzNL_WriteUserData(VZNLHANDLE hDevice, unsigned int nOffset, unsigned char* pData, unsigned int nDataLength); VZNLAPI int VzNL_ReadUserData(VZNLHANDLE hDevice, unsigned int nOffset, unsigned char* pData, unsigned int nDataLength); /** * @brief LL * @param hDevice [in] 设备Handle */ VZNLAPI int VzNL_SetSmoothingLL(VZNLHANDLE hDevice, unsigned int nWinSize); VZNLAPI unsigned int VzNL_GetSmoothingLL(VZNLHANDLE hDevice, int* pnErrorCode); /** * @brief LLG (当LL为1时, LLG最大只为1) * @param hDevice [in] 设备Handle */ VZNLAPI int VzNL_SetSmoothingDigiGain(VZNLHANDLE hDevice, unsigned int nDigiGain); VZNLAPI unsigned int VzNL_GetSmoothingDigiGain(VZNLHANDLE hDevice, int* pnErrorCode); /// @brief 给PetaLinux发送信息 VZNLAPI int VzNL_SendDataToPeta(VZNLHANDLE hDevice, unsigned char* pData, unsigned int nDataLength); /// @brief 激活取消激活PetaLinux通道 VZNLAPI int VzNL_ActivePetaLinux(VZNLHANDLE hDevice, VzBool bActive); /// @brief 启用/禁用 激光线输出 VZNLAPI int VzNL_EnableOutputLaserLine(VZNLHANDLE hDevice, VzBool bActive); VZNLAPI VzBool VzNL_IsEnableOutputLaserLine(VZNLHANDLE hDevice, int* pnErrorCode); /// @brief 启用/禁用 煤流数据 VZNLAPI int VzNL_EnableOutputCoalData(VZNLHANDLE hDevice, VzBool bEnable); VZNLAPI VzBool VzNL_IsEnableOutputCoalData(VZNLHANDLE hDevice, int* pnErrorCode); /// @brief /// 写入煤流特有的命令 VZNLAPI int VzNL_SendCoalSpecialCommand(VZNLHANDLE hDevice, unsigned int eCoalCommand, unsigned char* pData, unsigned int nDataLength); VZNLAPI int VzNL_GetCoalSpecialCommand(VZNLHANDLE hDevice, unsigned int eCoalCommand, unsigned char* ppData, unsigned int nDataLength); /// @brief /// 查看当前开流状态 VZNLAPI VzBool VzNL_QueryStreamStatus(VZNLHANDLE hDevice); VZNLAPI EVzNLEyeDataWorkMode VzNL_QueryCurDataMode(VZNLHANDLE hDevice); /// @brief /// 发送任意数据到PS VZNLAPI int VzNL_SendCustomDataToPS(VZNLHANDLE hDevice, unsigned char* pData, unsigned int nDataLength); /// @brief /// 激活PS通道 VZNLAPI int VzNL_ActivePSChannel(VZNLHANDLE hDevice, VzBool bEnable); /// @brief /// 设置在开流前后是否自己控制摆动模块位置 VZNLAPI int VzNL_EnableAutoRotateSwingToStopAngle(VZNLHANDLE hDevice, VzBool bEnable); VZNLAPI VzBool VzNL_IsEnableAutoRotateSwingToStopAngle(VZNLHANDLE hDevice, int* pnErrorCode); /// @brief 是否支持Bin VZNLAPI VzBool VzNL_IsSupportBin(VZNLHANDLE hDevice); /// @brief 启用/禁用 Bin模式 VZNLAPI VzBool VzNL_IsEnableBinMode(VZNLHANDLE hDevice, int* pnErrorCode); /// @breif 设置当前位置为零位 VZNLAPI int VzNL_SetSwingZeroPos(VZNLHANDLE hDevice); /// @breif 设置当前位置为左极限 VZNLAPI int VzNL_SetSwingLeftLimit(VZNLHANDLE hDevice); /// @breif 设置当前位置为右极限 VZNLAPI int VzNL_SetSwingRightLimit(VZNLHANDLE hDevice); /// @brief 重启摆动模块 VZNLAPI int VzNL_SetSpeedPI(VZNLHANDLE hDevice, unsigned char shSpeedP, unsigned char shSpeedI); VZNLAPI int VzNL_GetSpeedPI(VZNLHANDLE hDevice, unsigned char* pshSpeedP, unsigned char* pshSpeedI); /// @brief 重启摆动模块 VZNLAPI int VzNL_SetCurrentPI(VZNLHANDLE hDevice, unsigned char shSpeedP, unsigned char shSpeedI); VZNLAPI int VzNL_GetCurrentPI(VZNLHANDLE hDevice, unsigned char* pshSpeedP, unsigned char* pshSpeedI); /// @brief 重启摆动模块 VZNLAPI int VzNL_RebootSwing(VZNLHANDLE hDevice); /// @brief 自动配置PI VZNLAPI int VzNL_EnableSwingAdjustPI(VZNLHANDLE hDevice, VzBool bEnable); /// @brief 获取摆动模块状态 VZNLAPI int VzNL_QuerySwingStatus(VZNLHANDLE hDevice, int* pnErrorCode); /// @brief 升级摆动模块 VZNLAPI int VZNL_UpdateSwing(VZNLHANDLE hDevice, const char* lpszFile); /// @brief 重置摆动模块 VZNLAPI int VZNL_ResetSwing(VZNLHANDLE hDevice); /// @brief 电机找零 VZNLAPI int VZNL_FindMotorZero(VZNLHANDLE hDevice); /// @brief 电机自检 VZNLAPI int VZNL_MotorSelfCheck(VZNLHANDLE hDevice); /// @brief 设置延迟的帧数 frame VZNLAPI int VzNL_SetRGBDPostFrameNum(VZNLHANDLE hDevice, unsigned int nPostFrameNum); VZNLAPI unsigned int VzNL_GetRGBDPostFrameNum(VZNLHANDLE hDevice, int* pnErrorCode); /// @brief 设置微调距离mm VZNLAPI int VzNL_SetRGBDFineTune(VZNLHANDLE hDevice, float fFineTune); VZNLAPI float VzNL_GetRGBDFineTune(VZNLHANDLE hDevice, int* pnErrorCode); /// @brief 设置双目标单目参数 VZNLAPI int VzNL_UseSingleCameraCalibParam(VZNLHANDLE hDevice, VzBool bUseCalibParam); VZNLAPI VzBool VzNL_IsUseSingleCameraCalibParam(VZNLHANDLE hDevice, int* pnErrorCode); VZNLAPI int VzNL_SetSingleCameraRefPlaneCalibParam(VZNLHANDLE hDevice, double dParam[5]); VZNLAPI int VzNL_GetSingleCameraRefPlaneCalibParam(VZNLHANDLE hDevice, double dParam[5]); /// @brief 设置单目标定参数 VZNLAPI int VzNL_EnableCompute3DSingleEye(VZNLHANDLE hDevice, VzBool bEnable); VZNLAPI VzBool VzNL_IsEnableCompute3DSingleEye(VZNLHANDLE hDevice, int* pnErrorCode); VZNLAPI int VzNL_SetCompute3DSEParam(VZNLHANDLE hDevice, float fParam[4]); VZNLAPI int VzNL_GetCompute3DSEParam(VZNLHANDLE hDevice, float fParam[4]); /// @brief 获取Debug数据的总数据量 VZNLAPI unsigned int VzNL_QueryDeviceDebugDataTotleSize(VZNLHANDLE hDevice); /// @brief 保存Map数据等信息 /// [in]设备句柄 /// [in]存储路径 /// [in]更新时间 /// [in]数据回调 VZNLAPI int VzNL_SaveDeviceDebugInfo(VZNLHANDLE hDevice, const char* lpszSaveDir, double dUpdateTime, void* pDebugSaveProgress); /// @brief 启用无限制帧率 VZNLAPI int VzNL_EnableFreeFrameRate(VZNLHANDLE hDevice, VzBool bEnable); /** * @brief 是否启用C模式图像传输 * @param [in] hDevice 设备Handle * @param [in] bEnable 是否启用C模式图像 * @return 当前已启用分层返回VzTrue,否则返回VzFalse */ VZNLAPI int VzNL_EnableCModeImage(VZNLHANDLE hDevice, VzBool bEnable); /** * @brief 配置蓝光RGBD偏移距离(mm) * @param [in] hDevice 设备Handle * @param [in] fDistance 偏移距离(mm) * @return 成功返回0,失败返回错误码 */ VZNLAPI int VzNL_SetRGBOffsetDistance(VZNLHANDLE hDevice, float fDistance); /** * @brief 获取蓝光RGBD偏移距离(mm) * @param [in] hDevice 设备Handle * @param [in] nErrorCode 错误码 * @return 蓝光RGBD偏移距离(mm) */ VZNLAPI float VzNL_GetRGBOffsetDistance(VZNLHANDLE hDevice, int* nErrorCode); /** * @brief 启用/禁用算法增强 * @param [in] hDevice 设备Handle * @param [in] bEnable 启用VzTrue / 禁用VzFalse * @return 成功返回0,失败返回错误码 */ VZNLAPI int VzNL_EnableSupportSS(VZNLHANDLE hDevice, VzBool bEnable); /** * @brief 是否启用算法增强 * @param [in] hDevice 设备Handle * @param [in] pnErrorCode 错误码 * @return 当前已启用分层返回VzTrue,否则返回VzFalse */ VZNLAPI VzBool VzNL_IsEnableSupportSS(VZNLHANDLE hDevice, int* pnErrorCode); /** * @brief 启用/禁用单边反光增强 * @param [in] hDevice 设备Handle * @param [in] bEnable 启用VzTrue / 禁用VzFalse * @return 成功返回0,失败返回错误码 */ VZNLAPI int VzNL_EnableSupportSingleReflect(VZNLHANDLE hDevice, VzBool bEnable); /** * @brief 是否启用了单边反光增强 * @param [in] hDevice 设备Handle * @param [in] pnErrorCode 错误码 * @return 当前已启用分层返回VzTrue,否则返回VzFalse */ VZNLAPI VzBool VzNL_IsEnableSupportSingleReflect(VZNLHANDLE hDevice, int* pnErrorCode); /** * @brief 启用分层功能 (默认为VzTrue) * @param [in] hDevice 设备Handle * @param [in] bEnable 启用VzTrue / 禁用VzFalse * @return 成功返回0,失败返回错误码 */ VZNLAPI int VzNL_EnableMultiMatch(VZNLHANDLE hDevice, VzBool bEnable); /** * @brief 是否启用了分层功能 * @param [in] hDevice 设备Handle * @param [in] pnErrorCode 错误码 * @return 当前已启用分层返回VzTrue,否则返回VzFalse */ VZNLAPI VzBool VzNL_IsEnableMultiMatch(VZNLHANDLE hDevice, int* pnErrorCode); /** * @brief 获取用户配置个数(共10个) 当前仅支持智光眼 * @param [in] hDevice 设备Handle * @param [out]pnSupportUserProfileCount 不能为null, 获取支持的最大文件个数 */ VZNLAPI int VzNL_QueryUserProfileCount(VZNLHANDLE hDevice, int* pnSupportUserProfileCount); /** * @brief 获取单个配置文件最大的大小(512 K) 当前仅支持智光眼 * @param [in] hDevice 设备Handle * @param [out]pnMaxLength 不能为null, 获取文件的最大数据长度 */ VZNLAPI int VzNL_QueryUserProfileMaxLength(VZNLHANDLE hDevice, int* pnMaxLength); /** * @brief 读取、写入用户配置(共10个) 当前仅支持智光眼 * @param [in] hDevice 设备Handle * @param [in] nProfileIdx 文件索引 * @param [in] pData 数据Buffer * @param [in] nReadLength 数据长度 */ VZNLAPI int VzNL_ReadUserProfile(VZNLHANDLE hDevice, unsigned int nProfileIdx, unsigned char* pData, unsigned int nReadLength); VZNLAPI int VzNL_WriteUserProfile(VZNLHANDLE hDevice, unsigned int nProfileIdx, unsigned char* pData, unsigned int nWriteLength); /** * @brief 写入/读取用户文件列表 当前仅支持智光眼 * @param [in] hDevice 设备Handle * @param [in] pData 数据Buffer * @param [in] nReadLength 数据长度 */ VZNLAPI int VzNL_WriteUseProfileHeadBlock(VZNLHANDLE hDevice, unsigned char* pData, unsigned int nWriteLength); VZNLAPI int VzNL_ReadUseProfileHeadBlock(VZNLHANDLE hDevice, unsigned char* pData, unsigned int nReadLength); /** * @brief 设置摆动模块速度补偿系数 * @param [in] hDevice 设备Handle * @param [in] fSpeedFactor 速度补偿系数 */ VZNLAPI int VzNL_SetSwingSpeedFactor(VZNLHANDLE hDevice, float fSpeedFactor); /** * @brief 测试SPI通信是否正常 * @param [in] hDevice 设备Handle */ VZNLAPI int VzNL_CheckSwingSPIComm(VZNLHANDLE hDevice); /** * @brief 保存默认参数配置,当前仅支持智光眼 * @param hDevice 设备Handle */ VZNLAPI int VzNL_SaveDefaultSetting(VZNLHANDLE hDevice); /** * @brief 读写用户默认区数据 * @param [in] hDevice 设备Handle * @param [in] pData 数据Buffer * @param [in] nReadLength 数据长度 */ VZNLAPI int VzNL_WriteDefaultData(VZNLHANDLE hDevice, unsigned char* pData, unsigned int nWriteLength); VZNLAPI int VzNL_ReadDefaultData(VZNLHANDLE hDevice, unsigned char* pData, unsigned int nReadLength); /** * @brief 读写运行区数据 * @param [in] hDevice 设备Handle * @param [in] pData 数据Buffer * @param [in] nReadLength 数据长度 */ VZNLAPI int VzNL_WriteRuntimeData(VZNLHANDLE hDevice, unsigned char* pData, unsigned int nWriteLength); VZNLAPI int VzNL_ReadRuntimeData(VZNLHANDLE hDevice, unsigned char* pData, unsigned int nReadLength); /** * @brief 切换使能和触发信号线 */ VZNLAPI int VzNL_SwapTriggerSignal(VZNLHANDLE hDevice, VzBool bEnable); VZNLAPI VzBool VzNL_IsSwapTriggerSignal(VZNLHANDLE hDevice, int* pnErrorCode); /** * @brief 是否支持双相编码器 */ VZNLAPI VzBool VzNL_IsSupportBiPhaseEncoder(VZNLHANDLE hDevice, int* pnErrorCode); /** * @brief 是否支持光强数据 */ VZNLAPI VzBool VzNL_IsSupportIntensityData(VZNLHANDLE hDevice, int* pnErrorCode); /** * @brief 切换双向编码器/En 信号 */ VZNLAPI int VzNL_SetEnInPointSignal(VZNLHANDLE hDevice, EVzEnLineInPoint bEnable); VZNLAPI EVzEnLineInPoint VzNL_GetEnInPointSignal(VZNLHANDLE hDevice, int* pnErrorCode); /** * @brief 修改选择左右目灰度源 */ VZNLAPI int VzNL_SetGraySource(VZNLHANDLE hDevice, EVzGrayValueSource eSource); VZNLAPI EVzGrayValueSource VzNL_GetGraySource(VZNLHANDLE hDevice, int* pnErrorCode); /** * @brief 获取当前编码器状态 */ VZNLAPI int VzNL_GetEncoderStatus(VZNLHANDLE hDevice, unsigned int nStatus[3]); /** * @brief 重置当前编码器 */ VZNLAPI int VzNL_ResetEncoder(VZNLHANDLE hDevice); /** * @brief 获取当前编码器状态 */ VZNLAPI int VzNL_SetRGBCalibCamInfo(VZNLHANDLE hDevice, float fCamInfo[4]); VZNLAPI int VzNL_GetRGBCalibCamInfo(VZNLHANDLE hDevice, float fCamInfo[4]); /** * @brief 获取当前编码器状态 */ VZNLAPI int VzNL_SetRGBCalibRTMatrixData(VZNLHANDLE hDevice, float fRTMatrix[12]); VZNLAPI int VzNL_GetRGBCalibRTMatrixData(VZNLHANDLE hDevice, float fRTMatrix[12]); /// @brief 写入RGB 标定数据 VZNLAPI int VzNL_SetRGBASyncParamData(VZNLHANDLE hDevice, float fBaseDx, float fMidDx[2], float fMaxDx[2], unsigned int nDivFrame); VZNLAPI int VzNL_GetRGBASyncParamData(VZNLHANDLE hDevice, float* pfBaseDx, float fMidDx[2], float fMaxDx[2], unsigned int* pnDivFrame); /// @brief 计算RGB UV VZNLAPI SVzNL2DPoint* VzNL_CalcRGBUV(VZNLHANDLE hDevice, SVzNL3DPointF* ptPoint, int nPointCount); /// @brief 是否为异步RGBD相机 VZNLAPI VzBool VzNL_IsSupportAsyncRGB(VZNLHANDLE hDevice); /** * @brief 获取智光眼/星光眼设备详细信息 * @param [in] pEyeCBInfo * @param [out] pDeviceInfoEx * @return 返回0表示成功 */ VZNLAPI int VzNL_QueryDeviceDetailDesc(const SVzNLEyeCBInfo* pEyeCBInfo, SVzNLEyeDeviceInfoEx* pDeviceInfoEx); // @name Mark 相关 // @{ /** * @brief 启用/禁用 Mark跟踪 * @param [in] bEnable 启用跟踪? * @return 返回0表示正确 * @retval 0 表示成功 * @retval 非0 表示失败,可以使用VzNL_GetErrorInfo获取 */ VZNLAPI int VzNL_EnableTraceMark(VZNLHANDLE hDevice, VzBool bEnable); VZNLAPI int VzNL_IsEnableTraceMark(VZNLHANDLE hDevice, VzBool* pbEnable); /** * @brief 设置、获取 跟踪范围 * @param [in] dDiameter 直径 * @return 返回0表示正确 * @retval 0 表示成功 * @retval 非0 表示失败,可以使用VzNL_GetErrorInfo获取 */ VZNLAPI int VzNL_SetMarkTraceDistance(VZNLHANDLE hDevice, float fDistance); VZNLAPI int VzNL_GetMarkTraceDistance(VZNLHANDLE hDevice, float* pfDistance); /** * @brief 设置、获取 跟踪范围 * @param [in] dDiameter 直径 * @return 返回0表示正确 * @retval 0 表示成功 * @retval 非0 表示失败,可以使用VzNL_GetErrorInfo获取 */ VZNLAPI int VzNL_ResetMarkSequenceID(VZNLHANDLE hDevice, unsigned int* pnSequenceID, unsigned int nCount); VZNLAPI int VzNL_GetMarkSequenceID(VZNLHANDLE hDevice, unsigned int* pnSequenceID, unsigned int* pnCount); // @} VZNLAPI int VzNL_EnableOutputTearData(VZNLHANDLE hDevice, VzBool bEnable); /** * @brief 设置激光线采样间隔 * @param [in] hDevice 设备句柄 * @param [in] nInterval 采样间隔 * @return 返回0表示正确 * @retval 0 表示成功 * @retval 非0 表示失败,可以使用VzNL_GetErrorInfo获取 */ VZNLAPI int VzNL_SetOutputLaserInterval(VZNLHANDLE hDevice, unsigned int nInterval); VZNLAPI int VzNL_GetOutputLaserInterval(VZNLHANDLE hDevice, unsigned int* pnInterval); /** * @brief 是否只输出缺陷数据 * @param [in] hDevice 设备句柄 * @param [in] bEnable VzTrue表示只输出缺陷数据 * @return 返回0表示正确 * @retval 0 表示成功 * @retval 非0 表示失败,可以使用VzNL_GetErrorInfo获取 */ VZNLAPI int VzNL_EnableOnlyOutputTearResult(VZNLHANDLE hDevice, VzBool bEnable); VZNLAPI VzBool VzNL_IsEnableOnlyOutputTearResult(VZNLHANDLE hDevice, int* pnErrorCode); /** * @brief 配置检测目标类型 * @param [in] ePresetProfile 目标类型配置 * @return 返回0表示正确 * @retval 0 表示成功 * @retval 非0 表示失败,可以使用VzNL_GetErrorInfo获取 */ VZNLAPI int VzNL_SetDetectObjectType(VZNLHANDLE hDevice, EVzLaserObjectDetectPresetProfile ePresetProfile); VZNLAPI EVzLaserObjectDetectPresetProfile VzNL_GetDetectObjectType(VZNLHANDLE hDevice, int* pnErrorCode); /** * @brief 是否禁用流输出 */ VZNLAPI int VzNL_DisableStreamData(VZNLHANDLE hDevice, VzBool bEnable); VZNLAPI VzBool VzNL_IsDisableStreamData(VZNLHANDLE hDevice, int* pnErrorCode); /** * szy * @brief 启用3D数据计算模式 */ VZNLAPI int VzNL_EnableTrans3DRGBImage(VZNLHANDLE hDevice, VzBool bEnable); VZNLAPI VzBool VzNL_IsEnableTrans3DRGBImage(VZNLHANDLE hDevice, int* pnErrorCode); /** * @brief 网络一次发送数据大小 */ VZNLAPI int VzNL_SetEthSendDataLength(VZNLHANDLE hDevice, unsigned int nDataLength); /** * @brief 获取摆动模块记录的Debug数据,分别为发送命令的次数,接收命令的次数,命令错误的次数 */ VZNLAPI int VzNL_GetSwingInterruptInfo(VZNLHANDLE hDevice, unsigned int nTime[3]); /** * @brief 启用摆动模块Debug模式 */ VZNLAPI int VzNL_EnableSwingDebugMode(VZNLHANDLE hDevice, VzBool bEnable); /** * @brief 启用摆动模块Log */ VZNLAPI int VzNL_EnableSwingLog(VZNLHANDLE hDevice, VzBool bEnable); /** * @brief 输出摆动模块的Log */ VZNLAPI void VzNL_PrintSwingLog(VZNLHANDLE hDevice); /** * @brief 输出摆动模块的Log */ VZNLAPI int VzNL_GetSwingLogCount(VZNLHANDLE hDevice); /** * @brief 输出摆动模块的Log */ VZNLAPI int VzNL_GetPSSwingLog(VZNLHANDLE hDevice, int nLogIdx, char szLog[256]); /** * @brief 输出摆动模块Log */ VZNLAPI int VzNL_GetSwingDevLog(VZNLHANDLE hDevice, unsigned char* pTransData, unsigned int* pnDataLength); /** * @brief 获取RTC状态 0正常 1损坏 2过期 */ VZNLAPI int VzNL_GetRTCStatus(VZNLHANDLE hDevice, int* pnErrorCode); /// @brief /// 获取AutoReg个数 VZNLAPI int VzNL_GetAutoRegCount(VZNLHANDLE hDevice, int* pnErrorCode); /// @brief /// 获取AutoReg名称 VZNLAPI int VzNL_GetAutoRegName(VZNLHANDLE hDevice, int nAutoRegIdx, char szRegName[64]); /// @brief /// 获取AutoReg类型 /// @return 返回AutoReg类型,如果是1则表示为int 2则表示为float VZNLAPI int VzNL_GetAutoRegType(VZNLHANDLE hDevice, int nAutoRegIdx, int* pnErrorCode); /// @brief /// 获取AutoReg值 VZNLAPI int VzNL_GetAutoRegVal(VZNLHANDLE hDevice, int nAutoRegIdx, unsigned char pData[4]); /// @brief /// 设置AutoReg VZNLAPI int VzNL_SetAutoRegVal(VZNLHANDLE hDevice, int nAutoRegIdx, const unsigned char* pData, unsigned int nDataLength); /// @brief /// 配置Debug存储标志 VZNLAPI int VzNL_EnterDebugMode(VZNLHANDLE hDevice, VzBool bEnterDebug); VZNLAPI VzBool VzNL_IsEnterDebugMode(VZNLHANDLE hDevice, int* pnErrorCode); /// @brief 配置/获取sensor镜头信息 VZNLAPI int VzNL_SetSensorLenType(VZNLHANDLE hDevice, EVzSensorLenType eLenType); VZNLAPI EVzSensorLenType VzNL_GetSensorLenType(VZNLHANDLE hDevice, int* pnErrorCode); //@brief //设置/获取镜头舵机极性 VZNLAPI int VzNL_SetCameraServoPola(VZNLHANDLE hDevice, unsigned int nPola); VZNLAPI int VzNL_GetCameraServoPola(VZNLHANDLE hDevice, unsigned int& nPola); //@brief //设置/获取镜头舵机各种状态下对应的脉冲值 VZNLAPI int VzNL_SetCameraServoStatusPlusWidth(VZNLHANDLE hDevice, EVzServoStatusType eServoStatusType, unsigned int nPlusWidth); VZNLAPI int VzNL_GetCameraServoStatusPlusWidth(VZNLHANDLE hDevice, EVzServoStatusType eServoStatusType, unsigned int& nPlusWidth); //@brief //设置/获取镜头舵机各种状态下对应的脉冲周期 VZNLAPI int VzNL_SetCameraServoSpeedCycle(VZNLHANDLE hDevice, unsigned int nCycle); VZNLAPI int VzNL_GetCameraServoSpeedCycle(VZNLHANDLE hDevice, unsigned int& nCycle); //@brief //设置/获取等待时间 (ms) VZNLAPI int VzNL_SetCameraServoWaitTime(VZNLHANDLE hDevice, unsigned int nTime); VZNLAPI int VzNL_GetCameraServoWaitTime(VZNLHANDLE hDevice, unsigned int& nTime); //@brief //设置/获取打开、关闭动作次数 VZNLAPI int VzNL_SetCameraServoMoveCount(VZNLHANDLE hDevice, unsigned int nCount); VZNLAPI int VzNL_GetCameraServoMoveCount(VZNLHANDLE hDevice, unsigned int& nCount); //设置舵机脉冲值 VZNLAPI int VzNL_SetCameraServoPlusWidth(VZNLHANDLE hDevice, unsigned int nPlusWidth); //设置舵机开机后的默认脉冲值 VZNLAPI int VzNL_SetCameraServoDefaultPlusWidth(VZNLHANDLE hDevice, unsigned int nPlusWidth); //获取舵机开机后的默认脉冲值 VZNLAPI int VzNL_GetCameraServoDefaultPlusWidth(VZNLHANDLE hDevice, unsigned int& nPlusWidth); /// @brief 是否具有打开CalibTool的能力 VZNLAPI VzBool VzNL_HasCalibToolCap(VZNLHANDLE hDevice); /// @brief 写入/读取Map系数表数据 VZNLAPI int VzNL_WriteSparseMapData(VZNLHANDLE hDevice, VzBool bCMode, VzBool bLeftOrRight, const unsigned char* pData, unsigned int nDataLength); VZNLAPI int VzNL_ReadSparseMapData(VZNLHANDLE hDevice, VzBool bCMode, VzBool bLeftOrRight, unsigned char* pData, unsigned int nDataLength); /// @brief 配置在计算ROI时,左右眼的偏移角度 VZNLAPI int VzNL_SetROIOffsetAngle(VZNLHANDLE hDevice,float fLeftOffsetAngle,float fRightOffsetAngle); VZNLAPI int VzNL_GetROIOffsetAngle(VZNLHANDLE hDevice, float& fLeftOffsetAngle, float& fRightOffsetAngle); /// @brief 获取左右目的ROI跟踪表的大小 VZNLAPI int VzNL_GetROITraceTableSize(VZNLHANDLE hDevice, unsigned int* pnSize); /// @brief 获取左右目的ROI跟踪表 VZNLAPI int VzNL_GetROITraceTable(VZNLHANDLE hDevice, unsigned int* pnLeftOffset, unsigned int* pnRightOffset, unsigned int nSize); #endif