MIG Grabber SDK Manual 1.0
This is the manual for MIG Grabber SDK
|
#include "MIG_ErrCode.h"
Go to the source code of this file.
Classes | |
struct | _tagBOARD_INFO |
Board Info struct. More... | |
struct | _tagBOARD_LIST |
Board List struct. More... | |
struct | _tagMIG_VIDEO_CONF |
Video Config struct. More... | |
struct | _tagMIG_I2C_CONF |
I2C Config struct. More... | |
Macros | |
#define | MIG_PARAM_VIDEO_FMT 1 |
0:BAYER, 1:GRAY, 2:YUV422, 3:RGB16 | |
#define | MIG_PARAM_PIXEL_ORDER 2 |
0:BGGR, 1:GBRG, 2:RGGB, 3:GRBG, / 0:YCBYCR;YUYV, 1:YCRYCB;YVYU, 2:CBYCRY;UYVY, 3:CRYCBY;VYUY | |
#define | MIG_PARAM_HOR_RES 3 |
Horizontal resolution (ex> 1920) | |
#define | MIG_PARAM_VER_RES 4 |
Vertical resolution (ex> 1080) | |
#define | MIG_PARAM_BITS_PER_PIXEL 5 |
bits per pixel (for internal image buffer and source) | |
#define | MIG_PARAM_SRC_BITS_PER_PIXEL 6 |
bits per pixel for source | |
#define | MIG_PARAM_I2C_SLAVE_ADDR 11 |
1byte data | |
#define | MIG_PARAM_I2C_ADDR_TYPE_WORD 12 |
0:byte Address, 1:word Address | |
#define | MIG_PARAM_I2C_DATA_TYPE_WORD 13 |
0:byte Data, 1:word Data | |
#define | MIG_PARAM_I2C_CHECK_ACK 14 |
Check Acknowledge. | |
#define | MIG_PARAM_I2C_REPEAT_START 15 |
Repeated Start Mode. | |
#define | MIG_PARAM_I2C_SPEED_KHZ 16 |
400: 400Khz | |
#define | MIG_PARAM_BOARD_PRESET 61 |
0: RESET / 1: ENABLE | |
#define | MIG_PARAM_GPIO_1 71 |
GPIO 1,2 output only / GPIO 3~7 bi-direction (0: low, 1: high) | |
Typedefs | |
typedef struct _tagBOARD_INFO | _BOARD_INFO |
Board Info struct. | |
typedef struct _tagBOARD_LIST | _BOARD_LIST |
Board List struct. | |
typedef struct _tagMIG_VIDEO_CONF | _MIG_VIDEO_CONF |
Video Config struct. | |
typedef struct _tagMIG_I2C_CONF | _MIG_I2C_CONF |
I2C Config struct. | |
Functions | |
int | GetMigSdkVersion () |
Get the version of MIG SDK. | |
int | EnumerateBoard (_BOARD_LIST *pDest) |
Get the list of connected boards. | |
int | GetNumOfBoard () |
Get the number of connected boards. | |
int | GetBoardId (int nUsbIndex) |
Get the board id by the usb index. | |
void | GetErrStr (int nErrCode, char *pBuff, int sizeBuff) |
Get the error string. | |
int | SetParamInt (int BoardId, int type, int val) |
Set the parameter. | |
int | GetParamInt (int BoardId, int type) |
Get the parameter. | |
int | OpenGrabber (int BoardId, int nGrabberType, MIG_HANDLE hwndParent) |
Open Grabber board. | |
void | SetConfigPathName (int BoardId, const char *pConfigFilePath) |
Set the config path name. | |
int | CloseGrabber (int BoardId) |
Close Grabber board. | |
BOOL | IsGrabberOpened (int BoardId) |
Query that Grabber is opened. | |
int | GetGrabberType (int BoardId) |
Get the Grabber Type. | |
int | GetSerialNo (int BoardId, char *pSn, int sizeSN) |
Get the Serial Number. | |
BOOL | IsVirtual (int BoardId) |
Query that Grabber is virtual mode. | |
int | Grab (int BoardId, int nNbImage, DWORD dwTimeOut_ms) |
Captures the specified number of frames. | |
int | GrabContinuous (int BoardId) |
Start capturing image. | |
BOOL | GrabInProgress (int BoardId) |
Query that Grab is in progress. | |
int | HaltGrab (int BoardId) |
Stop capturing image. | |
int | WaitForFrameDone (int BoardId, DWORD dwTimeOut_ms) |
Wait for new frame. | |
int | GetImage (int BoardId, unsigned char *pDstBuffer, int dstWidth, int dstHeight, int dstPitchBytes) |
Get image data. | |
int | i2cRead (int BoardId, unsigned short wRegAddr, BYTE *pbytValue, int nLength) |
Read i2c data. | |
int | i2cWrite (int BoardId, unsigned short wRegAddr, BYTE *pbytValue, int nLength) |
Write i2c data. | |
int | bulk_i2cReset (int BoardId) |
Reset bulk i2c buffer data. | |
int | bulk_i2cSet (int BoardId, unsigned short wRegAddr, BYTE *pbytValue, int nLength) |
Add i2c data into bulk buffer. | |
int | bulk_i2cSetDelay (int BoardId, WORD wDelay_ms) |
Add delay data into bulk buffer. | |
int | bulk_i2cRun (int BoardId) |
Execute bulk i2c buffer data. | |
int | pwrSetVoltage (int BoardId, int nPwrChannel, const int nPwrLevel_mV) |
Power on the specified power channel. | |
int | pwrMeasureVoltage (int BoardId, int nPwrChannel, int *pPwrResult_mV) |
Measure voltage on specified power channel. | |
int | pwrMeasureCurrent (int BoardId, int nPwrChannel, int *pPwrResult_mA) |
Measure current on specified power channel. | |
int | WriteRegisterSet (int BoardId, const char *pFile, const char *pSection, int *pnErrorIndex) |
Apply power or Sensor init configuration. ex> [POWERON] [REGISTER_INIT]. | |
int | ReadSyncCount (int BoardId, DWORD dwTimeOut_ms, int *pDestHsync, int *pDestVsync, ULONG *pDestPClk_Hz) |
Read sync count to check module output. | |
#define MIG_PARAM_BITS_PER_PIXEL 5 |
bits per pixel (for internal image buffer and source)
Definition at line 22 of file migGrabber.h.
#define MIG_PARAM_BOARD_PRESET 61 |
0: RESET / 1: ENABLE
Definition at line 50 of file migGrabber.h.
#define MIG_PARAM_GPIO_1 71 |
GPIO 1,2 output only / GPIO 3~7 bi-direction (0: low, 1: high)
Definition at line 56 of file migGrabber.h.
#define MIG_PARAM_HOR_RES 3 |
Horizontal resolution (ex> 1920)
Definition at line 20 of file migGrabber.h.
#define MIG_PARAM_I2C_ADDR_TYPE_WORD 12 |
0:byte Address, 1:word Address
Definition at line 30 of file migGrabber.h.
#define MIG_PARAM_I2C_CHECK_ACK 14 |
Check Acknowledge.
Definition at line 32 of file migGrabber.h.
#define MIG_PARAM_I2C_DATA_TYPE_WORD 13 |
0:byte Data, 1:word Data
Definition at line 31 of file migGrabber.h.
#define MIG_PARAM_I2C_REPEAT_START 15 |
Repeated Start Mode.
Definition at line 33 of file migGrabber.h.
#define MIG_PARAM_I2C_SLAVE_ADDR 11 |
1byte data
Definition at line 29 of file migGrabber.h.
#define MIG_PARAM_I2C_SPEED_KHZ 16 |
400: 400Khz
Definition at line 34 of file migGrabber.h.
#define MIG_PARAM_PIXEL_ORDER 2 |
0:BGGR, 1:GBRG, 2:RGGB, 3:GRBG, / 0:YCBYCR;YUYV, 1:YCRYCB;YVYU, 2:CBYCRY;UYVY, 3:CRYCBY;VYUY
Definition at line 19 of file migGrabber.h.
#define MIG_PARAM_SRC_BITS_PER_PIXEL 6 |
bits per pixel for source
Definition at line 23 of file migGrabber.h.
#define MIG_PARAM_VER_RES 4 |
Vertical resolution (ex> 1080)
Definition at line 21 of file migGrabber.h.
#define MIG_PARAM_VIDEO_FMT 1 |
0:BAYER, 1:GRAY, 2:YUV422, 3:RGB16
Definition at line 18 of file migGrabber.h.
typedef struct _tagBOARD_INFO _BOARD_INFO |
Board Info struct.
typedef struct _tagBOARD_LIST _BOARD_LIST |
Board List struct.
typedef struct _tagMIG_I2C_CONF _MIG_I2C_CONF |
I2C Config struct.
typedef struct _tagMIG_VIDEO_CONF _MIG_VIDEO_CONF |
Video Config struct.
|
extern |
|
extern |
|
extern |
|
extern |
|
extern |
|
extern |
|
extern |
Get the board id by the usb index.
nUsbIndex | usb index |
|
extern |
Get the error string.
nErrCode | error code |
pBuff | string buffer to get result |
sizeBuff | buffer size |
|
extern |
Get the Grabber Type.
BoardId | ID to control |
|
extern |
|
extern |
Get the version of MIG SDK.
|
extern |
Get the number of connected boards.
|
extern |
|
extern |
Get the Serial Number.
BoardId | ID to control |
pSn | string buffer to get SN |
sizeSN | buffer size |
|
extern |
Captures the specified number of frames.
BoardId | ID to control |
nNbImage | number of grab-image. normally that is 1. (over 1: average images) |
dwTimeOut_ms | command timeout (millisecond) |
|
extern |
Start capturing image.
BoardId | ID to control |
|
extern |
Query that Grab is in progress.
BoardId | ID to control |
|
extern |
|
extern |
|
extern |
Write i2c data.
BoardId | ID to control |
wRegAddr | Register address |
pbytValue | Register data |
nLength | data length |
|
extern |
Query that Grabber is opened.
BoardId | ID to control |
|
extern |
Query that Grabber is virtual mode.
BoardId | ID to control |
|
extern |
|
extern |
|
extern |
|
extern |
|
extern |
Read sync count to check module output.
BoardId | ID to control |
dwTimeOut_ms | timeout for waiting valid sync |
pDestHsync | count of Horizontal sync |
pDestVsync | count of Vertical sync |
pDestPClk_Hz | count of PCLK |
|
extern |
Set the config path name.
BoardId | ID to control |
pConfigFilePath | config path |
|
extern |
Set the parameter.
BoardId | ID to control |
type | MIG_PARAM_VIDEO_FMT |
val | parameter value |
|
extern |
Wait for new frame.
BoardId | ID to control |
dwTimeOut_ms | timeout for waiting new frame (millisecond) |
|
extern |
Apply power or Sensor init configuration. ex> [POWERON] [REGISTER_INIT].
BoardId | ID to control |
pFile | file name of sensor init |
pSection | section name of sensor init |
pnErrorIndex | if error, error line number |