IMVDefines.h 47 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902
  1. #ifndef __IMV_DEFINES_H__
  2. #define __IMV_DEFINES_H__
  3. #ifdef WIN32
  4. typedef __int64 int64_t;
  5. typedef unsigned __int64 uint64_t;
  6. #else
  7. #include <stdint.h>
  8. #endif
  9. #ifndef IN
  10. #define IN ///< \~chinese 输入型参数 \~english Input param
  11. #endif
  12. #ifndef OUT
  13. #define OUT ///< \~chinese 输出型参数 \~english Output param
  14. #endif
  15. #ifndef IN_OUT
  16. #define IN_OUT ///< \~chinese 输入/输出型参数 \~english Input/Output param
  17. #endif
  18. #ifndef __cplusplus
  19. typedef char bool;
  20. #define true 1
  21. #define false 0
  22. #endif
  23. /// \~chinese
  24. /// \brief 错误码
  25. /// \~english
  26. /// \brief Error code
  27. #define IMV_OK 0 ///< \~chinese 成功,无错误 \~english Successed, no error
  28. #define IMV_ERROR -101 ///< \~chinese 通用的错误 \~english Generic error
  29. #define IMV_INVALID_HANDLE -102 ///< \~chinese 错误或无效的句柄 \~english Error or invalid handle
  30. #define IMV_INVALID_PARAM -103 ///< \~chinese 错误的参数 \~english Incorrect parameter
  31. #define IMV_INVALID_FRAME_HANDLE -104 ///< \~chinese 错误或无效的帧句柄 \~english Error or invalid frame handle
  32. #define IMV_INVALID_FRAME -105 ///< \~chinese 无效的帧 \~english Invalid frame
  33. #define IMV_INVALID_RESOURCE -106 ///< \~chinese 相机/事件/流等资源无效 \~english Camera/Event/Stream and so on resource invalid
  34. #define IMV_INVALID_IP -107 ///< \~chinese 设备与主机的IP网段不匹配 \~english Device's and PC's subnet is mismatch
  35. #define IMV_NO_MEMORY -108 ///< \~chinese 内存不足 \~english Malloc memery failed
  36. #define IMV_INSUFFICIENT_MEMORY -109 ///< \~chinese 传入的内存空间不足 \~english Insufficient memory
  37. #define IMV_ERROR_PROPERTY_TYPE -110 ///< \~chinese 属性类型错误 \~english Property type error
  38. #define IMV_INVALID_ACCESS -111 ///< \~chinese 属性不可访问、或不能读/写、或读/写失败 \~english Property not accessible, or not be read/written, or read/written failed
  39. #define IMV_INVALID_RANGE -112 ///< \~chinese 属性值超出范围、或者不是步长整数倍 \~english The property's value is out of range, or is not integer multiple of the step
  40. #define IMV_NOT_SUPPORT -113 ///< \~chinese 设备不支持的功能 \~english Device not supported function
  41. #define IMV_MAX_DEVICE_ENUM_NUM 100 ///< \~chinese 支持设备最大个数 \~english The maximum number of supported devices
  42. #define IMV_MAX_STRING_LENTH 256 ///< \~chinese 字符串最大长度 \~english The maximum length of string
  43. #define IMV_MAX_ERROR_LIST_NUM 128 ///< \~chinese 失败属性列表最大长度 \~english The maximum size of failed properties list
  44. typedef void* IMV_HANDLE; ///< \~chinese 设备句柄 \~english Device handle
  45. typedef void* IMV_FRAME_HANDLE; ///< \~chinese 帧句柄 \~english Frame handle
  46. /// \~chinese
  47. ///枚举:属性类型
  48. /// \~english
  49. ///Enumeration: property type
  50. typedef enum _IMV_EFeatureType
  51. {
  52. featureInt = 0x10000000, ///< \~chinese 整型数 \~english Integer
  53. featureFloat = 0x20000000, ///< \~chinese 浮点数 \~english Float
  54. featureEnum = 0x30000000, ///< \~chinese 枚举 \~english Enumeration
  55. featureBool = 0x40000000, ///< \~chinese 布尔 \~english Bool
  56. featureString = 0x50000000, ///< \~chinese 字符串 \~english String
  57. featureCommand = 0x60000000, ///< \~chinese 命令 \~english Command
  58. featureGroup = 0x70000000, ///< \~chinese 分组节点 \~english Group Node
  59. featureReg = 0x80000000, ///< \~chinese 寄存器节点 \~english Register Node
  60. featureUndefined = 0x90000000 ///< \~chinese 未定义 \~english Undefined
  61. }IMV_EFeatureType;
  62. /// \~chinese
  63. ///枚举:接口类型
  64. /// \~english
  65. ///Enumeration: interface type
  66. typedef enum _IMV_EInterfaceType
  67. {
  68. interfaceTypeGige = 0x00000001, ///< \~chinese 网卡接口类型 \~english NIC type
  69. interfaceTypeUsb3 = 0x00000002, ///< \~chinese USB3.0接口类型 \~english USB3.0 interface type
  70. interfaceTypeCL = 0x00000004, ///< \~chinese CAMERALINK接口类型 \~english Cameralink interface type
  71. interfaceTypePCIe = 0x00000008, ///< \~chinese PCIe接口类型 \~english PCIe interface type
  72. interfaceTypeAll = 0x00000000, ///< \~chinese 忽略接口类型 \~english All types interface type
  73. interfaceInvalidType = 0xFFFFFFFF ///< \~chinese 无效接口类型 \~english Invalid interface type
  74. }IMV_EInterfaceType;
  75. /// \~chinese
  76. ///枚举:设备类型
  77. /// \~english
  78. ///Enumeration: device type
  79. typedef enum _IMV_ECameraType
  80. {
  81. typeGigeCamera = 0, ///< \~chinese GIGE相机 \~english GigE Vision Camera
  82. typeU3vCamera = 1, ///< \~chinese USB3.0相机 \~english USB3.0 Vision Camera
  83. typeCLCamera = 2, ///< \~chinese CAMERALINK 相机 \~english Cameralink camera
  84. typePCIeCamera = 3, ///< \~chinese PCIe相机 \~english PCIe Camera
  85. typeUndefinedCamera = 255 ///< \~chinese 未知类型 \~english Undefined Camera
  86. }IMV_ECameraType;
  87. /// \~chinese
  88. ///枚举:创建句柄方式
  89. /// \~english
  90. ///Enumeration: Create handle mode
  91. typedef enum _IMV_ECreateHandleMode
  92. {
  93. modeByIndex = 0, ///< \~chinese 通过已枚举设备的索引(从0开始,比如 0, 1, 2...) \~english By index of enumerated devices (Start from 0, such as 0, 1, 2...)
  94. modeByCameraKey, ///< \~chinese 通过设备键"厂商:序列号" \~english By device's key "vendor:serial number"
  95. modeByDeviceUserID, ///< \~chinese 通过设备自定义名 \~english By device userID
  96. modeByIPAddress, ///< \~chinese 通过设备IP地址 \~english By device IP address.
  97. }IMV_ECreateHandleMode;
  98. /// \~chinese
  99. ///枚举:访问权限
  100. /// \~english
  101. ///Enumeration: access permission
  102. typedef enum _IMV_ECameraAccessPermission
  103. {
  104. accessPermissionOpen = 0, ///< \~chinese GigE相机没有被连接 \~english The GigE vision device isn't connected to any application.
  105. accessPermissionExclusive, ///< \~chinese 独占访问权限 \~english Exclusive Access Permission
  106. accessPermissionControl, ///< \~chinese 非独占可读访问权限 \~english Non-Exclusive Readbale Access Permission
  107. accessPermissionControlWithSwitchover, ///< \~chinese 切换控制访问权限 \~english Control access with switchover enabled.
  108. accessPermissionUnknown = 254, ///< \~chinese 无法确定 \~english Value not known; indeterminate.
  109. accessPermissionUndefined ///< \~chinese 未定义访问权限 \~english Undefined Access Permission
  110. }IMV_ECameraAccessPermission;
  111. /// \~chinese
  112. ///枚举:抓图策略
  113. /// \~english
  114. ///Enumeration: grab strartegy
  115. typedef enum _IMV_EGrabStrategy
  116. {
  117. grabStrartegySequential = 0, ///< \~chinese 按到达顺序处理图片 \~english The images are processed in the order of their arrival
  118. grabStrartegyLatestImage = 1, ///< \~chinese 获取最新的图片 \~english Get latest image
  119. grabStrartegyUpcomingImage = 2, ///< \~chinese 等待获取下一张图片(只针对GigE相机) \~english Waiting for next image(GigE only)
  120. grabStrartegyUndefined ///< \~chinese 未定义 \~english Undefined
  121. }IMV_EGrabStrategy;
  122. /// \~chinese
  123. ///枚举:流事件状态
  124. /// \~english
  125. /// Enumeration:stream event status
  126. typedef enum _IMV_EEventStatus
  127. {
  128. streamEventNormal = 1, ///< \~chinese 正常流事件 \~english Normal stream event
  129. streamEventLostFrame = 2, ///< \~chinese 丢帧事件 \~english Lost frame event
  130. streamEventLostPacket = 3, ///< \~chinese 丢包事件 \~english Lost packet event
  131. streamEventImageError = 4, ///< \~chinese 图像错误事件 \~english Error image event
  132. streamEventStreamChannelError = 5, ///< \~chinese 取流错误事件 \~english Stream channel error event
  133. streamEventTooManyConsecutiveResends = 6, ///< \~chinese 太多连续重传 \~english Too many consecutive resends event
  134. streamEventTooManyLostPacket = 7 ///< \~chinese 太多丢包 \~english Too many lost packet event
  135. }IMV_EEventStatus;
  136. /// \~chinese
  137. ///枚举:图像转换Bayer格式所用的算法
  138. /// \~english
  139. /// Enumeration:alorithm used for Bayer demosaic
  140. typedef enum _IMV_EBayerDemosaic
  141. {
  142. demosaicNearestNeighbor, ///< \~chinese 最近邻 \~english Nearest neighbor
  143. demosaicBilinear, ///< \~chinese 双线性 \~english Bilinear
  144. demosaicEdgeSensing, ///< \~chinese 边缘检测 \~english Edge sensing
  145. demosaicNotSupport = 255, ///< \~chinese 不支持 \~english Not support
  146. }IMV_EBayerDemosaic;
  147. /// \~chinese
  148. ///枚举:事件类型
  149. /// \~english
  150. /// Enumeration:event type
  151. typedef enum _IMV_EVType
  152. {
  153. offLine, ///< \~chinese 设备离线通知 \~english device offline notification
  154. onLine ///< \~chinese 设备在线通知 \~english device online notification
  155. }IMV_EVType;
  156. /// \~chinese
  157. ///枚举:视频格式
  158. /// \~english
  159. /// Enumeration:Video format
  160. typedef enum _IMV_EVideoType
  161. {
  162. typeVideoFormatAVI = 0, ///< \~chinese AVI格式 \~english AVI format
  163. typeVideoFormatNotSupport = 255 ///< \~chinese 不支持 \~english Not support
  164. }IMV_EVideoType;
  165. /// \~chinese
  166. ///枚举:图像翻转类型
  167. /// \~english
  168. /// Enumeration:Image flip type
  169. typedef enum _IMV_EFlipType
  170. {
  171. typeFlipVertical, ///< \~chinese 垂直(Y轴)翻转 \~english Vertical(Y-axis) flip
  172. typeFlipHorizontal ///< \~chinese 水平(X轴)翻转 \~english Horizontal(X-axis) flip
  173. }IMV_EFlipType;
  174. /// \~chinese
  175. ///枚举:顺时针旋转角度
  176. /// \~english
  177. /// Enumeration:Rotation angle clockwise
  178. typedef enum _IMV_ERotationAngle
  179. {
  180. rotationAngle90, ///< \~chinese 顺时针旋转90度 \~english Rotate 90 degree clockwise
  181. rotationAngle180, ///< \~chinese 顺时针旋转180度 \~english Rotate 180 degree clockwise
  182. rotationAngle270, ///< \~chinese 顺时针旋转270度 \~english Rotate 270 degree clockwise
  183. }IMV_ERotationAngle;
  184. typedef enum _IMV_FFCType
  185. {
  186. IIP_LSC_Type_Block = 0, ///< 块对块 block to block
  187. IIP_LSC_Type_Point = 1, ///< 点对点 points to point
  188. } IMV_FFCType;
  189. #define IMV_GVSP_PIX_MONO 0x01000000
  190. #define IMV_GVSP_PIX_RGB 0x02000000
  191. #define IMV_GVSP_PIX_COLOR 0x02000000
  192. #define IMV_GVSP_PIX_CUSTOM 0x80000000
  193. #define IMV_GVSP_PIX_COLOR_MASK 0xFF000000
  194. // Indicate effective number of bits occupied by the pixel (including padding).
  195. // This can be used to compute amount of memory required to store an image.
  196. #define IMV_GVSP_PIX_OCCUPY1BIT 0x00010000
  197. #define IMV_GVSP_PIX_OCCUPY2BIT 0x00020000
  198. #define IMV_GVSP_PIX_OCCUPY4BIT 0x00040000
  199. #define IMV_GVSP_PIX_OCCUPY8BIT 0x00080000
  200. #define IMV_GVSP_PIX_OCCUPY12BIT 0x000C0000
  201. #define IMV_GVSP_PIX_OCCUPY16BIT 0x00100000
  202. #define IMV_GVSP_PIX_OCCUPY24BIT 0x00180000
  203. #define IMV_GVSP_PIX_OCCUPY32BIT 0x00200000
  204. #define IMV_GVSP_PIX_OCCUPY36BIT 0x00240000
  205. #define IMV_GVSP_PIX_OCCUPY48BIT 0x00300000
  206. /// \~chinese
  207. ///枚举:图像格式
  208. /// \~english
  209. /// Enumeration:image format
  210. typedef enum _IMV_EPixelType
  211. {
  212. // Undefined pixel type
  213. gvspPixelTypeUndefined = -1,
  214. // Mono Format
  215. gvspPixelMono1p = (IMV_GVSP_PIX_MONO | IMV_GVSP_PIX_OCCUPY1BIT | 0x0037),
  216. gvspPixelMono2p = (IMV_GVSP_PIX_MONO | IMV_GVSP_PIX_OCCUPY2BIT | 0x0038),
  217. gvspPixelMono4p = (IMV_GVSP_PIX_MONO | IMV_GVSP_PIX_OCCUPY4BIT | 0x0039),
  218. gvspPixelMono8 = (IMV_GVSP_PIX_MONO | IMV_GVSP_PIX_OCCUPY8BIT | 0x0001),
  219. gvspPixelMono8S = (IMV_GVSP_PIX_MONO | IMV_GVSP_PIX_OCCUPY8BIT | 0x0002),
  220. gvspPixelMono10 = (IMV_GVSP_PIX_MONO | IMV_GVSP_PIX_OCCUPY16BIT | 0x0003),
  221. gvspPixelMono10Packed = (IMV_GVSP_PIX_MONO | IMV_GVSP_PIX_OCCUPY12BIT | 0x0004),
  222. gvspPixelMono12 = (IMV_GVSP_PIX_MONO | IMV_GVSP_PIX_OCCUPY16BIT | 0x0005),
  223. gvspPixelMono12Packed = (IMV_GVSP_PIX_MONO | IMV_GVSP_PIX_OCCUPY12BIT | 0x0006),
  224. gvspPixelMono14 = (IMV_GVSP_PIX_MONO | IMV_GVSP_PIX_OCCUPY16BIT | 0x0025),
  225. gvspPixelMono16 = (IMV_GVSP_PIX_MONO | IMV_GVSP_PIX_OCCUPY16BIT | 0x0007),
  226. // Bayer Format
  227. gvspPixelBayGR8 = (IMV_GVSP_PIX_MONO | IMV_GVSP_PIX_OCCUPY8BIT | 0x0008),
  228. gvspPixelBayRG8 = (IMV_GVSP_PIX_MONO | IMV_GVSP_PIX_OCCUPY8BIT | 0x0009),
  229. gvspPixelBayGB8 = (IMV_GVSP_PIX_MONO | IMV_GVSP_PIX_OCCUPY8BIT | 0x000A),
  230. gvspPixelBayBG8 = (IMV_GVSP_PIX_MONO | IMV_GVSP_PIX_OCCUPY8BIT | 0x000B),
  231. gvspPixelBayGR10 = (IMV_GVSP_PIX_MONO | IMV_GVSP_PIX_OCCUPY16BIT | 0x000C),
  232. gvspPixelBayRG10 = (IMV_GVSP_PIX_MONO | IMV_GVSP_PIX_OCCUPY16BIT | 0x000D),
  233. gvspPixelBayGB10 = (IMV_GVSP_PIX_MONO | IMV_GVSP_PIX_OCCUPY16BIT | 0x000E),
  234. gvspPixelBayBG10 = (IMV_GVSP_PIX_MONO | IMV_GVSP_PIX_OCCUPY16BIT | 0x000F),
  235. gvspPixelBayGR12 = (IMV_GVSP_PIX_MONO | IMV_GVSP_PIX_OCCUPY16BIT | 0x0010),
  236. gvspPixelBayRG12 = (IMV_GVSP_PIX_MONO | IMV_GVSP_PIX_OCCUPY16BIT | 0x0011),
  237. gvspPixelBayGB12 = (IMV_GVSP_PIX_MONO | IMV_GVSP_PIX_OCCUPY16BIT | 0x0012),
  238. gvspPixelBayBG12 = (IMV_GVSP_PIX_MONO | IMV_GVSP_PIX_OCCUPY16BIT | 0x0013),
  239. gvspPixelBayGR10Packed = (IMV_GVSP_PIX_MONO | IMV_GVSP_PIX_OCCUPY12BIT | 0x0026),
  240. gvspPixelBayRG10Packed = (IMV_GVSP_PIX_MONO | IMV_GVSP_PIX_OCCUPY12BIT | 0x0027),
  241. gvspPixelBayGB10Packed = (IMV_GVSP_PIX_MONO | IMV_GVSP_PIX_OCCUPY12BIT | 0x0028),
  242. gvspPixelBayBG10Packed = (IMV_GVSP_PIX_MONO | IMV_GVSP_PIX_OCCUPY12BIT | 0x0029),
  243. gvspPixelBayGR12Packed = (IMV_GVSP_PIX_MONO | IMV_GVSP_PIX_OCCUPY12BIT | 0x002A),
  244. gvspPixelBayRG12Packed = (IMV_GVSP_PIX_MONO | IMV_GVSP_PIX_OCCUPY12BIT | 0x002B),
  245. gvspPixelBayGB12Packed = (IMV_GVSP_PIX_MONO | IMV_GVSP_PIX_OCCUPY12BIT | 0x002C),
  246. gvspPixelBayBG12Packed = (IMV_GVSP_PIX_MONO | IMV_GVSP_PIX_OCCUPY12BIT | 0x002D),
  247. gvspPixelBayGR16 = (IMV_GVSP_PIX_MONO | IMV_GVSP_PIX_OCCUPY16BIT | 0x002E),
  248. gvspPixelBayRG16 = (IMV_GVSP_PIX_MONO | IMV_GVSP_PIX_OCCUPY16BIT | 0x002F),
  249. gvspPixelBayGB16 = (IMV_GVSP_PIX_MONO | IMV_GVSP_PIX_OCCUPY16BIT | 0x0030),
  250. gvspPixelBayBG16 = (IMV_GVSP_PIX_MONO | IMV_GVSP_PIX_OCCUPY16BIT | 0x0031),
  251. // RGB Format
  252. gvspPixelRGB8 = (IMV_GVSP_PIX_COLOR | IMV_GVSP_PIX_OCCUPY24BIT | 0x0014),
  253. gvspPixelBGR8 = (IMV_GVSP_PIX_COLOR | IMV_GVSP_PIX_OCCUPY24BIT | 0x0015),
  254. gvspPixelRGBA8 = (IMV_GVSP_PIX_COLOR | IMV_GVSP_PIX_OCCUPY32BIT | 0x0016),
  255. gvspPixelBGRA8 = (IMV_GVSP_PIX_COLOR | IMV_GVSP_PIX_OCCUPY32BIT | 0x0017),
  256. gvspPixelRGB10 = (IMV_GVSP_PIX_COLOR | IMV_GVSP_PIX_OCCUPY48BIT | 0x0018),
  257. gvspPixelBGR10 = (IMV_GVSP_PIX_COLOR | IMV_GVSP_PIX_OCCUPY48BIT | 0x0019),
  258. gvspPixelRGB12 = (IMV_GVSP_PIX_COLOR | IMV_GVSP_PIX_OCCUPY48BIT | 0x001A),
  259. gvspPixelBGR12 = (IMV_GVSP_PIX_COLOR | IMV_GVSP_PIX_OCCUPY48BIT | 0x001B),
  260. gvspPixelRGB16 = (IMV_GVSP_PIX_COLOR | IMV_GVSP_PIX_OCCUPY48BIT | 0x0033),
  261. gvspPixelRGB10V1Packed = (IMV_GVSP_PIX_COLOR | IMV_GVSP_PIX_OCCUPY32BIT | 0x001C),
  262. gvspPixelRGB10P32 = (IMV_GVSP_PIX_COLOR | IMV_GVSP_PIX_OCCUPY32BIT | 0x001D),
  263. gvspPixelRGB12V1Packed = (IMV_GVSP_PIX_COLOR | IMV_GVSP_PIX_OCCUPY36BIT | 0X0034),
  264. gvspPixelRGB565P = (IMV_GVSP_PIX_COLOR | IMV_GVSP_PIX_OCCUPY16BIT | 0x0035),
  265. gvspPixelBGR565P = (IMV_GVSP_PIX_COLOR | IMV_GVSP_PIX_OCCUPY16BIT | 0X0036),
  266. // YVR Format
  267. gvspPixelYUV411_8_UYYVYY = (IMV_GVSP_PIX_COLOR | IMV_GVSP_PIX_OCCUPY12BIT | 0x001E),
  268. gvspPixelYUV422_8_UYVY = (IMV_GVSP_PIX_COLOR | IMV_GVSP_PIX_OCCUPY16BIT | 0x001F),
  269. gvspPixelYUV422_8 = (IMV_GVSP_PIX_COLOR | IMV_GVSP_PIX_OCCUPY16BIT | 0x0032),
  270. gvspPixelYUV8_UYV = (IMV_GVSP_PIX_COLOR | IMV_GVSP_PIX_OCCUPY24BIT | 0x0020),
  271. gvspPixelYCbCr8CbYCr = (IMV_GVSP_PIX_COLOR | IMV_GVSP_PIX_OCCUPY24BIT | 0x003A),
  272. gvspPixelYCbCr422_8 = (IMV_GVSP_PIX_COLOR | IMV_GVSP_PIX_OCCUPY16BIT | 0x003B),
  273. gvspPixelYCbCr422_8_CbYCrY = (IMV_GVSP_PIX_COLOR | IMV_GVSP_PIX_OCCUPY16BIT | 0x0043),
  274. gvspPixelYCbCr411_8_CbYYCrYY = (IMV_GVSP_PIX_COLOR | IMV_GVSP_PIX_OCCUPY12BIT | 0x003C),
  275. gvspPixelYCbCr601_8_CbYCr = (IMV_GVSP_PIX_COLOR | IMV_GVSP_PIX_OCCUPY24BIT | 0x003D),
  276. gvspPixelYCbCr601_422_8 = (IMV_GVSP_PIX_COLOR | IMV_GVSP_PIX_OCCUPY16BIT | 0x003E),
  277. gvspPixelYCbCr601_422_8_CbYCrY = (IMV_GVSP_PIX_COLOR | IMV_GVSP_PIX_OCCUPY16BIT | 0x0044),
  278. gvspPixelYCbCr601_411_8_CbYYCrYY = (IMV_GVSP_PIX_COLOR | IMV_GVSP_PIX_OCCUPY12BIT | 0x003F),
  279. gvspPixelYCbCr709_8_CbYCr = (IMV_GVSP_PIX_COLOR | IMV_GVSP_PIX_OCCUPY24BIT | 0x0040),
  280. gvspPixelYCbCr709_422_8 = (IMV_GVSP_PIX_COLOR | IMV_GVSP_PIX_OCCUPY16BIT | 0x0041),
  281. gvspPixelYCbCr709_422_8_CbYCrY = (IMV_GVSP_PIX_COLOR | IMV_GVSP_PIX_OCCUPY16BIT | 0x0045),
  282. gvspPixelYCbCr709_411_8_CbYYCrYY = (IMV_GVSP_PIX_COLOR | IMV_GVSP_PIX_OCCUPY12BIT | 0x0042),
  283. // RGB Planar
  284. gvspPixelRGB8Planar = (IMV_GVSP_PIX_COLOR | IMV_GVSP_PIX_OCCUPY24BIT | 0x0021),
  285. gvspPixelRGB10Planar = (IMV_GVSP_PIX_COLOR | IMV_GVSP_PIX_OCCUPY48BIT | 0x0022),
  286. gvspPixelRGB12Planar = (IMV_GVSP_PIX_COLOR | IMV_GVSP_PIX_OCCUPY48BIT | 0x0023),
  287. gvspPixelRGB16Planar = (IMV_GVSP_PIX_COLOR | IMV_GVSP_PIX_OCCUPY48BIT | 0x0024),
  288. //BayerRG10p和BayerRG12p格式,针对特定项目临时添加,请不要使用
  289. //BayerRG10p and BayerRG12p, currently used for specific project, please do not use them
  290. gvspPixelBayRG10p = 0x010A0058,
  291. gvspPixelBayRG12p = 0x010c0059,
  292. //mono1c格式,自定义格式
  293. //mono1c, customized image format, used for binary output
  294. gvspPixelMono1c = 0x012000FF,
  295. //mono1e格式,自定义格式,用来显示连通域
  296. //mono1e, customized image format, used for displaying connected domain
  297. gvspPixelMono1e = 0x01080FFF
  298. }IMV_EPixelType;
  299. /// \~chinese
  300. /// \brief 字符串信息
  301. /// \~english
  302. /// \brief String information
  303. typedef struct _IMV_String
  304. {
  305. char str[IMV_MAX_STRING_LENTH]; ///< \~chinese 字符串.长度不超过256 \~english Strings and the maximum length of strings is 255.
  306. }IMV_String;
  307. /// \~chinese
  308. /// \brief GigE网卡信息
  309. /// \~english
  310. /// \brief GigE interface information
  311. typedef struct _IMV_GigEInterfaceInfo
  312. {
  313. char description[IMV_MAX_STRING_LENTH]; ///< \~chinese 网卡描述信息 \~english Network card description
  314. char macAddress[IMV_MAX_STRING_LENTH]; ///< \~chinese 网卡Mac地址 \~english Network card MAC Address
  315. char ipAddress[IMV_MAX_STRING_LENTH]; ///< \~chinese 设备Ip地址 \~english Device ip Address
  316. char subnetMask[IMV_MAX_STRING_LENTH]; ///< \~chinese 子网掩码 \~english SubnetMask
  317. char defaultGateWay[IMV_MAX_STRING_LENTH]; ///< \~chinese 默认网关 \~english Default GateWay
  318. char chReserved[5][IMV_MAX_STRING_LENTH]; ///< 保留 \~english Reserved field
  319. }IMV_GigEInterfaceInfo;
  320. /// \~chinese
  321. /// \brief USB接口信息
  322. /// \~english
  323. /// \brief USB interface information
  324. typedef struct _IMV_UsbInterfaceInfo
  325. {
  326. char description[IMV_MAX_STRING_LENTH]; ///< \~chinese USB接口描述信息 \~english USB interface description
  327. char vendorID[IMV_MAX_STRING_LENTH]; ///< \~chinese USB接口Vendor ID \~english USB interface Vendor ID
  328. char deviceID[IMV_MAX_STRING_LENTH]; ///< \~chinese USB接口设备ID \~english USB interface Device ID
  329. char subsystemID[IMV_MAX_STRING_LENTH]; ///< \~chinese USB接口Subsystem ID \~english USB interface Subsystem ID
  330. char revision[IMV_MAX_STRING_LENTH]; ///< \~chinese USB接口Revision \~english USB interface Revision
  331. char speed[IMV_MAX_STRING_LENTH]; ///< \~chinese USB接口speed \~english USB interface speed
  332. char chReserved[4][IMV_MAX_STRING_LENTH]; ///< 保留 \~english Reserved field
  333. }IMV_UsbInterfaceInfo;
  334. /// \~chinese
  335. /// \brief GigE设备信息
  336. /// \~english
  337. /// \brief GigE device information
  338. typedef struct _IMV_GigEDeviceInfo
  339. {
  340. /// \~chinese
  341. /// 设备支持的IP配置选项\n
  342. /// value:4 相机只支持LLA\n
  343. /// value:5 相机支持LLA和Persistent IP\n
  344. /// value:6 相机支持LLA和DHCP\n
  345. /// value:7 相机支持LLA、DHCP和Persistent IP\n
  346. /// value:0 获取失败
  347. /// \~english
  348. /// Supported IP configuration options of device\n
  349. /// value:4 Device supports LLA \n
  350. /// value:5 Device supports LLA and Persistent IP\n
  351. /// value:6 Device supports LLA and DHCP\n
  352. /// value:7 Device supports LLA, DHCP and Persistent IP\n
  353. /// value:0 Get fail
  354. unsigned int nIpConfigOptions;
  355. /// \~chinese
  356. /// 设备当前的IP配置选项\n
  357. /// value:4 LLA处于活动状态\n
  358. /// value:5 LLA和Persistent IP处于活动状态\n
  359. /// value:6 LLA和DHCP处于活动状态\n
  360. /// value:7 LLA、DHCP和Persistent IP处于活动状态\n
  361. /// value:0 获取失败
  362. /// \~english
  363. /// Current IP Configuration options of device\n
  364. /// value:4 LLA is active\n
  365. /// value:5 LLA and Persistent IP are active\n
  366. /// value:6 LLA and DHCP are active\n
  367. /// value:7 LLA, DHCP and Persistent IP are active\n
  368. /// value:0 Get fail
  369. unsigned int nIpConfigCurrent;
  370. unsigned int nReserved[3]; ///< \~chinese 保留 \~english Reserved field
  371. char macAddress[IMV_MAX_STRING_LENTH]; ///< \~chinese 设备Mac地址 \~english Device MAC Address
  372. char ipAddress[IMV_MAX_STRING_LENTH]; ///< \~chinese 设备Ip地址 \~english Device ip Address
  373. char subnetMask[IMV_MAX_STRING_LENTH]; ///< \~chinese 子网掩码 \~english SubnetMask
  374. char defaultGateWay[IMV_MAX_STRING_LENTH]; ///< \~chinese 默认网关 \~english Default GateWay
  375. char protocolVersion[IMV_MAX_STRING_LENTH]; ///< \~chinese 网络协议版本 \~english Net protocol version
  376. /// \~chinese
  377. /// Ip配置有效性\n
  378. /// Ip配置有效时字符串值"Valid"\n
  379. /// Ip配置无效时字符串值"Invalid On This Interface"
  380. /// \~english
  381. /// IP configuration valid\n
  382. /// String value is "Valid" when ip configuration valid\n
  383. /// String value is "Invalid On This Interface" when ip configuration invalid
  384. char ipConfiguration[IMV_MAX_STRING_LENTH];
  385. char chReserved[6][IMV_MAX_STRING_LENTH]; ///< \~chinese 保留 \~english Reserved field
  386. }IMV_GigEDeviceInfo;
  387. /// \~chinese
  388. /// \brief Usb设备信息
  389. /// \~english
  390. /// \brief Usb device information
  391. typedef struct _IMV_UsbDeviceInfo
  392. {
  393. bool bLowSpeedSupported; ///< \~chinese true支持,false不支持,其他值 非法。 \~english true support,false not supported,other invalid
  394. bool bFullSpeedSupported; ///< \~chinese true支持,false不支持,其他值 非法。 \~english true support,false not supported,other invalid
  395. bool bHighSpeedSupported; ///< \~chinese true支持,false不支持,其他值 非法。 \~english true support,false not supported,other invalid
  396. bool bSuperSpeedSupported; ///< \~chinese true支持,false不支持,其他值 非法。 \~english true support,false not supported,other invalid
  397. bool bDriverInstalled; ///< \~chinese true安装,false未安装,其他值 非法。 \~english true support,false not supported,other invalid
  398. bool boolReserved[3]; ///< \~chinese 保留
  399. unsigned int Reserved[4]; ///< \~chinese 保留 \~english Reserved field
  400. char configurationValid[IMV_MAX_STRING_LENTH]; ///< \~chinese 配置有效性 \~english Configuration Valid
  401. char genCPVersion[IMV_MAX_STRING_LENTH]; ///< \~chinese GenCP 版本 \~english GenCP Version
  402. char u3vVersion[IMV_MAX_STRING_LENTH]; ///< \~chinese U3V 版本号 \~english U3v Version
  403. char deviceGUID[IMV_MAX_STRING_LENTH]; ///< \~chinese 设备引导号 \~english Device guid number
  404. char familyName[IMV_MAX_STRING_LENTH]; ///< \~chinese 设备系列号 \~english Device serial number
  405. char u3vSerialNumber[IMV_MAX_STRING_LENTH]; ///< \~chinese 设备序列号 \~english Device SerialNumber
  406. char speed[IMV_MAX_STRING_LENTH]; ///< \~chinese 设备传输速度 \~english Device transmission speed
  407. char maxPower[IMV_MAX_STRING_LENTH]; ///< \~chinese 设备最大供电量 \~english Maximum power supply of device
  408. char chReserved[4][IMV_MAX_STRING_LENTH]; ///< \~chinese 保留 \~english Reserved field
  409. }IMV_UsbDeviceInfo;
  410. /// \~chinese
  411. /// \brief 设备通用信息
  412. /// \~english
  413. /// \brief Device general information
  414. typedef struct _IMV_DeviceInfo
  415. {
  416. IMV_ECameraType nCameraType; ///< \~chinese 设备类别 \~english Camera type
  417. int nCameraReserved[5]; ///< \~chinese 保留 \~english Reserved field
  418. char cameraKey[IMV_MAX_STRING_LENTH]; ///< \~chinese 厂商:序列号 \~english Camera key
  419. char cameraName[IMV_MAX_STRING_LENTH]; ///< \~chinese 用户自定义名 \~english UserDefinedName
  420. char serialNumber[IMV_MAX_STRING_LENTH]; ///< \~chinese 设备序列号 \~english Device SerialNumber
  421. char vendorName[IMV_MAX_STRING_LENTH]; ///< \~chinese 厂商 \~english Camera Vendor
  422. char modelName[IMV_MAX_STRING_LENTH]; ///< \~chinese 设备型号 \~english Device model
  423. char manufactureInfo[IMV_MAX_STRING_LENTH]; ///< \~chinese 设备制造信息 \~english Device ManufactureInfo
  424. char deviceVersion[IMV_MAX_STRING_LENTH]; ///< \~chinese 设备版本 \~english Device Version
  425. char cameraReserved[5][IMV_MAX_STRING_LENTH]; ///< \~chinese 保留 \~english Reserved field
  426. union
  427. {
  428. IMV_GigEDeviceInfo gigeDeviceInfo; ///< \~chinese Gige设备信息 \~english Gige Device Information
  429. IMV_UsbDeviceInfo usbDeviceInfo; ///< \~chinese Usb设备信息 \~english Usb Device Information
  430. }DeviceSpecificInfo;
  431. IMV_EInterfaceType nInterfaceType; ///< \~chinese 接口类别 \~english Interface type
  432. int nInterfaceReserved[5]; ///< \~chinese 保留 \~english Reserved field
  433. char interfaceName[IMV_MAX_STRING_LENTH]; ///< \~chinese 接口名 \~english Interface Name
  434. char interfaceReserved[5][IMV_MAX_STRING_LENTH]; ///< \~chinese 保留 \~english Reserved field
  435. union
  436. {
  437. IMV_GigEInterfaceInfo gigeInterfaceInfo; ///< \~chinese GigE网卡信息 \~english Gige interface Information
  438. IMV_UsbInterfaceInfo usbInterfaceInfo; ///< \~chinese Usb接口信息 \~english Usb interface Information
  439. }InterfaceInfo;
  440. }IMV_DeviceInfo;
  441. /// \~chinese
  442. /// \brief 加载失败的属性信息
  443. /// \~english
  444. /// \brief Load failed properties information
  445. typedef struct _IMV_ErrorList
  446. {
  447. unsigned int nParamCnt; ///< \~chinese 加载失败的属性个数 \~english The count of load failed properties
  448. IMV_String paramNameList[IMV_MAX_ERROR_LIST_NUM]; ///< \~chinese 加载失败的属性集合,上限128 \~english Array of load failed properties, up to 128
  449. }IMV_ErrorList;
  450. /// \~chinese
  451. /// \brief 设备信息列表
  452. /// \~english
  453. /// \brief Device information list
  454. typedef struct _IMV_DeviceList
  455. {
  456. unsigned int nDevNum; ///< \~chinese 设备数量 \~english Device Number
  457. IMV_DeviceInfo* pDevInfo; ///< \~chinese 设备息列表(SDK内部缓存),最多100设备 \~english Device information list(cached within the SDK), up to 100
  458. }IMV_DeviceList;
  459. /// \~chinese
  460. /// \brief 连接事件信息
  461. /// \~english
  462. /// \brief connection event information
  463. typedef struct _IMV_SConnectArg
  464. {
  465. IMV_EVType event; ///< \~chinese 事件类型 \~english event type
  466. unsigned int nReserve[10]; ///< \~chinese 预留字段 \~english Reserved field
  467. }IMV_SConnectArg;
  468. /// \~chinese
  469. /// \brief 参数更新事件信息
  470. /// \~english
  471. /// \brief Updating parameters event information
  472. typedef struct _IMV_SParamUpdateArg
  473. {
  474. bool isPoll; ///< \~chinese 是否是定时更新,true:表示是定时更新,false:表示非定时更新 \~english Update periodically or not. true:update periodically, true:not update periodically
  475. unsigned int nReserve[10]; ///< \~chinese 预留字段 \~english Reserved field
  476. unsigned int nParamCnt; ///< \~chinese 更新的参数个数 \~english The number of parameters which need update
  477. IMV_String* pParamNameList; ///< \~chinese 更新的参数名称集合(SDK内部缓存) \~english Array of parameter's name which need to be updated(cached within the SDK)
  478. }IMV_SParamUpdateArg;
  479. /// \~chinese
  480. /// \brief 流事件信息
  481. /// \~english
  482. /// \brief Stream event information
  483. typedef struct _IMV_SStreamArg
  484. {
  485. unsigned int channel; ///< \~chinese 流通道号 \~english Channel no.
  486. uint64_t blockId; ///< \~chinese 流数据BlockID \~english Block ID of stream data
  487. uint64_t timeStamp; ///< \~chinese 时间戳 \~english Event time stamp
  488. IMV_EEventStatus eStreamEventStatus; ///< \~chinese 流事件状态码 \~english Stream event status code
  489. unsigned int status; ///< \~chinese 事件状态错误码 \~english Status error code
  490. unsigned int nReserve[9]; ///< \~chinese 预留字段 \~english Reserved field
  491. }IMV_SStreamArg;
  492. /// \~chinese
  493. /// 消息通道事件ID列表
  494. /// \~english
  495. /// message channel event id list
  496. #define IMV_MSG_EVENT_ID_EXPOSURE_END 0x9001
  497. #define IMV_MSG_EVENT_ID_FRAME_TRIGGER 0x9002
  498. #define IMV_MSG_EVENT_ID_FRAME_START 0x9003
  499. #define IMV_MSG_EVENT_ID_ACQ_START 0x9004
  500. #define IMV_MSG_EVENT_ID_ACQ_TRIGGER 0x9005
  501. #define IMV_MSG_EVENT_ID_DATA_READ_OUT 0x9006
  502. /// \~chinese
  503. /// \brief 消息通道事件信息
  504. /// \~english
  505. /// \brief Message channel event information
  506. typedef struct _IMV_SMsgChannelArg
  507. {
  508. unsigned short eventId; ///< \~chinese 事件Id \~english Event id
  509. unsigned short channelId; ///< \~chinese 消息通道号 \~english Channel id
  510. uint64_t blockId; ///< \~chinese 流数据BlockID \~english Block ID of stream data
  511. uint64_t timeStamp; ///< \~chinese 时间戳 \~english Event timestamp
  512. unsigned int nReserve[8]; ///< \~chinese 预留字段 \~english Reserved field
  513. unsigned int nParamCnt; ///< \~chinese 参数个数 \~english The number of parameters which need update
  514. IMV_String* pParamNameList; ///< \~chinese 事件相关的属性名列集合(SDK内部缓存) \~english Array of parameter's name which is related(cached within the SDK)
  515. }IMV_SMsgChannelArg;
  516. /// \~chinese
  517. /// \brief Chunk数据信息
  518. /// \~english
  519. /// \brief Chunk data information
  520. typedef struct _IMV_ChunkDataInfo
  521. {
  522. unsigned int chunkID; ///< \~chinese ChunkID \~english ChunkID
  523. unsigned int nParamCnt; ///< \~chinese 属性名个数 \~english The number of paramNames
  524. IMV_String* pParamNameList; ///< \~chinese Chunk数据对应的属性名集合(SDK内部缓存) \~english ParamNames Corresponding property name of chunk data(cached within the SDK)
  525. }IMV_ChunkDataInfo;
  526. /// \~chinese
  527. /// \brief 帧图像信息
  528. /// \~english
  529. /// \brief The frame image information
  530. typedef struct _IMV_FrameInfo
  531. {
  532. uint64_t blockId; ///< \~chinese 帧Id(仅对GigE/Usb/PCIe相机有效) \~english The block ID(GigE/Usb/PCIe camera only)
  533. unsigned int status; ///< \~chinese 数据帧状态(0是正常状态) \~english The status of frame(0 is normal status)
  534. unsigned int width; ///< \~chinese 图像宽度 \~english The width of image
  535. unsigned int height; ///< \~chinese 图像高度 \~english The height of image
  536. unsigned int size; ///< \~chinese 图像大小 \~english The size of image
  537. IMV_EPixelType pixelFormat; ///< \~chinese 图像像素格式 \~english The pixel format of image
  538. uint64_t timeStamp; ///< \~chinese 图像时间戳(仅对GigE/Usb/PCIe相机有效) \~english The timestamp of image(GigE/Usb/PCIe camera only)
  539. unsigned int chunkCount; ///< \~chinese 帧数据中包含的Chunk个数(仅对GigE/Usb相机有效) \~english The number of chunk in frame data(GigE/Usb Camera Only)
  540. unsigned int paddingX; ///< \~chinese 图像paddingX(仅对GigE/Usb/PCIe相机有效) \~english The paddingX of image(GigE/Usb/PCIe camera only)
  541. unsigned int paddingY; ///< \~chinese 图像paddingY(仅对GigE/Usb/PCIe相机有效) \~english The paddingY of image(GigE/Usb/PCIe camera only)
  542. unsigned int recvFrameTime; ///< \~chinese 图像在网络传输所用的时间(单位:微秒,非GigE相机该值为0) \~english The time taken for the image to be transmitted over the network(unit:us, The value is 0 for non-GigE camera)
  543. unsigned int nReserved[19]; ///< \~chinese 预留字段 \~english Reserved field
  544. }IMV_FrameInfo;
  545. /// \~chinese
  546. /// \brief 帧图像数据信息
  547. /// \~english
  548. /// \brief Frame image data information
  549. typedef struct _IMV_Frame
  550. {
  551. IMV_FRAME_HANDLE frameHandle; ///< \~chinese 帧图像句柄(SDK内部帧管理用) \~english Frame image handle(used for managing frame within the SDK)
  552. unsigned char* pData; ///< \~chinese 帧图像数据的内存首地址 \~english The starting address of memory of image data
  553. IMV_FrameInfo frameInfo; ///< \~chinese 帧信息 \~english Frame information
  554. unsigned int nReserved[10]; ///< \~chinese 预留字段 \~english Reserved field
  555. }IMV_Frame;
  556. /// \~chinese
  557. /// \brief PCIE设备统计流信息
  558. /// \~english
  559. /// \brief PCIE device stream statistics information
  560. typedef struct _IMV_PCIEStreamStatsInfo
  561. {
  562. unsigned int imageError; ///< \~chinese 图像错误的帧数 \~english Number of images error frames
  563. unsigned int lostPacketBlock; ///< \~chinese 丢包的帧数 \~english Number of frames lost
  564. unsigned int nReserved0[10]; ///< \~chinese 预留 \~english Reserved field
  565. unsigned int imageReceived; ///< \~chinese 正常获取的帧数 \~english Number of frames acquired
  566. double fps; ///< \~chinese 帧率 \~english Frame rate
  567. double bandwidth; ///< \~chinese 带宽(Mbps) \~english Bandwidth(Mbps)
  568. unsigned int nReserved[8]; ///< \~chinese 预留 \~english Reserved field
  569. }IMV_PCIEStreamStatsInfo;
  570. /// \~chinese
  571. /// \brief U3V设备统计流信息
  572. /// \~english
  573. /// \brief U3V device stream statistics information
  574. typedef struct _IMV_U3VStreamStatsInfo
  575. {
  576. unsigned int imageError; ///< \~chinese 图像错误的帧数 \~english Number of images error frames
  577. unsigned int lostPacketBlock; ///< \~chinese 丢包的帧数 \~english Number of frames lost
  578. unsigned int nReserved0[10]; ///< \~chinese 预留 \~english Reserved field
  579. unsigned int imageReceived; ///< \~chinese 正常获取的帧数 \~english Number of images error frames
  580. double fps; ///< \~chinese 帧率 \~english Frame rate
  581. double bandwidth; ///< \~chinese 带宽(Mbps) \~english Bandwidth(Mbps)
  582. unsigned int nReserved[8]; ///< \~chinese 预留 \~english Reserved field
  583. }IMV_U3VStreamStatsInfo;
  584. /// \~chinese
  585. /// \brief Gige设备统计流信息
  586. /// \~english
  587. /// \brief Gige device stream statistics information
  588. typedef struct _IMV_GigEStreamStatsInfo
  589. {
  590. unsigned int nReserved0[10]; ///< \~chinese 预留 \~english Reserved field
  591. unsigned int imageError; ///< \~chinese 图像错误的帧数 \~english Number of image error frames
  592. unsigned int lostPacketBlock; ///< \~chinese 丢包的帧数 \~english Number of frames lost
  593. unsigned int nReserved1[4]; ///< \~chinese 预留 \~english Reserved field
  594. unsigned int nReserved2[5]; ///< \~chinese 预留 \~english Reserved field
  595. unsigned int imageReceived; ///< \~chinese 正常获取的帧数 \~english Number of frames acquired
  596. double fps; ///< \~chinese 帧率 \~english Frame rate
  597. double bandwidth; ///< \~chinese 带宽(Mbps) \~english Bandwidth(Mbps)
  598. unsigned int nReserved[4]; ///< \~chinese 预留 \~english Reserved field
  599. }IMV_GigEStreamStatsInfo;
  600. /// \~chinese
  601. /// \brief 统计流信息
  602. /// \~english
  603. /// \brief Stream statistics information
  604. typedef struct _IMV_StreamStatisticsInfo
  605. {
  606. IMV_ECameraType nCameraType; ///< \~chinese 设备类型 \~english Device type
  607. union
  608. {
  609. IMV_PCIEStreamStatsInfo pcieStatisticsInfo; ///< \~chinese PCIE设备统计信息 \~english PCIE device statistics information
  610. IMV_U3VStreamStatsInfo u3vStatisticsInfo; ///< \~chinese U3V设备统计信息 \~english U3V device statistics information
  611. IMV_GigEStreamStatsInfo gigeStatisticsInfo; ///< \~chinese Gige设备统计信息 \~english GIGE device statistics information
  612. };
  613. }IMV_StreamStatisticsInfo;
  614. /// \~chinese
  615. /// \brief 枚举属性的枚举值信息
  616. /// \~english
  617. /// \brief Enumeration property 's enumeration value information
  618. typedef struct _IMV_EnumEntryInfo
  619. {
  620. uint64_t value; ///< \~chinese 枚举值 \~english Enumeration value
  621. char name[IMV_MAX_STRING_LENTH]; ///< \~chinese symbol名 \~english Symbol name
  622. }IMV_EnumEntryInfo;
  623. /// \~chinese
  624. /// \brief 枚举属性的可设枚举值列表信息
  625. /// \~english
  626. /// \brief Enumeration property 's settable enumeration value list information
  627. typedef struct _IMV_EnumEntryList
  628. {
  629. unsigned int nEnumEntryBufferSize; ///< \~chinese 存放枚举值内存大小 \~english The size of saving enumeration value
  630. IMV_EnumEntryInfo* pEnumEntryInfo; ///< \~chinese 存放可设枚举值列表(调用者分配缓存) \~english Save the list of settable enumeration value(allocated cache by the caller)
  631. }IMV_EnumEntryList;
  632. /// \~chinese
  633. /// \brief 像素转换结构体
  634. /// \~english
  635. /// \brief Pixel convert structure
  636. typedef struct _IMV_PixelConvertParam
  637. {
  638. unsigned int nWidth; ///< [IN] \~chinese 图像宽 \~english Width
  639. unsigned int nHeight; ///< [IN] \~chinese 图像高 \~english Height
  640. IMV_EPixelType ePixelFormat; ///< [IN] \~chinese 像素格式 \~english Pixel format
  641. unsigned char* pSrcData; ///< [IN] \~chinese 输入图像数据 \~english Input image data
  642. unsigned int nSrcDataLen; ///< [IN] \~chinese 输入图像长度 \~english Input image length
  643. unsigned int nPaddingX; ///< [IN] \~chinese 图像宽填充 \~english Padding X
  644. unsigned int nPaddingY; ///< [IN] \~chinese 图像高填充 \~english Padding Y
  645. IMV_EBayerDemosaic eBayerDemosaic; ///< [IN] \~chinese 转换Bayer格式算法 \~english Alorithm used for Bayer demosaic
  646. IMV_EPixelType eDstPixelFormat; ///< [IN] \~chinese 目标像素格式 \~english Destination pixel format
  647. unsigned char* pDstBuf; ///< [OUT] \~chinese 输出数据缓存(调用者分配缓存) \~english Output data buffer(allocated cache by the caller)
  648. unsigned int nDstBufSize; ///< [IN] \~chinese 提供的输出缓冲区大小 \~english Provided output buffer size
  649. unsigned int nDstDataLen; ///< [OUT] \~chinese 输出数据长度 \~english Output data length
  650. unsigned int nReserved[8]; ///< \~chinese 预留 \~english Reserved field
  651. }IMV_PixelConvertParam;
  652. typedef struct tagPoint2Di32
  653. {
  654. int x;
  655. int y;
  656. }IMV_Point2Di32;
  657. // 矩形框结构体
  658. // rectangle of struct
  659. //////////////////////////////////////////////////////////////////////////////////
  660. typedef struct tagRect2Di32
  661. {
  662. IMV_Point2Di32 ul; //左上 | left upper
  663. IMV_Point2Di32 lr; //右下 | right down
  664. }IMV_Rect2Di32;
  665. /// \~chinese
  666. /// \brief 畸变矫正结构体
  667. /// \~english
  668. /// \brief Pixel convert structure
  669. typedef struct _IMV_ImageCalibParam
  670. {
  671. char CalibFilePath[256]; //标定文件路径(IN)
  672. char *pDstBuf; // 图像数据指针(OUT) | Image data pointer
  673. int nDstBufSize; //转换后数据大小(OUT)
  674. int reserved[22]; // 预留字段1 | reserved
  675. }IMV_ImageCalibParam;
  676. /// \~chinese
  677. /// \brief 平场矫正结构体
  678. /// \~english
  679. /// \brief Pixel convert structure
  680. typedef struct _IMV_ImageCalibFFCParam
  681. {
  682. char FFCBgroundFilePath[256]; //背景图路径
  683. int nDstBufSize; //转换后数据大小
  684. char* pDstBuf; //转换后数据大小
  685. }IMV_ImageCalibFFCParam;
  686. /// \~chinese
  687. /// \brief 获取平场系数结构体
  688. /// \~english
  689. /// \brief Pixel convert structure
  690. typedef struct _IMV_LSCConfigParam
  691. {
  692. IMV_FFCType pType; ///< [IN] 处理方式
  693. IMV_String ePixelFormat; ///< [IN] 图像格式(Mono8/...)
  694. unsigned int pCount; ///< [IN] 图像数量
  695. unsigned int nWidth; ///< [IN] 图像宽度
  696. unsigned int nHeight; ///< [IN] 图像高度
  697. const char* pGreyDataPath; ///< [IN] 明场图像路径
  698. const char* pBlackDataPath; ///< [IN] 暗场图像路径
  699. const char* pCfgPath; ///< [OUT] 系数文件路径
  700. int reserved[31];
  701. }IMV_LSCConfigParam;
  702. /// \~chinese
  703. /// \brief 平场矫正结构体
  704. /// \~english
  705. /// \brief Pixel convert structure
  706. typedef struct _IMV_LSCCorrectParam
  707. {
  708. IMV_FFCType pType; //< [IN] 图像处理方式
  709. const char* pCfgPath; //< [IN] 系数文件路径
  710. char* pDstBuf; //< [OUT] 转换后的图像数据
  711. int reserved[10]; // 预留字段
  712. }IMV_LSCCorrectParam;
  713. /// \~chinese
  714. /// \brief 录像结构体
  715. /// \~english
  716. /// \brief Record structure
  717. typedef struct _IMV_RecordParam
  718. {
  719. unsigned int nWidth; ///< [IN] \~chinese 图像宽 \~english Width
  720. unsigned int nHeight; ///< [IN] \~chinese 图像高 \~english Height
  721. float fFameRate; ///< [IN] \~chinese 帧率(大于0) \~english Frame rate(greater than 0)
  722. unsigned int nQuality; ///< [IN] \~chinese 视频质量(1-100) \~english Video quality(1-100)
  723. IMV_EVideoType recordFormat; ///< [IN] \~chinese 视频格式 \~english Video format
  724. const char* pRecordFilePath; ///< [IN] \~chinese 保存视频路径 \~english Save video path
  725. unsigned int nReserved[5]; ///< \~chinese 预留 \~english Reserved
  726. }IMV_RecordParam;
  727. /// \~chinese
  728. /// \brief 录像用帧信息结构体
  729. /// \~english
  730. /// \brief Frame information for recording structure
  731. typedef struct _IMV_RecordFrameInfoParam
  732. {
  733. unsigned char* pData; ///< [IN] \~chinese 图像数据 \~english Image data
  734. unsigned int nDataLen; ///< [IN] \~chinese 图像数据长度 \~english Image data length
  735. unsigned int nPaddingX; ///< [IN] \~chinese 图像宽填充 \~english Padding X
  736. unsigned int nPaddingY; ///< [IN] \~chinese 图像高填充 \~english Padding Y
  737. IMV_EPixelType ePixelFormat; ///< [IN] \~chinese 像素格式 \~english Pixel format
  738. unsigned int nReserved[5]; ///< \~chinese 预留 \~english Reserved
  739. }IMV_RecordFrameInfoParam;
  740. /// \~chinese
  741. /// \brief 图像翻转结构体
  742. /// \~english
  743. /// \brief Flip image structure
  744. typedef struct _IMV_FlipImageParam
  745. {
  746. unsigned int nWidth; ///< [IN] \~chinese 图像宽 \~english Width
  747. unsigned int nHeight; ///< [IN] \~chinese 图像高 \~english Height
  748. IMV_EPixelType ePixelFormat; ///< [IN] \~chinese 像素格式 \~english Pixel format
  749. IMV_EFlipType eFlipType; ///< [IN] \~chinese 翻转类型 \~english Flip type
  750. unsigned char* pSrcData; ///< [IN] \~chinese 输入图像数据 \~english Input image data
  751. unsigned int nSrcDataLen; ///< [IN] \~chinese 输入图像长度 \~english Input image length
  752. unsigned char* pDstBuf; ///< [OUT] \~chinese 输出数据缓存(调用者分配缓存) \~english Output data buffer(allocated cache by the caller)
  753. unsigned int nDstBufSize; ///< [IN] \~chinese 提供的输出缓冲区大小 \~english Provided output buffer size
  754. unsigned int nDstDataLen; ///< [OUT] \~chinese 输出数据长度 \~english Output data length
  755. unsigned int nReserved[8]; ///< \~chinese 预留 \~english Reserved
  756. }IMV_FlipImageParam;
  757. /// \~chinese
  758. /// \brief 图像旋转结构体
  759. /// \~english
  760. /// \brief Rotate image structure
  761. typedef struct _IMV_RotateImageParam
  762. {
  763. unsigned int nWidth; ///< [IN][OUT] \~chinese 图像宽 \~english Width
  764. unsigned int nHeight; ///< [IN][OUT] \~chinese 图像高 \~english Height
  765. IMV_EPixelType ePixelFormat; ///< [IN] \~chinese 像素格式 \~english Pixel format
  766. IMV_ERotationAngle eRotationAngle; ///< [IN] \~chinese 旋转角度 \~english Rotation angle
  767. unsigned char* pSrcData; ///< [IN] \~chinese 输入图像数据 \~english Input image data
  768. unsigned int nSrcDataLen; ///< [IN] \~chinese 输入图像长度 \~english Input image length
  769. unsigned char* pDstBuf; ///< [OUT] \~chinese 输出数据缓存(调用者分配缓存) \~english Output data buffer(allocated cache by the caller)
  770. unsigned int nDstBufSize; ///< [IN] \~chinese 提供的输出缓冲区大小 \~english Provided output buffer size
  771. unsigned int nDstDataLen; ///< [OUT] \~chinese 输出数据长度 \~english Output data length
  772. unsigned int nReserved[8]; ///< \~chinese 预留 \~english Reserved
  773. }IMV_RotateImageParam;
  774. /// \~chinese
  775. /// \brief 设备连接状态事件回调函数声明
  776. /// \param pParamUpdateArg [in] 回调时主动推送的设备连接状态事件信息
  777. /// \param pUser [in] 用户自定义数据
  778. /// \~english
  779. /// \brief Call back function declaration of device connection status event
  780. /// \param pStreamArg [in] The device connection status event which will be active pushed out during the callback
  781. /// \param pUser [in] User defined data
  782. typedef void(*IMV_ConnectCallBack)(const IMV_SConnectArg* pConnectArg, void* pUser);
  783. /// \~chinese
  784. /// \brief 参数更新事件回调函数声明
  785. /// \param pParamUpdateArg [in] 回调时主动推送的参数更新事件信息
  786. /// \param pUser [in] 用户自定义数据
  787. /// \~english
  788. /// \brief Call back function declaration of parameter update event
  789. /// \param pStreamArg [in] The parameter update event which will be active pushed out during the callback
  790. /// \param pUser [in] User defined data
  791. typedef void(*IMV_ParamUpdateCallBack)(const IMV_SParamUpdateArg* pParamUpdateArg, void* pUser);
  792. /// \~chinese
  793. /// \brief 流事件回调函数声明
  794. /// \param pStreamArg [in] 回调时主动推送的流事件信息
  795. /// \param pUser [in] 用户自定义数据
  796. /// \~english
  797. /// \brief Call back function declaration of stream event
  798. /// \param pStreamArg [in] The stream event which will be active pushed out during the callback
  799. /// \param pUser [in] User defined data
  800. typedef void(*IMV_StreamCallBack)(const IMV_SStreamArg* pStreamArg, void* pUser);
  801. /// \~chinese
  802. /// \brief 消息通道事件回调函数声明
  803. /// \param pMsgChannelArg [in] 回调时主动推送的消息通道事件信息
  804. /// \param pUser [in] 用户自定义数据
  805. /// \~english
  806. /// \brief Call back function declaration of message channel event
  807. /// \param pMsgChannelArg [in] The message channel event which will be active pushed out during the callback
  808. /// \param pUser [in] User defined data
  809. typedef void(*IMV_MsgChannelCallBack)(const IMV_SMsgChannelArg* pMsgChannelArg, void* pUser);
  810. /// \~chinese
  811. /// \brief 帧数据信息回调函数声明
  812. /// \param pFrame [in] 回调时主动推送的帧信息
  813. /// \param pUser [in] 用户自定义数据
  814. /// \~english
  815. /// \brief Call back function declaration of frame data information
  816. /// \param pFrame [in] The frame information which will be active pushed out during the callback
  817. /// \param pUser [in] User defined data
  818. typedef void(*IMV_FrameCallBack)(IMV_Frame* pFrame, void* pUser);
  819. #endif // __IMV_DEFINES_H__