PylonRecorder/myimage.h

33 lines
634 B
C++

#ifndef MYIMAGE_H
#define MYIMAGE_H
#include<pylon/PylonIncludes.h>
class MyImage
{
public:
MyImage(uint32_t width, uint32_t height);
MyImage(Pylon::CGrabResultPtr ptr);
~MyImage();
int width();
int height();
int size();
int64_t index();
void* data();
time_t timestamp();
bool setFrame(Pylon::CGrabResultPtr ptr);
bool setFrame(Pylon::CPylonImage &img);
private:
uint32_t img_width = 0;
uint32_t img_height = 0;
int64_t img_index = 0;
time_t img_timestamp;
static const int max_width = 5184;
static const int max_height = 2048;
char *buffer; //[max_width * max_height];
};
#endif // MYIMAGE_H