EduArt Sensor Ring Library 3.0.1
Loading...
Searching...
No Matches
eduart::measurement::GenericGrayscaleImage< T, RESOLUTION > Class Template Reference

Template for images with one channel and variable type. More...

#include <Image.hpp>

Public Member Functions

double avg ()
 Calculate the average over all pixels.
GenericGrayscaleImageround ()
 Round each pixel value when a floating point type is used.
GenericGrayscaleImageoperator/= (const T other)
 Divide each pixel by the same value.
GenericGrayscaleImageoperator+= (const T other)
 Add the same value to each pixel.
GenericGrayscaleImageoperator-= (const T other)
 Subtract the same value from each pixel.
GenericGrayscaleImageoperator+= (const GenericGrayscaleImage &other)
 Add two GrayScaleImage images pixel wise.
GenericGrayscaleImageoperator-= (const GenericGrayscaleImage &other)
 Subtract two GrayScaleImage images pixel wise.
template<typename U>
GenericGrayscaleImageoperator+= (const GenericGrayscaleImage< U, RESOLUTION > &other)
 Add two GrayScaleImage images of different data types pixel wise.
template<typename U>
GenericGrayscaleImageoperator-= (const GenericGrayscaleImage< U, RESOLUTION > &other)
 Subtract two GrayScaleImage images of different data types pixel wise.

Public Attributes

std::array< T, RESOLUTION > data = {}
 Internal data structure for the image.

Detailed Description

template<typename T, std::size_t RESOLUTION>
class eduart::measurement::GenericGrayscaleImage< T, RESOLUTION >

Template for images with one channel and variable type.

Member Function Documentation

◆ avg()

template<typename T, std::size_t RESOLUTION>
double eduart::measurement::GenericGrayscaleImage< T, RESOLUTION >::avg ( )

Calculate the average over all pixels.

Returns
average

◆ operator+=() [1/3]

template<typename T, std::size_t RESOLUTION>
GenericGrayscaleImage & eduart::measurement::GenericGrayscaleImage< T, RESOLUTION >::operator+= ( const GenericGrayscaleImage< T, RESOLUTION > & other)

Add two GrayScaleImage images pixel wise.

Returns
Resulting GrayScaleImage with updated values

◆ operator+=() [2/3]

template<typename T, std::size_t RESOLUTION>
template<typename U>
GenericGrayscaleImage & eduart::measurement::GenericGrayscaleImage< T, RESOLUTION >::operator+= ( const GenericGrayscaleImage< U, RESOLUTION > & other)

Add two GrayScaleImage images of different data types pixel wise.

Returns
Resulting GrayScaleImage with updated values

◆ operator+=() [3/3]

template<typename T, std::size_t RESOLUTION>
GenericGrayscaleImage & eduart::measurement::GenericGrayscaleImage< T, RESOLUTION >::operator+= ( const T other)

Add the same value to each pixel.

Returns
Resulting GrayScaleImage with updated values

◆ operator-=() [1/3]

template<typename T, std::size_t RESOLUTION>
GenericGrayscaleImage & eduart::measurement::GenericGrayscaleImage< T, RESOLUTION >::operator-= ( const GenericGrayscaleImage< T, RESOLUTION > & other)

Subtract two GrayScaleImage images pixel wise.

Returns
Resulting GrayScaleImage with updated values

◆ operator-=() [2/3]

template<typename T, std::size_t RESOLUTION>
template<typename U>
GenericGrayscaleImage & eduart::measurement::GenericGrayscaleImage< T, RESOLUTION >::operator-= ( const GenericGrayscaleImage< U, RESOLUTION > & other)

Subtract two GrayScaleImage images of different data types pixel wise.

Returns
Resulting GrayScaleImage with updated values

◆ operator-=() [3/3]

template<typename T, std::size_t RESOLUTION>
GenericGrayscaleImage & eduart::measurement::GenericGrayscaleImage< T, RESOLUTION >::operator-= ( const T other)

Subtract the same value from each pixel.

Returns
Resulting GrayScaleImage with updated values

◆ operator/=()

template<typename T, std::size_t RESOLUTION>
GenericGrayscaleImage & eduart::measurement::GenericGrayscaleImage< T, RESOLUTION >::operator/= ( const T other)

Divide each pixel by the same value.

Returns
Resulting GrayScaleImage with updated values

◆ round()

template<typename T, std::size_t RESOLUTION>
GenericGrayscaleImage & eduart::measurement::GenericGrayscaleImage< T, RESOLUTION >::round ( )

Round each pixel value when a floating point type is used.

Returns
Averaged GrayScaleImage of the same type

The documentation for this class was generated from the following file: