Collection of arithmetic functions from the Foundation Package. More...
Static Public Member Functions | |
static Image | Add (Image img1, Image img2, PixelOverflow overflow) |
Add the pixel values of both input images to obtain the output image. More... | |
static Image | Multiply (Image img1, Image img2, PixelOverflow overflow) |
Multiply the pixel values of both input images to obtain the output image. More... | |
static Image | Subtract (Image img1, Image img2) |
Subtract the pixel values of img2 from img1 to obtain the output image. More... | |
static Image | SubtractAbs (Image img1, Image img2) |
Subtract the pixel values of img2 from img1 to obtain the output image. More... | |
static Image | Divide (Image img1, Image img2, int upShift) |
Divide the pixel values of img2 by the pixel values of img2 to obtain the output image and shift them up by upShift bits to preserve information. More... | |
static Image | Square (Image img, PixelOverflow overflow) |
Squares the pixel values of the input image to obtain the output image. More... | |
static Image | Sqrt (Image img, SqrtPixelScaling scaling) |
Calculates the square roots of pixel values of a source image and writes them into the destination image. More... | |
static Image | Absolute (Image img) |
Determines the absolute values of the pixels in the input image img . More... | |
static Image | Add (Image img, double[] values, PixelOverflow overflow) |
Add constant offsets to the pixel values of the input image. More... | |
static Image | Add (Image img, double value, PixelOverflow overflow) |
Add constant offsets to the pixel values of the input image. More... | |
static Image | Multiply (Image img, double[] values, PixelOverflow overflow) |
Multiply constant values to the pixel values of the input image. More... | |
static Image | Multiply (Image img, double value, PixelOverflow overflow) |
Multiply constant values to the pixel values of the input image. More... | |
static Image | Subtract (Image img, double[] values) |
Subtract constant offsets from the pixel values of the input image. More... | |
static Image | SubtractAbs (Image img, double[] values) |
Subtract constant offsets from the pixel values of the input image. More... | |
static Image | Subtract (Image img, double value) |
Subtract constant offsets from the pixel values of the input image. More... | |
static Image | SubtractAbs (Image img, double value) |
Subtract constant offsets from the pixel values of the input image. More... | |
static Image | Divide (Image img, double[] values) |
Divide pixel values from the input image by constant values. More... | |
static Image | Divide (Image img, double value) |
Divide pixel values from the input image by a constant value. More... | |
Collection of arithmetic functions from the Foundation Package.
Determines the absolute values of the pixels in the input image img .
Of course calling this function on an image with unsigned pixels will have no effect.
img | Input image |
ArgumentNullException | If the input img is null |
ObjectDisposedException | If the input img has already been disposed |
|
static |
Add constant offsets to the pixel values of the input image.
If the parameter overflow is set to PixelOverflow.Scale, the resulting pixel values are divided to fit the dynamic range of the image (truncated otherwise).
img | Input image |
value | Value to be added to each plane |
overflow | Defines how arithmetic overflow is handled. |
ArgumentNullException | If the input img is null |
ObjectDisposedException | If the input img has already been disposed |
|
static |
Add constant offsets to the pixel values of the input image.
If the parameter overflow is set to PixelOverflow.Scale, the resulting pixel values are divided to fit the dynamic range of the image (truncated otherwise).
img | Input image |
values | Values to be added (at least one per plane in img |
overflow | Defines how arithmetic overflow is handled. |
ArgumentNullException | If the input img or values is null. |
ObjectDisposedException | If the input img has already been disposed. |
|
static |
Add the pixel values of both input images to obtain the output image.
If the parameter overflow is set to PixelOverflow.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.
img1 | Input image 1 |
img2 | Input image 2 |
overflow | Defines how arithmetic overflow is handled. |
ArgumentNullException | If the input img1 /img2 is null. |
ObjectDisposedException | If the input img1 /img2 has already been disposed. |
Divide pixel values from the input image by a constant value.
img | Input image |
value | Value to divide each plane by |
ArgumentNullException | If the input img is null |
ObjectDisposedException | If the input img has already been disposed |
CvbException | When value is 0. |
Divide pixel values from the input image by constant values.
img | Input image |
values | Values to divide by (at least one per plane inimg ) |
ArgumentNullException | If the input img or values is null. |
ObjectDisposedException | If the input img has already been disposed |
ArgumentException | When values contains less values than the img has planes. |
CvbException | When values contains 0. |
Divide the pixel values of img2 by the pixel values of img2 to obtain the output image and shift them up by upShift bits to preserve information.
If the sizes of the two input images differ, the result image will contain the biggest rectangle common to both input images.
img1 | Input image 1 |
img2 | Input image 2 |
upShift | Result shift parameter |
ArgumentNullException | If the input img1 /img2 is null. |
ObjectDisposedException | If the input img1 /img2 has already been disposed. |
|
static |
Multiply constant values to the pixel values of the input image.
If the parameter overflow is set to PixelOverflow.Scale, the resulting pixel values are divided to fit the dynamic range of the image (truncated otherwise).
img | Input image |
value | Value to be multiplied to each plane |
overflow | Defines how arithmetic overflow is handled. |
ArgumentNullException | If the input img is null |
ObjectDisposedException | If the input img has already been disposed |
|
static |
Multiply constant values to the pixel values of the input image.
If the parameter overflow is set to PixelOverflow.Scale, the resulting pixel values are divided to fit the dynamic range of the image (truncated otherwise).
img | Input image |
values | Values to be multiplied (at least one per plane inimg |
overflow | Defines how arithmetic overflow is handled. |
ArgumentNullException | If the input img or values is null. |
ObjectDisposedException | If the input img has already been disposed |
|
static |
Multiply the pixel values of both input images to obtain the output image.
If the parameter overflow is set to PixelOverflow.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.
img1 | Input image 1 |
img2 | Input image 2 |
overflow | Defines how arithmetic overflow is handled. |
ArgumentNullException | If the input img1 /img2 is null. |
ObjectDisposedException | If the input img1 /img2 has already been disposed. |
|
static |
Calculates the square roots of pixel values of a source image and writes them into the destination image.
If the parameter scaling is SqrtPixelScaling.AsIs, the resulting image has pixel values as they come out of the calculation. If SqrtPixelScaling.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.
img | Input image |
scaling | Whether or not to scale the result. |
ArgumentNullException | If the input img is null |
ObjectDisposedException | If the input img has already been disposed |
|
static |
Squares the pixel values of the input image to obtain the output image.
If the parameter overflow is set to PixelOverflow.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.
img | Input image |
overflow | Defines how arithmetic overflow is handled. |
ArgumentNullException | If the input img is null |
ObjectDisposedException | If the input img has already been disposed |
Subtract constant offsets from the pixel values of the input image.
Negative results are saturated at DataType.MinVal.
img | Input image |
value | Value to be subtracted to each plane |
ArgumentNullException | If the input img is null |
ObjectDisposedException | If the input img has already been disposed |
Subtract constant offsets from the pixel values of the input image.
Negative results are saturated at DataType.MinVal.
img | Input image |
values | Values to be subtracted (at least one per plane inimg |
ArgumentNullException | If the input img or values is null. |
ObjectDisposedException | If the input img has already been disposed |
Subtract the pixel values of img2 from img1 to obtain the output image.
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.
img1 | Input image 1 |
img2 | Input image 2 |
ArgumentNullException | If the input img1 /img2 is null. |
ObjectDisposedException | If the input img1 /img2 has already been disposed. |
Subtract constant offsets from the pixel values of the input image.
The stored results are the absolute value (see Math.Abs(double)) of the difference of both pixels.
img | Input image |
value | Value to be subtracted to each plane |
ArgumentNullException | If the input img is null |
ObjectDisposedException | If the input img has already been disposed |
Subtract constant offsets from the pixel values of the input image.
The stored results are the absolute value (see Math.Abs(double)) of the difference of both pixels.
img | Input image |
values | Values to be subtracted (at least one per plane inimg |
ArgumentNullException | If the input img or values is null. |
ObjectDisposedException | If the input img has already been disposed |
Subtract the pixel values of img2 from img1 to obtain the output image.
The stored results are the absolute value (see Math.Abs(double)) 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.
img1 | Input image 1 |
img2 | Input image 2 |
ArgumentNullException | If the input img1 /img2 is null. |
ObjectDisposedException | If the input img1 /img2 has already been disposed. |