![]() |
EduArt Sensor Ring Library 4.0.0
|
Template for images with one scalar value per pixel and variable arithmetic type. More...
#include <Image.hpp>
Public Member Functions | |
| void | copyTo (T *buffer, int size) |
| Copy image data to a pre-allocated buffer. | |
| double | avg () |
| Calculate the average over all pixels. | |
| ScalarImage & | round () |
| Round each pixel value when a floating point type is used. | |
| ScalarImage & | operator/= (const T other) |
| Divide each pixel by the same value. | |
| ScalarImage & | operator+= (const T other) |
| Add the same value to each pixel. | |
| ScalarImage & | operator-= (const T other) |
| Subtract the same value from each pixel. | |
| ScalarImage & | operator+= (const ScalarImage &other) |
| Add two ScalarImage images pixel wise. | |
| ScalarImage & | operator-= (const ScalarImage &other) |
| Subtract two ScalarImage images pixel wise. | |
| template<typename U> | |
| ScalarImage & | operator+= (const ScalarImage< U, RESOLUTION > &other) |
| Add two ScalarImage images of different data types pixel wise. | |
| template<typename U> | |
| ScalarImage & | operator-= (const ScalarImage< U, RESOLUTION > &other) |
| Subtract two ScalarImage images of different data types pixel wise. | |
Public Attributes | |
| std::array< T, RESOLUTION > | data = {} |
| Internal data structure for the image. | |
Template for images with one scalar value per pixel and variable arithmetic type.
| double eduart::sensorring::measurement::ScalarImage< T, RESOLUTION >::avg | ( | ) |
Calculate the average over all pixels.
| void eduart::sensorring::measurement::ScalarImage< T, RESOLUTION >::copyTo | ( | T * | buffer, |
| int | size ) |
Copy image data to a pre-allocated buffer.
| [out] | buffer | Pointer to the buffer. Make sure it has sufficient size. |
| [in] | size | Actual size of the buffer (number of elements). If smaller than RESOLUTION, only a subset of pixels is copied. |
| ScalarImage & eduart::sensorring::measurement::ScalarImage< T, RESOLUTION >::operator+= | ( | const ScalarImage< T, RESOLUTION > & | other | ) |
Add two ScalarImage images pixel wise.
| ScalarImage & eduart::sensorring::measurement::ScalarImage< T, RESOLUTION >::operator+= | ( | const ScalarImage< U, RESOLUTION > & | other | ) |
Add two ScalarImage images of different data types pixel wise.
| ScalarImage & eduart::sensorring::measurement::ScalarImage< T, RESOLUTION >::operator+= | ( | const T | other | ) |
Add the same value to each pixel.
| ScalarImage & eduart::sensorring::measurement::ScalarImage< T, RESOLUTION >::operator-= | ( | const ScalarImage< T, RESOLUTION > & | other | ) |
Subtract two ScalarImage images pixel wise.
| ScalarImage & eduart::sensorring::measurement::ScalarImage< T, RESOLUTION >::operator-= | ( | const ScalarImage< U, RESOLUTION > & | other | ) |
Subtract two ScalarImage images of different data types pixel wise.
| ScalarImage & eduart::sensorring::measurement::ScalarImage< T, RESOLUTION >::operator-= | ( | const T | other | ) |
Subtract the same value from each pixel.
| ScalarImage & eduart::sensorring::measurement::ScalarImage< T, RESOLUTION >::operator/= | ( | const T | other | ) |
Divide each pixel by the same value.
| ScalarImage & eduart::sensorring::measurement::ScalarImage< T, RESOLUTION >::round | ( | ) |
Round each pixel value when a floating point type is used.