//----------------------------------------------------------------------------------
/**
\file HVDef.h
\brief This header file defines constant and external struct type
\version V1.0.0.10
\date 2011/08/15
Copyright (c) 2011 Daheng Imavision
All right reserved
*/
//----------------------------------------------------------------------------------
#if !defined(HV_HVDEF) //
#define HV_HVDEF
/* By C++ language compiler */
#ifdef __cplusplus
extern "C" {
#endif
typedef HANDLE HHV;
/// the device type
typedef enum tagHVTYPE {
UNKNOWN_TYPE = -1, ///< Invalid devcie type.
HV1300UCTYPE = 0,
HV2000UCTYPE = 1,
HV1301UCTYPE = 2,
HV2001UCTYPE = 3,
HV3000UCTYPE = 4,
HV1300UMTYPE = 5,
HV1302UCTYPE = 6,
HV2002UCTYPE = 7,
HV3102UCTYPE = 8,
HV1302UMTYPE = 9,
HV1300FCTYPE = 10,
HV2000FCTYPE = 11,
HV3100FCTYPE = 12,
HV1300FMTYPE = 13,
HV1303UCTYPE = 14,
HV2003UCTYPE = 15,
HV3103UCTYPE = 16,
HV1303UMTYPE = 17,
SV1300FMTYPE = 18,
SV1300FCTYPE = 19,
SV1310FCTYPE = 20,
SV1310FMTYPE = 21,
SV1311FCTYPE = 22,
SV1311FMTYPE = 23,
SV400FCTYPE = 24,
SV400FMTYPE = 25,
DH1394FXTYPE = 26,
SV1410FCTYPE = 27,
SV1410FMTYPE = 28,
SV1420FCTYPE = 29,
SV1420FMTYPE = 30,
SV2000FCTYPE = 31,
SV2000FMTYPE = 32,
SV1400FCTYPE = 33,
SV1400FMTYPE = 34,
HV1350UCTYPE = 35,
HV2050UCTYPE = 36,
HV3150UCTYPE = 37,
HV1350UMTYPE = 38,
HV1360UCTYPE = 39,
HV2060UCTYPE = 40,
HV3160UCTYPE = 41,
HV1360UMTYPE = 42,
HV1351UCTYPE = 56,
HV2051UCTYPE = 57,
HV3151UCTYPE = 58,
HV1351UMTYPE = 59,
GV400UCTYPE = 60,
GV400UMTYPE = 61,
HV5051UCTYPE = 62,
HV5051UMTYPE = 63
} HVTYPE;
/// the color code for the device image
typedef enum tagHV_COLOR_CODE {
COLOR_MONO8 = 0, ///< Y only, Y=8bits
COLOR_YUV8_4_1_1 = 1, ///< Y=U=V=8bits, non compressed
COLOR_YUV8_4_2_2 = 2, ///< Y=U=V=8bits, non compressed
COLOR_YUV8_4_4_4 = 3, ///< Y=U=V=8bits, non compressed
COLOR_RGB8 = 4, ///< RGB 8 format, each component has 8bit data
COLOR_MONO16 = 5, ///< Y only, Y=16bits, non compressed(unsigned integer)
COLOR_RGB16 = 6, ///< RGB 16 format, each component has 16bit data
COLOR_SIGNED_MONO16 = 7, ///< Y only, Y=16bits, non compressed(signed integer)
COLOR_SIGNED_RGB16 = 8, ///< R=G=B=16bits, non compressed(signed integer)
COLOR_RAW8 = 9, ///< RAW 8 format, each pixel has 8bit data
COLOR_RAW16 = 10, ///< RAW 16 format, each pixel has 16bit data
COLOR_MONO10 = 128,///< Y only, each pixel has 16bit data, the low 10bit is valid
COLOR_MONO10_NORMALIZED = 129,///< Reserved
COLOR_MONO10_PACKED = 130,///< Y only, packed format, each pixel has 10bit data
COLOR_RAW10 = 131,///< RAW 10 format, each pixel has 16bit data, the low 10bit is valid
COLOR_RAW10_NORMALIZED = 132,///< Reserved
COLOR_RAW10_PACKED = 133,///< RAW 10 packed format, each pixel has 10bit data
COLOR_MONO12 = 134,///< Y only, each pixel has 16bit data, the low 12bit is valid
COLOR_MONO12_NORMALIZED = 135,///< Reserved
COLOR_MONO12_PACKED = 136,///< Y only, packed format, each pixel has 12bit data
COLOR_RAW12 = 137,///< RAW 12 format, each pixel has 16bit data, the low 12bit is valid
COLOR_RAW12_NORMALIZED = 138,///< Reserved
COLOR_RAW12_PACKED = 139 ///< RAW 12 packed format, each pixel has 12bit data
} HV_COLOR_CODE;
/// Color Filter ID
typedef enum tagHV_COLOR_FILTER {
COLOR_FILTER_RG_GB = 0, ///< RGB primary color filter (RG/GB)
COLOR_FILTER_GB_RG = 1, ///< RGB primary color filter (GB/RG)
COLOR_FILTER_GR_BG = 2, ///< RGB primary color filter (GR/BG)
COLOR_FILTER_BG_GR = 3 ///< RGB primary color filter (BG/GR)
} HV_COLOR_FILTER;
/// the video mode
typedef enum tagHV_RESOLUTION {
RES_MODE0 = 0, ///< Resolution 0
RES_MODE1 = 1, ///< Resolution 1
RES_MODE2 = 2, ///< Resolution 2
RES_MODE3 = 3, ///< Resolution 3
RES_MODE4 = 4, ///< Resolution 4
RES_MODE5 = 5, ///< Resolution 5
RES_MODE6 = 6 ///< Resolution 6
} HV_RESOLUTION;
/// the image acquisition mode.
typedef enum tagHV_SNAP_MODE {
CONTINUATION = 0, ///< Acquire images continuously
TRIGGER = 1, ///< Acquiring image controlled by standard trigger
TRIGGER_EDGE = 2, ///< Acquiring image controlled by edge event triggering
TRIGGER_LEVEL = 3, ///< Acquiring image controlled by level triggering
TRIGGER_LEVEL_STANDARD = 4 ///< Acquiring image controlled by standard level triggering
} HV_SNAP_MODE;
/// the trigger signal polarity
typedef enum tagHV_POLARITY {
LOW = 0,
HIGH = 1
} HV_POLARITY;
/// the image acquisition speed
typedef enum tagHV_SNAP_SPEED {
NORMAL_SPEED = 0, ///< Acquiring images at normal speed
HIGH_SPEED = 1 ///< Acquiring images at high speed
} HV_SNAP_SPEED;
///the color channel for controlling gains
typedef enum tagHV_CHANNEL {
RED_CHANNEL = 0x10, ///< Red channel
GREEN_CHANNEL1 = 0x11, ///< Green channe1
GREEN_CHANNEL2 = 0x12, ///< Green channe2
BLUE_CHANNEL = 0x13 ///< Blue channel
} HV_CHANNEL;
/// the controlling method of A/D conversion
typedef enum tagHV_ADC_CONTROL{
ADC_BITS = 0, ///< Controlling bits that are used for A/D conversion
ADC_BLKLEVEL_CAL = 1, ///< Enable/disable to control the black level parameter
ADC_BLKLEVEL_CAL_REDCHANNEL = 0x10,///< Controlling the red channel of the black level
ADC_BLKLEVEL_CAL_GREENCHANNEL1 = 0x11,///< Controlling the green channel 1 of the black level
ADC_BLKLEVEL_CAL_GREENCHANNEL2 = 0x12,///< Controlling the green channel 2 of the black level
ADC_BLKLEVEL_CAL_BLUECHANNEL = 0x13 ///< Controlling the blue channel of the black level
} HV_ADC_CONTROL;
/// the level of A/D conversion
typedef enum tagHV_ADC_LEVEL{
ADC_LEVEL0 = 0, ///< Level 0
ADC_LEVEL1 = 1, ///< Level 1
ADC_LEVEL2 = 2, ///< Level 2
ADC_LEVEL3 = 3, ///< Level 3
ADC_LEVEL4 = 4 ///< Level 4
} HV_ADC_LEVEL;
/// the controlling method of exposure
typedef enum tagHV_AEC_CONTROL{
AEC_EXPOSURE_TIME = 1, ///< Controlling exposure by exposure coefficient
AEC_SHUTTER_SPEED = 2, ///< Controlling the shutter speed
AEC_SHUTTER_UNIT = 3 ///< Controlling the unit of the shutter speed
} HV_AEC_CONTROL;
/// the unit of the shutter speed
typedef enum tagSHUTTER_UNIT{
SHUTTER_US = 0, ///< The unit of the shutter speed is microsecond
SHUTTER_MS = 1 ///< The unit of the shutter speed is millisecond
}SHUTTER_UNIT_VALUE;
/// the mirror direction during the image acquisition
typedef enum tagHV_MIRROR_DIRECTION {
VERT_DIR = 1, ///< performing vertical mirror during image acquisition
HOR_DIR = 2, ///< performing horizontal mirror during image acquisition
FULL_DIR = 3 ///< performing vertical and horizontal mirror during image acquisition
} HV_MIRROR_DIRECTION;
/// the device information of a camera
typedef enum tagHV_DEVICE_INFO {
DESC_DEVICE_TYPE = 0, ///< the device type of a camera
DESC_RESOLUTION = 1, ///< the resolution of a camera
DESC_DEVICE_MARK = 2, ///< the device mark of a camera
DESC_DEVICE_SERIESNUM = 3, ///< the serial number of a camera
DESC_DEVICE_BLANKSIZE = 4, ///< the available range of blanking interval
DESC_DEVICE_CHIPID = 5, ///< the device chip id
DESC_DEVICE_HARDWARE_VERSION = 6, ///< the firmware version of camera
DESC_DEVICE_BAYER_LAYOUT = 11 ///< the bayer layout of image
} HV_DEVICE_INFO;
/// Define HV periphery device control
typedef enum tagHV_PERIDEV_CONTROL{
PERIDEV_BICOLOR_LAMP1 = 0, ///< control the lamp1
PERIDEV_BICOLOR_L