From a133dea09aeeb2efe531d5edfdc309c8d3bf018b Mon Sep 17 00:00:00 2001 From: HelixCopex Date: Mon, 16 Mar 2026 14:47:30 +0800 Subject: [PATCH] =?UTF-8?q?=E5=8E=BB=E9=99=A4=20XMake?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- CMakeLists.txt | 2 +- armor/include/armor_finder/armor_finder.h | 4 +- others/armor.Config | 10 +- others/include/camera/CameraDefine.H | 700 +++++++++++----------- others/include/config/setconfig.h | 1 + others/src/serial.cpp | 2 +- xmake.lua | 24 +- 7 files changed, 368 insertions(+), 375 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index e19eb1d..578855b 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -24,7 +24,7 @@ IF(CCACHE_FOUND) ENDIF() FIND_PACKAGE(Eigen3 REQUIRED) -FIND_PACKAGE(OpenCV 3 REQUIRED) +FIND_PACKAGE(OpenCV 4 REQUIRED) FIND_PACKAGE(Threads) LINK_DIRECTORIES(${PROJECT_SOURCE_DIR}/others) diff --git a/armor/include/armor_finder/armor_finder.h b/armor/include/armor_finder/armor_finder.h index f00eca0..a0df0e1 100644 --- a/armor/include/armor_finder/armor_finder.h +++ b/armor/include/armor_finder/armor_finder.h @@ -20,8 +20,8 @@ #define BOX_RED ENEMY_RED #define BOX_BLUE ENEMY_BLUE -#define IMAGE_CENTER_X (320) -#define IMAGE_CENTER_Y (240-20) +#define IMAGE_CENTER_X (640) +#define IMAGE_CENTER_Y (512-20) #define DISTANCE_HEIGHT_5MM (10700.0) // 鍗曚綅: cm*pixel #define DISTANCE_HEIGHT DISTANCE_HEIGHT_5MM diff --git a/others/armor.Config b/others/armor.Config index d5f03ee..9b2e5ae 100644 --- a/others/armor.Config +++ b/others/armor.Config @@ -5,17 +5,17 @@ resolution : image_size : { iIndex = 1; - acDescription = "640X480 ROI"; + acDescription = "1280X1024 ROI"; uBinSumMode = 0; uBinAverageMode = 0; uSkipMode = 0; uResampleMask = 0; iHOffsetFOV = 56; iVOffsetFOV = 0; - iWidthFOV = 640; - iHeightFOV = 480; - iWidth = 640; - iHeight = 480; + iWidthFOV = 1280; + iHeightFOV = 1024; + iWidth = 1280; + iHeight = 1024; iWidthZoomHd = 0; iHeightZoomHd = 0; iWidthZoomSw = 0; diff --git a/others/include/camera/CameraDefine.H b/others/include/camera/CameraDefine.H index 9773ded..0d6474e 100644 --- a/others/include/camera/CameraDefine.H +++ b/others/include/camera/CameraDefine.H @@ -7,90 +7,90 @@ #define MAX_CROSS_LINE 9 /// @ingroup MV_TYPEDEF -/// \~chinese 相机的句柄类型定义 +/// \~chinese 鐩告満鐨勫彞鏌勭被鍨嬪畾涔 /// \~english Camera handle type definition typedef int CameraHandle; /// @ingroup MV_ENUM_TYPE -/// \~chinese 图像查表变换的方式 +/// \~chinese 鍥惧儚鏌ヨ〃鍙樻崲鐨勬柟寮 /// \~english Image lookup table transformation typedef enum { - LUTMODE_PARAM_GEN=0, ///< \~chinese 通过调节参数动态生成LUT表。 \~english Dynamically generate LUT tables by adjusting parameters. - LUTMODE_PRESET=1, ///< \~chinese 使用预设的LUT表 \~english Use a preset LUT table - LUTMODE_USER_DEF=2 ///< \~chinese 使用用户自定义的LUT表 \~english Use a user-defined LUT table + LUTMODE_PARAM_GEN=0, ///< \~chinese 閫氳繃璋冭妭鍙傛暟鍔ㄦ佺敓鎴怢UT琛ㄣ \~english Dynamically generate LUT tables by adjusting parameters. + LUTMODE_PRESET=1, ///< \~chinese 浣跨敤棰勮鐨凩UT琛 \~english Use a preset LUT table + LUTMODE_USER_DEF=2 ///< \~chinese 浣跨敤鐢ㄦ埛鑷畾涔夌殑LUT琛 \~english Use a user-defined LUT table }emSdkLutMode; /// @ingroup MV_ENUM_TYPE -/// \~chinese 相机的视频流控制 +/// \~chinese 鐩告満鐨勮棰戞祦鎺у埗 /// \~english Camera video flow control typedef enum { - /// \~chinese 正常预览,捕获到图像就显示。(如果相机处于触发模式,则会等待触发帧的到来) + /// \~chinese 姝e父棰勮锛屾崟鑾峰埌鍥惧儚灏辨樉绀恒傦紙濡傛灉鐩告満澶勪簬瑙﹀彂妯″紡锛屽垯浼氱瓑寰呰Е鍙戝抚鐨勫埌鏉ワ級 /// \~english Normal preview, the captured image is displayed. (If the camera is in trigger mode, it will wait for the arrival of the trigger frame) RUNMODE_PLAY=0, - RUNMODE_PAUSE=1, ///< \~chinese 暂停,会暂停相机的图像输出,同时也不会去捕获图像 \~english Pause, will pause the camera's image output, and will not capture the image. - RUNMODE_STOP=2 ///< \~chinese 停止相机工作。反初始化后,相机就处于停止模式 \~english Stop the camera. Camera is in stop mode after deinitialization. + RUNMODE_PAUSE=1, ///< \~chinese 鏆傚仠锛屼細鏆傚仠鐩告満鐨勫浘鍍忚緭鍑猴紝鍚屾椂涔熶笉浼氬幓鎹曡幏鍥惧儚 \~english Pause, will pause the camera's image output, and will not capture the image. + RUNMODE_STOP=2 ///< \~chinese 鍋滄鐩告満宸ヤ綔銆傚弽鍒濆鍖栧悗锛岀浉鏈哄氨澶勪簬鍋滄妯″紡 \~english Stop the camera. Camera is in stop mode after deinitialization. }emSdkRunMode; /// @ingroup MV_ENUM_TYPE -/// \~chinese SDK内部显示接口的显示方式 +/// \~chinese SDK鍐呴儴鏄剧ず鎺ュ彛鐨勬樉绀烘柟寮 /// \~english How to display the internal display interface of the SDK typedef enum { - DISPLAYMODE_SCALE=0, ///< \~chinese 缩放显示模式,缩放到显示控件的尺寸 \~english Zoom the display mode, zoom to the size of the display control - DISPLAYMODE_REAL=1, ///< \~chinese 1:1显示模式,当图像尺寸大于显示控件的尺寸时,只显示局部 \~english 1:1 display mode, when the image size is larger than the size of the display control, only the local display - DISPLAYMODE_2X=2, ///< \~chinese 放大2X \~english Zoom in 2X - DISPLAYMODE_4X=3, ///< \~chinese 放大4X \~english Zoom in 4X - DISPLAYMODE_8X=4, ///< \~chinese 放大8X \~english Zoom in 8X - DISPLAYMODE_16X=5 ///< \~chinese 放大16X \~english Zoom in 16X + DISPLAYMODE_SCALE=0, ///< \~chinese 缂╂斁鏄剧ず妯″紡锛岀缉鏀惧埌鏄剧ず鎺т欢鐨勫昂瀵 \~english Zoom the display mode, zoom to the size of the display control + DISPLAYMODE_REAL=1, ///< \~chinese 1:1鏄剧ず妯″紡锛屽綋鍥惧儚灏哄澶т簬鏄剧ず鎺т欢鐨勫昂瀵告椂锛屽彧鏄剧ず灞閮 \~english 1:1 display mode, when the image size is larger than the size of the display control, only the local display + DISPLAYMODE_2X=2, ///< \~chinese 鏀惧ぇ2X \~english Zoom in 2X + DISPLAYMODE_4X=3, ///< \~chinese 鏀惧ぇ4X \~english Zoom in 4X + DISPLAYMODE_8X=4, ///< \~chinese 鏀惧ぇ8X \~english Zoom in 8X + DISPLAYMODE_16X=5 ///< \~chinese 鏀惧ぇ16X \~english Zoom in 16X }emSdkDisplayMode; /// @ingroup MV_ENUM_TYPE -/// \~chinese 录像状态 +/// \~chinese 褰曞儚鐘舵 /// \~english Recording status typedef enum { - RECORD_STOP=0, ///< \~chinese 停止 \~english Stop - RECORD_START=1, ///< \~chinese 录像中 \~english Start - RECORD_PAUSE=2 ///< \~chinese 暂停 \~english Pause + RECORD_STOP=0, ///< \~chinese 鍋滄 \~english Stop + RECORD_START=1, ///< \~chinese 褰曞儚涓 \~english Start + RECORD_PAUSE=2 ///< \~chinese 鏆傚仠 \~english Pause }emSdkRecordMode; /// @ingroup MV_ENUM_TYPE -/// \~chinese 图像的镜像操作 +/// \~chinese 鍥惧儚鐨勯暅鍍忔搷浣 /// \~english Image mirroring operation typedef enum { - MIRROR_DIRECTION_HORIZONTAL=0, ///< \~chinese 水平镜像 \~english Horizontal mirroring - MIRROR_DIRECTION_VERTICAL=1 ///< \~chinese 垂直镜像 \~english Vertical mirroring + MIRROR_DIRECTION_HORIZONTAL=0, ///< \~chinese 姘村钩闀滃儚 \~english Horizontal mirroring + MIRROR_DIRECTION_VERTICAL=1 ///< \~chinese 鍨傜洿闀滃儚 \~english Vertical mirroring }emSdkMirrorDirection; /// @ingroup MV_ENUM_TYPE -/// \~chinese 图像的旋转操作 +/// \~chinese 鍥惧儚鐨勬棆杞搷浣 /// \~english Rotation of the image typedef enum { - ROTATE_DIRECTION_0=0, ///< \~chinese 不旋转 \~english Do not rotate - ROTATE_DIRECTION_90=1, ///< \~chinese 逆时针90度 \~english Counterclockwise 90 degrees - ROTATE_DIRECTION_180=2, ///< \~chinese 逆时针180度 \~english Counterclockwise 180 degrees - ROTATE_DIRECTION_270=3, ///< \~chinese 逆时针270度 \~english Counterclockwise 270 degrees + ROTATE_DIRECTION_0=0, ///< \~chinese 涓嶆棆杞 \~english Do not rotate + ROTATE_DIRECTION_90=1, ///< \~chinese 閫嗘椂閽90搴 \~english Counterclockwise 90 degrees + ROTATE_DIRECTION_180=2, ///< \~chinese 閫嗘椂閽180搴 \~english Counterclockwise 180 degrees + ROTATE_DIRECTION_270=3, ///< \~chinese 閫嗘椂閽270搴 \~english Counterclockwise 270 degrees }emSdkRotateDirection; /// @ingroup MV_ENUM_TYPE -/// \~chinese 相机视频的帧率 +/// \~chinese 鐩告満瑙嗛鐨勫抚鐜 /// \~english Camera video frame rate typedef enum { - FRAME_SPEED_LOW=0, ///< \~chinese 低速模式 \~english Low Speed - FRAME_SPEED_NORMAL=1, ///< \~chinese 普通模式 \~english Normal Speed - FRAME_SPEED_HIGH=2, ///< \~chinese 高速模式(需要较高的传输带宽,多设备共享传输带宽时会对帧率的稳定性有影响) \~english High Speed - FRAME_SPEED_SUPER=3 ///< \~chinese 超高速模式(需要较高的传输带宽,多设备共享传输带宽时会对帧率的稳定性有影响) \~english Super Speed + FRAME_SPEED_LOW=0, ///< \~chinese 浣庨熸ā寮 \~english Low Speed + FRAME_SPEED_NORMAL=1, ///< \~chinese 鏅氭ā寮 \~english Normal Speed + FRAME_SPEED_HIGH=2, ///< \~chinese 楂橀熸ā寮(闇瑕佽緝楂樼殑浼犺緭甯﹀,澶氳澶囧叡浜紶杈撳甫瀹芥椂浼氬甯х巼鐨勭ǔ瀹氭ф湁褰卞搷) \~english High Speed + FRAME_SPEED_SUPER=3 ///< \~chinese 瓒呴珮閫熸ā寮(闇瑕佽緝楂樼殑浼犺緭甯﹀,澶氳澶囧叡浜紶杈撳甫瀹芥椂浼氬甯х巼鐨勭ǔ瀹氭ф湁褰卞搷) \~english Super Speed }emSdkFrameSpeed; /// @ingroup MV_ENUM_TYPE -/// \~chinese 保存文件的格式类型 +/// \~chinese 淇濆瓨鏂囦欢鐨勬牸寮忕被鍨 /// \~english Save file format type typedef enum { @@ -104,60 +104,60 @@ typedef enum }emSdkFileType; /// @ingroup MV_ENUM_TYPE -/// \~chinese 相机中的图像传感器的工作模式 +/// \~chinese 鐩告満涓殑鍥惧儚浼犳劅鍣ㄧ殑宸ヤ綔妯″紡 /// \~english Image Sensor Operation Mode in Camera typedef enum { - /// \~chinese 连续采集模式 + /// \~chinese 杩炵画閲囬泦妯″紡 /// \~english Continuous acquisition mode CONTINUATION=0, - /// \~chinese 软件触发模式,由软件发送指令后,传感器开始采集指定帧数的图像,采集完成后,停止输出 + /// \~chinese 杞欢瑙﹀彂妯″紡锛岀敱杞欢鍙戦佹寚浠ゅ悗锛屼紶鎰熷櫒寮濮嬮噰闆嗘寚瀹氬抚鏁扮殑鍥惧儚锛岄噰闆嗗畬鎴愬悗锛屽仠姝㈣緭鍑 /// \~english Software trigger mode. After the software sends the instruction, the sensor starts to capture the image of the specified frame number. After the acquisition is completed, the output is stopped. SOFT_TRIGGER=1, - /// \~chinese 硬件触发模式,当接收到外部信号,传感器开始采集指定帧数的图像,采集完成后,停止输出 + /// \~chinese 纭欢瑙﹀彂妯″紡锛屽綋鎺ユ敹鍒板閮ㄤ俊鍙凤紝浼犳劅鍣ㄥ紑濮嬮噰闆嗘寚瀹氬抚鏁扮殑鍥惧儚锛岄噰闆嗗畬鎴愬悗锛屽仠姝㈣緭鍑 /// \~english In the hardware trigger mode, when receiving an external signal, the sensor starts to capture the image of the specified frame number. After the acquisition is completed, the output is stopped. EXTERNAL_TRIGGER=2 } emSdkSnapMode; /// @ingroup MV_ENUM_TYPE -/// \~chinese 自动曝光时抗频闪的频率 +/// \~chinese 鑷姩鏇濆厜鏃舵姉棰戦棯鐨勯鐜 /// \~english Anti-strobe frequency at auto exposure typedef enum { - /// \~chinese 50HZ,一般的灯光都是50HZ + /// \~chinese 50HZ,涓鑸殑鐏厜閮芥槸50HZ /// \~english 50HZ, the general lighting is 50HZ LIGHT_FREQUENCY_50HZ=0, - /// \~chinese 60HZ,主要是指显示器的 + /// \~chinese 60HZ,涓昏鏄寚鏄剧ず鍣ㄧ殑 /// \~english 60HZ, mainly refers to the monitor LIGHT_FREQUENCY_60HZ=1 }emSdkLightFrequency; /// @ingroup MV_ENUM_TYPE -/// \~chinese 相机的配置参数,分为A,B,C,D 4组进行保存。 +/// \~chinese 鐩告満鐨勯厤缃弬鏁帮紝鍒嗕负A,B,C,D 4缁勮繘琛屼繚瀛樸 /// \~english The camera configuration parameters are divided into groups A, B, C, and D for preservation. typedef enum { - PARAMETER_TEAM_DEFAULT = 0xff, ///< \~chinese 默认参数 \~english Default parameters - PARAMETER_TEAM_A = 0, ///< \~chinese 参数A \~english parametersA - PARAMETER_TEAM_B = 1, ///< \~chinese 参数B \~english parametersB - PARAMETER_TEAM_C = 2, ///< \~chinese 参数C \~english parametersC - PARAMETER_TEAM_D = 3 ///< \~chinese 参数D \~english parametersD + PARAMETER_TEAM_DEFAULT = 0xff, ///< \~chinese 榛樿鍙傛暟 \~english Default parameters + PARAMETER_TEAM_A = 0, ///< \~chinese 鍙傛暟A \~english parametersA + PARAMETER_TEAM_B = 1, ///< \~chinese 鍙傛暟B \~english parametersB + PARAMETER_TEAM_C = 2, ///< \~chinese 鍙傛暟C \~english parametersC + PARAMETER_TEAM_D = 3 ///< \~chinese 鍙傛暟D \~english parametersD }emSdkParameterTeam; /// @ingroup MV_ENUM_TYPE /// \~chinese -/// \brief 相机参数加载模式 -/// \note 您可以根据自己的使用环境,灵活使用以上几种方式加载参数。例如,以 -/// \note MV-U300为例,您希望多台该型号的相机在您的 电脑上都共用4组参数,那么就 -/// \note 使用PARAM_MODE_BY_MODEL方式;如果您希望其中某一台或者某几台MV-U300能 -/// \note 使用自己参数文件而其余的MV-U300又要使用相同的参数文件,那么使用 -/// \note PARAM_MODE_BY_NAME方式;如果您希望每台MV-U300都使用不同的参数文件,那么 -/// \note 使用PARAM_MODE_BY_SN方式。 -/// \note 参数文件存在安装目录的 \\Camera\\Configs 目录下,以config为后缀名的文件。 +/// \brief 鐩告満鍙傛暟鍔犺浇妯″紡 +/// \note 鎮ㄥ彲浠ユ牴鎹嚜宸辩殑浣跨敤鐜锛岀伒娲讳娇鐢ㄤ互涓婂嚑绉嶆柟寮忓姞杞藉弬鏁般備緥濡傦紝浠 +/// \note MV-U300涓轰緥锛屾偍甯屾湜澶氬彴璇ュ瀷鍙风殑鐩告満鍦ㄦ偍鐨 鐢佃剳涓婇兘鍏辩敤4缁勫弬鏁帮紝閭d箞灏 +/// \note 浣跨敤PARAM_MODE_BY_MODEL鏂瑰紡;濡傛灉鎮ㄥ笇鏈涘叾涓煇涓鍙版垨鑰呮煇鍑犲彴MV-U300鑳 +/// \note 浣跨敤鑷繁鍙傛暟鏂囦欢鑰屽叾浣欑殑MV-U300鍙堣浣跨敤鐩稿悓鐨勫弬鏁版枃浠讹紝閭d箞浣跨敤 +/// \note PARAM_MODE_BY_NAME鏂瑰紡;濡傛灉鎮ㄥ笇鏈涙瘡鍙癕V-U300閮戒娇鐢ㄤ笉鍚岀殑鍙傛暟鏂囦欢锛岄偅涔 +/// \note 浣跨敤PARAM_MODE_BY_SN鏂瑰紡銆 +/// \note 鍙傛暟鏂囦欢瀛樺湪瀹夎鐩綍鐨 \\Camera\\Configs 鐩綍涓嬶紝浠onfig涓哄悗缂鍚嶇殑鏂囦欢銆 /// \~english /// \brief Camera parameter loading mode /// \note You can use the above several ways to load parameters according to your own environment. For example, with @@ -169,18 +169,18 @@ typedef enum /// \note The parameter file exists in the \\Camera\\Configs directory of the installation directory, with a config extension file. typedef enum { - /// \~chinese 根据相机型号名从文件中加载参数,例如MV-U300 - /// \note 所有同型号的相机共用ABCD四组参数文件。修改一台相机的参数文件,会影响到整个同型号的相机参数加载。 + /// \~chinese 鏍规嵁鐩告満鍨嬪彿鍚嶄粠鏂囦欢涓姞杞藉弬鏁帮紝渚嬪MV-U300 + /// \note 鎵鏈夊悓鍨嬪彿鐨勭浉鏈哄叡鐢ˋBCD鍥涚粍鍙傛暟鏂囦欢銆備慨鏀逛竴鍙扮浉鏈虹殑鍙傛暟鏂囦欢锛屼細褰卞搷鍒版暣涓悓鍨嬪彿鐨勭浉鏈哄弬鏁板姞杞姐 /// \~english Load parameters from a file based on the camera model name, such as the MV-U300 /// \note All ABCD four-group parameter files are shared by all cameras of the same model. Modifying a camera's parameter file will affect the entire camera model parameter loading. PARAM_MODE_BY_MODEL=0, - /// \~chinese 根据设备昵称(tSdkCameraDevInfo.acFriendlyName)从文件中加载参数,例如MV-U300,该昵称可自定义 - /// \note 所有设备名相同的相机,共用ABCD四组参数文件。 - /// \note 默认情况下,当电脑上只接了某型号一台相机时, - /// \note 设备名都是一样的,而您希望某一台相机能够加载 - /// \note 不同的参数文件,则可以通过修改其设备名的方式 - /// \note 来让其加载指定的参数文件。 + /// \~chinese 鏍规嵁璁惧鏄电О(tSdkCameraDevInfo.acFriendlyName)浠庢枃浠朵腑鍔犺浇鍙傛暟锛屼緥濡侻V-U300,璇ユ樀绉板彲鑷畾涔 + /// \note 鎵鏈夎澶囧悕鐩稿悓鐨勭浉鏈猴紝鍏辩敤ABCD鍥涚粍鍙傛暟鏂囦欢銆 + /// \note 榛樿鎯呭喌涓嬶紝褰撶數鑴戜笂鍙帴浜嗘煇鍨嬪彿涓鍙扮浉鏈烘椂锛 + /// \note 璁惧鍚嶉兘鏄竴鏍风殑锛岃屾偍甯屾湜鏌愪竴鍙扮浉鏈鸿兘澶熷姞杞 + /// \note 涓嶅悓鐨勫弬鏁版枃浠讹紝鍒欏彲浠ラ氳繃淇敼鍏惰澶囧悕鐨勬柟寮 + /// \note 鏉ヨ鍏跺姞杞芥寚瀹氱殑鍙傛暟鏂囦欢銆 /// \~english Load parameters from a file based on device nickname (tSdkCameraDevInfo.acFriendlyName), such as MV-U300, which can be customized /// \note All cameras with the same device name share the four ABCD parameter files. /// \note By default, when only one model of a camera is connected to the computer, @@ -189,220 +189,220 @@ typedef enum /// \note to have it load the specified parameter file. PARAM_MODE_BY_NAME=1, - /// \~chinese 根据设备的唯一序列号从文件中加载参数,序列号在出厂时已经写入设备,每台相机拥有不同的序列号。 - /// \note 相机按照自己的唯一序列号来加载ABCD四组参数文件, - /// \note 序列号在出厂时已经固化在相机内,每台相机的序列号 - /// \note 都不相同,通过这种方式,每台相机的参数文件都是独立的。 + /// \~chinese 鏍规嵁璁惧鐨勫敮涓搴忓垪鍙蜂粠鏂囦欢涓姞杞藉弬鏁帮紝搴忓垪鍙峰湪鍑哄巶鏃跺凡缁忓啓鍏ヨ澶囷紝姣忓彴鐩告満鎷ユ湁涓嶅悓鐨勫簭鍒楀彿銆 + /// \note 鐩告満鎸夌収鑷繁鐨勫敮涓搴忓垪鍙锋潵鍔犺浇ABCD鍥涚粍鍙傛暟鏂囦欢锛 + /// \note 搴忓垪鍙峰湪鍑哄巶鏃跺凡缁忓浐鍖栧湪鐩告満鍐咃紝姣忓彴鐩告満鐨勫簭鍒楀彿 + /// \note 閮戒笉鐩稿悓锛岄氳繃杩欑鏂瑰紡锛屾瘡鍙扮浉鏈虹殑鍙傛暟鏂囦欢閮芥槸鐙珛鐨勩 /// \~english The parameters are loaded from the file according to the unique serial number of the device. The serial number is already written to the device at the factory and each camera has a different serial number. /// \note The camera loads ABCD four sets of parameter files according to their unique serial number. /// \note The serial number has been fixed in the camera at the factory, the serial number of each camera /// \note is not the same. In this way, the parameter files for each camera are independent. PARAM_MODE_BY_SN=2, - /// \~chinese 从设备的固态存储器中加载参数。不是所有的型号都支持从相机中读写参数组,由tSdkCameraCapbility.bParamInDevice决定 + /// \~chinese 浠庤澶囩殑鍥烘佸瓨鍌ㄥ櫒涓姞杞藉弬鏁般備笉鏄墍鏈夌殑鍨嬪彿閮芥敮鎸佷粠鐩告満涓鍐欏弬鏁扮粍锛岀敱tSdkCameraCapbility.bParamInDevice鍐冲畾 /// \~english Load parameters from the device's solid-state memory. Not all models support reading and writing parameters from the camera, as determined by tSdkCameraCapbility.bParamInDevice PARAM_MODE_IN_DEVICE=3 }emSdkParameterMode; /// @ingroup MV_ENUM_TYPE -/// \~chinese SDK生成的相机配置页面掩码值 +/// \~chinese SDK鐢熸垚鐨勭浉鏈洪厤缃〉闈㈡帺鐮佸 /// \~english SDK generated camera configuration page mask values typedef enum { - PROP_SHEET_INDEX_EXPOSURE=0, ///< \~chinese 曝光设置 \~english Exposure Settings - PROP_SHEET_INDEX_ISP_COLOR=1, ///< \~chinese 颜色矩阵设置 \~english Color Matrix Settings - PROP_SHEET_INDEX_ISP_LUT=2, ///< \~chinese LUT设置 \~english LUT setting - PROP_SHEET_INDEX_ISP_SHAPE=3, ///< \~chinese 变换设置 \~english transform settings - PROP_SHEET_INDEX_VIDEO_FORMAT=4, ///< \~chinese 格式设置 \~english Formatting - PROP_SHEET_INDEX_RESOLUTION=5, ///< \~chinese 分辨率设置 \~english resolution setting - PROP_SHEET_INDEX_IO_CTRL=6, ///< \~chinese IO控制 \~english IO control - PROP_SHEET_INDEX_TRIGGER_SET=7, ///< \~chinese 触发模式 \~english trigger setting - PROP_SHEET_INDEX_OVERLAY=8, ///< \~chinese 十字线 \~english Crosshair - PROP_SHEET_INDEX_DEVICE_INFO=9, ///< \~chinese 设备信息 \~english Device Information - PROP_SHEET_INDEX_WDR=10 ///< \~chinese 宽动态 \~english Wide Dynamic + PROP_SHEET_INDEX_EXPOSURE=0, ///< \~chinese 鏇濆厜璁剧疆 \~english Exposure Settings + PROP_SHEET_INDEX_ISP_COLOR=1, ///< \~chinese 棰滆壊鐭╅樀璁剧疆 \~english Color Matrix Settings + PROP_SHEET_INDEX_ISP_LUT=2, ///< \~chinese LUT璁剧疆 \~english LUT setting + PROP_SHEET_INDEX_ISP_SHAPE=3, ///< \~chinese 鍙樻崲璁剧疆 \~english transform settings + PROP_SHEET_INDEX_VIDEO_FORMAT=4, ///< \~chinese 鏍煎紡璁剧疆 \~english Formatting + PROP_SHEET_INDEX_RESOLUTION=5, ///< \~chinese 鍒嗚鲸鐜囪缃 \~english resolution setting + PROP_SHEET_INDEX_IO_CTRL=6, ///< \~chinese IO鎺у埗 \~english IO control + PROP_SHEET_INDEX_TRIGGER_SET=7, ///< \~chinese 瑙﹀彂妯″紡 \~english trigger setting + PROP_SHEET_INDEX_OVERLAY=8, ///< \~chinese 鍗佸瓧绾 \~english Crosshair + PROP_SHEET_INDEX_DEVICE_INFO=9, ///< \~chinese 璁惧淇℃伅 \~english Device Information + PROP_SHEET_INDEX_WDR=10 ///< \~chinese 瀹藉姩鎬 \~english Wide Dynamic }emSdkPropSheetMask; /// @ingroup MV_ENUM_TYPE -/// \~chinese SDK生成的相机配置页面的回调消息类型 +/// \~chinese SDK鐢熸垚鐨勭浉鏈洪厤缃〉闈㈢殑鍥炶皟娑堟伅绫诲瀷 /// \~english SDK callback camera configuration page callback message type typedef enum { - SHEET_MSG_LOAD_PARAM_DEFAULT=0, ///< \~chinese 参数被恢复成默认后,触发该消息 \~english After the parameter is restored to the default, the message is triggered - SHEET_MSG_LOAD_PARAM_GROUP=1, ///< \~chinese 加载指定参数组,触发该消息 \~english Load the specified parameter group and trigger the message - SHEET_MSG_LOAD_PARAM_FROMFILE=2, ///< \~chinese 从指定文件加载参数后,触发该消息 \~english Fires the message after loading parameters from the specified file - SHEET_MSG_SAVE_PARAM_GROUP=3 ///< \~chinese 当前参数组被保存时,触发该消息 \~english Trigger this message when the current parameter group is saved + SHEET_MSG_LOAD_PARAM_DEFAULT=0, ///< \~chinese 鍙傛暟琚仮澶嶆垚榛樿鍚庯紝瑙﹀彂璇ユ秷鎭 \~english After the parameter is restored to the default, the message is triggered + SHEET_MSG_LOAD_PARAM_GROUP=1, ///< \~chinese 鍔犺浇鎸囧畾鍙傛暟缁勶紝瑙﹀彂璇ユ秷鎭 \~english Load the specified parameter group and trigger the message + SHEET_MSG_LOAD_PARAM_FROMFILE=2, ///< \~chinese 浠庢寚瀹氭枃浠跺姞杞藉弬鏁板悗锛岃Е鍙戣娑堟伅 \~english Fires the message after loading parameters from the specified file + SHEET_MSG_SAVE_PARAM_GROUP=3 ///< \~chinese 褰撳墠鍙傛暟缁勮淇濆瓨鏃讹紝瑙﹀彂璇ユ秷鎭 \~english Trigger this message when the current parameter group is saved }emSdkPropSheetMsg; /// @ingroup MV_ENUM_TYPE -/// \~chinese 可视化选择参考窗口的类型 +/// \~chinese 鍙鍖栭夋嫨鍙傝冪獥鍙g殑绫诲瀷 /// \~english Visualize the type of reference window typedef enum { - REF_WIN_AUTO_EXPOSURE=0, ///< \~chinese 自动曝光窗口 \~english Automatic exposure window - REF_WIN_WHITE_BALANCE=1, ///< \~chinese 白平衡窗口 \~english White balance window + REF_WIN_AUTO_EXPOSURE=0, ///< \~chinese 鑷姩鏇濆厜绐楀彛 \~english Automatic exposure window + REF_WIN_WHITE_BALANCE=1, ///< \~chinese 鐧藉钩琛$獥鍙 \~english White balance window }emSdkRefWinType; /// @ingroup MV_ENUM_TYPE -/// \~chinese 可视化选择参考窗口的类型 +/// \~chinese 鍙鍖栭夋嫨鍙傝冪獥鍙g殑绫诲瀷 /// \~english Visualize the type of reference window typedef enum { - RES_MODE_PREVIEW=0, ///< \~chinese 预览 \~english Preview - RES_MODE_SNAPSHOT=1, ///< \~chinese 抓拍 \~english Snapshot + RES_MODE_PREVIEW=0, ///< \~chinese 棰勮 \~english Preview + RES_MODE_SNAPSHOT=1, ///< \~chinese 鎶撴媿 \~english Snapshot }emSdkResolutionMode; /// @ingroup MV_ENUM_TYPE -/// \~chinese 白平衡时色温模式 +/// \~chinese 鐧藉钩琛℃椂鑹叉俯妯″紡 /// \~english White balance color temperature mode typedef enum { - CT_MODE_AUTO=0, ///< \~chinese 自动识别色温 \~english Automatically recognize color temperature - CT_MODE_PRESET=1, ///< \~chinese 使用指定的预设色温 \~english Use the specified preset color temperature - CT_MODE_USER_DEF=2 ///< \~chinese 自定义色温(增益和矩阵) \~english Custom color temperature (gain and matrix) + CT_MODE_AUTO=0, ///< \~chinese 鑷姩璇嗗埆鑹叉俯 \~english Automatically recognize color temperature + CT_MODE_PRESET=1, ///< \~chinese 浣跨敤鎸囧畾鐨勯璁捐壊娓 \~english Use the specified preset color temperature + CT_MODE_USER_DEF=2 ///< \~chinese 鑷畾涔夎壊娓(澧炵泭鍜岀煩闃) \~english Custom color temperature (gain and matrix) }emSdkClrTmpMode; /// @ingroup MV_ENUM_TYPE -/// \~chinese LUT的颜色通道 +/// \~chinese LUT鐨勯鑹查氶亾 /// \~english LUT color channel typedef enum { - LUT_CHANNEL_ALL=0, ///< \~chinese R,B,G三通道同时调节 \~english R, B, G simultaneous adjustment of three channels - LUT_CHANNEL_RED=1, ///< \~chinese 红色通道 \~english Red channel - LUT_CHANNEL_GREEN=2, ///< \~chinese 绿色通道 \~english Green channel - LUT_CHANNEL_BLUE=3, ///< \~chinese 蓝色通道 \~english Blue channel + LUT_CHANNEL_ALL=0, ///< \~chinese R,B,G涓夐氶亾鍚屾椂璋冭妭 \~english R, B, G simultaneous adjustment of three channels + LUT_CHANNEL_RED=1, ///< \~chinese 绾㈣壊閫氶亾 \~english Red channel + LUT_CHANNEL_GREEN=2, ///< \~chinese 缁胯壊閫氶亾 \~english Green channel + LUT_CHANNEL_BLUE=3, ///< \~chinese 钃濊壊閫氶亾 \~english Blue channel }emSdkLutChannel; /// @ingroup MV_ENUM_TYPE -/// \~chinese ISP处理单元 +/// \~chinese ISP澶勭悊鍗曞厓 /// \~english ISP processing unit typedef enum { - ISP_PROCESSSOR_PC=0, ///< \~chinese 使用PC的软件ISP模块 \~english Use software ISP module of PC - ISP_PROCESSSOR_DEVICE=1 ///< \~chinese 使用相机自带的硬件ISP模块 \~english Use the camera's own hardware ISP module + ISP_PROCESSSOR_PC=0, ///< \~chinese 浣跨敤PC鐨勮蒋浠禝SP妯″潡 \~english Use software ISP module of PC + ISP_PROCESSSOR_DEVICE=1 ///< \~chinese 浣跨敤鐩告満鑷甫鐨勭‖浠禝SP妯″潡 \~english Use the camera's own hardware ISP module }emSdkIspProcessor; /// @ingroup MV_ENUM_TYPE -/// \~chinese 闪光灯信号控制方式 +/// \~chinese 闂厜鐏俊鍙锋帶鍒舵柟寮 /// \~english Strobe signal control method typedef enum { - STROBE_SYNC_WITH_TRIG_AUTO=0, ///< \~chinese 和触发信号同步,触发后,相机进行曝光时,自动生成STROBE信号。此时,有效极性可设置(@link #CameraSetStrobePolarity @endlink)。 \~english Synchronized with the trigger signal, the STROBE signal is automatically generated when the camera performs exposure. At this point, the effective polarity can be set (@link #CameraSetStrobePolarity @endlink). - STROBE_SYNC_WITH_TRIG_MANUAL=1, ///< \~chinese 和触发信号同步,触发后,STROBE延时指定的时间后(@link #CameraSetStrobeDelayTime @endlink),再持续指定时间的脉冲(@link #CameraSetStrobePulseWidth @endlink),有效极性可设置(@link #CameraSetStrobePolarity @endlink)。 \~english Synchronized with the trigger signal. After the trigger, STROBE is delayed by the specified time (@link #CameraSetStrobeDelayTime @endlink) and continues for the specified time (@link #CameraSetStrobePulseWidth @endlink). The effective polarity can be set (@link #CameraSetStrobePolarity @endlink). - STROBE_ALWAYS_HIGH=2, ///< \~chinese 始终为高,忽略STROBE信号的其他设置 \~english Always high, ignoring other settings of the STROBE signal - STROBE_ALWAYS_LOW=3 ///< \~chinese 始终为低,忽略STROBE信号的其他设置 \~english Always low, ignoring other settings of the STROBE signal + STROBE_SYNC_WITH_TRIG_AUTO=0, ///< \~chinese 鍜岃Е鍙戜俊鍙峰悓姝ワ紝瑙﹀彂鍚庯紝鐩告満杩涜鏇濆厜鏃讹紝鑷姩鐢熸垚STROBE淇″彿銆傛鏃讹紝鏈夋晥鏋佹у彲璁剧疆(@link #CameraSetStrobePolarity @endlink)銆 \~english Synchronized with the trigger signal, the STROBE signal is automatically generated when the camera performs exposure. At this point, the effective polarity can be set (@link #CameraSetStrobePolarity @endlink). + STROBE_SYNC_WITH_TRIG_MANUAL=1, ///< \~chinese 鍜岃Е鍙戜俊鍙峰悓姝ワ紝瑙﹀彂鍚庯紝STROBE寤舵椂鎸囧畾鐨勬椂闂村悗(@link #CameraSetStrobeDelayTime @endlink)锛屽啀鎸佺画鎸囧畾鏃堕棿鐨勮剦鍐(@link #CameraSetStrobePulseWidth @endlink)锛屾湁鏁堟瀬鎬у彲璁剧疆(@link #CameraSetStrobePolarity @endlink)銆 \~english Synchronized with the trigger signal. After the trigger, STROBE is delayed by the specified time (@link #CameraSetStrobeDelayTime @endlink) and continues for the specified time (@link #CameraSetStrobePulseWidth @endlink). The effective polarity can be set (@link #CameraSetStrobePolarity @endlink). + STROBE_ALWAYS_HIGH=2, ///< \~chinese 濮嬬粓涓洪珮锛屽拷鐣TROBE淇″彿鐨勫叾浠栬缃 \~english Always high, ignoring other settings of the STROBE signal + STROBE_ALWAYS_LOW=3 ///< \~chinese 濮嬬粓涓轰綆锛屽拷鐣TROBE淇″彿鐨勫叾浠栬缃 \~english Always low, ignoring other settings of the STROBE signal }emStrobeControl; /// @ingroup MV_ENUM_TYPE -/// \~chinese 硬件外触发的信号种类 +/// \~chinese 纭欢澶栬Е鍙戠殑淇″彿绉嶇被 /// \~english Signal types triggered by hardware typedef enum { - EXT_TRIG_LEADING_EDGE=0, ///< \~chinese 上升沿触发,默认为该方式 \~english Rising edge trigger, default is this method - EXT_TRIG_TRAILING_EDGE=1, ///< \~chinese 下降沿触发 \~english Falling edge trigger - EXT_TRIG_HIGH_LEVEL=2, ///< \~chinese 高电平触发,电平宽度决定曝光时间,仅部分型号的相机支持电平触发方式。 \~english The high level triggers, the level width determines the exposure time, only some models of cameras support level triggering. - EXT_TRIG_LOW_LEVEL=3, ///< \~chinese 低电平触发 \~english Low level trigger - EXT_TRIG_DOUBLE_EDGE=4, ///< \~chinese 双边沿触发 \~english Bilateral trigger + EXT_TRIG_LEADING_EDGE=0, ///< \~chinese 涓婂崌娌胯Е鍙戯紝榛樿涓鸿鏂瑰紡 \~english Rising edge trigger, default is this method + EXT_TRIG_TRAILING_EDGE=1, ///< \~chinese 涓嬮檷娌胯Е鍙 \~english Falling edge trigger + EXT_TRIG_HIGH_LEVEL=2, ///< \~chinese 楂樼數骞宠Е鍙,鐢靛钩瀹藉害鍐冲畾鏇濆厜鏃堕棿锛屼粎閮ㄥ垎鍨嬪彿鐨勭浉鏈烘敮鎸佺數骞宠Е鍙戞柟寮忋 \~english The high level triggers, the level width determines the exposure time, only some models of cameras support level triggering. + EXT_TRIG_LOW_LEVEL=3, ///< \~chinese 浣庣數骞宠Е鍙 \~english Low level trigger + EXT_TRIG_DOUBLE_EDGE=4, ///< \~chinese 鍙岃竟娌胯Е鍙 \~english Bilateral trigger }emExtTrigSignal; /// @ingroup MV_ENUM_TYPE -/// \~chinese 硬件外触发时的快门方式 +/// \~chinese 纭欢澶栬Е鍙戞椂鐨勫揩闂ㄦ柟寮 /// \~english Shutter mode when triggered by hardware typedef enum { - EXT_TRIG_EXP_STANDARD=0, ///< \~chinese 标准方式,默认为该方式。 \~english Standard mode, the default is this mode. - EXT_TRIG_EXP_GRR=1, ///< \~chinese 全局复位方式,部分滚动快门的CMOS型号的相机支持该方式,配合外部机械快门,可以达到全局快门的效果,适合拍高速运动的物体 \~english Global reset mode, part of the rolling shutter CMOS model camera supports this method, with the external mechanical shutter, you can achieve the effect of a global shutter, suitable for shooting high-speed objects + EXT_TRIG_EXP_STANDARD=0, ///< \~chinese 鏍囧噯鏂瑰紡锛岄粯璁や负璇ユ柟寮忋 \~english Standard mode, the default is this mode. + EXT_TRIG_EXP_GRR=1, ///< \~chinese 鍏ㄥ眬澶嶄綅鏂瑰紡锛岄儴鍒嗘粴鍔ㄥ揩闂ㄧ殑CMOS鍨嬪彿鐨勭浉鏈烘敮鎸佽鏂瑰紡锛岄厤鍚堝閮ㄦ満姊板揩闂紝鍙互杈惧埌鍏ㄥ眬蹇棬鐨勬晥鏋滐紝閫傚悎鎷嶉珮閫熻繍鍔ㄧ殑鐗╀綋 \~english Global reset mode, part of the rolling shutter CMOS model camera supports this method, with the external mechanical shutter, you can achieve the effect of a global shutter, suitable for shooting high-speed objects }emExtTrigShutterMode; /// @ingroup MV_ENUM_TYPE -/// \~chinese 清晰度评估算法 +/// \~chinese 娓呮櫚搴﹁瘎浼扮畻娉 /// \~english Sharpness assessment algorithm typedef enum { - EVALUATE_DEFINITION_DEVIATION=0, ///< \~chinese 方差法 \~english Variance method - EVALUATE_DEFINITION_SMD=1, ///< \~chinese 相邻像素灰度方差法 \~english Adjacent Pixel Gray Difference Method - EVALUATE_DEFINITION_GRADIENT=2, ///< \~chinese 梯度统计 \~english Gradient statistics + EVALUATE_DEFINITION_DEVIATION=0, ///< \~chinese 鏂瑰樊娉 \~english Variance method + EVALUATE_DEFINITION_SMD=1, ///< \~chinese 鐩搁偦鍍忕礌鐏板害鏂瑰樊娉 \~english Adjacent Pixel Gray Difference Method + EVALUATE_DEFINITION_GRADIENT=2, ///< \~chinese 姊害缁熻 \~english Gradient statistics EVALUATE_DEFINITION_SOBEL=3, ///< \~chinese Sobel \~english Sobel EVALUATE_DEFINITION_ROBERT=4, ///< \~chinese Robert \~english Robert EVALUATE_DEFINITION_LAPLACE=5, ///< \~chinese Laplace \~english Laplace - EVALUATE_DEFINITION_ALG_MAX=6, ///< \~chinese 算法个数 \~english The number of algorithms + EVALUATE_DEFINITION_ALG_MAX=6, ///< \~chinese 绠楁硶涓暟 \~english The number of algorithms }emEvaluateDefinitionAlgorith; /// @ingroup MV_ENUM_TYPE -/// \~chinese 文字输出标志 +/// \~chinese 鏂囧瓧杈撳嚭鏍囧織 /// \~english Text output flag typedef enum { - CAMERA_DT_VCENTER = 0x1, ///< \~chinese 垂直居中 \~english Vertically centered - CAMERA_DT_BOTTOM = 0x2, ///< \~chinese 底部对齐 \~english Bottom alignment - CAMERA_DT_HCENTER = 0x4, ///< \~chinese 水平居中 \~english Horizontally centered - CAMERA_DT_RIGHT = 0x8, ///< \~chinese 右对齐 \~english Right alignment - CAMERA_DT_SINGLELINE = 0x10, ///< \~chinese 单行显示 \~english Single-line display - CAMERA_DT_ALPHA_BLEND = 0x20, ///< \~chinese Alpha混合 \~english Alpha blend - CAMERA_DT_ANTI_ALIASING = 0x40, ///< \~chinese 抗锯齿 \~english Anti-aliasing + CAMERA_DT_VCENTER = 0x1, ///< \~chinese 鍨傜洿灞呬腑 \~english Vertically centered + CAMERA_DT_BOTTOM = 0x2, ///< \~chinese 搴曢儴瀵归綈 \~english Bottom alignment + CAMERA_DT_HCENTER = 0x4, ///< \~chinese 姘村钩灞呬腑 \~english Horizontally centered + CAMERA_DT_RIGHT = 0x8, ///< \~chinese 鍙冲榻 \~english Right alignment + CAMERA_DT_SINGLELINE = 0x10, ///< \~chinese 鍗曡鏄剧ず \~english Single-line display + CAMERA_DT_ALPHA_BLEND = 0x20, ///< \~chinese Alpha娣峰悎 \~english Alpha blend + CAMERA_DT_ANTI_ALIASING = 0x40, ///< \~chinese 鎶楅敮榻 \~english Anti-aliasing }emCameraDrawTextFlags; /// @ingroup MV_ENUM_TYPE -/// \~chinese GPIO模式 +/// \~chinese GPIO妯″紡 /// \~english GPIO Mode typedef enum { - IOMODE_TRIG_INPUT=0, ///< \~chinese 触发输入 \~english Trigger input - IOMODE_STROBE_OUTPUT=1, ///< \~chinese 闪光灯输出 \~english Strobe output - IOMODE_GP_INPUT=2, ///< \~chinese 通用型输入 \~english Universal input - IOMODE_GP_OUTPUT=3, ///< \~chinese 通用型输出 \~english Universal output - IOMODE_PWM_OUTPUT=4, ///< \~chinese PWM型输出 \~english PWM output + IOMODE_TRIG_INPUT=0, ///< \~chinese 瑙﹀彂杈撳叆 \~english Trigger input + IOMODE_STROBE_OUTPUT=1, ///< \~chinese 闂厜鐏緭鍑 \~english Strobe output + IOMODE_GP_INPUT=2, ///< \~chinese 閫氱敤鍨嬭緭鍏 \~english Universal input + IOMODE_GP_OUTPUT=3, ///< \~chinese 閫氱敤鍨嬭緭鍑 \~english Universal output + IOMODE_PWM_OUTPUT=4, ///< \~chinese PWM鍨嬭緭鍑 \~english PWM output }emCameraGPIOMode; /// @ingroup MV_ENUM_TYPE -/// \~chinese 取图优先级 +/// \~chinese 鍙栧浘浼樺厛绾 /// \~english Get Image priority typedef enum { - CAMERA_GET_IMAGE_PRIORITY_OLDEST=0, ///< \~chinese 获取缓存中最旧的一帧 \~english Get the oldest frame in the cache - CAMERA_GET_IMAGE_PRIORITY_NEWEST=1, ///< \~chinese 获取缓存中最新的一帧(比此帧旧的将全部丢弃) \~english Get the latest frame in the cache (older than this frame will be discarded) + CAMERA_GET_IMAGE_PRIORITY_OLDEST=0, ///< \~chinese 鑾峰彇缂撳瓨涓渶鏃х殑涓甯 \~english Get the oldest frame in the cache + CAMERA_GET_IMAGE_PRIORITY_NEWEST=1, ///< \~chinese 鑾峰彇缂撳瓨涓渶鏂扮殑涓甯э紙姣旀甯ф棫鐨勫皢鍏ㄩ儴涓㈠純锛 \~english Get the latest frame in the cache (older than this frame will be discarded) - /// \~chinese 丢弃缓存中的所有帧,并且如果此刻相机正在曝光或传输将会被立即打断,等待接收下一帧 - /// \note 某些型号的相机不支持此功能,对于不支持此功能的相机这个标志相当于@link #CAMERA_GET_IMAGE_PRIORITY_OLDEST @endlink + /// \~chinese 涓㈠純缂撳瓨涓殑鎵鏈夊抚锛屽苟涓斿鏋滄鍒荤浉鏈烘鍦ㄦ洕鍏夋垨浼犺緭灏嗕細琚珛鍗虫墦鏂紝绛夊緟鎺ユ敹涓嬩竴甯 + /// \note 鏌愪簺鍨嬪彿鐨勭浉鏈轰笉鏀寔姝ゅ姛鑳斤紝瀵逛簬涓嶆敮鎸佹鍔熻兘鐨勭浉鏈鸿繖涓爣蹇楃浉褰撲簬@link #CAMERA_GET_IMAGE_PRIORITY_OLDEST @endlink /// \~english All frames in the cache are discarded, and if the camera is now being exposed or transmitted it will be immediately interrupted, waiting to receive the next frame /// \note Some models do not support this feature. For cameras that do not support this feature this flag is equivalent to @link #CAMERA_GET_IMAGE_PRIORITY_OLDEST @endlink CAMERA_GET_IMAGE_PRIORITY_NEXT=2, }emCameraGetImagePriority; /// @ingroup MV_ENUM_TYPE -/// \~chinese 软触发功能标志 +/// \~chinese 杞Е鍙戝姛鑳芥爣蹇 /// \~english Soft trigger function flag typedef enum { - CAMERA_ST_CLEAR_BUFFER_BEFORE = 0x1, ///< \~chinese 在软触发之前先清空相机已缓存的帧 \~english Empty camera-cached frames before soft triggering + CAMERA_ST_CLEAR_BUFFER_BEFORE = 0x1, ///< \~chinese 鍦ㄨ蒋瑙﹀彂涔嬪墠鍏堟竻绌虹浉鏈哄凡缂撳瓨鐨勫抚 \~english Empty camera-cached frames before soft triggering }emCameraSoftTriggerExFlags; -/// \~chinese 相机的设备信息 +/// \~chinese 鐩告満鐨勮澶囦俊鎭 /// \~english Camera device information typedef struct { - char acProductSeries[32]; ///< \~chinese 产品系列 \~english Product Series - char acProductName[32]; ///< \~chinese 产品名称 \~english product name + char acProductSeries[32]; ///< \~chinese 浜у搧绯诲垪 \~english Product Series + char acProductName[32]; ///< \~chinese 浜у搧鍚嶇О \~english product name - /// \~chinese 产品昵称,用户可自定义改昵称,保存在相机内,用于区分多个相机同时使用,可以用@link #CameraSetFriendlyName @endlink接口改变该昵称,设备重启后生效。 + /// \~chinese 浜у搧鏄电О锛岀敤鎴峰彲鑷畾涔夋敼鏄电О锛屼繚瀛樺湪鐩告満鍐咃紝鐢ㄤ簬鍖哄垎澶氫釜鐩告満鍚屾椂浣跨敤,鍙互鐢ˊlink #CameraSetFriendlyName @endlink鎺ュ彛鏀瑰彉璇ユ樀绉帮紝璁惧閲嶅惎鍚庣敓鏁堛 /// \~english Product nicknames, users can customize the nickname, saved in the camera, used to distinguish between multiple cameras at the same time, you can use the @link #CameraSetFriendlyName @endlink interface to change the nickname, the device takes effect after restart. char acFriendlyName[32]; - char acLinkName[32]; ///< \~chinese 内核符号连接名,内部使用 \~english Kernel symbolic connection name, internal use - char acDriverVersion[32]; ///< \~chinese 驱动版本 \~english Driver version - char acSensorType[32]; ///< \~chinese sensor类型 \~english Sensor type - char acPortType[32]; ///< \~chinese 接口类型 \~english Interface Type - char acSn[32]; ///< \~chinese 产品唯一序列号 \~english Product unique serial number - UINT uInstance; ///< \~chinese 该型号相机在该电脑上的实例索引号,用于区分同型号多相机 \~english The example index number of this model camera on this computer, used to distinguish the same model multiple cameras + char acLinkName[32]; ///< \~chinese 鍐呮牳绗﹀彿杩炴帴鍚嶏紝鍐呴儴浣跨敤 \~english Kernel symbolic connection name, internal use + char acDriverVersion[32]; ///< \~chinese 椹卞姩鐗堟湰 \~english Driver version + char acSensorType[32]; ///< \~chinese sensor绫诲瀷 \~english Sensor type + char acPortType[32]; ///< \~chinese 鎺ュ彛绫诲瀷 \~english Interface Type + char acSn[32]; ///< \~chinese 浜у搧鍞竴搴忓垪鍙 \~english Product unique serial number + UINT uInstance; ///< \~chinese 璇ュ瀷鍙风浉鏈哄湪璇ョ數鑴戜笂鐨勫疄渚嬬储寮曞彿锛岀敤浜庡尯鍒嗗悓鍨嬪彿澶氱浉鏈 \~english The example index number of this model camera on this computer, used to distinguish the same model multiple cameras } tSdkCameraDevInfo; /// @ingroup MV_MACRO_TYPE /// @{ -#define EXT_TRIG_MASK_GRR_SHUTTER 1 ///< \~chinese 快门支持GRR模式 \~english Shutter supports GRR mode -#define EXT_TRIG_MASK_LEVEL_MODE 2 ///< \~chinese 支持电平触发 \~english Support level trigger -#define EXT_TRIG_MASK_DOUBLE_EDGE 4 ///< \~chinese 支持双边沿触发 \~english Supports bilateral triggering +#define EXT_TRIG_MASK_GRR_SHUTTER 1 ///< \~chinese 蹇棬鏀寔GRR妯″紡 \~english Shutter supports GRR mode +#define EXT_TRIG_MASK_LEVEL_MODE 2 ///< \~chinese 鏀寔鐢靛钩瑙﹀彂 \~english Support level trigger +#define EXT_TRIG_MASK_DOUBLE_EDGE 4 ///< \~chinese 鏀寔鍙岃竟娌胯Е鍙 \~english Supports bilateral triggering -//tSdkResolutionRange结构体中SKIP、 BIN、RESAMPLE模式的掩码值 -#define MASK_2X2_HD (1<<0) //硬件SKIP、BIN、重采样 2X2 +//tSdkResolutionRange缁撴瀯浣撲腑SKIP銆 BIN銆丷ESAMPLE妯″紡鐨勬帺鐮佸 +#define MASK_2X2_HD (1<<0) //纭欢SKIP銆丅IN銆侀噸閲囨牱 2X2 #define MASK_3X3_HD (1<<1) #define MASK_4X4_HD (1<<2) #define MASK_5X5_HD (1<<3) @@ -418,7 +418,7 @@ typedef struct #define MASK_15X15_HD (1<<13) #define MASK_16X16_HD (1<<14) #define MASK_17X17_HD (1<<15) -#define MASK_2X2_SW (1<<16) //软件SKIP、BIN、重采样 2X2 +#define MASK_2X2_SW (1<<16) //杞欢SKIP銆丅IN銆侀噸閲囨牱 2X2 #define MASK_3X3_SW (1<<17) #define MASK_4X4_SW (1<<18) #define MASK_5X5_SW (1<<19) @@ -436,305 +436,305 @@ typedef struct #define MASK_17X17_SW (1<<31) /// @} -/// \~chinese 相机的分辨率设定范围,可用于构件UI +/// \~chinese 鐩告満鐨勫垎杈ㄧ巼璁惧畾鑼冨洿锛屽彲鐢ㄤ簬鏋勪欢UI /// \~english Camera resolution setting range, can be used for component UI typedef struct { - INT iHeightMax; ///< \~chinese 图像最大高度 \~english Maximum image height - INT iHeightMin; ///< \~chinese 图像最小高度 \~english Image minimum height - INT iWidthMax; ///< \~chinese 图像最大宽度 \~english The maximum width of the image - INT iWidthMin; ///< \~chinese 图像最小宽度 \~english The minimum width of the image - UINT uSkipModeMask; ///< \~chinese SKIP模式掩码,为0,表示不支持SKIP 。bit0为1,表示支持SKIP 2x2 ;bit1为1,表示支持SKIP 3x3.... \~english The SKIP mode mask, which is 0, indicates that SKIP is not supported. Bit0 is 1 to indicate that SKIP 2x2 is supported; bit1 is 1 to indicate that SKIP 3x3 is supported.... - UINT uBinSumModeMask; ///< \~chinese BIN(求和)模式掩码,为0,表示不支持BIN 。bit0为1,表示支持BIN 2x2 ;bit1为1,表示支持BIN 3x3.... \~english The BIN (sum) pattern mask, which is 0, indicates that BIN is not supported. Bit0 is 1, indicating that BIN 2x2 is supported; bit1 is 1, indicating that BIN 3x3 is supported.... - UINT uBinAverageModeMask; ///< \~chinese BIN(求均值)模式掩码,为0,表示不支持BIN 。bit0为1,表示支持BIN 2x2 ;bit1为1,表示支持BIN 3x3.... \~english The BIN (mean value) mode mask, which is 0, indicates that BIN is not supported. Bit0 is 1, indicating that BIN 2x2 is supported; bit1 is 1, indicating that BIN 3x3 is supported.... - UINT uResampleMask; ///< \~chinese 硬件重采样的掩码 \~english Hardware resampling mask + INT iHeightMax; ///< \~chinese 鍥惧儚鏈澶ч珮搴 \~english Maximum image height + INT iHeightMin; ///< \~chinese 鍥惧儚鏈灏忛珮搴 \~english Image minimum height + INT iWidthMax; ///< \~chinese 鍥惧儚鏈澶у搴 \~english The maximum width of the image + INT iWidthMin; ///< \~chinese 鍥惧儚鏈灏忓搴 \~english The minimum width of the image + UINT uSkipModeMask; ///< \~chinese SKIP妯″紡鎺╃爜锛屼负0锛岃〃绀轰笉鏀寔SKIP 銆俠it0涓1,琛ㄧず鏀寔SKIP 2x2 ;bit1涓1锛岃〃绀烘敮鎸丼KIP 3x3.... \~english The SKIP mode mask, which is 0, indicates that SKIP is not supported. Bit0 is 1 to indicate that SKIP 2x2 is supported; bit1 is 1 to indicate that SKIP 3x3 is supported.... + UINT uBinSumModeMask; ///< \~chinese BIN(姹傚拰)妯″紡鎺╃爜锛屼负0锛岃〃绀轰笉鏀寔BIN 銆俠it0涓1,琛ㄧず鏀寔BIN 2x2 ;bit1涓1锛岃〃绀烘敮鎸丅IN 3x3.... \~english The BIN (sum) pattern mask, which is 0, indicates that BIN is not supported. Bit0 is 1, indicating that BIN 2x2 is supported; bit1 is 1, indicating that BIN 3x3 is supported.... + UINT uBinAverageModeMask; ///< \~chinese BIN(姹傚潎鍊)妯″紡鎺╃爜锛屼负0锛岃〃绀轰笉鏀寔BIN 銆俠it0涓1,琛ㄧず鏀寔BIN 2x2 ;bit1涓1锛岃〃绀烘敮鎸丅IN 3x3.... \~english The BIN (mean value) mode mask, which is 0, indicates that BIN is not supported. Bit0 is 1, indicating that BIN 2x2 is supported; bit1 is 1, indicating that BIN 3x3 is supported.... + UINT uResampleMask; ///< \~chinese 纭欢閲嶉噰鏍风殑鎺╃爜 \~english Hardware resampling mask } tSdkResolutionRange; -/// \~chinese 相机的分辨率描述 +/// \~chinese 鐩告満鐨勫垎杈ㄧ巼鎻忚堪 /// \~english Camera resolution description typedef struct { - INT iIndex; ///< \~chinese 索引号,[0,N]表示预设的分辨率(N 为预设分辨率的最大个数,一般不超过20),OXFF 表示自定义分辨率(ROI) \~english Index number, [0, N] indicates the preset resolution (N is the maximum number of preset resolutions, generally no more than 20), OXFF indicates custom resolution (ROI) - char acDescription[32]; ///< \~chinese 该分辨率的描述信息。仅预设分辨率时该信息有效。自定义分辨率可忽略该信息 \~english The description of the resolution. This information is valid only when the resolution is preset. Custom resolution ignores this information - UINT uBinSumMode; ///< \~chinese BIN(求和)的模式,范围不能超过tSdkResolutionRange.uBinSumModeMask \~english The BIN (sum) mode cannot exceed the tSdkResolutionRange.uBinSumModeMask - UINT uBinAverageMode; ///< \~chinese BIN(求均值)的模式,范围不能超过tSdkResolutionRange.uBinAverageModeMask \~english BIN (average) mode, the range cannot exceed tSdkResolutionRange.uBinAverageModeMask - UINT uSkipMode; ///< \~chinese 是否SKIP的尺寸,为0表示禁止SKIP模式,范围不能超过tSdkResolutionRange.uSkipModeMask \~english Whether the SKIP size is 0 indicates that the SKIP mode is disabled and the range cannot exceed the tSdkResolutionRange.uSkipModeMask - UINT uResampleMask; ///< \~chinese 硬件重采样的掩码 \~english Hardware resampling mask - INT iHOffsetFOV; ///< \~chinese 采集视场相对于Sensor最大视场左上角的水平偏移 \~english The horizontal offset of the acquisition field of view relative to the top left corner of the Sensor's largest field of view - INT iVOffsetFOV; ///< \~chinese 采集视场相对于Sensor最大视场左上角的垂直偏移 \~english The vertical offset of the acquisition field of view relative to the upper left corner of the Sensor's largest field of view - INT iWidthFOV; ///< \~chinese 采集视场的宽度 \~english The width of the field of view - INT iHeightFOV; ///< \~chinese 采集视场的高度 \~english The height of the field of view - INT iWidth; ///< \~chinese 相机最终输出的图像的宽度 \~english The width of the final output image of the camera - INT iHeight; ///< \~chinese 相机最终输出的图像的高度 \~english The height of the final output image of the camera - INT iWidthZoomHd; ///< \~chinese 硬件缩放的宽度,不需要进行此操作的分辨率,此变量设置为0. \~english The width of the hardware zoom, resolution that does not require this operation, this variable is set to 0. - INT iHeightZoomHd; ///< \~chinese 硬件缩放的高度,不需要进行此操作的分辨率,此变量设置为0. \~english The height of the hardware zoom, resolution that does not require this operation, this variable is set to 0. - INT iWidthZoomSw; ///< \~chinese 软件缩放的宽度,不需要进行此操作的分辨率,此变量设置为0. \~english The width of the software's zoom, which does not require the resolution of this operation, this variable is set to 0. - INT iHeightZoomSw; ///< \~chinese 软件缩放的高度,不需要进行此操作的分辨率,此变量设置为0. \~english The height of the software's zoom, which does not require the resolution of this operation, this variable is set to 0. + INT iIndex; ///< \~chinese 绱㈠紩鍙凤紝[0,N]琛ㄧず棰勮鐨勫垎杈ㄧ巼(N 涓洪璁惧垎杈ㄧ巼鐨勬渶澶т釜鏁帮紝涓鑸笉瓒呰繃20),OXFF 琛ㄧず鑷畾涔夊垎杈ㄧ巼(ROI) \~english Index number, [0, N] indicates the preset resolution (N is the maximum number of preset resolutions, generally no more than 20), OXFF indicates custom resolution (ROI) + char acDescription[32]; ///< \~chinese 璇ュ垎杈ㄧ巼鐨勬弿杩颁俊鎭備粎棰勮鍒嗚鲸鐜囨椂璇ヤ俊鎭湁鏁堛傝嚜瀹氫箟鍒嗚鲸鐜囧彲蹇界暐璇ヤ俊鎭 \~english The description of the resolution. This information is valid only when the resolution is preset. Custom resolution ignores this information + UINT uBinSumMode; ///< \~chinese BIN(姹傚拰)鐨勬ā寮,鑼冨洿涓嶈兘瓒呰繃tSdkResolutionRange.uBinSumModeMask \~english The BIN (sum) mode cannot exceed the tSdkResolutionRange.uBinSumModeMask + UINT uBinAverageMode; ///< \~chinese BIN(姹傚潎鍊)鐨勬ā寮,鑼冨洿涓嶈兘瓒呰繃tSdkResolutionRange.uBinAverageModeMask \~english BIN (average) mode, the range cannot exceed tSdkResolutionRange.uBinAverageModeMask + UINT uSkipMode; ///< \~chinese 鏄惁SKIP鐨勫昂瀵革紝涓0琛ㄧず绂佹SKIP妯″紡锛岃寖鍥翠笉鑳借秴杩噒SdkResolutionRange.uSkipModeMask \~english Whether the SKIP size is 0 indicates that the SKIP mode is disabled and the range cannot exceed the tSdkResolutionRange.uSkipModeMask + UINT uResampleMask; ///< \~chinese 纭欢閲嶉噰鏍风殑鎺╃爜 \~english Hardware resampling mask + INT iHOffsetFOV; ///< \~chinese 閲囬泦瑙嗗満鐩稿浜嶴ensor鏈澶ц鍦哄乏涓婅鐨勬按骞冲亸绉 \~english The horizontal offset of the acquisition field of view relative to the top left corner of the Sensor's largest field of view + INT iVOffsetFOV; ///< \~chinese 閲囬泦瑙嗗満鐩稿浜嶴ensor鏈澶ц鍦哄乏涓婅鐨勫瀭鐩村亸绉 \~english The vertical offset of the acquisition field of view relative to the upper left corner of the Sensor's largest field of view + INT iWidthFOV; ///< \~chinese 閲囬泦瑙嗗満鐨勫搴 \~english The width of the field of view + INT iHeightFOV; ///< \~chinese 閲囬泦瑙嗗満鐨勯珮搴 \~english The height of the field of view + INT iWidth; ///< \~chinese 鐩告満鏈缁堣緭鍑虹殑鍥惧儚鐨勫搴 \~english The width of the final output image of the camera + INT iHeight; ///< \~chinese 鐩告満鏈缁堣緭鍑虹殑鍥惧儚鐨勯珮搴 \~english The height of the final output image of the camera + INT iWidthZoomHd; ///< \~chinese 纭欢缂╂斁鐨勫搴,涓嶉渶瑕佽繘琛屾鎿嶄綔鐨勫垎杈ㄧ巼锛屾鍙橀噺璁剧疆涓0. \~english The width of the hardware zoom, resolution that does not require this operation, this variable is set to 0. + INT iHeightZoomHd; ///< \~chinese 纭欢缂╂斁鐨勯珮搴,涓嶉渶瑕佽繘琛屾鎿嶄綔鐨勫垎杈ㄧ巼锛屾鍙橀噺璁剧疆涓0. \~english The height of the hardware zoom, resolution that does not require this operation, this variable is set to 0. + INT iWidthZoomSw; ///< \~chinese 杞欢缂╂斁鐨勫搴,涓嶉渶瑕佽繘琛屾鎿嶄綔鐨勫垎杈ㄧ巼锛屾鍙橀噺璁剧疆涓0. \~english The width of the software's zoom, which does not require the resolution of this operation, this variable is set to 0. + INT iHeightZoomSw; ///< \~chinese 杞欢缂╂斁鐨勯珮搴,涓嶉渶瑕佽繘琛屾鎿嶄綔鐨勫垎杈ㄧ巼锛屾鍙橀噺璁剧疆涓0. \~english The height of the software's zoom, which does not require the resolution of this operation, this variable is set to 0. } tSdkImageResolution; -/// \~chinese 相机白平衡色温模式描述信息 +/// \~chinese 鐩告満鐧藉钩琛¤壊娓╂ā寮忔弿杩颁俊鎭 /// \~english Camera white balance color temperature mode description information typedef struct { - INT iIndex; ///< \~chinese 模式索引号 \~english Mode index number - char acDescription[32]; ///< \~chinese 描述信息 \~english Description + INT iIndex; ///< \~chinese 妯″紡绱㈠紩鍙 \~english Mode index number + char acDescription[32]; ///< \~chinese 鎻忚堪淇℃伅 \~english Description } tSdkColorTemperatureDes; -/// \~chinese 相机帧率描述信息 +/// \~chinese 鐩告満甯х巼鎻忚堪淇℃伅 /// \~english Camera frame rate description information typedef struct { - INT iIndex; ///< \~chinese 帧率索引号,一般0对应于低速模式,1对应于普通模式,2对应于高速模式 \~english Frame rate index number, generally 0 corresponds to low speed mode, 1 corresponds to normal mode, 2 corresponds to high speed mode - char acDescription[32]; ///< \~chinese 描述信息 \~english Description + INT iIndex; ///< \~chinese 甯х巼绱㈠紩鍙凤紝涓鑸0瀵瑰簲浜庝綆閫熸ā寮忥紝1瀵瑰簲浜庢櫘閫氭ā寮忥紝2瀵瑰簲浜庨珮閫熸ā寮 \~english Frame rate index number, generally 0 corresponds to low speed mode, 1 corresponds to normal mode, 2 corresponds to high speed mode + char acDescription[32]; ///< \~chinese 鎻忚堪淇℃伅 \~english Description } tSdkFrameSpeed; -/// \~chinese 相机曝光功能范围定义 +/// \~chinese 鐩告満鏇濆厜鍔熻兘鑼冨洿瀹氫箟 /// \see tSdkCameraCapbility.sExposeDesc /// \~english Camera exposure function scope definition /// \see tSdkCameraCapbility.sExposeDesc typedef struct { - UINT uiTargetMin; ///< \~chinese 自动曝光亮度目标最小值 \~english Auto exposure brightness target minimum - UINT uiTargetMax; ///< \~chinese 自动曝光亮度目标最大值 \~english Auto exposure brightness target maximum - UINT uiAnalogGainMin; ///< \~chinese 模拟增益的最小值,单位为fAnalogGainStep中定义 \~english The minimum value of the analog gain in fAnalog defined in GainStep - UINT uiAnalogGainMax; ///< \~chinese 模拟增益的最大值,单位为fAnalogGainStep中定义 \~english The maximum value of the analog gain in fAnalog defined in GainStep - float fAnalogGainStep; ///< \~chinese 模拟增益每增加1,对应的增加的放大倍数。例如,uiAnalogGainMin一般为16,fAnalogGainStep一般为0.125,那么最小放大倍数就是16*0.125 = 2倍 \~english Each increase in analog gain corresponds to an increased amplification factor. For example, uiAnalogGainMin is generally 16 and fAnalogGainStep is generally 0.125, so the minimum magnification is 16*0.125 = 2 times - UINT uiExposeTimeMin; ///< \~chinese 手动模式下,曝光时间的最小值,单位:行。根据CameraGetExposureLineTime可以获得一行对应的时间(微秒),从而得到整帧的曝光时间 \~english The minimum exposure time in manual mode, unit: line. According to CameraGetExposureLineTime can get a row of corresponding time (microseconds) to get the entire frame exposure time - UINT uiExposeTimeMax; ///< \~chinese 手动模式下,曝光时间的最大值,单位:行 \~english Maximum exposure time in manual mode, unit: line + UINT uiTargetMin; ///< \~chinese 鑷姩鏇濆厜浜害鐩爣鏈灏忓 \~english Auto exposure brightness target minimum + UINT uiTargetMax; ///< \~chinese 鑷姩鏇濆厜浜害鐩爣鏈澶у \~english Auto exposure brightness target maximum + UINT uiAnalogGainMin; ///< \~chinese 妯℃嫙澧炵泭鐨勬渶灏忓硷紝鍗曚綅涓篺AnalogGainStep涓畾涔 \~english The minimum value of the analog gain in fAnalog defined in GainStep + UINT uiAnalogGainMax; ///< \~chinese 妯℃嫙澧炵泭鐨勬渶澶у硷紝鍗曚綅涓篺AnalogGainStep涓畾涔 \~english The maximum value of the analog gain in fAnalog defined in GainStep + float fAnalogGainStep; ///< \~chinese 妯℃嫙澧炵泭姣忓鍔1锛屽搴旂殑澧炲姞鐨勬斁澶у嶆暟銆備緥濡傦紝uiAnalogGainMin涓鑸负16锛宖AnalogGainStep涓鑸负0.125锛岄偅涔堟渶灏忔斁澶у嶆暟灏辨槸16*0.125 = 2鍊 \~english Each increase in analog gain corresponds to an increased amplification factor. For example, uiAnalogGainMin is generally 16 and fAnalogGainStep is generally 0.125, so the minimum magnification is 16*0.125 = 2 times + UINT uiExposeTimeMin; ///< \~chinese 鎵嬪姩妯″紡涓嬶紝鏇濆厜鏃堕棿鐨勬渶灏忓硷紝鍗曚綅:琛屻傛牴鎹瓹ameraGetExposureLineTime鍙互鑾峰緱涓琛屽搴旂殑鏃堕棿(寰),浠庤屽緱鍒版暣甯х殑鏇濆厜鏃堕棿 \~english The minimum exposure time in manual mode, unit: line. According to CameraGetExposureLineTime can get a row of corresponding time (microseconds) to get the entire frame exposure time + UINT uiExposeTimeMax; ///< \~chinese 鎵嬪姩妯″紡涓嬶紝鏇濆厜鏃堕棿鐨勬渶澶у硷紝鍗曚綅:琛 \~english Maximum exposure time in manual mode, unit: line } tSdkExpose; -/// \~chinese 触发模式描述 +/// \~chinese 瑙﹀彂妯″紡鎻忚堪 /// \~english Trigger mode description typedef struct { - INT iIndex; ///< \~chinese 模式索引号 \~english Mode index number - char acDescription[32]; ///< \~chinese 该模式的描述信息 \~english Description information of this mode + INT iIndex; ///< \~chinese 妯″紡绱㈠紩鍙 \~english Mode index number + char acDescription[32]; ///< \~chinese 璇ユā寮忕殑鎻忚堪淇℃伅 \~english Description information of this mode } tSdkTrigger; -/// \~chinese 传输分包大小描述(针对某些网络相机有效) +/// \~chinese 浼犺緭鍒嗗寘澶у皬鎻忚堪(閽堝鏌愪簺缃戠粶鐩告満鏈夋晥) /// \~english Transmission packet size description (valid for some web cameras) typedef struct { - INT iIndex; ///< \~chinese 分包大小索引号 \~english Packet size index number - char acDescription[32]; ///< \~chinese 对应的描述信息 \~english Corresponding description information - UINT iPackSize; ///< \~chinese 包大小 \~english Packet size + INT iIndex; ///< \~chinese 鍒嗗寘澶у皬绱㈠紩鍙 \~english Packet size index number + char acDescription[32]; ///< \~chinese 瀵瑰簲鐨勬弿杩颁俊鎭 \~english Corresponding description information + UINT iPackSize; ///< \~chinese 鍖呭ぇ灏 \~english Packet size } tSdkPackLength; -/// \~chinese 预设的LUT表描述 +/// \~chinese 棰勮鐨凩UT琛ㄦ弿杩 /// \~english Preset LUT Table Description typedef struct { - INT iIndex; ///< \~chinese 索引 \~english index - char acDescription[32]; ///< \~chinese 描述信息 \~english description + INT iIndex; ///< \~chinese 绱㈠紩 \~english index + char acDescription[32]; ///< \~chinese 鎻忚堪淇℃伅 \~english description } tSdkPresetLut; -/// \~chinese AE算法描述 +/// \~chinese AE绠楁硶鎻忚堪 /// \~english AE algorithm description typedef struct { - INT iIndex; ///< \~chinese 索引 \~english index - char acDescription[32]; ///< \~chinese 描述信息 \~english description + INT iIndex; ///< \~chinese 绱㈠紩 \~english index + char acDescription[32]; ///< \~chinese 鎻忚堪淇℃伅 \~english description } tSdkAeAlgorithm; -/// \~chinese RAW转RGB算法描述 +/// \~chinese RAW杞琑GB绠楁硶鎻忚堪 /// \~english RAW to RGB algorithm description typedef struct { - INT iIndex; ///< \~chinese 索引 \~english index - char acDescription[32]; ///< \~chinese 描述信息 \~english description + INT iIndex; ///< \~chinese 绱㈠紩 \~english index + char acDescription[32]; ///< \~chinese 鎻忚堪淇℃伅 \~english description } tSdkBayerDecodeAlgorithm; -/// \~chinese 帧统计信息 +/// \~chinese 甯х粺璁′俊鎭 /// \~english Frame statistics typedef struct { - INT iTotal; ///< \~chinese 当前采集的总帧数(包括错误帧) \~english The current total number of frames collected (including error frames) - INT iCapture; ///< \~chinese 当前采集的有效帧的数量 \~english The number of valid frames currently collected - INT iLost; ///< \~chinese 当前丢帧的数量 \~english Current number of dropped frames + INT iTotal; ///< \~chinese 褰撳墠閲囬泦鐨勬诲抚鏁帮紙鍖呮嫭閿欒甯э級 \~english The current total number of frames collected (including error frames) + INT iCapture; ///< \~chinese 褰撳墠閲囬泦鐨勬湁鏁堝抚鐨勬暟閲 \~english The number of valid frames currently collected + INT iLost; ///< \~chinese 褰撳墠涓㈠抚鐨勬暟閲 \~english Current number of dropped frames } tSdkFrameStatistic; -/// \~chinese 相机输出的图像数据格式 +/// \~chinese 鐩告満杈撳嚭鐨勫浘鍍忔暟鎹牸寮 /// \~english Camera output image data format typedef struct { - INT iIndex; ///< \~chinese 格式种类编号 \~english Format type number - char acDescription[32]; ///< \~chinese 描述信息 \~english description - UINT iMediaType; ///< \~chinese 对应的图像格式编码,如CAMERA_MEDIA_TYPE_BAYGR8。 \~english Corresponding image format encoding, such as CAMERA_MEDIA_TYPE_BAYGR8. + INT iIndex; ///< \~chinese 鏍煎紡绉嶇被缂栧彿 \~english Format type number + char acDescription[32]; ///< \~chinese 鎻忚堪淇℃伅 \~english description + UINT iMediaType; ///< \~chinese 瀵瑰簲鐨勫浘鍍忔牸寮忕紪鐮侊紝濡侰AMERA_MEDIA_TYPE_BAYGR8銆 \~english Corresponding image format encoding, such as CAMERA_MEDIA_TYPE_BAYGR8. } tSdkMediaType; -/// \~chinese 伽马的设定范围 +/// \~chinese 浼介┈鐨勮瀹氳寖鍥 /// \~english Gamma setting range typedef struct { - INT iMin; ///< \~chinese 最小值 \~english min - INT iMax; ///< \~chinese 最大值 \~english max + INT iMin; ///< \~chinese 鏈灏忓 \~english min + INT iMax; ///< \~chinese 鏈澶у \~english max } tGammaRange; -/// \~chinese 对比度的设定范围 +/// \~chinese 瀵规瘮搴︾殑璁惧畾鑼冨洿 /// \~english Contrast setting range typedef struct { - INT iMin; ///< \~chinese 最小值 \~english min - INT iMax; ///< \~chinese 最大值 \~english max + INT iMin; ///< \~chinese 鏈灏忓 \~english min + INT iMax; ///< \~chinese 鏈澶у \~english max } tContrastRange; -/// \~chinese RGB三通道数字增益的设定范围 +/// \~chinese RGB涓夐氶亾鏁板瓧澧炵泭鐨勮瀹氳寖鍥 /// \~english RGB three channel digital gain setting range typedef struct { - INT iRGainMin; ///< \~chinese 红色增益的最小值 \~english Red gain minimum - INT iRGainMax; ///< \~chinese 红色增益的最大值 \~english Red gain maximum - INT iGGainMin; ///< \~chinese 绿色增益的最小值 \~english Green gain minimum - INT iGGainMax; ///< \~chinese 绿色增益的最大值 \~english Green gain maximum - INT iBGainMin; ///< \~chinese 蓝色增益的最小值 \~english Blue gain minimum - INT iBGainMax; ///< \~chinese 蓝色增益的最大值 \~english blue gain maximum + INT iRGainMin; ///< \~chinese 绾㈣壊澧炵泭鐨勬渶灏忓 \~english Red gain minimum + INT iRGainMax; ///< \~chinese 绾㈣壊澧炵泭鐨勬渶澶у \~english Red gain maximum + INT iGGainMin; ///< \~chinese 缁胯壊澧炵泭鐨勬渶灏忓 \~english Green gain minimum + INT iGGainMax; ///< \~chinese 缁胯壊澧炵泭鐨勬渶澶у \~english Green gain maximum + INT iBGainMin; ///< \~chinese 钃濊壊澧炵泭鐨勬渶灏忓 \~english Blue gain minimum + INT iBGainMax; ///< \~chinese 钃濊壊澧炵泭鐨勬渶澶у \~english blue gain maximum } tRgbGainRange; -/// \~chinese 饱和度设定的范围 +/// \~chinese 楗卞拰搴﹁瀹氱殑鑼冨洿 /// \~english Saturation setting range typedef struct { - INT iMin; ///< \~chinese 最小值 \~english min - INT iMax; ///< \~chinese 最大值 \~english max + INT iMin; ///< \~chinese 鏈灏忓 \~english min + INT iMax; ///< \~chinese 鏈澶у \~english max } tSaturationRange; -/// \~chinese 锐化的设定范围 +/// \~chinese 閿愬寲鐨勮瀹氳寖鍥 /// \~english Sharpening setting range typedef struct { - INT iMin; ///< \~chinese 最小值 \~english min - INT iMax; ///< \~chinese 最大值 \~english max + INT iMin; ///< \~chinese 鏈灏忓 \~english min + INT iMax; ///< \~chinese 鏈澶у \~english max } tSharpnessRange; -/// \~chinese ISP模块的使能信息 +/// \~chinese ISP妯″潡鐨勪娇鑳戒俊鎭 /// \~english ISP module enable information typedef struct { - BOOL bMonoSensor; ///< \~chinese 表示该型号相机是否为黑白相机,如果是黑白相机,则颜色相关的功能都无法调节 \~english Indicates whether this model is a black-and-white camera. If it is a black-and-white camera, color-related functions cannot be adjusted. - BOOL bWbOnce; ///< \~chinese 表示该型号相机是否支持手动白平衡功能 \~english Indicates whether this model camera supports manual white balance function - BOOL bAutoWb; ///< \~chinese 表示该型号相机是否支持自动白平衡功能 \~english Indicates whether this model camera supports automatic white balance function - BOOL bAutoExposure; ///< \~chinese 表示该型号相机是否支持自动曝光功能 \~english Indicates whether this model camera supports auto exposure function - BOOL bManualExposure; ///< \~chinese 表示该型号相机是否支持手动曝光功能 \~english Indicates whether this model camera supports manual exposure function - BOOL bAntiFlick; ///< \~chinese 表示该型号相机是否支持抗频闪功能 \~english Indicates whether this model camera supports anti-strobe function - BOOL bDeviceIsp; ///< \~chinese 表示该型号相机是否支持硬件ISP功能 \~english Indicates whether this model camera supports hardware ISP function - BOOL bForceUseDeviceIsp;///< \~chinese bDeviceIsp和bForceUseDeviceIsp同时为TRUE时,表示强制只用硬件ISP,不可取消。 \~english When both bDeviceIsp and bForceUseDeviceIsp are TRUE, this means that only the hardware ISP is forced and cannot be cancelled. - BOOL bZoomHD; ///< \~chinese 相机硬件是否支持图像缩放输出(只能是缩小)。 \~english Whether the camera hardware supports image scaling output (can only be reduced). + BOOL bMonoSensor; ///< \~chinese 琛ㄧず璇ュ瀷鍙风浉鏈烘槸鍚︿负榛戠櫧鐩告満,濡傛灉鏄粦鐧界浉鏈猴紝鍒欓鑹茬浉鍏崇殑鍔熻兘閮芥棤娉曡皟鑺 \~english Indicates whether this model is a black-and-white camera. If it is a black-and-white camera, color-related functions cannot be adjusted. + BOOL bWbOnce; ///< \~chinese 琛ㄧず璇ュ瀷鍙风浉鏈烘槸鍚︽敮鎸佹墜鍔ㄧ櫧骞宠 鍔熻兘 \~english Indicates whether this model camera supports manual white balance function + BOOL bAutoWb; ///< \~chinese 琛ㄧず璇ュ瀷鍙风浉鏈烘槸鍚︽敮鎸佽嚜鍔ㄧ櫧骞宠 鍔熻兘 \~english Indicates whether this model camera supports automatic white balance function + BOOL bAutoExposure; ///< \~chinese 琛ㄧず璇ュ瀷鍙风浉鏈烘槸鍚︽敮鎸佽嚜鍔ㄦ洕鍏夊姛鑳 \~english Indicates whether this model camera supports auto exposure function + BOOL bManualExposure; ///< \~chinese 琛ㄧず璇ュ瀷鍙风浉鏈烘槸鍚︽敮鎸佹墜鍔ㄦ洕鍏夊姛鑳 \~english Indicates whether this model camera supports manual exposure function + BOOL bAntiFlick; ///< \~chinese 琛ㄧず璇ュ瀷鍙风浉鏈烘槸鍚︽敮鎸佹姉棰戦棯鍔熻兘 \~english Indicates whether this model camera supports anti-strobe function + BOOL bDeviceIsp; ///< \~chinese 琛ㄧず璇ュ瀷鍙风浉鏈烘槸鍚︽敮鎸佺‖浠禝SP鍔熻兘 \~english Indicates whether this model camera supports hardware ISP function + BOOL bForceUseDeviceIsp;///< \~chinese bDeviceIsp鍜宐ForceUseDeviceIsp鍚屾椂涓篢RUE鏃讹紝琛ㄧず寮哄埗鍙敤纭欢ISP锛屼笉鍙彇娑堛 \~english When both bDeviceIsp and bForceUseDeviceIsp are TRUE, this means that only the hardware ISP is forced and cannot be cancelled. + BOOL bZoomHD; ///< \~chinese 鐩告満纭欢鏄惁鏀寔鍥惧儚缂╂斁杈撳嚭(鍙兘鏄缉灏)銆 \~english Whether the camera hardware supports image scaling output (can only be reduced). } tSdkIspCapacity; -/// \~chinese 定义整合的设备描述信息,这些信息可以用于动态构建UI -/// \note 调用@link #CameraGetCapability @endlink获取本结构 +/// \~chinese 瀹氫箟鏁村悎鐨勮澶囨弿杩颁俊鎭紝杩欎簺淇℃伅鍙互鐢ㄤ簬鍔ㄦ佹瀯寤篣I +/// \note 璋冪敤@link #CameraGetCapability @endlink鑾峰彇鏈粨鏋 /// \~english Define integrated device description information that can be used to dynamically build UI /// \note call @link #CameraGetCapability @endlink to get this structure typedef struct { - tSdkTrigger *pTriggerDesc; ///< \~chinese 触发模式 \~english trigger mode - INT iTriggerDesc; ///< \~chinese 触发模式的个数,即pTriggerDesc数组的大小 \~english The number of trigger modes, that is, the size of the pTriggerDesc array + tSdkTrigger *pTriggerDesc; ///< \~chinese 瑙﹀彂妯″紡 \~english trigger mode + INT iTriggerDesc; ///< \~chinese 瑙﹀彂妯″紡鐨勪釜鏁帮紝鍗硃TriggerDesc鏁扮粍鐨勫ぇ灏 \~english The number of trigger modes, that is, the size of the pTriggerDesc array - tSdkImageResolution *pImageSizeDesc;///< \~chinese 预设分辨率 \~english Preset resolution - INT iImageSizeDesc; ///< \~chinese 预设分辨率的个数,即pImageSizeDesc数组的大小 \~english The number of preset resolutions, that is, the size of the pImageSizeDesc array + tSdkImageResolution *pImageSizeDesc;///< \~chinese 棰勮鍒嗚鲸鐜 \~english Preset resolution + INT iImageSizeDesc; ///< \~chinese 棰勮鍒嗚鲸鐜囩殑涓暟锛屽嵆pImageSizeDesc鏁扮粍鐨勫ぇ灏 \~english The number of preset resolutions, that is, the size of the pImageSizeDesc array - tSdkColorTemperatureDes *pClrTempDesc;///< \~chinese 预设色温,用于白平衡 \~english Preset color temperature for white balance - INT iClrTempDesc; ///< \~chinese 预设色温个数 \~english The number of preset color temperatures + tSdkColorTemperatureDes *pClrTempDesc;///< \~chinese 棰勮鑹叉俯锛岀敤浜庣櫧骞宠  \~english Preset color temperature for white balance + INT iClrTempDesc; ///< \~chinese 棰勮鑹叉俯涓暟 \~english The number of preset color temperatures - tSdkMediaType *pMediaTypeDesc; ///< \~chinese 相机输出图像格式 \~english Camera output image format - INT iMediaTypdeDesc; ///< \~chinese 相机输出图像格式的种类个数,即pMediaTypeDesc数组的大小。 \~english The number of types of camera output image formats, that is, the size of the pMediaTypeDesc array. + tSdkMediaType *pMediaTypeDesc; ///< \~chinese 鐩告満杈撳嚭鍥惧儚鏍煎紡 \~english Camera output image format + INT iMediaTypdeDesc; ///< \~chinese 鐩告満杈撳嚭鍥惧儚鏍煎紡鐨勭绫讳釜鏁帮紝鍗硃MediaTypeDesc鏁扮粍鐨勫ぇ灏忋 \~english The number of types of camera output image formats, that is, the size of the pMediaTypeDesc array. - tSdkFrameSpeed *pFrameSpeedDesc; ///< \~chinese 可调节帧速类型,对应界面上普通 高速 和超级三种速度设置 \~english Adjustable frame rate type, normal high speed and super three speed settings on the corresponding interface - INT iFrameSpeedDesc; ///< \~chinese 可调节帧速类型的个数,即pFrameSpeedDesc数组的大小。 \~english The number of frame rate types that can be adjusted, that is, the size of the pFrameSpeedDesc array. + tSdkFrameSpeed *pFrameSpeedDesc; ///< \~chinese 鍙皟鑺傚抚閫熺被鍨嬶紝瀵瑰簲鐣岄潰涓婃櫘閫 楂橀 鍜岃秴绾т笁绉嶉熷害璁剧疆 \~english Adjustable frame rate type, normal high speed and super three speed settings on the corresponding interface + INT iFrameSpeedDesc; ///< \~chinese 鍙皟鑺傚抚閫熺被鍨嬬殑涓暟锛屽嵆pFrameSpeedDesc鏁扮粍鐨勫ぇ灏忋 \~english The number of frame rate types that can be adjusted, that is, the size of the pFrameSpeedDesc array. - tSdkPackLength *pPackLenDesc; ///< \~chinese 传输包长度,一般用于网络设备 \~english Transmission packet length, generally used for network equipment - INT iPackLenDesc; ///< \~chinese 可供选择的传输分包长度的个数,即pPackLenDesc数组的大小。 \~english The number of transmission packetization lengths available for selection, which is the size of the pPackLenDesc array. + tSdkPackLength *pPackLenDesc; ///< \~chinese 浼犺緭鍖呴暱搴︼紝涓鑸敤浜庣綉缁滆澶 \~english Transmission packet length, generally used for network equipment + INT iPackLenDesc; ///< \~chinese 鍙緵閫夋嫨鐨勪紶杈撳垎鍖呴暱搴︾殑涓暟锛屽嵆pPackLenDesc鏁扮粍鐨勫ぇ灏忋 \~english The number of transmission packetization lengths available for selection, which is the size of the pPackLenDesc array. - INT iOutputIoCounts; ///< \~chinese 可编程输出IO的个数 \~english Number of programmable output IOs - INT iInputIoCounts; ///< \~chinese 可编程输入IO的个数 \~english Number of programmable input IOs + INT iOutputIoCounts; ///< \~chinese 鍙紪绋嬭緭鍑篒O鐨勪釜鏁 \~english Number of programmable output IOs + INT iInputIoCounts; ///< \~chinese 鍙紪绋嬭緭鍏O鐨勪釜鏁 \~english Number of programmable input IOs - tSdkPresetLut *pPresetLutDesc; ///< \~chinese 相机预设的LUT表 \~english Camera preset LUT table - INT iPresetLut; ///< \~chinese 相机预设的LUT表的个数,即pPresetLutDesc数组的大小 \~english The number of LUT tables preset by the camera, that is, the size of the pPresetLutDesc array + tSdkPresetLut *pPresetLutDesc; ///< \~chinese 鐩告満棰勮鐨凩UT琛 \~english Camera preset LUT table + INT iPresetLut; ///< \~chinese 鐩告満棰勮鐨凩UT琛ㄧ殑涓暟锛屽嵆pPresetLutDesc鏁扮粍鐨勫ぇ灏 \~english The number of LUT tables preset by the camera, that is, the size of the pPresetLutDesc array - INT iUserDataMaxLen; ///< \~chinese 指示该相机中用于保存用户数据区的最大长度。为0表示无。 \~english Indicates the maximum length in the camera used to save the user data area. 0 means no. - BOOL bParamInDevice; ///< \~chinese 指示该设备是否支持从设备中读写参数组。1为支持,0不支持。 \~english Indicates whether the device supports reading and writing parameter groups from the device. 1 is supported, 0 is not supported. + INT iUserDataMaxLen; ///< \~chinese 鎸囩ず璇ョ浉鏈轰腑鐢ㄤ簬淇濆瓨鐢ㄦ埛鏁版嵁鍖虹殑鏈澶ч暱搴︺備负0琛ㄧず鏃犮 \~english Indicates the maximum length in the camera used to save the user data area. 0 means no. + BOOL bParamInDevice; ///< \~chinese 鎸囩ず璇ヨ澶囨槸鍚︽敮鎸佷粠璁惧涓鍐欏弬鏁扮粍銆1涓烘敮鎸侊紝0涓嶆敮鎸併 \~english Indicates whether the device supports reading and writing parameter groups from the device. 1 is supported, 0 is not supported. - tSdkAeAlgorithm *pAeAlmSwDesc; ///< \~chinese 软件自动曝光算法描述 \~english Software auto exposure algorithm description - int iAeAlmSwDesc; ///< \~chinese 软件自动曝光算法个数 \~english Software automatic exposure algorithm number + tSdkAeAlgorithm *pAeAlmSwDesc; ///< \~chinese 杞欢鑷姩鏇濆厜绠楁硶鎻忚堪 \~english Software auto exposure algorithm description + int iAeAlmSwDesc; ///< \~chinese 杞欢鑷姩鏇濆厜绠楁硶涓暟 \~english Software automatic exposure algorithm number - tSdkAeAlgorithm *pAeAlmHdDesc; ///< \~chinese 硬件自动曝光算法描述,为NULL表示不支持硬件自动曝光 \~english Hardware auto exposure algorithm description, NULL means hardware auto exposure is not supported - int iAeAlmHdDesc; ///< \~chinese 硬件自动曝光算法个数,为0表示不支持硬件自动曝光 \~english Number of hardware auto exposure algorithms, 0 means hardware auto exposure is not supported + tSdkAeAlgorithm *pAeAlmHdDesc; ///< \~chinese 纭欢鑷姩鏇濆厜绠楁硶鎻忚堪锛屼负NULL琛ㄧず涓嶆敮鎸佺‖浠惰嚜鍔ㄦ洕鍏 \~english Hardware auto exposure algorithm description, NULL means hardware auto exposure is not supported + int iAeAlmHdDesc; ///< \~chinese 纭欢鑷姩鏇濆厜绠楁硶涓暟锛屼负0琛ㄧず涓嶆敮鎸佺‖浠惰嚜鍔ㄦ洕鍏 \~english Number of hardware auto exposure algorithms, 0 means hardware auto exposure is not supported - tSdkBayerDecodeAlgorithm *pBayerDecAlmSwDesc; ///< \~chinese 软件Bayer转换为RGB数据的算法描述 \~english Algorithm Description of Software Bayer Conversion to RGB Data - int iBayerDecAlmSwDesc; ///< \~chinese 软件Bayer转换为RGB数据的算法个数 \~english The number of algorithms that Bayer converts to RGB data + tSdkBayerDecodeAlgorithm *pBayerDecAlmSwDesc; ///< \~chinese 杞欢Bayer杞崲涓篟GB鏁版嵁鐨勭畻娉曟弿杩 \~english Algorithm Description of Software Bayer Conversion to RGB Data + int iBayerDecAlmSwDesc; ///< \~chinese 杞欢Bayer杞崲涓篟GB鏁版嵁鐨勭畻娉曚釜鏁 \~english The number of algorithms that Bayer converts to RGB data - tSdkBayerDecodeAlgorithm *pBayerDecAlmHdDesc; ///< \~chinese 硬件Bayer转换为RGB数据的算法描述,为NULL表示不支持 \~english Hardware Bayer converts to RGB data algorithm description, is not supported for NULL representation - int iBayerDecAlmHdDesc; ///< \~chinese 硬件Bayer转换为RGB数据的算法个数,为0表示不支持 \~english The number of algorithms that hardware Bayer converts to RGB data, 0 means not supported + tSdkBayerDecodeAlgorithm *pBayerDecAlmHdDesc; ///< \~chinese 纭欢Bayer杞崲涓篟GB鏁版嵁鐨勭畻娉曟弿杩帮紝涓篘ULL琛ㄧず涓嶆敮鎸 \~english Hardware Bayer converts to RGB data algorithm description, is not supported for NULL representation + int iBayerDecAlmHdDesc; ///< \~chinese 纭欢Bayer杞崲涓篟GB鏁版嵁鐨勭畻娉曚釜鏁帮紝涓0琛ㄧず涓嶆敮鎸 \~english The number of algorithms that hardware Bayer converts to RGB data, 0 means not supported - /* 图像参数的调节范围定义,用于动态构建UI*/ - tSdkExpose sExposeDesc; ///< \~chinese 曝光的范围值 \~english Exposure range value - tSdkResolutionRange sResolutionRange; ///< \~chinese 分辨率范围描述 \~english Resolution range description - tRgbGainRange sRgbGainRange; ///< \~chinese 图像数字增益范围描述 \~english Image digital gain range description - tSaturationRange sSaturationRange; ///< \~chinese 饱和度范围描述 \~english Saturation range description - tGammaRange sGammaRange; ///< \~chinese 伽马范围描述 \~english Gamma range description - tContrastRange sContrastRange; ///< \~chinese 对比度范围描述 \~english Contrast range description - tSharpnessRange sSharpnessRange; ///< \~chinese 锐化范围描述 \~english Sharpening range description - tSdkIspCapacity sIspCapacity; ///< \~chinese ISP能力描述 \~english ISP capability description + /* 鍥惧儚鍙傛暟鐨勮皟鑺傝寖鍥村畾涔,鐢ㄤ簬鍔ㄦ佹瀯寤篣I*/ + tSdkExpose sExposeDesc; ///< \~chinese 鏇濆厜鐨勮寖鍥村 \~english Exposure range value + tSdkResolutionRange sResolutionRange; ///< \~chinese 鍒嗚鲸鐜囪寖鍥存弿杩 \~english Resolution range description + tRgbGainRange sRgbGainRange; ///< \~chinese 鍥惧儚鏁板瓧澧炵泭鑼冨洿鎻忚堪 \~english Image digital gain range description + tSaturationRange sSaturationRange; ///< \~chinese 楗卞拰搴﹁寖鍥存弿杩 \~english Saturation range description + tGammaRange sGammaRange; ///< \~chinese 浼介┈鑼冨洿鎻忚堪 \~english Gamma range description + tContrastRange sContrastRange; ///< \~chinese 瀵规瘮搴﹁寖鍥存弿杩 \~english Contrast range description + tSharpnessRange sSharpnessRange; ///< \~chinese 閿愬寲鑼冨洿鎻忚堪 \~english Sharpening range description + tSdkIspCapacity sIspCapacity; ///< \~chinese ISP鑳藉姏鎻忚堪 \~english ISP capability description } tSdkCameraCapbility; -/// \~chinese 图像帧头信息 +/// \~chinese 鍥惧儚甯уご淇℃伅 /// \~english Image frame header information typedef struct { - UINT uiMediaType; ///< \~chinese 图像格式 \~english Image Format - UINT uBytes; ///< \~chinese 图像数据字节数 \~english Total bytes - INT iWidth; ///< \~chinese 图像的宽度,调用图像处理函数后,该变量可能被动态修改,来指示处理后的图像尺寸 \~english The width of the image, after calling the image processing function, the variable may be dynamically modified to indicate the image size after processing - INT iHeight; ///< \~chinese 图像的高度,调用图像处理函数后,该变量可能被动态修改,来指示处理后的图像尺寸 \~english The height of the image, after calling the image processing function, the variable may be dynamically modified to indicate the image size after processing - INT iWidthZoomSw; ///< \~chinese 软件缩放的宽度,不需要进行软件裁剪的图像,此变量设置为0. \~english The width of the software zoom, which does not require software cropping. This variable is set to 0. - INT iHeightZoomSw; ///< \~chinese 软件缩放的高度,不需要进行软件裁剪的图像,此变量设置为0. \~english Software zoom height, no software cropped image is required. This variable is set to 0. - BOOL bIsTrigger; ///< \~chinese 指示是否为触发帧 \~english is trigger - UINT uiTimeStamp; ///< \~chinese 该帧的采集时间,单位0.1毫秒 \~english The frame acquisition time, in units of 0.1 milliseconds - UINT uiExpTime; ///< \~chinese 当前图像的曝光值,单位为微秒us \~english Exposure of the current image in microseconds us - float fAnalogGain; ///< \~chinese 当前图像的模拟增益倍数 \~english The current image's analog gain multiplier - INT iGamma; ///< \~chinese 该帧图像的伽马设定值,仅当LUT模式为动态参数生成时有效,其余模式下为-1 \~english The gamma setting value of the frame image is valid only when the LUT mode is a dynamic parameter generation, and is -1 in other modes. - INT iContrast; ///< \~chinese 该帧图像的对比度设定值,仅当LUT模式为动态参数生成时有效,其余模式下为-1 \~english The contrast setting value of the frame image is only valid when the LUT mode is generated by the dynamic parameter, and is -1 in other modes. - INT iSaturation; ///< \~chinese 该帧图像的饱和度设定值,对于黑白相机无意义,为0 \~english The saturation value of the frame image, which is meaningless for a black and white camera, is 0 - float fRgain; ///< \~chinese 该帧图像处理的红色数字增益倍数,对于黑白相机无意义,为1 \~english The red digital gain multiple of this frame image processing is meaningless for a black and white camera and is 1 - float fGgain; ///< \~chinese 该帧图像处理的绿色数字增益倍数,对于黑白相机无意义,为1 \~english The green digital gain multiplier for this frame image processing, meaning no significance for black and white cameras, is 1 - float fBgain; ///< \~chinese 该帧图像处理的蓝色数字增益倍数,对于黑白相机无意义,为1 \~english The blue digital gain multiplier for this frame image processing, meaning no significance for black and white cameras, is 1 + UINT uiMediaType; ///< \~chinese 鍥惧儚鏍煎紡 \~english Image Format + UINT uBytes; ///< \~chinese 鍥惧儚鏁版嵁瀛楄妭鏁 \~english Total bytes + INT iWidth; ///< \~chinese 鍥惧儚鐨勫搴︼紝璋冪敤鍥惧儚澶勭悊鍑芥暟鍚庯紝璇ュ彉閲忓彲鑳借鍔ㄦ佷慨鏀癸紝鏉ユ寚绀哄鐞嗗悗鐨勫浘鍍忓昂瀵 \~english The width of the image, after calling the image processing function, the variable may be dynamically modified to indicate the image size after processing + INT iHeight; ///< \~chinese 鍥惧儚鐨勯珮搴︼紝璋冪敤鍥惧儚澶勭悊鍑芥暟鍚庯紝璇ュ彉閲忓彲鑳借鍔ㄦ佷慨鏀癸紝鏉ユ寚绀哄鐞嗗悗鐨勫浘鍍忓昂瀵 \~english The height of the image, after calling the image processing function, the variable may be dynamically modified to indicate the image size after processing + INT iWidthZoomSw; ///< \~chinese 杞欢缂╂斁鐨勫搴,涓嶉渶瑕佽繘琛岃蒋浠惰鍓殑鍥惧儚锛屾鍙橀噺璁剧疆涓0. \~english The width of the software zoom, which does not require software cropping. This variable is set to 0. + INT iHeightZoomSw; ///< \~chinese 杞欢缂╂斁鐨勯珮搴,涓嶉渶瑕佽繘琛岃蒋浠惰鍓殑鍥惧儚锛屾鍙橀噺璁剧疆涓0. \~english Software zoom height, no software cropped image is required. This variable is set to 0. + BOOL bIsTrigger; ///< \~chinese 鎸囩ず鏄惁涓鸿Е鍙戝抚 \~english is trigger + UINT uiTimeStamp; ///< \~chinese 璇ュ抚鐨勯噰闆嗘椂闂达紝鍗曚綅0.1姣 \~english The frame acquisition time, in units of 0.1 milliseconds + UINT uiExpTime; ///< \~chinese 褰撳墠鍥惧儚鐨勬洕鍏夊硷紝鍗曚綅涓哄井绉抲s \~english Exposure of the current image in microseconds us + float fAnalogGain; ///< \~chinese 褰撳墠鍥惧儚鐨勬ā鎷熷鐩婂嶆暟 \~english The current image's analog gain multiplier + INT iGamma; ///< \~chinese 璇ュ抚鍥惧儚鐨勪冀椹瀹氬硷紝浠呭綋LUT妯″紡涓哄姩鎬佸弬鏁扮敓鎴愭椂鏈夋晥锛屽叾浣欐ā寮忎笅涓-1 \~english The gamma setting value of the frame image is valid only when the LUT mode is a dynamic parameter generation, and is -1 in other modes. + INT iContrast; ///< \~chinese 璇ュ抚鍥惧儚鐨勫姣斿害璁惧畾鍊硷紝浠呭綋LUT妯″紡涓哄姩鎬佸弬鏁扮敓鎴愭椂鏈夋晥锛屽叾浣欐ā寮忎笅涓-1 \~english The contrast setting value of the frame image is only valid when the LUT mode is generated by the dynamic parameter, and is -1 in other modes. + INT iSaturation; ///< \~chinese 璇ュ抚鍥惧儚鐨勯ケ鍜屽害璁惧畾鍊硷紝瀵逛簬榛戠櫧鐩告満鏃犳剰涔夛紝涓0 \~english The saturation value of the frame image, which is meaningless for a black and white camera, is 0 + float fRgain; ///< \~chinese 璇ュ抚鍥惧儚澶勭悊鐨勭孩鑹叉暟瀛楀鐩婂嶆暟锛屽浜庨粦鐧界浉鏈烘棤鎰忎箟锛屼负1 \~english The red digital gain multiple of this frame image processing is meaningless for a black and white camera and is 1 + float fGgain; ///< \~chinese 璇ュ抚鍥惧儚澶勭悊鐨勭豢鑹叉暟瀛楀鐩婂嶆暟锛屽浜庨粦鐧界浉鏈烘棤鎰忎箟锛屼负1 \~english The green digital gain multiplier for this frame image processing, meaning no significance for black and white cameras, is 1 + float fBgain; ///< \~chinese 璇ュ抚鍥惧儚澶勭悊鐨勮摑鑹叉暟瀛楀鐩婂嶆暟锛屽浜庨粦鐧界浉鏈烘棤鎰忎箟锛屼负1 \~english The blue digital gain multiplier for this frame image processing, meaning no significance for black and white cameras, is 1 }tSdkFrameHead; -/// \~chinese 图像帧描述 +/// \~chinese 鍥惧儚甯ф弿杩 /// \~english Image frame description typedef struct sCameraFrame { - tSdkFrameHead head; ///< \~chinese 帧头 \~english Frame Head - BYTE * pBuffer; ///< \~chinese 数据区 \~english Image Data + tSdkFrameHead head; ///< \~chinese 甯уご \~english Frame Head + BYTE * pBuffer; ///< \~chinese 鏁版嵁鍖 \~english Image Data }tSdkFrame; /// @ingroup API_GRAB_CB -/// \~chinese 图像捕获的回调函数定义 +/// \~chinese 鍥惧儚鎹曡幏鐨勫洖璋冨嚱鏁板畾涔 /// \~english Callback function definition for image capture typedef void (WINAPI* CAMERA_SNAP_PROC)(CameraHandle hCamera, BYTE *pFrameBuffer, tSdkFrameHead* pFrameHead,PVOID pContext); /// @ingroup API_SETTINGS_PAGE -/// \~chinese 相机配置页面的消息回调函数定义 +/// \~chinese 鐩告満閰嶇疆椤甸潰鐨勬秷鎭洖璋冨嚱鏁板畾涔 /// \~english camera configuration page message callback function definition typedef void (WINAPI* CAMERA_PAGE_MSG_PROC)(CameraHandle hCamera,UINT MSG,UINT uParam,PVOID pContext); /// @ingroup API_RECONNECT -/// \~chinese 相机连接状态回调 -/// \param [in] hCamera 相机句柄 -/// \param [in] MSG 消息,0: 相机连接断开 1: 相机连接恢复 -/// \param [in] uParam 附加信息 -/// \param [in] pContext 用户数据 -/// \return 无 -/// \note USB相机uParam取值: -/// \note 未定义 -/// \note 网口相机uParam取值: -/// \note 当MSG=0时:未定义 -/// \note 当MSG=1时: -/// \note 0:上次掉线原因,网络通讯失败 -/// \note 1:上次掉线原因,相机掉电 +/// \~chinese 鐩告満杩炴帴鐘舵佸洖璋 +/// \param [in] hCamera 鐩告満鍙ユ焺 +/// \param [in] MSG 娑堟伅锛0: 鐩告満杩炴帴鏂紑 1: 鐩告満杩炴帴鎭㈠ +/// \param [in] uParam 闄勫姞淇℃伅 +/// \param [in] pContext 鐢ㄦ埛鏁版嵁 +/// \return 鏃 +/// \note USB鐩告満uParam鍙栧硷細 +/// \note 鏈畾涔 +/// \note 缃戝彛鐩告満uParam鍙栧硷細 +/// \note 褰揗SG=0鏃讹細鏈畾涔 +/// \note 褰揗SG=1鏃讹細 +/// \note 0锛氫笂娆℃帀绾垮師鍥狅紝缃戠粶閫氳澶辫触 +/// \note 1锛氫笂娆℃帀绾垮師鍥狅紝鐩告満鎺夌數 /// \~english Camera connection status callback /// \param [in] hCamera Camera handle /// \param [in] MSG message, 0: Camera disconnected 1: Camera connection restored @@ -752,24 +752,24 @@ typedef void (WINAPI* CAMERA_CONNECTION_STATUS_CALLBACK)(CameraHandle hCamera,UI ////////////////////////////////////////////////////////////////////////// -// Grabber 相关 +// Grabber 鐩稿叧 -/// \~chinese Grabber统计信息 +/// \~chinese Grabber缁熻淇℃伅 /// \~english Grabber statistics typedef struct { - int Width; ///< \~chinese 帧宽度 \~english Frame image width - int Height; ///< \~chinese 帧高度 \~english Frame image height - int Disp; ///< \~chinese 显示帧数量 \~english Display frame number - int Capture; ///< \~chinese 采集的有效帧的数量 \~english The number of valid frames collected - int Lost; ///< \~chinese 丢帧的数量 \~english The number of dropped frames - int Error; ///< \~chinese 错帧的数量 \~english The number of error frames - float DispFps; ///< \~chinese 显示帧率 \~english Display frame rate - float CapFps; ///< \~chinese 捕获帧率 \~english Capture frame rate + int Width; ///< \~chinese 甯у搴 \~english Frame image width + int Height; ///< \~chinese 甯ч珮搴 \~english Frame image height + int Disp; ///< \~chinese 鏄剧ず甯ф暟閲 \~english Display frame number + int Capture; ///< \~chinese 閲囬泦鐨勬湁鏁堝抚鐨勬暟閲 \~english The number of valid frames collected + int Lost; ///< \~chinese 涓㈠抚鐨勬暟閲 \~english The number of dropped frames + int Error; ///< \~chinese 閿欏抚鐨勬暟閲 \~english The number of error frames + float DispFps; ///< \~chinese 鏄剧ず甯х巼 \~english Display frame rate + float CapFps; ///< \~chinese 鎹曡幏甯х巼 \~english Capture frame rate }tSdkGrabberStat; /// @ingroup GRABBER_CB -/// \~chinese 图像捕获的回调函数定义 +/// \~chinese 鍥惧儚鎹曡幏鐨勫洖璋冨嚱鏁板畾涔 /// \~english Callback function definition for image capture typedef void (__stdcall *pfnCameraGrabberFrameCallback)( void* Grabber, @@ -778,18 +778,18 @@ typedef void (__stdcall *pfnCameraGrabberFrameCallback)( void* Context); /// @ingroup GRABBER_CB -/// \~chinese 帧监听函数定义 +/// \~chinese 甯х洃鍚嚱鏁板畾涔 /// \param [in] Grabber -/// \param [in] Phase 图像处理阶段 -/// \param [in] pFrameBuffer 帧数据 -/// \param [in] pFrameHead 帧头 -/// \param [in] Context 用户数据 -/// \return 0:Grabber将会丢弃此帧并结束针对此帧的所有后续处理阶段 1:继续下一阶段处理 -/// \note 每当Grabber捕获到一帧图像时,会分3个阶段来依次调用FrameListener -/// \note 阶段0: RAW数据处理,pFrameBuffer=Raw数据 -/// \note 阶段1: 截图前处理,pFrameBuffer=RGB数据 -/// \note 阶段2: 显示前处理,pFrameBuffer=RGB数据 -/// \note 特别的,当相机掉线后此回调也会被调用,此时Phase=-1,pFrameBuffer=NULL,pFrameHead=NULL。 +/// \param [in] Phase 鍥惧儚澶勭悊闃舵 +/// \param [in] pFrameBuffer 甯ф暟鎹 +/// \param [in] pFrameHead 甯уご +/// \param [in] Context 鐢ㄦ埛鏁版嵁 +/// \return 0:Grabber灏嗕細涓㈠純姝ゅ抚骞剁粨鏉熼拡瀵规甯х殑鎵鏈夊悗缁鐞嗛樁娈 1:缁х画涓嬩竴闃舵澶勭悊 +/// \note 姣忓綋Grabber鎹曡幏鍒颁竴甯у浘鍍忔椂锛屼細鍒3涓樁娈垫潵渚濇璋冪敤FrameListener +/// \note 闃舵0: RAW鏁版嵁澶勭悊锛宲FrameBuffer=Raw鏁版嵁 +/// \note 闃舵1: 鎴浘鍓嶅鐞嗭紝pFrameBuffer=RGB鏁版嵁 +/// \note 闃舵2: 鏄剧ず鍓嶅鐞嗭紝pFrameBuffer=RGB鏁版嵁 +/// \note 鐗瑰埆鐨勶紝褰撶浉鏈烘帀绾垮悗姝ゅ洖璋冧篃浼氳璋冪敤锛屾鏃禤hase=-1锛宲FrameBuffer=NULL,pFrameHead=NULL銆 /// \~english Frame listening function definition /// \param [in] Grabber /// \param [in] Phase image processing phase @@ -810,13 +810,13 @@ typedef int (__stdcall *pfnCameraGrabberFrameListener)( void* Context); /// @ingroup GRABBER_SNAPSHOT -/// \~chinese 异步抓图的回调函数定义 -/// \warning Image需要调用 @link CameraImage_Destroy @endlink 释放 +/// \~chinese 寮傛鎶撳浘鐨勫洖璋冨嚱鏁板畾涔 +/// \warning Image闇瑕佽皟鐢 @link CameraImage_Destroy @endlink 閲婃斁 /// \~english Asynchronous snapshot callback function definition /// \warning Image needs to call @link CameraImage_Destroy @endlink to release typedef void (__stdcall *pfnCameraGrabberSaveImageComplete)( void* Grabber, - void* Image, // 需要调用CameraImage_Destroy释放 + void* Image, // 闇瑕佽皟鐢–ameraImage_Destroy閲婃斁 CameraSdkStatus Status, void* Context ); @@ -825,7 +825,7 @@ typedef void (__stdcall *pfnCameraGrabberSaveImageComplete)( /// @ingroup MV_MACRO_TYPE /// @{ //----------------------------IMAGE FORMAT DEFINE------------------------------------ -//----------------------------图像格式定义------------------------------------------- +//----------------------------鍥惧儚鏍煎紡瀹氫箟------------------------------------------- #define CAMERA_MEDIA_TYPE_MONO 0x01000000 #define CAMERA_MEDIA_TYPE_RGB 0x02000000 #define CAMERA_MEDIA_TYPE_COLOR 0x02000000 diff --git a/others/include/config/setconfig.h b/others/include/config/setconfig.h index 496f7cd..ce24c39 100644 --- a/others/include/config/setconfig.h +++ b/others/include/config/setconfig.h @@ -4,6 +4,7 @@ #ifndef _SETCONFIG_H_ #define _SETCONFIG_H_ +#define WITH_CONFIG #ifdef WITH_CONFIG #include diff --git a/others/src/serial.cpp b/others/src/serial.cpp index 6abfc75..d2b599f 100644 --- a/others/src/serial.cpp +++ b/others/src/serial.cpp @@ -181,7 +181,7 @@ bool Serial::ReadData(unsigned char *buffer, unsigned int length) { using namespace std; string get_uart_dev_name() { - FILE *ls = popen("ls /dev/ttyUSB* --color=never", "r"); + FILE *ls = popen("ls /dev/ttyCH341USB* --color=never", "r"); char name[20] = {0}; fscanf(ls, "%s", name); return name; diff --git a/xmake.lua b/xmake.lua index a636b13..71a6679 100644 --- a/xmake.lua +++ b/xmake.lua @@ -22,25 +22,15 @@ end -- 娣诲姞渚濊禆 add_requires("eigen", {system = false}) -add_requires("pthread") - ---- OpenCV 4.6.0 閰嶇疆锛堝惎鐢 ffmpeg 鍜 contrib锛 -add_requires("opencv", { +add_requires("pthread", {system = true}) +add_requires("ffmpeg", { system = false, configs = { - ffmpeg = false, - eigen = true, - png = true, - jpeg = true, - webp = false, - tiff = false, - quirc = false, - opengl = false, - protobuf = false, - bundled = true, - gtk = true + iconv = true } }) +add_requires("glib") +add_requires("gdk-pixbuf", {system = false}) -- 鐩爣閰嶇疆 target("run") @@ -66,12 +56,14 @@ target("run") add_includedirs("armor/include/armor_finder") add_includedirs("armor/include/armor_finder/classifier") add_includedirs("armor/include/show_images") + add_includedirs("/usr/local/include/opencv4") -- 娣诲姞渚濊禆鍖 - add_packages("pthread", "eigen", "opencv") + add_packages("pthread", "eigen", "opencv", "ffmpeg") -- 娣诲姞閾炬帴鐩綍 add_linkdirs("others") + add_links("opencv") -- 鏍规嵁骞冲彴閾炬帴鐩告満 SDK if is_plat("linux") then