PylonRecorder/pylonwrapper.h

48 lines
1.0 KiB
C++

#ifndef PYLONWRAPPER_H
#define PYLONWRAPPER_H
#include <pylon/PylonIncludes.h>
#include <pylon/BaslerUniversalInstantCamera.h>
#include "mylogger.h"
#include "util.h"
#include "myimage.h"
class PylonWrapper
{
public:
PylonWrapper(const std::string &name);
PylonWrapper(const CameraLayout &layout);
~PylonWrapper();
ImageSettings getImageSettings();
bool isOpen();
void terminate();
bool openCamera(std::string &message);
void closeCamera();
bool grabFrame(MyImage &img);
bool frameRate(uint framerate);
double frameRate();
double maxFrameRate();
double exposureTime();
bool exposureTime(double exposure_time);
double gain();
bool gain(double gain_db);
uint32_t sensorHeight();
uint32_t sensorWidth();
QString userName();
Pylon::CInstantCamera *getCamera();
void resetCamera();
QString deviceName();
private:
Pylon::CInstantCamera *camera;
bool valid, withLayout;
std::string fullName;
CameraLayout layout;
};
#endif // PYLONWRAPPER_H