-
Notifications
You must be signed in to change notification settings - Fork 0
/
lsl_mvcamera.h
67 lines (56 loc) · 3.07 KB
/
lsl_mvcamera.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
#ifndef _CMvCamera_H_
#define _CMvCamera_H_
#include"MvCameraControl.h"
#include<string.h>
#ifndef MV_NULL
#define MV_NULL 0
#endif
// MyCamera
class CMvCamera
{
public:
CMvCamera();
~CMvCamera();
static int MC_GetSDKVersion();
// ch:枚举设备 | en:Enumerate Device 静态变量
static int EnumDevices(unsigned int nTLayerType, MV_CC_DEVICE_INFO_LIST* pstDevList);
// ch:打开设备 | en:Open Device
int MC_Open(MV_CC_DEVICE_INFO* pstDeviceInfo);
// ch:探测网络最佳包大小(只对GigE相机有效) | en:Detection network optimal package size(It only works for the GigE camera)
int MC_GetOptimalPacketSize(unsigned int* pOptimalPacketSize);
// ch:获取和设置Int型参数,如 Width和Height,详细内容参考SDK安装目录下的 MvCameraNode.xlsx 文件
// en:Get Int type parameters, such as Width and Height, for details please refer to MvCameraNode.xlsx file under SDK installation directory
int MC_GetIntValue(IN const char* strKey, OUT MVCC_INTVALUE_EX* pIntValue);
int MC_SetIntValue(IN const char* strKey, IN int64_t nValue);
// ch:开启抓图 | en:Start Grabbing
int MC_StartGrabbing();
// ch:获取和设置Bool型参数,如 ReverseX,详细内容参考SDK安装目录下的 MvCameraNode.xlsx 文件
// en:Get Bool type parameters, such as ReverseX, for details please refer to MvCameraNode.xlsx file under SDK installation directory
int MC_GetBoolValue(IN const char* strKey, OUT bool* pbValue);
int MC_SetBoolValue(IN const char* strKey, IN bool bValue);
// ch:获取和设置Enum型参数,如 PixelFormat,详细内容参考SDK安装目录下的 MvCameraNode.xlsx 文件
// en:Get Enum type parameters, such as PixelFormat, for details please refer to MvCameraNode.xlsx file under SDK installation directory
int MC_GetEnumValue(IN const char* strKey, OUT MVCC_ENUMVALUE* pEnumValue);
int MC_SetEnumValue(IN const char* strKey, IN unsigned int nValue);
int MC_SetEnumValueByString(IN const char* strKey, IN const char* sValue);
// ch:获取和设置Float型参数,如 ExposureTime和Gain,详细内容参考SDK安装目录下的 MvCameraNode.xlsx 文件
// en:Get Float type parameters, such as ExposureTime and Gain, for details please refer to MvCameraNode.xlsx file under SDK installation directory
int MC_GetFloatValue(IN const char* strKey, OUT MVCC_FLOATVALUE* pFloatValue);
int MC_SetFloatValue(IN const char* strKey, IN float fValue);
// ch:停止抓图 | en:Stop Grabbing
int MC_StopGrabbing();
// ch:主动获取一帧图像数据 | en:Get one frame initiatively
int MC_GetImageBuffer(MV_FRAME_OUT* pFrame, int nMsec);
// ch:释放图像缓存 | en:Free image buffer
int MC_FreeImageBuffer(MV_FRAME_OUT* pFrame);
// ch:显示一帧图像 | en:Display one frame image
int MC_DisplayOneFrame(MV_DISPLAY_FRAME_INFO* pDisplayInfo);
// ch:关闭设备 | en:Close Device
int MC_Close();
// ch:保存图片为文件 | en:Save the image as a file
int MC_SaveImageToFile(MV_SAVE_IMG_TO_FILE_PARAM* pstParam);
private:
void* m_hDevHandle;
};
#endif //_MY_CAMERA_H_