16 #ifndef EPUCK_CAMERA_HPP 17 #define EPUCK_CAMERA_HPP 51 :logic_error(make_what(wrongVersion)){}
53 std::string make_what(
int wrongVersion);
60 :out_of_range(whatArg){}
67 :length_error(whatArg){}
69 :length_error(make_what(maxWidth, maxHeight)){}
71 std::string make_what(
int maxWidth,
int maxHeight);
105 unsigned sensor_y1,
unsigned sensor_width,
106 unsigned sensor_height,
unsigned zoom_fact_width,
107 unsigned zoom_fact_height,
ColorModes color_mode)
throw();
133 void GetCameraData(
unsigned &imageWidth,
unsigned &imageHeight,
141 void GetImage(
unsigned char*
const ptrImage);
145 static const unsigned PO3030K = 0x3030;
146 static const unsigned PO6030K = 0x6030;
150 unsigned sensor_width;
151 unsigned sensor_height;
152 unsigned zoom_fact_width;
153 unsigned zoom_fact_height;
160 unsigned imageByteSize;
162 unsigned imagePixelSize;
163 unsigned rowPixelLength;
164 unsigned columnPixelLength;
166 unsigned epuckCameraVersion;
168 unsigned char* tmpImage;
169 bool tmpImageAllocated;
173 void checkCameraParameters()
const;
176 template <
typename T>
177 void processTmpImage(T* ptrImage)
const;
const SerialPort *const serialPort
A SerialPort class instance shared among the device interfaces.
Definition: epuckInterface.hpp:59
Definition: epuckCamera.hpp:47
Definition: epuckCamera.hpp:63
RGB color mode, with 16 bits per pixel.
Definition: epuckCamera.hpp:83
void GetImage(unsigned char *const ptrImage)
Get a new image from e-puck.
Definition: epuckCamera.cpp:203
Grey color mode, with 8 bits per pixel.
Definition: epuckCamera.hpp:82
ColorModes
Possible color modes for e-puck camera.
Definition: epuckCamera.hpp:80
std::string GetCameraVersion() const
Get the version of camera in e-puck.
Definition: epuckCamera.cpp:174
Definition: epuckCamera.hpp:56
EpuckCamera(const SerialPort *const serialPort, unsigned sensor_x1, unsigned sensor_y1, unsigned sensor_width, unsigned sensor_height, unsigned zoom_fact_width, unsigned zoom_fact_height, ColorModes color_mode)
The EpuckCamera class constructor.
Definition: epuckCamera.cpp:43
Header file of the EpuckInterface class and the struct EpuckInterface::Triple.
Class for to get images from e-puck camera.
Definition: epuckCamera.hpp:43
void Initialize()
Send the configurations givens in EpuckCamera constructor to e-puck.
Definition: epuckCamera.cpp:135
void GetCameraData(unsigned &imageWidth, unsigned &imageHeight, EpuckCamera::ColorModes &colorMode) const
Get the relevant configurations camera data.
Definition: epuckCamera.cpp:194
Base class for all concrete interfaces of e-puck.
Definition: epuckInterface.hpp:33
Send and receive messages from e-puck.
Definition: serialPort.hpp:40
YUV color mode, with 16 bits per pixel.
Definition: epuckCamera.hpp:84