48 lines
1.0 KiB
C
48 lines
1.0 KiB
C
|
#pragma once
|
||
|
#include <SDK.h>
|
||
|
#include "../config/bean/ExtCfg.h"
|
||
|
#include <windows.h>
|
||
|
#include "HBDCamera.h"
|
||
|
|
||
|
class OPTCamera :public HBDCamera
|
||
|
{
|
||
|
public:
|
||
|
OPTCamera();
|
||
|
~OPTCamera();
|
||
|
bool Init();
|
||
|
void Uninit();
|
||
|
|
||
|
unsigned int GetShowImage();
|
||
|
bool GenLogImage(void);
|
||
|
void SetExposureAutoByCfg();
|
||
|
void SetExposureTimeByCfg();
|
||
|
bool IsConnect();
|
||
|
void SetFrameRateEnable();
|
||
|
void SetFrameRate();
|
||
|
|
||
|
void CreateTestImage();
|
||
|
protected:
|
||
|
bool ConnectCamera();
|
||
|
void GenTex(uint32_t *tex, unsigned int w, unsigned int h, void * data);
|
||
|
void CatpureRun();
|
||
|
void SetConnect(bool isc);
|
||
|
private:
|
||
|
void ReleaseSource();
|
||
|
static void OnDeviceLinkNotify(const GENICAM_SConnectArg* pConnectArg, void* pUser);
|
||
|
static void OnGetFrame(GENICAM_Frame* pFrame, void* pUser);
|
||
|
private:
|
||
|
|
||
|
GENICAM_System *m_System;
|
||
|
GENICAM_Camera *m_Camera;
|
||
|
GENICAM_StreamSource *m_StreamSource;
|
||
|
GENICAM_EventSubscribe* m_EventSubscribe;
|
||
|
CRITICAL_SECTION m_ConnectCS;
|
||
|
|
||
|
uint32_t m_ShowWidth;
|
||
|
uint32_t m_ShowHeight;
|
||
|
|
||
|
bool m_IsConnect;
|
||
|
bool m_IsCatpure;
|
||
|
};
|
||
|
|