Ok.. This is from the VEO SDK Documentation...
How would I be able to call up the Snapshot function in VB .NET??!??!?
Camera SDIO SDK Specification
SDK Interface
1. BOOL SDIOCamVersion(HANDLE hCom, TCHAR *DriverVersion)
Description:
Get driver version information
Params
hCom : Camera Device Handle
DriverVersion : buffer to receive data
Return Value
Zero if fail,otherwise not zero;
2. BOOL SDIOCamData(HANDLE hCom,
UCHAR *ScreenBufShow, DWORD *ll)
Description:
Get frame data from driver
Params
hCom : Camera Device Handle
ScreenBufShow : Buffer to receive frame data
ll : To receive data length
Return value
Zero if fail,otherwise not zero;
3. BOOL SDIOCamInit(HANDLE hCom, HWND Mainhwnd )
Description
Device initialization
Params
hCom : Camera Device Handle
Mainhwnd : Handle of Application main window
Return value
Zero if fail,otherwise not zero;
4. BOOL SDIOCamSnapShot(HANDLE hCom,
TSNAPINFO snapshotinfo)
Description
Request for doing snap shot
Params
hCom : Camera Device Handle
snapshotinfo : Image quality to achieve and file name?directory information,
resolution and more.
Return Value
Zero if fail,otherwise not zero;
5. BOOL SDIOCamPreviewStart(HANDLE hCom, HWND hwVideo,
int prvmode)
Description
Request for starting preview
Params
hCom : Camera Device Handle
hwVideo : Handle of Video window
prvmode : preview mode, values:
PREVIEW_160_120_1X : preview with 160*120 and zoom 1x
PREVIEW_160_120_2X : preview with 160 *120 and zoom 2x
PREVIEW_160_120_4X: preview with 160 *120 and zoom 4x
PREVIEW_320_240_1X: preview with 320*240 and zoom 1x
PREVIEW_320_240_2X: preview with 320*240 and zoom 2x
PREVIEW_320_240_4X: preview with 320*240 and zoom 4x
Return value
Zero if fail,otherwise not zero;
6. BOOL SDIOCamPreviewStop(HANDLE hCom)
Description
Request for stopping preview
Params
hCom : Camera Device Handle
Return value
Zero if fail,otherwise not zero;
7. BOOL SDIOCamPowerOff(HANDLE hCom)
Description
Request for shutting down the power of camera
Params
hCom : Camera Device Handle
Return value
Zero if fail,otherwise not zero;
8. BOOL SDIOCamSetting(HANDLE hCom,_
PARAMETERINFO parainfo)
Description
request for Setting the mode of video or snapshot picture
Params
hCom : Camera Device Handle
Parainfo : Mode information to be set
Return value
Zero if fail,otherwise not zero;
9. void SDIOCamPreviewInit( void )
Description
Initialize to preview
Params
NULL
Return value
No return value;
10. BOOL SDIOCamDeCode( int PreMode, UCHAR *inBuf,
UCHAR *outBuf, ULONG dataLenLeft)
Description
Decode Image data from JPEG formate to BMP format
Params
PreMode: Preview Mode.( as SDIOCamPreviewStart)
InBuf : Buffer of JPEG data source to decode
OutBuf : Buffer to receive decoded BMP data.
DataLenLeft : Data length of JPEG data source
Return value
Zero if fail,otherwise not zero;
? Structures Definition Needed
1.
typedef struct imgcolor_struct {
UCHAR avRed;
UCHAR avGreen;
UCHAR avBlue;
UCHAR avY;
}Imagecolor;
Description
This structure defines the color information
Members
avRed : Value of red
avGreen : Value of green
avBlue :Value of blue
avY : Brightness
2.
typedef struct _TSNAPINFO {
UCHAR resolution;
UCHAR quality;
TCHAR filename[100];
int inbufferlen;
unsigned char *imgbuff;
int *outbufferlen;
HINSTANCE hinst;
} TSNAPINFO, *PTSNAPINFO;
Description
This structure defines the information of snapshot picture when requesting for do snapshot
Members
resolution : resolution of snapshot picture. Values:
TAKPIC_1280_1024: 1280 *1024 wiht zoom 1x
TAKPIC_1280_960: 1280 *960 wiht zoom 1x
TAKPIC_640_480: 640 *480 wiht zoom 1x
TAKPIC_320_240: 320*240 with zoom 1x
TAKPIC_640_480_2X: 640 *480 wiht zoom 2x
TAKPIC_320_240_2X: 320 *240 wiht zoom 2x
TAKPIC_320_240_4X: 320*240 with zoom 4x
quality : quality of snapshot picture. 0 : good 1: better 2: best
filename : file name of picture to save(full name, directory inside).
inbufferlen:
imgbuff:
outbufferlen:
hinst:
3.
typedef struct{
int WhiteBalance;
int Color;
int Compression;
int AeMetering;
}_PARAMETERINFO, *_pPARAMETERINFO;
Description
This structure defines the information of snapshot picture when do setting
Members
WhiteBalance : Mode of whitebalance. Values:
WB_AUTO: auto;
WB_SUN: sun;
WB_TUNGSTEN: tungsten;
WB_FLUORESCENT: fluorescent;
Color : Color of picture, (0: full color; 1: black & white; 2: negative;
3: negative; 4: cool )
Compression : Compression of picture ,( 0: good; 1: better; 2: best )
AeMetering : AeMetering of picture,( 0: average; 1: center-weighted; 2:spot)
? Preview Mode and Snapshot resolution values
For Snapshot:
Zoom*1:
#define TAKPIC_1280_1024 0 //1280 *1024 wiht 1x
#define TAKPIC_1280_960 1 //1280 *960 wiht 1x
#define TAKPIC_640_480 2 //640 *480 wiht 1x
#define TAKPIC_320_240 4 // 320*240 with 1x
Zoom*2:
#define TAKPIC_640_480_2X 7 //640 *480 wiht 2x
#define TAKPIC_320_240_2X 8 //320 *240 wiht 2x
Zoom*4:
#define TAKPIC_320_240_4X 17 // 320*240 with 4x
For Preview:
#define PREVIEW_160_120_1X 6 //preview with 160*120 and zoom 1x
#define PREVIEW_160_120_2X 20 //preview with 160 *120 and zoom 2x
#define PREVIEW_160_120_4X 21 //preview with 160 *120 and zoom 4x
#define PREVIEW_320_240_1X 4 // 320*240 with zoom 1x
#define PREVIEW_320_240_2X 9 //preview with 320*240 and zoom 2x
#define PREVIEW_320_240_4X 17 // 320*240 with zoom 4x
? White balance values
#define WB_AUTO 0 //auto
#define WB_SUN 1 //sun
#define WB_TUNGSTEN 2 //tungsten
#define WB_FLUORESCENT 3 //fluorescent
All above need SDIOCam.h ? SDIOCam.lib ? SDIOCam.dll