EduArt Sensor Ring Library 3.0.1
Loading...
Searching...
No Matches
Image.hpp
Go to the documentation of this file.
1// Copyright (c) 2025 EduArt Robotik GmbH
2
9
10#pragma once
11
12#include <array>
13
15
16namespace eduart {
17
18static constexpr unsigned int THERMAL_RESOLUTION = 1024;
19static constexpr unsigned int MAX_MSG_LENGTH = 64;
20
21namespace measurement {
22
27template <typename T, std::size_t RESOLUTION> struct SENSORRING_API GenericGrayscaleImage {
28 static_assert(std::is_arithmetic<T>::value, "T must be an arithmetic type");
29
31 std::array<T, RESOLUTION> data = {};
32
37 double avg();
38
44
50
56
62
68
74
80
86};
87
92template <typename T, std::size_t RESOLUTION> struct SENSORRING_API GenericRGBImage {
93 static_assert(std::is_arithmetic<T>::value, "T must be an arithmetic type");
94
96 std::array<std::array<T, 3>, RESOLUTION> data = {};
97};
98
99} // namespace measurement
100
101} // namespace eduart
Control the import and export of Windows DLL symbols.
Template for images with one channel and variable type.
Definition Image.hpp:27
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.
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:31
Template for images with three channels and variable type.
Definition Image.hpp:92
std::array< std::array< T, 3 >, RESOLUTION > data
Internal data structure for the image.
Definition Image.hpp:96