PylonRecorder/dualcamwrapper.h

45 lines
1.1 KiB
C++

#ifndef DUALCAMWRAPPER_H
#define DUALCAMWRAPPER_H
#include <pylon/PylonIncludes.h>
#include <pylon/BaslerUniversalInstantCamera.h>
#include "mylogger.h"
#include "util.h"
#include "myimage.h"
class DualcamWrapper
{
public:
// DualcamWrapper(const std::string &name);
DualcamWrapper(const CameraLayout &layout);
~DualcamWrapper();
ImageSettings getImageSettings(int camindex);
bool isOpen();
void terminate();
bool openCameras(std::string &message);
void closeCameras();
bool grabFrame(MyImage &img, int camindex=0);
bool frameRate(uint framerate);
double frameRate();
double maxFrameRate();
double exposureTime();
bool exposureTime(double exposure_time, int camindex=-1);
double gain();
bool gain(double gain_db, int camindex=-1);
Pylon::CInstantCamera *getCamera(int camindex);
private:
void resetCamera(int camindex);
GenApi::INodeMap& getNodemap(int camindex);
std::vector<Pylon::CInstantCamera*> cameras;
Pylon::CInstantCamera *camera0, *camera1;
bool valid, withLayout;
std::string fullName;
CameraLayout layout;
};
#endif // DUALCAMWRAPPER_H