-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcamera.h
102 lines (87 loc) · 2.34 KB
/
camera.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
#ifndef CAMERA_H
#define CAMERA_H
#include <arv.h>
struct Parameter {
int value;
int min;
int max;
int step;
};
struct ParameterF {
float value;
float min;
float max;
float step;
};
struct Camera {
unsigned int index;
char *protocol;
char *deviceId;
char *vendor;
char *model;
char *serialNumber;
char *physicalId;
bool connected;
ArvCamera *camera;
ArvRegisterCachePolicy cachePolicy;
ArvStream *stream;
bool binningAvailable;
Parameter xBinning;
Parameter yBinning;
Parameter xOffset;
Parameter yOffset;
Parameter xSize;
Parameter ySize;
ParameterF exposure;
ParameterF gain;
bool frameRateAvailable;
ParameterF frameRate;
bool gainAvailable;
bool gainAuto;
bool gainAutoAvailable;
bool exposureAvailable;
bool exposureAuto;
bool exposureAutoAvailable;
unsigned int numPixelFormats;
long *pixelFormats;
const char **pixelFormatStrings;
const char *pixelFormatString;
ArvPixelFormat pixelFormat;
unsigned int pixelFormatCurrent;
bool autoSocketBuffer;
bool packetResend;
// in milli seconds
unsigned int packetTimeout;
unsigned int frameRetention;
double packetRequestRatio;
void *imageData;
unsigned int imageSize;
unsigned int imageWidth;
unsigned int imageHeight;
unsigned int imagePayload;
unsigned int imageDepth;
bool imageUpdate;
unsigned int numImages;
unsigned int numBytes;
unsigned int numErrors;
Camera(const unsigned int _index);
~Camera(void);
void stop(void);
void start(void);
void startVideo(void);
void stopVideo(void);
static void controlLostCallback(void *_userData);
static void streamCallback(void *_userData, ArvStreamCallbackType _type, ArvBuffer *_buffer);
static void newBufferCallback(ArvStream *_stream, void *_userData);
bool infoQuery(void);
void setImageSize(const int _x, const int _y);
void setImageOffset(const int _x, const int _y);
void setImageBinning(const int _x, const int _y);
void setPixelFormat(const unsigned int _value);
void setFrameRate(const float _value);
void setGain(const float _value);
void setGainAuto(const bool _value);
void setExposure(const float _value);
void setExposureAuto(const bool _value);
};
#endif // CAMERA_H