14#include "sensorring/platform/SensorringExport.hpp"
24namespace measurement {
31 static_assert(std::is_arithmetic<T>::value,
"T must be an arithmetic type");
34 std::array<T, RESOLUTION>
data = {};
103template <
typename T, std::
size_t RESOLUTION>
struct SENSORRING_EXPORT
GenericRGBImage {
104 static_assert(std::is_arithmetic<T>::value,
"T must be an arithmetic type");
107 std::array<std::array<T, 3>, RESOLUTION>
data = {};
static constexpr unsigned int THERMAL_RESOLUTION
Thermal image resolution constant (32x32).
Definition Image.hpp:19
static constexpr unsigned int MAX_MSG_LENGTH
Maximum message length in bytes.
Definition Image.hpp:22
Template for images with one channel and variable type.
Definition Image.hpp:30
GenericGrayscaleImage & operator-=(const GenericGrayscaleImage &other)
Subtract two GrayScaleImage images pixel wise.
GenericGrayscaleImage & operator+=(const T other)
Add the same value to each pixel.
GenericGrayscaleImage & operator-=(const GenericGrayscaleImage< U, RESOLUTION > &other)
Subtract two GrayScaleImage images of different data types pixel wise.
GenericGrayscaleImage & operator+=(const GenericGrayscaleImage &other)
Add two GrayScaleImage images pixel wise.
double avg()
Calculate the average over all pixels.
GenericGrayscaleImage & round()
Round each pixel value when a floating point type is used.
GenericGrayscaleImage & operator+=(const GenericGrayscaleImage< U, RESOLUTION > &other)
Add two GrayScaleImage images of different data types pixel wise.
void copyTo(T *buffer, int size)
Copy image data to a pre-allocated buffer.
GenericGrayscaleImage & operator-=(const T other)
Subtract the same value from each pixel.
GenericGrayscaleImage & operator/=(const T other)
Divide each pixel by the same value.
std::array< T, RESOLUTION > data
Internal data structure for the image.
Definition Image.hpp:34
Template for images with three channels and variable type.
Definition Image.hpp:103
std::array< std::array< T, 3 >, RESOLUTION > data
Internal data structure for the image.
Definition Image.hpp:107
void copyTo(T *buffer, int size)
Copy image data to a pre-allocated buffer (flattened: R,G,B,R,G,B,...).