CameraDefine.H 62 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021
  1. #pragma once
  2. #ifndef _CAMERA_DEFINE_H_
  3. #define _CAMERA_DEFINE_H_
  4. #include "CameraStatus.h"
  5. #define MAX_CROSS_LINE 9
  6. /// @ingroup MV_TYPEDEF
  7. /// \~chinese 相机的句柄类型定义
  8. /// \~english Camera handle type definition
  9. typedef int CameraHandle;
  10. /// @ingroup MV_ENUM_TYPE
  11. /// \~chinese 图像查表变换的方式
  12. /// \~english Image lookup table transformation
  13. typedef enum
  14. {
  15. LUTMODE_PARAM_GEN=0, ///< \~chinese 通过调节参数动态生成LUT表。 \~english Dynamically generate LUT tables by adjusting parameters.
  16. LUTMODE_PRESET=1, ///< \~chinese 使用预设的LUT表 \~english Use a preset LUT table
  17. LUTMODE_USER_DEF=2 ///< \~chinese 使用用户自定义的LUT表 \~english Use a user-defined LUT table
  18. }emSdkLutMode;
  19. /// @ingroup MV_ENUM_TYPE
  20. /// \~chinese 相机的视频流控制
  21. /// \~english Camera video flow control
  22. typedef enum
  23. {
  24. /// \~chinese 正常预览,捕获到图像就显示。(如果相机处于触发模式,则会等待触发帧的到来)
  25. /// \~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)
  26. RUNMODE_PLAY=0,
  27. RUNMODE_PAUSE=1, ///< \~chinese 暂停,会暂停相机的图像输出,同时也不会去捕获图像 \~english Pause, will pause the camera's image output, and will not capture the image.
  28. RUNMODE_STOP=2 ///< \~chinese 停止相机工作。反初始化后,相机就处于停止模式 \~english Stop the camera. Camera is in stop mode after deinitialization.
  29. }emSdkRunMode;
  30. /// @ingroup MV_ENUM_TYPE
  31. /// \~chinese SDK内部显示接口的显示方式
  32. /// \~english How to display the internal display interface of the SDK
  33. typedef enum
  34. {
  35. DISPLAYMODE_SCALE=0, ///< \~chinese 缩放显示模式,缩放到显示控件的尺寸 \~english Zoom the display mode, zoom to the size of the display control
  36. 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
  37. DISPLAYMODE_2X=2, ///< \~chinese 放大2X \~english Zoom in 2X
  38. DISPLAYMODE_4X=3, ///< \~chinese 放大4X \~english Zoom in 4X
  39. DISPLAYMODE_8X=4, ///< \~chinese 放大8X \~english Zoom in 8X
  40. DISPLAYMODE_16X=5, ///< \~chinese 放大16X \~english Zoom in 16X
  41. DISPLAYMODE_SCALE_FIT=6 ///< \~chinese 拉伸缩放,填满显示区域 \~english Stretch zoom to fill the display area
  42. }emSdkDisplayMode;
  43. /// @ingroup MV_ENUM_TYPE
  44. /// \~chinese 录像状态
  45. /// \~english Recording status
  46. typedef enum
  47. {
  48. RECORD_STOP=0, ///< \~chinese 停止 \~english Stop
  49. RECORD_START=1, ///< \~chinese 录像中 \~english Start
  50. RECORD_PAUSE=2 ///< \~chinese 暂停 \~english Pause
  51. }emSdkRecordMode;
  52. /// @ingroup MV_ENUM_TYPE
  53. /// \~chinese 图像的镜像操作
  54. /// \~english Image mirroring operation
  55. typedef enum
  56. {
  57. MIRROR_DIRECTION_HORIZONTAL=0, ///< \~chinese 水平镜像 \~english Horizontal mirroring
  58. MIRROR_DIRECTION_VERTICAL=1 ///< \~chinese 垂直镜像 \~english Vertical mirroring
  59. }emSdkMirrorDirection;
  60. /// @ingroup MV_ENUM_TYPE
  61. /// \~chinese 图像的旋转操作
  62. /// \~english Rotation of the image
  63. typedef enum
  64. {
  65. ROTATE_DIRECTION_0=0, ///< \~chinese 不旋转 \~english Do not rotate
  66. ROTATE_DIRECTION_90=1, ///< \~chinese 逆时针90度 \~english Counterclockwise 90 degrees
  67. ROTATE_DIRECTION_180=2, ///< \~chinese 逆时针180度 \~english Counterclockwise 180 degrees
  68. ROTATE_DIRECTION_270=3, ///< \~chinese 逆时针270度 \~english Counterclockwise 270 degrees
  69. }emSdkRotateDirection;
  70. /// @ingroup MV_ENUM_TYPE
  71. /// \~chinese 相机视频的帧率
  72. /// \~english Camera video frame rate
  73. typedef enum
  74. {
  75. FRAME_SPEED_LOW=0, ///< \~chinese 低速模式 \~english Low Speed
  76. FRAME_SPEED_NORMAL=1, ///< \~chinese 普通模式 \~english Normal Speed
  77. FRAME_SPEED_HIGH=2, ///< \~chinese 高速模式(需要较高的传输带宽,多设备共享传输带宽时会对帧率的稳定性有影响) \~english High Speed
  78. FRAME_SPEED_SUPER=3 ///< \~chinese 超高速模式(需要较高的传输带宽,多设备共享传输带宽时会对帧率的稳定性有影响) \~english Super Speed
  79. }emSdkFrameSpeed;
  80. /// @ingroup MV_ENUM_TYPE
  81. /// \~chinese 保存文件的格式类型
  82. /// \~english Save file format type
  83. typedef enum
  84. {
  85. FILE_JPG = 1, ///< \~chinese JPG \~english JPG
  86. FILE_BMP = 2, ///< \~chinese BMP 24bit \~english BMP 24bit
  87. FILE_RAW = 4, ///< \~chinese RAW \~english RAW
  88. FILE_PNG = 8, ///< \~chinese PNG 24bit \~english PNG 24bit
  89. FILE_BMP_8BIT = 16, ///< \~chinese BMP 8bit \~english BMP 8bit
  90. FILE_PNG_8BIT = 32, ///< \~chinese PNG 8bit \~english PNG 8bit
  91. FILE_RAW_16BIT = 64 ///< \~chinese RAW 16bit \~english RAW 16bit
  92. }emSdkFileType;
  93. /// @ingroup MV_ENUM_TYPE
  94. /// \~chinese 相机中的图像传感器的工作模式
  95. /// \~english Image Sensor Operation Mode in Camera
  96. typedef enum
  97. {
  98. /// \~chinese 连续采集模式
  99. /// \~english Continuous acquisition mode
  100. CONTINUATION=0,
  101. /// \~chinese 软件触发模式,由软件发送指令后,传感器开始采集指定帧数的图像,采集完成后,停止输出
  102. /// \~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.
  103. SOFT_TRIGGER=1,
  104. /// \~chinese 硬件触发模式,当接收到外部信号,传感器开始采集指定帧数的图像,采集完成后,停止输出
  105. /// \~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.
  106. EXTERNAL_TRIGGER=2,
  107. /// \~chinese 编码器触发模式(仅用于线阵相机)
  108. /// \~english Encoder trigger mode (only for line scan cameras)
  109. ROTARYENC_TRIGGER=3,
  110. /// \~chinese 编码器条件触发模式(仅用于线阵相机)
  111. /// \~english Encoder condition trigger mode (only for line scan cameras)
  112. ROTARYENC_COND_TRIGGER=4,
  113. } emSdkSnapMode;
  114. /// @ingroup MV_ENUM_TYPE
  115. /// \~chinese 自动曝光时抗频闪的频率
  116. /// \~english Anti-strobe frequency at auto exposure
  117. typedef enum
  118. {
  119. /// \~chinese 50HZ,一般的灯光都是50HZ
  120. /// \~english 50HZ, the general lighting is 50HZ
  121. LIGHT_FREQUENCY_50HZ=0,
  122. /// \~chinese 60HZ,主要是指显示器的
  123. /// \~english 60HZ, mainly refers to the monitor
  124. LIGHT_FREQUENCY_60HZ=1
  125. }emSdkLightFrequency;
  126. /// @ingroup MV_ENUM_TYPE
  127. /// \~chinese 相机的配置参数,分为A,B,C,D 4组进行保存。
  128. /// \~english The camera configuration parameters are divided into groups A, B, C, and D for preservation.
  129. typedef enum
  130. {
  131. PARAMETER_TEAM_DEFAULT = 0xff, ///< \~chinese 默认参数 \~english Default parameters
  132. PARAMETER_TEAM_A = 0, ///< \~chinese 参数A \~english parametersA
  133. PARAMETER_TEAM_B = 1, ///< \~chinese 参数B \~english parametersB
  134. PARAMETER_TEAM_C = 2, ///< \~chinese 参数C \~english parametersC
  135. PARAMETER_TEAM_D = 3 ///< \~chinese 参数D \~english parametersD
  136. }emSdkParameterTeam;
  137. /// @ingroup MV_ENUM_TYPE
  138. /// \~chinese
  139. /// \brief 相机参数加载模式
  140. /// \note 您可以根据自己的使用环境,灵活使用以上几种方式加载参数。例如,以
  141. /// \note MV-U300为例,您希望多台该型号的相机在您的 电脑上都共用4组参数,那么就
  142. /// \note 使用PARAM_MODE_BY_MODEL方式;如果您希望其中某一台或者某几台MV-U300能
  143. /// \note 使用自己参数文件而其余的MV-U300又要使用相同的参数文件,那么使用
  144. /// \note PARAM_MODE_BY_NAME方式;如果您希望每台MV-U300都使用不同的参数文件,那么
  145. /// \note 使用PARAM_MODE_BY_SN方式。
  146. /// \note 参数文件存在安装目录的 \\Camera\\Configs 目录下,以config为后缀名的文件。
  147. /// \~english
  148. /// \brief Camera parameter loading mode
  149. /// \note You can use the above several ways to load parameters according to your own environment. For example, with
  150. /// \note MV-U300 as an example, you want multiple cameras of this model to share 4 sets of parameters on your computer.
  151. /// \note Use the PARAM_MODE_BY_MODEL method; if you want one or more of the MV-U300s
  152. /// \note Use your own parameter file and the rest of the MV-U300 use the same parameter file again, then use
  153. /// \note PARAM_MODE_BY_NAME way; if you want each MV-U300 to use a different parameter file, then
  154. /// \note Use the PARAM_MODE_BY_SN method.
  155. /// \note The parameter file exists in the \\Camera\\Configs directory of the installation directory, with a config extension file.
  156. typedef enum
  157. {
  158. /// \~chinese 根据相机型号名从文件中加载参数,例如MV-U300
  159. /// \note 所有同型号的相机共用ABCD四组参数文件。修改一台相机的参数文件,会影响到整个同型号的相机参数加载。
  160. /// \~english Load parameters from a file based on the camera model name, such as the MV-U300
  161. /// \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.
  162. PARAM_MODE_BY_MODEL=0,
  163. /// \~chinese 根据设备昵称(tSdkCameraDevInfo.acFriendlyName)从文件中加载参数,例如MV-U300,该昵称可自定义
  164. /// \note 所有设备名相同的相机,共用ABCD四组参数文件。
  165. /// \note 默认情况下,当电脑上只接了某型号一台相机时,
  166. /// \note 设备名都是一样的,而您希望某一台相机能够加载
  167. /// \note 不同的参数文件,则可以通过修改其设备名的方式
  168. /// \note 来让其加载指定的参数文件。
  169. /// \~english Load parameters from a file based on device nickname (tSdkCameraDevInfo.acFriendlyName), such as MV-U300, which can be customized
  170. /// \note All cameras with the same device name share the four ABCD parameter files.
  171. /// \note By default, when only one model of a camera is connected to the computer,
  172. /// \note The device name is the same, and you want a camera to load
  173. /// \note different parameter files, you can modify the device name
  174. /// \note to have it load the specified parameter file.
  175. PARAM_MODE_BY_NAME=1,
  176. /// \~chinese 根据设备的唯一序列号从文件中加载参数,序列号在出厂时已经写入设备,每台相机拥有不同的序列号。
  177. /// \note 相机按照自己的唯一序列号来加载ABCD四组参数文件,
  178. /// \note 序列号在出厂时已经固化在相机内,每台相机的序列号
  179. /// \note 都不相同,通过这种方式,每台相机的参数文件都是独立的。
  180. /// \~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.
  181. /// \note The camera loads ABCD four sets of parameter files according to their unique serial number.
  182. /// \note The serial number has been fixed in the camera at the factory, the serial number of each camera
  183. /// \note is not the same. In this way, the parameter files for each camera are independent.
  184. PARAM_MODE_BY_SN=2,
  185. /// \~chinese 从设备的固态存储器中加载参数。不是所有的型号都支持从相机中读写参数组,由tSdkCameraCapbility.bParamInDevice决定
  186. /// \~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
  187. PARAM_MODE_IN_DEVICE=3
  188. }emSdkParameterMode;
  189. /// @ingroup MV_ENUM_TYPE
  190. /// \~chinese SDK生成的相机配置页面掩码值
  191. /// \~english SDK generated camera configuration page mask values
  192. typedef enum
  193. {
  194. PROP_SHEET_INDEX_EXPOSURE=0, ///< \~chinese 曝光设置 \~english Exposure Settings
  195. PROP_SHEET_INDEX_ISP_COLOR=1, ///< \~chinese 颜色矩阵设置 \~english Color Matrix Settings
  196. PROP_SHEET_INDEX_ISP_LUT=2, ///< \~chinese LUT设置 \~english LUT setting
  197. PROP_SHEET_INDEX_ISP_SHAPE=3, ///< \~chinese 变换设置 \~english transform settings
  198. PROP_SHEET_INDEX_VIDEO_FORMAT=4, ///< \~chinese 格式设置 \~english Formatting
  199. PROP_SHEET_INDEX_RESOLUTION=5, ///< \~chinese 分辨率设置 \~english resolution setting
  200. PROP_SHEET_INDEX_IO_CTRL=6, ///< \~chinese IO控制 \~english IO control
  201. PROP_SHEET_INDEX_TRIGGER_SET=7, ///< \~chinese 触发模式 \~english trigger setting
  202. PROP_SHEET_INDEX_OVERLAY=8, ///< \~chinese 十字线 \~english Crosshair
  203. PROP_SHEET_INDEX_DEVICE_INFO=9, ///< \~chinese 设备信息 \~english Device Information
  204. PROP_SHEET_INDEX_WDR=10, ///< \~chinese 宽动态 \~english Wide Dynamic
  205. PROP_SHEET_INDEX_MULTI_EXPOSURE=11, ///< \~chinese 多重曝光 \~english Multi exposure
  206. PROP_SHEET_INDEX_SPECIAL=12, ///< \~chinese 特殊设置 \~english Special settings
  207. PROP_SHEET_INDEX_GIGE=13, ///< \~chinese GIGE设置 \~english GIGE settings
  208. PROP_SHEET_INDEX_GF_SETTING_I = 14, ///< \~chinese GF系列红外相机设置I \~english GF Settings I
  209. PROP_SHEET_INDEX_GF_SETTING_II = 15, ///< \~chinese GF系列红外相机设置II \~english GF Settings II
  210. PROP_SHEET_INDEX_NEW_ISP_COLOR = 16, ///< \~chinese 白平衡设置 \~english WB Settings
  211. }emSdkPropSheetMask;
  212. /// @ingroup MV_ENUM_TYPE
  213. /// \~chinese SDK生成的相机配置页面的回调消息类型
  214. /// \~english SDK callback camera configuration page callback message type
  215. typedef enum
  216. {
  217. SHEET_MSG_LOAD_PARAM_DEFAULT=0, ///< \~chinese 参数被恢复成默认后,触发该消息 \~english After the parameter is restored to the default, the message is triggered
  218. SHEET_MSG_LOAD_PARAM_GROUP=1, ///< \~chinese 加载指定参数组,触发该消息 \~english Load the specified parameter group and trigger the message
  219. SHEET_MSG_LOAD_PARAM_FROMFILE=2, ///< \~chinese 从指定文件加载参数后,触发该消息 \~english Fires the message after loading parameters from the specified file
  220. SHEET_MSG_SAVE_PARAM_GROUP=3 ///< \~chinese 当前参数组被保存时,触发该消息 \~english Trigger this message when the current parameter group is saved
  221. }emSdkPropSheetMsg;
  222. /// @ingroup MV_ENUM_TYPE
  223. /// \~chinese 可视化选择参考窗口的类型
  224. /// \~english Visualize the type of reference window
  225. typedef enum
  226. {
  227. REF_WIN_AUTO_EXPOSURE=0, ///< \~chinese 自动曝光窗口 \~english Automatic exposure window
  228. REF_WIN_WHITE_BALANCE=1, ///< \~chinese 白平衡窗口 \~english White balance window
  229. }emSdkRefWinType;
  230. /// @ingroup MV_ENUM_TYPE
  231. /// \~chinese 可视化选择参考窗口的类型
  232. /// \~english Visualize the type of reference window
  233. typedef enum
  234. {
  235. RES_MODE_PREVIEW=0, ///< \~chinese 预览 \~english Preview
  236. RES_MODE_SNAPSHOT=1, ///< \~chinese 抓拍 \~english Snapshot
  237. }emSdkResolutionMode;
  238. /// @ingroup MV_ENUM_TYPE
  239. /// \~chinese 白平衡时色温模式
  240. /// \~english White balance color temperature mode
  241. typedef enum
  242. {
  243. CT_MODE_AUTO=0, ///< \~chinese 自动识别色温 \~english Automatically recognize color temperature
  244. CT_MODE_PRESET=1, ///< \~chinese 使用指定的预设色温 \~english Use the specified preset color temperature
  245. CT_MODE_USER_DEF=2 ///< \~chinese 自定义色温(增益和矩阵) \~english Custom color temperature (gain and matrix)
  246. }emSdkClrTmpMode;
  247. /// @ingroup MV_ENUM_TYPE
  248. /// \~chinese LUT的颜色通道
  249. /// \~english LUT color channel
  250. typedef enum
  251. {
  252. LUT_CHANNEL_ALL=0, ///< \~chinese R,B,G三通道同时调节 \~english R, B, G simultaneous adjustment of three channels
  253. LUT_CHANNEL_RED=1, ///< \~chinese 红色通道 \~english Red channel
  254. LUT_CHANNEL_GREEN=2, ///< \~chinese 绿色通道 \~english Green channel
  255. LUT_CHANNEL_BLUE=3, ///< \~chinese 蓝色通道 \~english Blue channel
  256. }emSdkLutChannel;
  257. /// @ingroup MV_ENUM_TYPE
  258. /// \~chinese ISP处理单元
  259. /// \~english ISP processing unit
  260. typedef enum
  261. {
  262. ISP_PROCESSSOR_PC=0, ///< \~chinese 使用PC的软件ISP模块 \~english Use software ISP module of PC
  263. ISP_PROCESSSOR_DEVICE=1 ///< \~chinese 使用相机自带的硬件ISP模块 \~english Use the camera's own hardware ISP module
  264. }emSdkIspProcessor;
  265. /// @ingroup MV_ENUM_TYPE
  266. /// \~chinese 闪光灯信号控制方式
  267. /// \~english Strobe signal control method
  268. typedef enum
  269. {
  270. 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).
  271. 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).
  272. STROBE_ALWAYS_HIGH=2, ///< \~chinese 始终为高,忽略STROBE信号的其他设置 \~english Always high, ignoring other settings of the STROBE signal
  273. STROBE_ALWAYS_LOW=3 ///< \~chinese 始终为低,忽略STROBE信号的其他设置 \~english Always low, ignoring other settings of the STROBE signal
  274. }emStrobeControl;
  275. /// @ingroup MV_ENUM_TYPE
  276. /// \~chinese 硬件外触发的信号种类
  277. /// \~english Signal types triggered by hardware
  278. typedef enum
  279. {
  280. EXT_TRIG_LEADING_EDGE=0, ///< \~chinese 上升沿触发,默认为该方式 \~english Rising edge trigger, default is this method
  281. EXT_TRIG_TRAILING_EDGE=1, ///< \~chinese 下降沿触发 \~english Falling edge trigger
  282. 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.
  283. EXT_TRIG_LOW_LEVEL=3, ///< \~chinese 低电平触发 \~english Low level trigger
  284. EXT_TRIG_DOUBLE_EDGE=4, ///< \~chinese 双边沿触发 \~english Bilateral trigger
  285. }emExtTrigSignal;
  286. /// @ingroup MV_ENUM_TYPE
  287. /// \~chinese 硬件外触发时的快门方式
  288. /// \~english Shutter mode when triggered by hardware
  289. typedef enum
  290. {
  291. EXT_TRIG_EXP_STANDARD=0, ///< \~chinese 标准方式,默认为该方式。 \~english Standard mode, the default is this mode.
  292. 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
  293. }emExtTrigShutterMode;
  294. /// @ingroup MV_ENUM_TYPE
  295. /// \~chinese 清晰度评估算法
  296. /// \~english Sharpness assessment algorithm
  297. typedef enum
  298. {
  299. EVALUATE_DEFINITION_DEVIATION=0, ///< \~chinese 方差法 \~english Variance method
  300. EVALUATE_DEFINITION_SMD=1, ///< \~chinese 相邻像素灰度方差法 \~english Adjacent Pixel Gray Difference Method
  301. EVALUATE_DEFINITION_GRADIENT=2, ///< \~chinese 梯度统计 \~english Gradient statistics
  302. EVALUATE_DEFINITION_SOBEL=3, ///< \~chinese Sobel \~english Sobel
  303. EVALUATE_DEFINITION_ROBERT=4, ///< \~chinese Robert \~english Robert
  304. EVALUATE_DEFINITION_LAPLACE=5, ///< \~chinese Laplace \~english Laplace
  305. EVALUATE_DEFINITION_ALG_MAX=6, ///< \~chinese 算法个数 \~english The number of algorithms
  306. }emEvaluateDefinitionAlgorith;
  307. /// @ingroup MV_ENUM_TYPE
  308. /// \~chinese 文字输出标志
  309. /// \~english Text output flag
  310. typedef enum
  311. {
  312. CAMERA_DT_VCENTER = 0x1, ///< \~chinese 垂直居中 \~english Vertically centered
  313. CAMERA_DT_BOTTOM = 0x2, ///< \~chinese 底部对齐 \~english Bottom alignment
  314. CAMERA_DT_HCENTER = 0x4, ///< \~chinese 水平居中 \~english Horizontally centered
  315. CAMERA_DT_RIGHT = 0x8, ///< \~chinese 右对齐 \~english Right alignment
  316. CAMERA_DT_SINGLELINE = 0x10, ///< \~chinese 单行显示 \~english Single-line display
  317. CAMERA_DT_ALPHA_BLEND = 0x20, ///< \~chinese Alpha混合 \~english Alpha blend
  318. CAMERA_DT_ANTI_ALIASING = 0x40, ///< \~chinese 抗锯齿 \~english Anti-aliasing
  319. }emCameraDrawTextFlags;
  320. /// @ingroup MV_ENUM_TYPE
  321. /// \~chinese GPIO模式
  322. /// \~english GPIO Mode
  323. typedef enum
  324. {
  325. IOMODE_TRIG_INPUT=0, ///< \~chinese 触发输入 \~english Trigger input
  326. IOMODE_STROBE_OUTPUT=1, ///< \~chinese 闪光灯输出 \~english Strobe output
  327. IOMODE_GP_INPUT=2, ///< \~chinese 通用型输入 \~english Universal input
  328. IOMODE_GP_OUTPUT=3, ///< \~chinese 通用型输出 \~english Universal output
  329. IOMODE_PWM_OUTPUT=4, ///< \~chinese PWM型输出 \~english PWM output
  330. IOMODE_ROTARYENC_INPUT=5, ///< \~chinese 编码器输入 \~english rotary input
  331. }emCameraGPIOMode;
  332. /// @ingroup MV_ENUM_TYPE
  333. /// \~chinese GPIO 格式
  334. /// \~english GPIO Format
  335. typedef enum
  336. {
  337. IOFORMAT_SINGLE=0, ///< \~chinese 单端 \~english single ended
  338. IOFORMAT_RS422=1, ///< \~chinese 差分RS422 \~english Differential RS422
  339. IOFORMAT_RS422_TERM=2, ///< \~chinese 差分RS422带终端电阻 \~english Differential RS422 and Termination Enable
  340. IOFORMAT_OCEP=3, ///< \~chinese 光耦 \~english opticalcoupler equipment
  341. }emCameraGPIOFormat;
  342. /// @ingroup MV_ENUM_TYPE
  343. /// \~chinese 取图优先级
  344. /// \~english Get Image priority
  345. typedef enum
  346. {
  347. CAMERA_GET_IMAGE_PRIORITY_OLDEST=0, ///< \~chinese 获取缓存中最旧的一帧 \~english Get the oldest frame in the cache
  348. CAMERA_GET_IMAGE_PRIORITY_NEWEST=1, ///< \~chinese 获取缓存中最新的一帧(比此帧旧的将全部丢弃) \~english Get the latest frame in the cache (older than this frame will be discarded)
  349. /// \~chinese 丢弃缓存中的所有帧,并且如果此刻相机正在曝光或传输将会被立即打断,等待接收下一帧
  350. /// \note 某些型号的相机不支持此功能,对于不支持此功能的相机这个标志相当于@link #CAMERA_GET_IMAGE_PRIORITY_OLDEST @endlink
  351. /// \~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
  352. /// \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
  353. CAMERA_GET_IMAGE_PRIORITY_NEXT=2,
  354. }emCameraGetImagePriority;
  355. /// @ingroup MV_ENUM_TYPE
  356. /// \~chinese 软触发功能标志
  357. /// \~english Soft trigger function flag
  358. typedef enum
  359. {
  360. CAMERA_ST_CLEAR_BUFFER_BEFORE = 0x1, ///< \~chinese 在软触发之前先清空相机已缓存的帧 \~english Empty camera-cached frames before soft triggering
  361. }emCameraSoftTriggerExFlags;
  362. /// \~chinese 相机的设备信息
  363. /// \~english Camera device information
  364. typedef struct
  365. {
  366. char acProductSeries[32]; ///< \~chinese 产品系列 \~english Product Series
  367. char acProductName[32]; ///< \~chinese 产品名称 \~english product name
  368. /// \~chinese 产品昵称,用户可自定义改昵称,保存在相机内,用于区分多个相机同时使用,可以用@link #CameraSetFriendlyName @endlink接口改变该昵称,设备重启后生效。
  369. /// \~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.
  370. char acFriendlyName[32];
  371. char acLinkName[32]; ///< \~chinese 内核符号连接名,内部使用 \~english Kernel symbolic connection name, internal use
  372. char acDriverVersion[32]; ///< \~chinese 驱动版本 \~english Driver version
  373. char acSensorType[32]; ///< \~chinese sensor类型 \~english Sensor type
  374. char acPortType[32]; ///< \~chinese 接口类型 \~english Interface Type
  375. char acSn[32]; ///< \~chinese 产品唯一序列号 \~english Product unique serial number
  376. UINT uInstance; ///< \~chinese 该型号相机在该电脑上的实例索引号,用于区分同型号多相机 \~english The example index number of this model camera on this computer, used to distinguish the same model multiple cameras
  377. } tSdkCameraDevInfo;
  378. /// @ingroup MV_MACRO_TYPE
  379. /// @{
  380. #define EXT_TRIG_MASK_GRR_SHUTTER 1 ///< \~chinese 快门支持GRR模式 \~english Shutter supports GRR mode
  381. #define EXT_TRIG_MASK_LEVEL_MODE 2 ///< \~chinese 支持电平触发 \~english Support level trigger
  382. #define EXT_TRIG_MASK_DOUBLE_EDGE 4 ///< \~chinese 支持双边沿触发 \~english Supports bilateral triggering
  383. #define EXT_TRIG_MASK_BUFFERED_DELAY 8 ///< \~chinese 支持信号后延 \~english Supports signal delayed activation
  384. //tSdkResolutionRange结构体中SKIP、 BIN、RESAMPLE模式的掩码值
  385. #define MASK_2X2_HD (1<<0) //硬件SKIP、BIN、重采样 2X2
  386. #define MASK_3X3_HD (1<<1)
  387. #define MASK_4X4_HD (1<<2)
  388. #define MASK_5X5_HD (1<<3)
  389. #define MASK_6X6_HD (1<<4)
  390. #define MASK_7X7_HD (1<<5)
  391. #define MASK_8X8_HD (1<<6)
  392. #define MASK_9X9_HD (1<<7)
  393. #define MASK_10X10_HD (1<<8)
  394. #define MASK_11X11_HD (1<<9)
  395. #define MASK_12X12_HD (1<<10)
  396. #define MASK_13X13_HD (1<<11)
  397. #define MASK_14X14_HD (1<<12)
  398. #define MASK_15X15_HD (1<<13)
  399. #define MASK_16X16_HD (1<<14)
  400. #define MASK_17X17_HD (1<<15)
  401. #define MASK_2X2_SW (1<<16) //软件SKIP、BIN、重采样 2X2
  402. #define MASK_3X3_SW (1<<17)
  403. #define MASK_4X4_SW (1<<18)
  404. #define MASK_5X5_SW (1<<19)
  405. #define MASK_6X6_SW (1<<20)
  406. #define MASK_7X7_SW (1<<21)
  407. #define MASK_8X8_SW (1<<22)
  408. #define MASK_9X9_SW (1<<23)
  409. #define MASK_10X10_SW (1<<24)
  410. #define MASK_11X11_SW (1<<25)
  411. #define MASK_12X12_SW (1<<26)
  412. #define MASK_13X13_SW (1<<27)
  413. #define MASK_14X14_SW (1<<28)
  414. #define MASK_15X15_SW (1<<29)
  415. #define MASK_16X16_SW (1<<30)
  416. #define MASK_17X17_SW (1<<31)
  417. /// @}
  418. /// \~chinese 相机的分辨率设定范围,可用于构件UI
  419. /// \~english Camera resolution setting range, can be used for component UI
  420. typedef struct
  421. {
  422. INT iHeightMax; ///< \~chinese 图像最大高度 \~english Maximum image height
  423. INT iHeightMin; ///< \~chinese 图像最小高度 \~english Image minimum height
  424. INT iWidthMax; ///< \~chinese 图像最大宽度 \~english The maximum width of the image
  425. INT iWidthMin; ///< \~chinese 图像最小宽度 \~english The minimum width of the image
  426. 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....
  427. 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....
  428. 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....
  429. UINT uResampleMask; ///< \~chinese 硬件重采样的掩码 \~english Hardware resampling mask
  430. } tSdkResolutionRange;
  431. /// \~chinese 相机的分辨率描述
  432. /// \~english Camera resolution description
  433. typedef struct
  434. {
  435. 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)
  436. 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
  437. UINT uBinSumMode; ///< \~chinese BIN(求和)的模式,范围不能超过tSdkResolutionRange.uBinSumModeMask \~english The BIN (sum) mode cannot exceed the tSdkResolutionRange.uBinSumModeMask
  438. UINT uBinAverageMode; ///< \~chinese BIN(求均值)的模式,范围不能超过tSdkResolutionRange.uBinAverageModeMask \~english BIN (average) mode, the range cannot exceed tSdkResolutionRange.uBinAverageModeMask
  439. 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
  440. UINT uResampleMask; ///< \~chinese 硬件重采样的掩码 \~english Hardware resampling mask
  441. 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
  442. 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
  443. INT iWidthFOV; ///< \~chinese 采集视场的宽度 \~english The width of the field of view
  444. INT iHeightFOV; ///< \~chinese 采集视场的高度 \~english The height of the field of view
  445. INT iWidth; ///< \~chinese 相机最终输出的图像的宽度 \~english The width of the final output image of the camera
  446. INT iHeight; ///< \~chinese 相机最终输出的图像的高度 \~english The height of the final output image of the camera
  447. INT iWidthZoomHd; ///< \~chinese 硬件缩放的宽度,不需要进行此操作的分辨率,此变量设置为0. \~english The width of the hardware zoom, resolution that does not require this operation, this variable is set to 0.
  448. INT iHeightZoomHd; ///< \~chinese 硬件缩放的高度,不需要进行此操作的分辨率,此变量设置为0. \~english The height of the hardware zoom, resolution that does not require this operation, this variable is set to 0.
  449. 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.
  450. 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.
  451. } tSdkImageResolution;
  452. /// \~chinese 相机白平衡色温模式描述信息
  453. /// \~english Camera white balance color temperature mode description information
  454. typedef struct
  455. {
  456. INT iIndex; ///< \~chinese 模式索引号 \~english Mode index number
  457. char acDescription[32]; ///< \~chinese 描述信息 \~english Description
  458. } tSdkColorTemperatureDes;
  459. /// \~chinese 相机帧率描述信息
  460. /// \~english Camera frame rate description information
  461. typedef struct
  462. {
  463. 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
  464. char acDescription[32]; ///< \~chinese 描述信息 \~english Description
  465. } tSdkFrameSpeed;
  466. /// \~chinese 相机曝光功能范围定义
  467. /// \see tSdkCameraCapbility.sExposeDesc
  468. /// \~english Camera exposure function scope definition
  469. /// \see tSdkCameraCapbility.sExposeDesc
  470. typedef struct
  471. {
  472. UINT uiTargetMin; ///< \~chinese 自动曝光亮度目标最小值 \~english Auto exposure brightness target minimum
  473. UINT uiTargetMax; ///< \~chinese 自动曝光亮度目标最大值 \~english Auto exposure brightness target maximum
  474. UINT uiAnalogGainMin; ///< \~chinese 模拟增益的最小值,单位为fAnalogGainStep中定义 \~english The minimum value of the analog gain in fAnalog defined in GainStep
  475. UINT uiAnalogGainMax; ///< \~chinese 模拟增益的最大值,单位为fAnalogGainStep中定义 \~english The maximum value of the analog gain in fAnalog defined in GainStep
  476. 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
  477. 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
  478. UINT uiExposeTimeMax; ///< \~chinese 手动模式下,曝光时间的最大值,单位:行 \~english Maximum exposure time in manual mode, unit: line
  479. } tSdkExpose;
  480. /// \~chinese 触发模式描述
  481. /// \~english Trigger mode description
  482. typedef struct
  483. {
  484. INT iIndex; ///< \~chinese 模式索引号 \~english Mode index number
  485. char acDescription[32]; ///< \~chinese 该模式的描述信息 \~english Description information of this mode
  486. } tSdkTrigger;
  487. /// \~chinese 传输分包大小描述(针对某些网络相机有效)
  488. /// \~english Transmission packet size description (valid for some web cameras)
  489. typedef struct
  490. {
  491. INT iIndex; ///< \~chinese 分包大小索引号 \~english Packet size index number
  492. char acDescription[32]; ///< \~chinese 对应的描述信息 \~english Corresponding description information
  493. UINT iPackSize; ///< \~chinese 包大小 \~english Packet size
  494. } tSdkPackLength;
  495. /// \~chinese 预设的LUT表描述
  496. /// \~english Preset LUT Table Description
  497. typedef struct
  498. {
  499. INT iIndex; ///< \~chinese 索引 \~english index
  500. char acDescription[32]; ///< \~chinese 描述信息 \~english description
  501. } tSdkPresetLut;
  502. /// \~chinese AE算法描述
  503. /// \~english AE algorithm description
  504. typedef struct
  505. {
  506. INT iIndex; ///< \~chinese 索引 \~english index
  507. char acDescription[32]; ///< \~chinese 描述信息 \~english description
  508. } tSdkAeAlgorithm;
  509. /// \~chinese RAW转RGB算法描述
  510. /// \~english RAW to RGB algorithm description
  511. typedef struct
  512. {
  513. INT iIndex; ///< \~chinese 索引 \~english index
  514. char acDescription[32]; ///< \~chinese 描述信息 \~english description
  515. } tSdkBayerDecodeAlgorithm;
  516. /// \~chinese 帧统计信息
  517. /// \~english Frame statistics
  518. typedef struct
  519. {
  520. INT iTotal; ///< \~chinese 当前采集的总帧数(包括错误帧) \~english The current total number of frames collected (including error frames)
  521. INT iCapture; ///< \~chinese 当前采集的有效帧的数量 \~english The number of valid frames currently collected
  522. INT iLost; ///< \~chinese 当前丢帧的数量 \~english Current number of dropped frames
  523. } tSdkFrameStatistic;
  524. /// \~chinese 相机输出的图像数据格式
  525. /// \~english Camera output image data format
  526. typedef struct
  527. {
  528. INT iIndex; ///< \~chinese 格式种类编号 \~english Format type number
  529. char acDescription[32]; ///< \~chinese 描述信息 \~english description
  530. UINT iMediaType; ///< \~chinese 对应的图像格式编码,如CAMERA_MEDIA_TYPE_BAYGR8。 \~english Corresponding image format encoding, such as CAMERA_MEDIA_TYPE_BAYGR8.
  531. } tSdkMediaType;
  532. /// \~chinese 伽马的设定范围
  533. /// \~english Gamma setting range
  534. typedef struct
  535. {
  536. INT iMin; ///< \~chinese 最小值 \~english min
  537. INT iMax; ///< \~chinese 最大值 \~english max
  538. } tGammaRange;
  539. /// \~chinese 对比度的设定范围
  540. /// \~english Contrast setting range
  541. typedef struct
  542. {
  543. INT iMin; ///< \~chinese 最小值 \~english min
  544. INT iMax; ///< \~chinese 最大值 \~english max
  545. } tContrastRange;
  546. /// \~chinese RGB三通道数字增益的设定范围
  547. /// \~english RGB three channel digital gain setting range
  548. typedef struct
  549. {
  550. INT iRGainMin; ///< \~chinese 红色增益的最小值 \~english Red gain minimum
  551. INT iRGainMax; ///< \~chinese 红色增益的最大值 \~english Red gain maximum
  552. INT iGGainMin; ///< \~chinese 绿色增益的最小值 \~english Green gain minimum
  553. INT iGGainMax; ///< \~chinese 绿色增益的最大值 \~english Green gain maximum
  554. INT iBGainMin; ///< \~chinese 蓝色增益的最小值 \~english Blue gain minimum
  555. INT iBGainMax; ///< \~chinese 蓝色增益的最大值 \~english blue gain maximum
  556. } tRgbGainRange;
  557. /// \~chinese 饱和度设定的范围
  558. /// \~english Saturation setting range
  559. typedef struct
  560. {
  561. INT iMin; ///< \~chinese 最小值 \~english min
  562. INT iMax; ///< \~chinese 最大值 \~english max
  563. } tSaturationRange;
  564. /// \~chinese 锐化的设定范围
  565. /// \~english Sharpening setting range
  566. typedef struct
  567. {
  568. INT iMin; ///< \~chinese 最小值 \~english min
  569. INT iMax; ///< \~chinese 最大值 \~english max
  570. } tSharpnessRange;
  571. /// \~chinese ISP模块的使能信息
  572. /// \~english ISP module enable information
  573. typedef struct
  574. {
  575. 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.
  576. BOOL bWbOnce; ///< \~chinese 表示该型号相机是否支持手动白平衡功能 \~english Indicates whether this model camera supports manual white balance function
  577. BOOL bAutoWb; ///< \~chinese 表示该型号相机是否支持自动白平衡功能 \~english Indicates whether this model camera supports automatic white balance function
  578. BOOL bAutoExposure; ///< \~chinese 表示该型号相机是否支持自动曝光功能 \~english Indicates whether this model camera supports auto exposure function
  579. BOOL bManualExposure; ///< \~chinese 表示该型号相机是否支持手动曝光功能 \~english Indicates whether this model camera supports manual exposure function
  580. BOOL bAntiFlick; ///< \~chinese 表示该型号相机是否支持抗频闪功能 \~english Indicates whether this model camera supports anti-strobe function
  581. BOOL bDeviceIsp; ///< \~chinese 表示该型号相机是否支持硬件ISP功能 \~english Indicates whether this model camera supports hardware ISP function
  582. 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.
  583. BOOL bZoomHD; ///< \~chinese 相机硬件是否支持图像缩放输出(只能是缩小)。 \~english Whether the camera hardware supports image scaling output (can only be reduced).
  584. } tSdkIspCapacity;
  585. /// \~chinese 定义整合的设备描述信息,这些信息可以用于动态构建UI
  586. /// \note 调用@link #CameraGetCapability @endlink获取本结构
  587. /// \~english Define integrated device description information that can be used to dynamically build UI
  588. /// \note call @link #CameraGetCapability @endlink to get this structure
  589. typedef struct
  590. {
  591. tSdkTrigger *pTriggerDesc; ///< \~chinese 触发模式 \~english trigger mode
  592. INT iTriggerDesc; ///< \~chinese 触发模式的个数,即pTriggerDesc数组的大小 \~english The number of trigger modes, that is, the size of the pTriggerDesc array
  593. tSdkImageResolution *pImageSizeDesc;///< \~chinese 预设分辨率 \~english Preset resolution
  594. INT iImageSizeDesc; ///< \~chinese 预设分辨率的个数,即pImageSizeDesc数组的大小 \~english The number of preset resolutions, that is, the size of the pImageSizeDesc array
  595. tSdkColorTemperatureDes *pClrTempDesc;///< \~chinese 预设色温,用于白平衡 \~english Preset color temperature for white balance
  596. INT iClrTempDesc; ///< \~chinese 预设色温个数 \~english The number of preset color temperatures
  597. tSdkMediaType *pMediaTypeDesc; ///< \~chinese 相机输出图像格式 \~english Camera output image format
  598. INT iMediaTypdeDesc; ///< \~chinese 相机输出图像格式的种类个数,即pMediaTypeDesc数组的大小。 \~english The number of types of camera output image formats, that is, the size of the pMediaTypeDesc array.
  599. tSdkFrameSpeed *pFrameSpeedDesc; ///< \~chinese 可调节帧速类型,对应界面上普通 高速 和超级三种速度设置 \~english Adjustable frame rate type, normal high speed and super three speed settings on the corresponding interface
  600. INT iFrameSpeedDesc; ///< \~chinese 可调节帧速类型的个数,即pFrameSpeedDesc数组的大小。 \~english The number of frame rate types that can be adjusted, that is, the size of the pFrameSpeedDesc array.
  601. tSdkPackLength *pPackLenDesc; ///< \~chinese 传输包长度,一般用于网络设备 \~english Transmission packet length, generally used for network equipment
  602. INT iPackLenDesc; ///< \~chinese 可供选择的传输分包长度的个数,即pPackLenDesc数组的大小。 \~english The number of transmission packetization lengths available for selection, which is the size of the pPackLenDesc array.
  603. INT iOutputIoCounts; ///< \~chinese 可编程输出IO的个数 \~english Number of programmable output IOs
  604. INT iInputIoCounts; ///< \~chinese 可编程输入IO的个数 \~english Number of programmable input IOs
  605. tSdkPresetLut *pPresetLutDesc; ///< \~chinese 相机预设的LUT表 \~english Camera preset LUT table
  606. INT iPresetLut; ///< \~chinese 相机预设的LUT表的个数,即pPresetLutDesc数组的大小 \~english The number of LUT tables preset by the camera, that is, the size of the pPresetLutDesc array
  607. INT iUserDataMaxLen; ///< \~chinese 指示该相机中用于保存用户数据区的最大长度。为0表示无。 \~english Indicates the maximum length in the camera used to save the user data area. 0 means no.
  608. 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.
  609. tSdkAeAlgorithm *pAeAlmSwDesc; ///< \~chinese 软件自动曝光算法描述 \~english Software auto exposure algorithm description
  610. int iAeAlmSwDesc; ///< \~chinese 软件自动曝光算法个数 \~english Software automatic exposure algorithm number
  611. tSdkAeAlgorithm *pAeAlmHdDesc; ///< \~chinese 硬件自动曝光算法描述,为NULL表示不支持硬件自动曝光 \~english Hardware auto exposure algorithm description, NULL means hardware auto exposure is not supported
  612. int iAeAlmHdDesc; ///< \~chinese 硬件自动曝光算法个数,为0表示不支持硬件自动曝光 \~english Number of hardware auto exposure algorithms, 0 means hardware auto exposure is not supported
  613. tSdkBayerDecodeAlgorithm *pBayerDecAlmSwDesc; ///< \~chinese 软件Bayer转换为RGB数据的算法描述 \~english Algorithm Description of Software Bayer Conversion to RGB Data
  614. int iBayerDecAlmSwDesc; ///< \~chinese 软件Bayer转换为RGB数据的算法个数 \~english The number of algorithms that Bayer converts to RGB data
  615. tSdkBayerDecodeAlgorithm *pBayerDecAlmHdDesc; ///< \~chinese 硬件Bayer转换为RGB数据的算法描述,为NULL表示不支持 \~english Hardware Bayer converts to RGB data algorithm description, is not supported for NULL representation
  616. int iBayerDecAlmHdDesc; ///< \~chinese 硬件Bayer转换为RGB数据的算法个数,为0表示不支持 \~english The number of algorithms that hardware Bayer converts to RGB data, 0 means not supported
  617. /* 图像参数的调节范围定义,用于动态构建UI*/
  618. tSdkExpose sExposeDesc; ///< \~chinese 曝光的范围值 \~english Exposure range value
  619. tSdkResolutionRange sResolutionRange; ///< \~chinese 分辨率范围描述 \~english Resolution range description
  620. tRgbGainRange sRgbGainRange; ///< \~chinese 图像数字增益范围描述 \~english Image digital gain range description
  621. tSaturationRange sSaturationRange; ///< \~chinese 饱和度范围描述 \~english Saturation range description
  622. tGammaRange sGammaRange; ///< \~chinese 伽马范围描述 \~english Gamma range description
  623. tContrastRange sContrastRange; ///< \~chinese 对比度范围描述 \~english Contrast range description
  624. tSharpnessRange sSharpnessRange; ///< \~chinese 锐化范围描述 \~english Sharpening range description
  625. tSdkIspCapacity sIspCapacity; ///< \~chinese ISP能力描述 \~english ISP capability description
  626. } tSdkCameraCapbility;
  627. /// \~chinese 图像帧头信息
  628. /// \~english Image frame header information
  629. typedef struct
  630. {
  631. UINT uiMediaType; ///< \~chinese 图像格式 \~english Image Format
  632. UINT uBytes; ///< \~chinese 图像数据字节数 \~english Total bytes
  633. 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
  634. 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
  635. INT iWidthZoomSw; ///< \~chinese 软件缩放的宽度,不需要进行软件裁剪的图像,此变量设置为0. \~english The width of the software zoom, which does not require software cropping. This variable is set to 0.
  636. INT iHeightZoomSw; ///< \~chinese 软件缩放的高度,不需要进行软件裁剪的图像,此变量设置为0. \~english Software zoom height, no software cropped image is required. This variable is set to 0.
  637. BOOL bIsTrigger; ///< \~chinese 指示是否为触发帧 \~english is trigger
  638. UINT uiTimeStamp; ///< \~chinese 该帧的采集时间,单位0.1毫秒 \~english The frame acquisition time, in units of 0.1 milliseconds
  639. UINT uiExpTime; ///< \~chinese 当前图像的曝光值,单位为微秒us \~english Exposure of the current image in microseconds us
  640. float fAnalogGain; ///< \~chinese 当前图像的模拟增益倍数 \~english The current image's analog gain multiplier
  641. 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.
  642. 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.
  643. INT iSaturation; ///< \~chinese 该帧图像的饱和度设定值,对于黑白相机无意义,为0 \~english The saturation value of the frame image, which is meaningless for a black and white camera, is 0
  644. 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
  645. 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
  646. 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
  647. }tSdkFrameHead;
  648. /// \~chinese 图像帧描述
  649. /// \~english Image frame description
  650. typedef struct sCameraFrame
  651. {
  652. tSdkFrameHead head; ///< \~chinese 帧头 \~english Frame Head
  653. BYTE * pBuffer; ///< \~chinese 数据区 \~english Image Data
  654. }tSdkFrame;
  655. /// \~chinese 帧事件
  656. /// \~english Frame Event
  657. typedef struct tSdkFrameEvent_
  658. {
  659. UINT uType; ///< \~chinese 事件类型(1:帧开始 2:帧结束) \~english Event type (1:frame start 2:frame end)
  660. UINT uStatus; ///< \~chinese 状态(0:成功 非0:错误) \~english Status (0:success, non-zero:error)
  661. UINT uFrameID; ///< \~chinese 帧ID \~english Frame ID
  662. UINT uWidth; ///< \~chinese 宽度 \~english Width
  663. UINT uHeight; ///< \~chinese 高度 \~english Height
  664. UINT uPixelFormat; ///< \~chinese 图像格式 \~english Image Format
  665. UINT TimeStampL; ///< \~chinese 时间戳低32位 \~english Lower 32 bits of timestamp
  666. UINT TimeStampH; ///< \~chinese 时间戳高32位 \~english High 32 bits of timestamp
  667. }tSdkFrameEvent;
  668. /// @ingroup API_GRAB_CB
  669. /// \~chinese 图像捕获的回调函数定义
  670. /// \~english Callback function definition for image capture
  671. typedef void (WINAPI* CAMERA_SNAP_PROC)(CameraHandle hCamera, BYTE *pFrameBuffer, tSdkFrameHead* pFrameHead,PVOID pContext);
  672. /// @ingroup API_SETTINGS_PAGE
  673. /// \~chinese 相机配置页面的消息回调函数定义
  674. /// \~english camera configuration page message callback function definition
  675. typedef void (WINAPI* CAMERA_PAGE_MSG_PROC)(CameraHandle hCamera,UINT MSG,UINT uParam,PVOID pContext);
  676. /// @ingroup API_RECONNECT
  677. /// \~chinese 相机连接状态回调
  678. /// \param [in] hCamera 相机句柄
  679. /// \param [in] MSG 消息,0: 相机连接断开 1: 相机连接恢复
  680. /// \param [in] uParam 附加信息
  681. /// \param [in] pContext 用户数据
  682. /// \return 无
  683. /// \note USB相机uParam取值:
  684. /// \note 未定义
  685. /// \note 网口相机uParam取值:
  686. /// \note 当MSG=0时:未定义
  687. /// \note 当MSG=1时:
  688. /// \note 0:上次掉线原因,网络通讯失败
  689. /// \note 1:上次掉线原因,相机掉电
  690. /// \~english Camera connection status callback
  691. /// \param [in] hCamera Camera handle
  692. /// \param [in] MSG message, 0: Camera disconnected 1: Camera connection restored
  693. /// \param [in] uParam Additional Information
  694. /// \param [in] pContext user data
  695. /// \return None
  696. /// \note USB camera uParam value:
  697. /// \note Undefined
  698. /// \note network camera uParam value:
  699. /// \note When MSG=0: Undefined
  700. /// \note When MSG=1:
  701. /// \note 0: The last dropped reason, network communication failed
  702. /// \note 1: The last dropped reason, the camera lost power
  703. typedef void (WINAPI* CAMERA_CONNECTION_STATUS_CALLBACK)(CameraHandle hCamera,UINT MSG,UINT uParam,PVOID pContext);
  704. /// @ingroup API_ADVANCE
  705. /// \~chinese 帧事件回调函数定义
  706. /// \~english Callback function definition for frame event
  707. typedef void (WINAPI* CAMERA_FRAME_EVENT_CALLBACK)(CameraHandle hCamera, tSdkFrameEvent* pEvent, PVOID pContext);
  708. //////////////////////////////////////////////////////////////////////////
  709. // Grabber 相关
  710. /// \~chinese Grabber统计信息
  711. /// \~english Grabber statistics
  712. typedef struct
  713. {
  714. int Width; ///< \~chinese 帧宽度 \~english Frame image width
  715. int Height; ///< \~chinese 帧高度 \~english Frame image height
  716. int Disp; ///< \~chinese 显示帧数量 \~english Display frame number
  717. int Capture; ///< \~chinese 采集的有效帧的数量 \~english The number of valid frames collected
  718. int Lost; ///< \~chinese 丢帧的数量 \~english The number of dropped frames
  719. int Error; ///< \~chinese 错帧的数量 \~english The number of error frames
  720. float DispFps; ///< \~chinese 显示帧率 \~english Display frame rate
  721. float CapFps; ///< \~chinese 捕获帧率 \~english Capture frame rate
  722. }tSdkGrabberStat;
  723. /// @ingroup GRABBER_CB
  724. /// \~chinese 图像捕获的回调函数定义
  725. /// \~english Callback function definition for image capture
  726. typedef void (__stdcall *pfnCameraGrabberFrameCallback)(
  727. void* Grabber,
  728. BYTE *pFrameBuffer,
  729. tSdkFrameHead* pFrameHead,
  730. void* Context);
  731. /// @ingroup GRABBER_CB
  732. /// \~chinese 帧监听函数定义
  733. /// \param [in] Grabber
  734. /// \param [in] Phase 图像处理阶段
  735. /// \param [in] pFrameBuffer 帧数据
  736. /// \param [in] pFrameHead 帧头
  737. /// \param [in] Context 用户数据
  738. /// \return 0:Grabber将会丢弃此帧并结束针对此帧的所有后续处理阶段 1:继续下一阶段处理
  739. /// \note 每当Grabber捕获到一帧图像时,会分3个阶段来依次调用FrameListener
  740. /// \note 阶段0: RAW数据处理,pFrameBuffer=Raw数据
  741. /// \note 阶段1: 截图前处理,pFrameBuffer=RGB数据
  742. /// \note 阶段2: 显示前处理,pFrameBuffer=RGB数据
  743. /// \note 特别的,当相机掉线后此回调也会被调用,此时Phase=-1,pFrameBuffer=NULL,pFrameHead=NULL。
  744. /// \~english Frame listening function definition
  745. /// \param [in] Grabber
  746. /// \param [in] Phase image processing phase
  747. /// \param [in] pFrameBuffer frame data
  748. /// \param [in] pFrameHead Frame Header
  749. /// \param [in] Context user data
  750. /// \return 0: Grabber will discard this frame and end all subsequent processing stages for this frame 1: Continue to the next stage of processing
  751. /// \note Whenever Grabber captures a frame of image, it will call FrameListener in turn in 3 stages.
  752. /// \note Phase 0: RAW data processing, pFrameBuffer= Raw data
  753. /// \note Phase 1: Screenshot pre-processing, pFrameBuffer=RGB data
  754. /// \note Phase 2: Display preprocessing, pFrameBuffer=RGB data
  755. /// \note In particular, this callback will be called when the camera is disconnected. At this time, Phase=-1, pFrameBuffer=NULL, and pFrameHead=NULL.
  756. typedef int (__stdcall *pfnCameraGrabberFrameListener)(
  757. void* Grabber,
  758. int Phase,
  759. BYTE *pFrameBuffer,
  760. tSdkFrameHead* pFrameHead,
  761. void* Context);
  762. /// @ingroup GRABBER_SNAPSHOT
  763. /// \~chinese 异步抓图的回调函数定义
  764. /// \warning Image需要调用 @link CameraImage_Destroy @endlink 释放
  765. /// \~english Asynchronous snapshot callback function definition
  766. /// \warning Image needs to call @link CameraImage_Destroy @endlink to release
  767. typedef void (__stdcall *pfnCameraGrabberSaveImageComplete)(
  768. void* Grabber,
  769. void* Image, // 需要调用CameraImage_Destroy释放
  770. CameraSdkStatus Status,
  771. void* Context
  772. );
  773. /// @ingroup MV_MACRO_TYPE
  774. /// @{
  775. //----------------------------IMAGE FORMAT DEFINE------------------------------------
  776. //----------------------------图像格式定义-------------------------------------------
  777. #define CAMERA_MEDIA_TYPE_MONO 0x01000000
  778. #define CAMERA_MEDIA_TYPE_RGB 0x02000000
  779. #define CAMERA_MEDIA_TYPE_COLOR 0x02000000
  780. #define CAMERA_MEDIA_TYPE_CUSTOM 0x80000000
  781. #define CAMERA_MEDIA_TYPE_COLOR_MASK 0xFF000000
  782. #define CAMERA_MEDIA_TYPE_OCCUPY1BIT 0x00010000
  783. #define CAMERA_MEDIA_TYPE_OCCUPY2BIT 0x00020000
  784. #define CAMERA_MEDIA_TYPE_OCCUPY4BIT 0x00040000
  785. #define CAMERA_MEDIA_TYPE_OCCUPY8BIT 0x00080000
  786. #define CAMERA_MEDIA_TYPE_OCCUPY10BIT 0x000A0000
  787. #define CAMERA_MEDIA_TYPE_OCCUPY12BIT 0x000C0000
  788. #define CAMERA_MEDIA_TYPE_OCCUPY16BIT 0x00100000
  789. #define CAMERA_MEDIA_TYPE_OCCUPY24BIT 0x00180000
  790. #define CAMERA_MEDIA_TYPE_OCCUPY32BIT 0x00200000
  791. #define CAMERA_MEDIA_TYPE_OCCUPY36BIT 0x00240000
  792. #define CAMERA_MEDIA_TYPE_OCCUPY48BIT 0x00300000
  793. #define CAMERA_MEDIA_TYPE_OCCUPY64BIT 0x00400000
  794. #define CAMERA_MEDIA_TYPE_EFFECTIVE_PIXEL_SIZE_MASK 0x00FF0000
  795. #define CAMERA_MEDIA_TYPE_EFFECTIVE_PIXEL_SIZE_SHIFT 16
  796. #define CAMERA_MEDIA_TYPE_PIXEL_SIZE(type) (((type) & CAMERA_MEDIA_TYPE_EFFECTIVE_PIXEL_SIZE_MASK) >> CAMERA_MEDIA_TYPE_EFFECTIVE_PIXEL_SIZE_SHIFT)
  797. #define CAMERA_MEDIA_TYPE_ID_MASK 0x0000FFFF
  798. #define CAMERA_MEDIA_TYPE_COUNT 0x46
  799. /*mono*/
  800. #define CAMERA_MEDIA_TYPE_MONO1P (CAMERA_MEDIA_TYPE_MONO | CAMERA_MEDIA_TYPE_OCCUPY1BIT | 0x0037)
  801. #define CAMERA_MEDIA_TYPE_MONO2P (CAMERA_MEDIA_TYPE_MONO | CAMERA_MEDIA_TYPE_OCCUPY2BIT | 0x0038)
  802. #define CAMERA_MEDIA_TYPE_MONO4P (CAMERA_MEDIA_TYPE_MONO | CAMERA_MEDIA_TYPE_OCCUPY4BIT | 0x0039)
  803. #define CAMERA_MEDIA_TYPE_MONO8 (CAMERA_MEDIA_TYPE_MONO | CAMERA_MEDIA_TYPE_OCCUPY8BIT | 0x0001)
  804. #define CAMERA_MEDIA_TYPE_MONO8S (CAMERA_MEDIA_TYPE_MONO | CAMERA_MEDIA_TYPE_OCCUPY8BIT | 0x0002)
  805. #define CAMERA_MEDIA_TYPE_MONO10 (CAMERA_MEDIA_TYPE_MONO | CAMERA_MEDIA_TYPE_OCCUPY16BIT | 0x0003)
  806. #define CAMERA_MEDIA_TYPE_MONO10_PACKED (CAMERA_MEDIA_TYPE_MONO | CAMERA_MEDIA_TYPE_OCCUPY12BIT | 0x0004)
  807. #define CAMERA_MEDIA_TYPE_MONO12 (CAMERA_MEDIA_TYPE_MONO | CAMERA_MEDIA_TYPE_OCCUPY16BIT | 0x0005)
  808. #define CAMERA_MEDIA_TYPE_MONO12_PACKED (CAMERA_MEDIA_TYPE_MONO | CAMERA_MEDIA_TYPE_OCCUPY12BIT | 0x0006)
  809. #define CAMERA_MEDIA_TYPE_MONO14 (CAMERA_MEDIA_TYPE_MONO | CAMERA_MEDIA_TYPE_OCCUPY16BIT | 0x0025)
  810. #define CAMERA_MEDIA_TYPE_MONO16 (CAMERA_MEDIA_TYPE_MONO | CAMERA_MEDIA_TYPE_OCCUPY16BIT | 0x0007)
  811. /*Bayer */
  812. #define CAMERA_MEDIA_TYPE_BAYGR8 (CAMERA_MEDIA_TYPE_MONO | CAMERA_MEDIA_TYPE_OCCUPY8BIT | 0x0008)
  813. #define CAMERA_MEDIA_TYPE_BAYRG8 (CAMERA_MEDIA_TYPE_MONO | CAMERA_MEDIA_TYPE_OCCUPY8BIT | 0x0009)
  814. #define CAMERA_MEDIA_TYPE_BAYGB8 (CAMERA_MEDIA_TYPE_MONO | CAMERA_MEDIA_TYPE_OCCUPY8BIT | 0x000A)
  815. #define CAMERA_MEDIA_TYPE_BAYBG8 (CAMERA_MEDIA_TYPE_MONO | CAMERA_MEDIA_TYPE_OCCUPY8BIT | 0x000B)
  816. #define CAMERA_MEDIA_TYPE_BAYGR10_MIPI (CAMERA_MEDIA_TYPE_MONO | CAMERA_MEDIA_TYPE_OCCUPY10BIT | 0x0026)
  817. #define CAMERA_MEDIA_TYPE_BAYRG10_MIPI (CAMERA_MEDIA_TYPE_MONO | CAMERA_MEDIA_TYPE_OCCUPY10BIT | 0x0027)
  818. #define CAMERA_MEDIA_TYPE_BAYGB10_MIPI (CAMERA_MEDIA_TYPE_MONO | CAMERA_MEDIA_TYPE_OCCUPY10BIT | 0x0028)
  819. #define CAMERA_MEDIA_TYPE_BAYBG10_MIPI (CAMERA_MEDIA_TYPE_MONO | CAMERA_MEDIA_TYPE_OCCUPY10BIT | 0x0029)
  820. #define CAMERA_MEDIA_TYPE_BAYGR10 (CAMERA_MEDIA_TYPE_MONO | CAMERA_MEDIA_TYPE_OCCUPY16BIT | 0x000C)
  821. #define CAMERA_MEDIA_TYPE_BAYRG10 (CAMERA_MEDIA_TYPE_MONO | CAMERA_MEDIA_TYPE_OCCUPY16BIT | 0x000D)
  822. #define CAMERA_MEDIA_TYPE_BAYGB10 (CAMERA_MEDIA_TYPE_MONO | CAMERA_MEDIA_TYPE_OCCUPY16BIT | 0x000E)
  823. #define CAMERA_MEDIA_TYPE_BAYBG10 (CAMERA_MEDIA_TYPE_MONO | CAMERA_MEDIA_TYPE_OCCUPY16BIT | 0x000F)
  824. #define CAMERA_MEDIA_TYPE_BAYGR12 (CAMERA_MEDIA_TYPE_MONO | CAMERA_MEDIA_TYPE_OCCUPY16BIT | 0x0010)
  825. #define CAMERA_MEDIA_TYPE_BAYRG12 (CAMERA_MEDIA_TYPE_MONO | CAMERA_MEDIA_TYPE_OCCUPY16BIT | 0x0011)
  826. #define CAMERA_MEDIA_TYPE_BAYGB12 (CAMERA_MEDIA_TYPE_MONO | CAMERA_MEDIA_TYPE_OCCUPY16BIT | 0x0012)
  827. #define CAMERA_MEDIA_TYPE_BAYBG12 (CAMERA_MEDIA_TYPE_MONO | CAMERA_MEDIA_TYPE_OCCUPY16BIT | 0x0013)
  828. #define CAMERA_MEDIA_TYPE_BAYGR10_PACKED (CAMERA_MEDIA_TYPE_MONO | CAMERA_MEDIA_TYPE_OCCUPY12BIT | 0x0026)
  829. #define CAMERA_MEDIA_TYPE_BAYRG10_PACKED (CAMERA_MEDIA_TYPE_MONO | CAMERA_MEDIA_TYPE_OCCUPY12BIT | 0x0027)
  830. #define CAMERA_MEDIA_TYPE_BAYGB10_PACKED (CAMERA_MEDIA_TYPE_MONO | CAMERA_MEDIA_TYPE_OCCUPY12BIT | 0x0028)
  831. #define CAMERA_MEDIA_TYPE_BAYBG10_PACKED (CAMERA_MEDIA_TYPE_MONO | CAMERA_MEDIA_TYPE_OCCUPY12BIT | 0x0029)
  832. #define CAMERA_MEDIA_TYPE_BAYGR12_PACKED (CAMERA_MEDIA_TYPE_MONO | CAMERA_MEDIA_TYPE_OCCUPY12BIT | 0x002A)
  833. #define CAMERA_MEDIA_TYPE_BAYRG12_PACKED (CAMERA_MEDIA_TYPE_MONO | CAMERA_MEDIA_TYPE_OCCUPY12BIT | 0x002B)
  834. #define CAMERA_MEDIA_TYPE_BAYGB12_PACKED (CAMERA_MEDIA_TYPE_MONO | CAMERA_MEDIA_TYPE_OCCUPY12BIT | 0x002C)
  835. #define CAMERA_MEDIA_TYPE_BAYBG12_PACKED (CAMERA_MEDIA_TYPE_MONO | CAMERA_MEDIA_TYPE_OCCUPY12BIT | 0x002D)
  836. #define CAMERA_MEDIA_TYPE_BAYGR16 (CAMERA_MEDIA_TYPE_MONO | CAMERA_MEDIA_TYPE_OCCUPY16BIT | 0x002E)
  837. #define CAMERA_MEDIA_TYPE_BAYRG16 (CAMERA_MEDIA_TYPE_MONO | CAMERA_MEDIA_TYPE_OCCUPY16BIT | 0x002F)
  838. #define CAMERA_MEDIA_TYPE_BAYGB16 (CAMERA_MEDIA_TYPE_MONO | CAMERA_MEDIA_TYPE_OCCUPY16BIT | 0x0030)
  839. #define CAMERA_MEDIA_TYPE_BAYBG16 (CAMERA_MEDIA_TYPE_MONO | CAMERA_MEDIA_TYPE_OCCUPY16BIT | 0x0031)
  840. /*RGB */
  841. #define CAMERA_MEDIA_TYPE_RGB8 (CAMERA_MEDIA_TYPE_COLOR | CAMERA_MEDIA_TYPE_OCCUPY24BIT | 0x0014)
  842. #define CAMERA_MEDIA_TYPE_BGR8 (CAMERA_MEDIA_TYPE_COLOR | CAMERA_MEDIA_TYPE_OCCUPY24BIT | 0x0015)
  843. #define CAMERA_MEDIA_TYPE_RGBA8 (CAMERA_MEDIA_TYPE_COLOR | CAMERA_MEDIA_TYPE_OCCUPY32BIT | 0x0016)
  844. #define CAMERA_MEDIA_TYPE_BGRA8 (CAMERA_MEDIA_TYPE_COLOR | CAMERA_MEDIA_TYPE_OCCUPY32BIT | 0x0017)
  845. #define CAMERA_MEDIA_TYPE_RGB10 (CAMERA_MEDIA_TYPE_COLOR | CAMERA_MEDIA_TYPE_OCCUPY48BIT | 0x0018)
  846. #define CAMERA_MEDIA_TYPE_BGR10 (CAMERA_MEDIA_TYPE_COLOR | CAMERA_MEDIA_TYPE_OCCUPY48BIT | 0x0019)
  847. #define CAMERA_MEDIA_TYPE_RGB12 (CAMERA_MEDIA_TYPE_COLOR | CAMERA_MEDIA_TYPE_OCCUPY48BIT | 0x001A)
  848. #define CAMERA_MEDIA_TYPE_BGR12 (CAMERA_MEDIA_TYPE_COLOR | CAMERA_MEDIA_TYPE_OCCUPY48BIT | 0x001B)
  849. #define CAMERA_MEDIA_TYPE_RGB16 (CAMERA_MEDIA_TYPE_COLOR | CAMERA_MEDIA_TYPE_OCCUPY48BIT | 0x0033)
  850. #define CAMERA_MEDIA_TYPE_BGR16 (CAMERA_MEDIA_TYPE_COLOR | CAMERA_MEDIA_TYPE_OCCUPY48BIT | 0x004B)
  851. #define CAMERA_MEDIA_TYPE_RGBA16 (CAMERA_MEDIA_TYPE_COLOR | CAMERA_MEDIA_TYPE_OCCUPY64BIT | 0x0064)
  852. #define CAMERA_MEDIA_TYPE_BGRA16 (CAMERA_MEDIA_TYPE_COLOR | CAMERA_MEDIA_TYPE_OCCUPY64BIT | 0x0051)
  853. #define CAMERA_MEDIA_TYPE_RGB10V1_PACKED (CAMERA_MEDIA_TYPE_COLOR | CAMERA_MEDIA_TYPE_OCCUPY32BIT | 0x001C)
  854. #define CAMERA_MEDIA_TYPE_RGB10P32 (CAMERA_MEDIA_TYPE_COLOR | CAMERA_MEDIA_TYPE_OCCUPY32BIT | 0x001D)
  855. #define CAMERA_MEDIA_TYPE_RGB12V1_PACKED (CAMERA_MEDIA_TYPE_COLOR | CAMERA_MEDIA_TYPE_OCCUPY36BIT | 0X0034)
  856. #define CAMERA_MEDIA_TYPE_RGB565P (CAMERA_MEDIA_TYPE_COLOR | CAMERA_MEDIA_TYPE_OCCUPY16BIT | 0x0035)
  857. #define CAMERA_MEDIA_TYPE_BGR565P (CAMERA_MEDIA_TYPE_COLOR | CAMERA_MEDIA_TYPE_OCCUPY16BIT | 0X0036)
  858. /*YUV and YCbCr*/
  859. #define CAMERA_MEDIA_TYPE_YUV411_8_UYYVYY (CAMERA_MEDIA_TYPE_COLOR | CAMERA_MEDIA_TYPE_OCCUPY12BIT | 0x001E)
  860. #define CAMERA_MEDIA_TYPE_YUV422_8_UYVY (CAMERA_MEDIA_TYPE_COLOR | CAMERA_MEDIA_TYPE_OCCUPY16BIT | 0x001F)
  861. #define CAMERA_MEDIA_TYPE_YUV422_8 (CAMERA_MEDIA_TYPE_COLOR | CAMERA_MEDIA_TYPE_OCCUPY16BIT | 0x0032)
  862. #define CAMERA_MEDIA_TYPE_YUV8_UYV (CAMERA_MEDIA_TYPE_COLOR | CAMERA_MEDIA_TYPE_OCCUPY24BIT | 0x0020)
  863. #define CAMERA_MEDIA_TYPE_YCBCR8_CBYCR (CAMERA_MEDIA_TYPE_COLOR | CAMERA_MEDIA_TYPE_OCCUPY24BIT | 0x003A)
  864. //CAMERA_MEDIA_TYPE_YCBCR422_8 : YYYYCbCrCbCr
  865. #define CAMERA_MEDIA_TYPE_YCBCR422_8 (CAMERA_MEDIA_TYPE_COLOR | CAMERA_MEDIA_TYPE_OCCUPY16BIT | 0x003B)
  866. #define CAMERA_MEDIA_TYPE_YCBCR422_8_CBYCRY (CAMERA_MEDIA_TYPE_COLOR | CAMERA_MEDIA_TYPE_OCCUPY16BIT | 0x0043)
  867. #define CAMERA_MEDIA_TYPE_YCBCR411_8_CBYYCRYY (CAMERA_MEDIA_TYPE_COLOR | CAMERA_MEDIA_TYPE_OCCUPY12BIT | 0x003C)
  868. #define CAMERA_MEDIA_TYPE_YCBCR601_8_CBYCR (CAMERA_MEDIA_TYPE_COLOR | CAMERA_MEDIA_TYPE_OCCUPY24BIT | 0x003D)
  869. #define CAMERA_MEDIA_TYPE_YCBCR601_422_8 (CAMERA_MEDIA_TYPE_COLOR | CAMERA_MEDIA_TYPE_OCCUPY16BIT | 0x003E)
  870. #define CAMERA_MEDIA_TYPE_YCBCR601_422_8_CBYCRY (CAMERA_MEDIA_TYPE_COLOR | CAMERA_MEDIA_TYPE_OCCUPY16BIT | 0x0044)
  871. #define CAMERA_MEDIA_TYPE_YCBCR601_411_8_CBYYCRYY (CAMERA_MEDIA_TYPE_COLOR | CAMERA_MEDIA_TYPE_OCCUPY12BIT | 0x003F)
  872. #define CAMERA_MEDIA_TYPE_YCBCR709_8_CBYCR (CAMERA_MEDIA_TYPE_COLOR | CAMERA_MEDIA_TYPE_OCCUPY24BIT | 0x0040)
  873. #define CAMERA_MEDIA_TYPE_YCBCR709_422_8 (CAMERA_MEDIA_TYPE_COLOR | CAMERA_MEDIA_TYPE_OCCUPY16BIT | 0x0041)
  874. #define CAMERA_MEDIA_TYPE_YCBCR709_422_8_CBYCRY (CAMERA_MEDIA_TYPE_COLOR | CAMERA_MEDIA_TYPE_OCCUPY16BIT | 0x0045)
  875. #define CAMERA_MEDIA_TYPE_YCBCR709_411_8_CBYYCRYY (CAMERA_MEDIA_TYPE_COLOR | CAMERA_MEDIA_TYPE_OCCUPY12BIT | 0x0042)
  876. /*RGB Planar */
  877. #define CAMERA_MEDIA_TYPE_RGB8_PLANAR (CAMERA_MEDIA_TYPE_COLOR | CAMERA_MEDIA_TYPE_OCCUPY24BIT | 0x0021)
  878. #define CAMERA_MEDIA_TYPE_RGB10_PLANAR (CAMERA_MEDIA_TYPE_COLOR | CAMERA_MEDIA_TYPE_OCCUPY48BIT | 0x0022)
  879. #define CAMERA_MEDIA_TYPE_RGB12_PLANAR (CAMERA_MEDIA_TYPE_COLOR | CAMERA_MEDIA_TYPE_OCCUPY48BIT | 0x0023)
  880. #define CAMERA_MEDIA_TYPE_RGB16_PLANAR (CAMERA_MEDIA_TYPE_COLOR | CAMERA_MEDIA_TYPE_OCCUPY48BIT | 0x0024)
  881. /*MindVision 12bit packed bayer*/
  882. #define CAMERA_MEDIA_TYPE_BAYGR12_PACKED_MV (CAMERA_MEDIA_TYPE_MONO | CAMERA_MEDIA_TYPE_OCCUPY12BIT | 0x0060)
  883. #define CAMERA_MEDIA_TYPE_BAYRG12_PACKED_MV (CAMERA_MEDIA_TYPE_MONO | CAMERA_MEDIA_TYPE_OCCUPY12BIT | 0x0061)
  884. #define CAMERA_MEDIA_TYPE_BAYGB12_PACKED_MV (CAMERA_MEDIA_TYPE_MONO | CAMERA_MEDIA_TYPE_OCCUPY12BIT | 0x0062)
  885. #define CAMERA_MEDIA_TYPE_BAYBG12_PACKED_MV (CAMERA_MEDIA_TYPE_MONO | CAMERA_MEDIA_TYPE_OCCUPY12BIT | 0x0063)
  886. /*MindVision 12bit packed monochome*/
  887. #define CAMERA_MEDIA_TYPE_MONO12_PACKED_MV (CAMERA_MEDIA_TYPE_MONO | CAMERA_MEDIA_TYPE_OCCUPY12BIT | 0x0064)
  888. #define CAMERA_MEDIA_TYPE_YUV420P_MV (CAMERA_MEDIA_TYPE_COLOR | CAMERA_MEDIA_TYPE_OCCUPY12BIT | 0x0065)
  889. /*planar YUV 4:2:0, 12bpp, 1 plane for Y and 1 plane for the UV components, which are interleaved (first byte V and the following byte U)*/
  890. #define CAMERA_MEDIA_TYPE_YUV_NV21_MV (CAMERA_MEDIA_TYPE_COLOR | CAMERA_MEDIA_TYPE_OCCUPY12BIT | 0x0066)
  891. /* H264 H265 */
  892. #define CAMERA_MEDIA_TYPE_H264_MV (CAMERA_MEDIA_TYPE_COLOR | CAMERA_MEDIA_TYPE_OCCUPY8BIT | 0x0067)
  893. #define CAMERA_MEDIA_TYPE_H265_MV (CAMERA_MEDIA_TYPE_COLOR | CAMERA_MEDIA_TYPE_OCCUPY8BIT | 0x0068)
  894. /* JPEG */
  895. #define CAMERA_MEDIA_TYPE_JPEG_MV (CAMERA_MEDIA_TYPE_COLOR | CAMERA_MEDIA_TYPE_OCCUPY8BIT | 0x0069)
  896. /// @}
  897. #endif