Namespace for collection of arithmetic functions from the Foundation package. More...
Enumerations | |
enum class | PixelOverflow { Scale , Truncate } |
Defines how arithmetic overflows and underflows are handled. More... | |
enum class | SqrtPixelScaling { AsIs , Yes } |
Defines the post processing of the Sqrt function. More... | |
Functions | |
std::unique_ptr< Image > | Add (const Image &image1, const Image &image2, PixelOverflow overflow) |
Add the pixel values of both input images to obtain the output image. More... | |
template<class RANGE > | |
TypedRange< std::unique_ptr< Image >, double, RANGE >::type | Add (const Image &image, const RANGE &values, PixelOverflow overflow) |
Add constant offsets to the pixel values of the input image. More... | |
std::unique_ptr< Image > | Add (const Image &image, double value, PixelOverflow overflow) |
Add constant offsets to the pixel values of the input image. More... | |
std::unique_ptr< Image > | Multiply (const Image &image1, const Image &image2, PixelOverflow overflow) |
Multiply the pixel values of both input images to obtain the output image. More... | |
template<class RANGE > | |
TypedRange< std::unique_ptr< Image >, double, RANGE >::type | Multiply (const Image &image, const RANGE &values, PixelOverflow overflow) |
Multiply constant values to the pixel values of the input image. More... | |
std::unique_ptr< Image > | Multiply (const Image &image, double value, PixelOverflow overflow) |
Multiply constant values to the pixel values of the input image. More... | |
std::unique_ptr< Image > | Subtract (const Image &image1, const Image &image2) |
Subtract the pixel values of image 2 from image 1 to obtain the output image. More... | |
template<class RANGE > | |
TypedRange< std::unique_ptr< Image >, double, RANGE >::type | Subtract (const Image &image, const RANGE &values) |
Subtract constant offsets from the pixel values of the input image. More... | |
std::unique_ptr< Image > | Subtract (const Image &image, double value) |
Subtract constant offsets from the pixel values of the input image. More... | |
std::unique_ptr< Image > | Divide (const Image &image1, const Image &image2, int upShift) |
Divide the pixel values of image1 by the pixel values of image 2 to obtain the output image and shift them up by upShift bits to preserve information. More... | |
template<class RANGE > | |
TypedRange< std::unique_ptr< Image >, double, RANGE >::type | Divide (const Image &image, const RANGE &values) |
Divide pixel values from the input image by constant values. More... | |
std::unique_ptr< Image > | Divide (const Image &image, double value) |
Divide pixel values from the input image by a constant value. More... | |
std::unique_ptr< Image > | Absolute (const Image &image) |
Determines the absolute values of the pixels in the input image. More... | |
std::unique_ptr< Image > | SubtractAbs (const Image &image1, const Image &image2) |
Subtract the pixel values of image 2 from image 1 to obtain the output image. More... | |
template<class RANGE > | |
TypedRange< std::unique_ptr< Image >, double, RANGE >::type | SubtractAbs (const Image &image, const RANGE &values) |
Subtract constant offsets from the pixel values of the input image. More... | |
std::unique_ptr< Image > | SubtractAbs (const Image &image, double value) |
Subtract constant offsets from the pixel values of the input image. More... | |
std::unique_ptr< Image > | Square (const Image &image, PixelOverflow overflow) |
Squares the pixel values of the input image to obtain the output image. More... | |
std::unique_ptr< Image > | Sqrt (const Image &image, SqrtPixelScaling scaling) |
Calculates the square roots of pixel values of a source image and writes them into the destination image. More... | |
Namespace for collection of arithmetic functions from the Foundation package.
|
strong |
|
strong |
Defines the post processing of the Sqrt function.
Enumerator | |
---|---|
AsIs | Square root result is stored as is (no scaling). |
Yes | Square root result is scaled to the DataType's range. |
|
inline |
Determines the absolute values of the pixels in the input image.
[in] | image | Input image. |
Any | exception derived from std::exception including CvbException. |
Of course calling this function on an image with unsigned pixels will have no effect.
|
inline |
Add constant offsets to the pixel values of the input image.
[in] | image | Input image. |
[in] | values | Values to be added (at least one per plane in image). |
[in] | overflow | Defines how arithmetic overflow is handled. |
Any | exception derived from std::exception including CvbException. |
If the parameter overflow is set to Scale, the resulting pixel values are divided to fit the dynamic range of the image (truncated otherwise).
|
inline |
Add constant offsets to the pixel values of the input image.
[in] | image | Input image. |
[in] | value | Value to be added to each image plane. |
[in] | overflow | Defines how arithmetic overflow is handled. |
Any | exception derived from std::exception including CvbException. |
If the parameter overflow is set to Scale, the resulting pixel values are divided to fit the dynamic range of the image (truncated otherwise).
|
inline |
Add the pixel values of both input images to obtain the output image.
[in] | image1 | Input image 1. |
[in] | image2 | Input image 2. |
[in] | overflow | Defines how arithmetic overflow is handled. |
Any | exception derived from std::exception including CvbException. |
If the parameter overflow is set to Scale, the resulting pixel values are divided to fit the dynamic range of the image (truncated otherwise). If the sizes of the two input images differ, the result image will contain the biggest rectangle common to both input images.
|
inline |
Divide pixel values from the input image by constant values.
[in] | image | Input image. |
[in] | values | Values to divide by (at least one per plane in image). |
Any | exception derived from std::exception including CvbException. |
|
inline |
Divide pixel values from the input image by a constant value.
[in] | image | Input image. |
[in] | value | Value to divide each plane by. |
Any | exception derived from std::exception including CvbException. |
|
inline |
Divide the pixel values of image1 by the pixel values of image 2 to obtain the output image and shift them up by upShift bits to preserve information.
[in] | image1 | Input image 1. |
[in] | image2 | Input image 2. |
[in] | upShift | Result shift parameter. |
Any | exception derived from std::exception including CvbException. |
If the sizes of the two input images differ, the result image will contain the biggest rectangle common to both input images.
|
inline |
Multiply constant values to the pixel values of the input image.
[in] | image | Input image. |
[in] | values | Values to be multiplied (at least one per plane in image). |
[in] | overflow | Defines how arithmetic overflow is handled. |
Any | exception derived from std::exception including CvbException. |
If the parameter overflow is set to Scale, the resulting pixel values are divided to fit the dynamic range of the image (truncated otherwise).
|
inline |
Multiply constant values to the pixel values of the input image.
[in] | image | Input image. |
[in] | value | Value to be multiplied to each image plane. |
[in] | overflow | Defines how arithmetic overflow is handled. |
Any | exception derived from std::exception including CvbException. |
If the parameter overflow is set to Scale, the resulting pixel values are divided to fit the dynamic range of the image (truncated otherwise).
|
inline |
Multiply the pixel values of both input images to obtain the output image.
[in] | image1 | Input image 1. |
[in] | image2 | Input image 2. |
[in] | overflow | Defines how arithmetic overflow is handled. |
Any | exception derived from std::exception including CvbException. |
If the parameter overflow is set to Scale, the resulting pixel values are divided to fit the dynamic range of the image (truncated otherwise). If the sizes of the two input images differ, the result image will contain the biggest rectangle common to both input images.
|
inline |
Calculates the square roots of pixel values of a source image and writes them into the destination image.
[in] | image | Input image. |
[in] | scaling | Whether or not to scale the result. |
Any | exception derived from std::exception including CvbException. |
If the parameter scaling is AsIs, the resulting image has pixel values as they come out of the calculation. If Yes, the results will be multiplied to fit the dynamic range of the image, effectively turning this function into a gamma correction with a gamma value of 1/2.
|
inline |
Squares the pixel values of the input image to obtain the output image.
[in] | image | Input image. |
[in] | overflow | Defines how arithmetic overflow is handled. |
Any | exception derived from std::exception including CvbException. |
If the parameter overflow is set to Scale, the resulting pixel values are divided to fit the dynamic range of the image (truncated otherwise). Scaling effectively turns this function into a gamma correction with a gamma value of 2.
|
inline |
Subtract constant offsets from the pixel values of the input image.
[in] | image | Input image. |
[in] | values | Values to be subtracted (at least one per plane in image). |
Any | exception derived from std::exception including CvbException. |
Negative results are saturated at DataType::MinVal.
|
inline |
Subtract constant offsets from the pixel values of the input image.
[in] | image | Input image. |
[in] | value | Value to be subtracted from each image plane. |
Any | exception derived from std::exception including CvbException. |
Negative results are saturated at DataType::MinVal.
|
inline |
Subtract the pixel values of image 2 from image 1 to obtain the output image.
[in] | image1 | Input image 1. |
[in] | image2 | Input image 2. |
Any | exception derived from std::exception including CvbException. |
Negative results are saturated at DataType::MinVal. If the sizes of the two input images differ, the result image will contain the biggest rectangle common to both input images.
|
inline |
Subtract constant offsets from the pixel values of the input image.
[in] | image | Input image. |
[in] | values | Values to be subtracted (at least one per plane in image). |
Any | exception derived from std::exception including CvbException. |
The stored results are the absolute value of the difference of both values.
|
inline |
Subtract constant offsets from the pixel values of the input image.
[in] | image | Input image. |
[in] | value | Value to be subtracted from each image plane. |
Any | exception derived from std::exception including CvbException. |
The stored results are the absolute value of the difference of both values.
|
inline |
Subtract the pixel values of image 2 from image 1 to obtain the output image.
[in] | image1 | Input image 1. |
[in] | image2 | Input image 2. |
Any | exception derived from std::exception including CvbException. |
The stored results are the absolute value of the difference of both pixels. If the sizes of the two input images differ, the result image will contain the biggest rectangle common to both input images.