#pragma once #pragma warning (push) #pragma warning (disable : 4005) #include #include #pragma warning (pop) #pragma warning (default : 4005) #include "../ImageFunc/ImageFunc.h" #include "MyCameraBase.h" #include typedef Pylon::CBaslerGigEInstantCamera Camera_t; class BaslerCamera : public MyCamera { public: BaslerCamera(void); ~BaslerCamera(void); public: static int TotalCameraCount; //ËùÓÐBaslerÏà»úÊýÁ¿ volatile static int Inited; //ÊÇ·ñÒѾ­³õʼ»¯ static const int TimeOutmS=1000; //³¬Ê±Ê±¼ä int Index; //Ïà»úË÷ÒýºÅ,¶à¸öÏà»úʱ double ExposeTimemS; public: Camera_t camera; //¶¨ÒåÈ«¾ÖÏà»ú±äÁ¿ private: Pylon::CGrabResultPtr ptrGrabResult; public: static int InitLib(); int GetCameraInfo(int index, MyCameraInfo * pMyCameraInfo); int GetCameraCount(){return TotalCameraCount;} int OpenCamera(int Index); int CloseCamera(); int GetCameraWidthHeight(int *nWidth,int *nHeight) { *nWidth=m_nWidth; *nHeight=m_nHeight; return CameraOk; } int GetCameraPixelFormat(){return m_PixelFormat;} int SetExposureTime(double ExposeTime1); int SetGain(double Gain){return CameraOk;} int SetROI(int nOffsetX, int nOffsetY, int nWidth, int nHeight) { return CameraOk; } int StartGrab(); int StopGrab(){return CameraOk;}; int WaitForGrabFinish(int TimeOutmS); int FetchImageData(); int SetPixelFormat(Basler_GigECameraParams::PixelFormatEnums newPixelFormat); };