05Robot 3.0

- Main Page
- Modules
- Classes
- Files

- File List
- File Members

Camera.h
Go to the documentation of this file.
1
7 #ifndef CAMERA_H
8 #define CAMERA_H
9
10 #include <string>
11 #include <vector>
12 #include <QObject>
13 #include <QString>
14
15 #include <opencv2/opencv.hpp>
16 #include <cxmlio.h>
42 using namespace std;
49 class Camera : public cXmlIO
50 {
51 Q_OBJECT
55 Q_PROPERTY(CameraColor CameraColor READ cameraColor WRITE setCameraColor DESIGNABLE true USER true)
56 Q_ENUMS(CameraColor)
57
58 public:
62 enum CameraColor {
63 CameraColor_Mono,
64 CameraColor_BGR,
65 };
69 void setCameraColor(const CameraColor cameraColor);
73 CameraColor cameraColor() const;
74
75 public:
79 int resultX;
83 int resultY;
87 unsigned char* resultBuffer;
91 vector<cv::Point2f> points;
95 bool readData;
96
100 QString cameraName;
101
102
103 private:
104 CameraColor m_cameraColor;
105 public:
109 int pixelSize;
110
111
112 public:
113
114 Camera();
122 virtual int connect(int camera_id);;
126 virtual int start(){return 1;};
132 virtual int sync(){return 1;};
140 virtual int grab(cv::Mat* output = NULL);;
146 virtual int stop(){return 1;};
152 virtual int disconnect(){return 1;};
153
154 signals:
155 void writeInfo(QString);
156 };
158 #endif
cxmlio.h
std
Camera::readData
bool readData
Data readout enable flag.
Definition: Camera.h:95
Camera
Base camera interface class.
Definition: Camera.h:49
Camera::stop
virtual int stop()
Stops acquisition.
Definition: Camera.h:146
Camera::cameraName
QString cameraName
Camera name.
Definition: Camera.h:100
Camera::start
virtual int start()
Starts acquisition.
Definition: Camera.h:126
Camera::disconnect
virtual int disconnect()
Disconnects from camera.
Definition: Camera.h:152
cXmlIO
Delivers XML file serialisation and deserialisation methods for modules.
Definition: cxmlio.h:22
Camera::resultY
int resultY
Output picture height.
Definition: Camera.h:83
Camera::resultBuffer
unsigned char * resultBuffer
Output image buffer.
Definition: Camera.h:87
Camera::pixelSize
int pixelSize
Pixel size in bytes.
Definition: Camera.h:109
Camera::resultX
int resultX
Output picture width.
Definition: Camera.h:79
Camera::points
vector< cv::Point2f > points
Output 2D point buffer.
Definition: Camera.h:91
Camera::sync
virtual int sync()
Sends software trigger to camera.
Definition: Camera.h:132