北京大恒 1394 高速相机4相机同时采集模块,VC++编写, 本人贡献, 相机型号: HV1300FM。界面如下:
头文件如下:
#pragma once
#include "daheng\\include\HVDAILT.h" //北京大恒
#include "daheng\\include\HVDef.h" //北京大恒
#include "daheng\\include\HVDevDetect.h" //北京大恒
#include "daheng\\include\HVUtil.h" //北京大恒
#include "daheng\\include\Raw2Rgb.h" //北京大恒
#define WIDTH_BYTES(bits) (((bits) + 31) / 32 * 4)
typedef struct DISP_DESC_struct{
HHV m_hhv; //数字摄像机句柄
HDC m_hDC; //显示句柄
RECT rcInputWindow; //输入窗口
RECT rcOutputWindow; //输出窗口
RECT rcViewWindow; //显示窗口
BITMAPINFO *m_pBmpInfo; //BITMAPINFO 结构指针,显示图像时使用
BYTE *m_pRawBuffer; //采集图像原始数据缓冲区
BYTE *m_pImageBuffer; //同m_pRawBuffer
BYTE *m_pImageBuffer1; //同m_pRawBuffer
BYTE *m_pBufferTemp; //垂直方向镜像
char m_chBmpBuf[2048]; //BIMTAPINFO 存储缓冲区,m_pBmpInfo即指向此缓冲区
} DISP_DESC;
class CCaptureTool1300
{
public:
CCaptureTool1300(void);
virtual ~CCaptureTool1300(void);
DISP_DESC m_DispDesc[4]; //一共4个相机,编号0~3
long m_Gain[4]; //增益值
long m_ExposureTint_Upper[4]; //曝光时间
long m_ExposureTint_Lower[4]; //曝光时间
long m_ADCLevel[4];
BOOL InitialDH1300_0();
BOOL InitialDH1300_1();
BOOL InitialDH1300_2();
BOOL InitialDH1300_3();
BOOL InitialDH1300_0(HWND hWnd, HDC hDC);
BOOL InitialDH1300_1(HWND hWnd, HDC hDC);
BOOL InitialDH1300_2(HWND hWnd, HDC hDC);
BOOL InitialDH1300_3(HWND hWnd, HDC hDC);
BOOL SetExposureTintUpper(int nCamera);
BOOL SetGain(int nCamera);
BOOL SetADCLevel(int nCamera);
BOOL SnapShotAndDisp(int nCamera);
BOOL SnapShotAndSaveBMPFile(int nCamera, char *FileName);
BOOL SaveBMPFile(LPCSTR lpFileName, BITMAPINFO *pBmpInfo, BYTE *pImageBuffer);
void Grab(int nCamera);
BOOL SnapexOpen(int nCamera);
BOOL SnapexClose(int nCamera);
void SnapexStart(int nCamera);
BOOL SnapexStop(int nCamera);
static int CALLBACK SnapCallback0(HV_SNAP_INFO *pInfo);
static int CALLBACK SnapCallback1(HV_SNAP_INFO *pInfo);
static int CALLBACK SnapCallback2(HV_SNAP_INFO *pInfo);
static int CALLBACK SnapCallback3(HV_SNAP_INFO *pInfo);
};
相关文件见附件:
文章评论(0条评论)
登录后参与讨论