Performs spatial binning on 2D images. More...
#include <peak_ipl/algorithm/peak_ipl_binning.hpp>
Public Types | |
| enum class | BinningMode : uint16_t { Average = PEAK_IPL_BINNINGMODE_AVERAGE , Sum = PEAK_IPL_BINNINGMODE_SUM } |
| Mode parameter for the binning algorithm. More... | |
Public Member Functions | |
| Binning () | |
| Constructor for a new Binning instance. | |
| ~Binning () | |
| Destructor for the Binning instance. | |
| Binning (const Binning &other) | |
| Copy Constructor for a new Binning instance. | |
| Binning & | operator= (const Binning &other) |
| Copy assigment for Binning instance. | |
| Binning (Binning &&other) noexcept | |
| Move constructor for Binning instance. | |
| Binning & | operator= (Binning &&other) noexcept |
| Move assignment for Binning instance. | |
| void | SetBinningX (uint8_t value) |
| Sets the values of the binning in horizontal direction. | |
| uint8_t | BinningX () const |
| Returns the value of the binning in horizontal direction. | |
| void | SetBinningY (uint8_t value) |
| Sets the values of the binning in vertical direction. | |
| uint8_t | BinningY () const |
| Returns the value of the binning in vertical direction. | |
| uint8_t | BinningMin () const |
| Returns the minimum value for the binning. | |
| uint8_t | BinningMax () const |
| Returns the maximum value for the binning. | |
| Size2D | ExpectedOutputSize (Size2D inputSize, PixelFormatName pixelFormat) const |
| Returns the size of a binned image given the input size and pixelformat. | |
| void | SetMode (BinningMode mode) |
| Sets the values of the binning mode. | |
| BinningMode | Mode () const |
| Returns the value of the binning mode. | |
| bool | IsPixelFormatSupported (PixelFormatName pixelFormatName) const |
| Returns whether the binning supports the given pixel format. | |
| Image | Process (const Image &inputImage) const |
| Applies the binning on the given image. | |
Performs spatial binning on 2D images.
The Binning class provides a configurable image-processing operation that reduces image resolution by aggregating pixel blocks in the horizontal and/or vertical direction. The aggregation can be performed either by summation or averaging, depending on the selected binning mode. Binning is used to increase signal-to-noise ratio (SNR), improve memory footprint or accelerate downstream image processing steps.
|
strong |
|
inline |
|
inline |
|
inline |
Copy Constructor for a new Binning instance.
Creates a new Binning instance.
| [in] | other | The other instance to acquire a reference for. |
|
inlinenoexcept |
Move constructor for Binning instance.
Moves the instance from other to this. Afterwards other is invalid.
| [in] | other | The other instance to move. |
|
inline |
Returns the maximum value for the binning.
|
inline |
Returns the minimum value for the binning.
|
inline |
Returns the value of the binning in horizontal direction.
|
inline |
Returns the value of the binning in vertical direction.
|
inline |
Returns the size of a binned image given the input size and pixelformat.
| [in] | inputSize | The size of the input image. |
| [in] | pixelFormat | The pixelFormat of the input image. |
| InvalidArgument | pixelFormat isn't supported. |
|
inline |
Returns whether the binning supports the given pixel format.
| [in] | pixelFormatName | The pixel format of interest. |
|
inline |
Returns the value of the binning mode.
Move assignment for Binning instance.
Moves the instance from other to this. Afterwards other is invalid.
| [in] | other | The other instance to move. |
Copy assigment for Binning instance.
Acquires a reference from other to this instance. If this instance already has a reference, it will be destroyed.
| [in] | other | The other instance to acquire a reference for. |
Applies the binning on the given image.
| [in] | inputImage | Image to process. |
| ImageFormatNotSupportedException | image has unsupported pixel format. |
| InvalidArgument | the image is too small. |
|
inline |
Sets the values of the binning in horizontal direction.
| [in] | value | The value of the binning in horizontal direction. |
| InvalidArgument | value isn't supported. |
|
inline |
Sets the values of the binning in vertical direction.
| [in] | value | The value of the binning in vertical direction. |
| InvalidArgument | value isn't supported. |
|
inline |
Sets the values of the binning mode.
| [in] | mode | The value of the binning mode. |
| InvalidArgument | value isn't supported. |