Created
February 3, 2014 08:33
-
-
Save dotchang/8780537 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#ifndef __GIGE_CAMERA_CAP_H__ | |
#define __GIGE_CAMERA_CAP_H__ | |
#include "FlyCapture2.h" | |
#include "opencv2\\opencv.hpp" | |
void PrintBuildInfo(); | |
void PrintCameraInfo( FlyCapture2::CameraInfo* pCamInfo ); | |
void PrintStreamChannelInfo( FlyCapture2::GigEStreamChannel* pStreamChannel ); | |
void PrintError( FlyCapture2::Error error ); | |
class GigEBusManager | |
{ | |
public: | |
GigEBusManager(); | |
~GigEBusManager(); | |
int Init(); | |
unsigned int num_cameras(); | |
FlyCapture2::PGRGuid* guid(unsigned int id); | |
private: | |
FlyCapture2::Error error; | |
FlyCapture2::BusManager busMgr; | |
FlyCapture2::CameraInfo camInfo[10]; | |
unsigned int numCamInfo; | |
unsigned int numCameras; | |
FlyCapture2::PGRGuid* _guid; | |
FlyCapture2::InterfaceType* _interfaceType; | |
}; | |
class GigECameraCap | |
{ | |
public: | |
GigECameraCap(); | |
~GigECameraCap(); | |
int Init(FlyCapture2::PGRGuid* guid); | |
int Capture(); | |
public: | |
int grap(cv::Mat &img); | |
IplImage* iplgrap(); | |
protected: | |
FlyCapture2::PGRGuid* _guid; | |
FlyCapture2::Error error; | |
FlyCapture2::GigECamera cam; | |
FlyCapture2::CameraInfo camInfo; | |
unsigned int numStreamChannels; | |
FlyCapture2::GigEImageSettingsInfo imageSettingsInfo; | |
FlyCapture2::GigEImageSettings imageSettings; | |
FlyCapture2::Image rawImage; | |
FlyCapture2::Image convertedImage; | |
private: | |
int imageCnt; | |
IplImage *cvImage; | |
cv::Mat mat; | |
}; | |
#endif __GIGE_CAMERA_CAP_H__ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment