Basic Image AlgorithmS Library
2.8.0
|
Performs pixelwise arithmetic and boolean operations on images. More...
#include <Base/ImageUtils/ImageCalc.hh>
Static Public Member Functions | |
static void | Abs (const Image< StorageType > &in, Image< StorageType > &out) |
Computes the absolute value for each pixel. More... | |
static void | Add (const Image< StorageType > &in1, const Image< StorageType > &in2, Image< StorageType > &out) |
Computes the pixelwise sum of the input images. More... | |
static void | AddScalar (const Image< StorageType > &in, StorageType scalar, Image< StorageType > &out) |
Adds the scalar value to each pixel of the input image. More... | |
static void | And (const Image< StorageType > &in1, const Image< StorageType > &in2, Image< StorageType > &out) |
Performs a pixelwise AND on the input images. More... | |
static void | Divide (const Image< StorageType > &in1, const Image< StorageType > &in2, Image< StorageType > &out) |
Computes the pixelwise quotient of the input images. More... | |
static void | DivideScalar (const Image< StorageType > &in, StorageType scalar, Image< StorageType > &out) |
Divides each pixel from the input image by the scalar. More... | |
static void | Log (const Image< StorageType > &in, Image< StorageType > &out) |
Computes the natural logarithm (base e) for each pixel. More... | |
static void | Log10 (const Image< StorageType > &in, Image< StorageType > &out) |
Computes the common logarithm (base 10) for each pixel. More... | |
static void | Multiply (const Image< StorageType > &in1, const Image< StorageType > &in2, Image< StorageType > &out) |
Computes the pixelwise product of the input images. More... | |
static void | MultiplyScalar (const Image< StorageType > &in, StorageType scalar, Image< StorageType > &out) |
Multiplies the scalar value to each pixel of the input image. More... | |
static void | Nand (const Image< StorageType > &in1, const Image< StorageType > &in2, Image< StorageType > &out) |
Performs a pixelwise NAND on the input images. More... | |
static void | Nor (const Image< StorageType > &in1, const Image< StorageType > &in2, Image< StorageType > &out) |
Performs a pixelwise NOR on the input images. More... | |
static void | Or (const Image< StorageType > &in1, const Image< StorageType > &in2, Image< StorageType > &out) |
Performs a pixelwise OR on the input images. More... | |
static void | Subtract (const Image< StorageType > &in1, const Image< StorageType > &in2, Image< StorageType > &out) |
Computes the pixelwise difference of the input images. More... | |
static void | SubtractScalar (const Image< StorageType > &in, StorageType scalar, Image< StorageType > &out) |
Subtracts the scalar value from each pixel of the input image. More... | |
static void | Xor (const Image< StorageType > &in1, const Image< StorageType > &in2, Image< StorageType > &out) |
Performs a pixelwise XOR on the input images. More... | |
Performs pixelwise arithmetic and boolean operations on images.
Possible improvements:
generalise for n input images
Definition at line 52 of file ImageCalc.hh.
|
static |
Computes the absolute value for each pixel.
Obiously only makes sense for signed storage types...
Definition at line 451 of file ImageCalc.cpp.
References BIAS::ImageBase::GetChannelCount(), BIAS::ImageBase::GetHeight(), BIAS::Image< StorageType >::GetImageData(), BIAS::ImageBase::GetWidth(), and BIAS::Image< StorageType >::Init().
|
static |
Computes the pixelwise sum of the input images.
Definition at line 35 of file ImageCalc.cpp.
References BIAS::ImageBase::GetChannelCount(), BIAS::ImageBase::GetHeight(), BIAS::Image< StorageType >::GetImageData(), BIAS::ImageBase::GetStorageType(), BIAS::ImageBase::GetWidth(), and BIAS::Image< StorageType >::Init().
|
static |
Adds the scalar value to each pixel of the input image.
Definition at line 321 of file ImageCalc.cpp.
References BIAS::ImageBase::GetChannelCount(), BIAS::ImageBase::GetHeight(), BIAS::Image< StorageType >::GetImageData(), BIAS::ImageBase::GetWidth(), and BIAS::Image< StorageType >::Init().
|
static |
Performs a pixelwise AND on the input images.
The input images are interpreted binary: input pixel values == 0 are treated as FALSE and all values != 0 are interpreted as TRUE. Output image will be of same storage type as input images, but will contain only binary values, i.e. only 0 and 1.
Each image channel is treated individually.
Definition at line 150 of file ImageCalc.cpp.
References BIAS::ImageBase::GetChannelCount(), BIAS::ImageBase::GetHeight(), BIAS::Image< StorageType >::GetImageData(), BIAS::ImageBase::GetWidth(), and BIAS::Image< StorageType >::Init().
|
static |
Computes the pixelwise quotient of the input images.
The first image is divided by the second one.
Definition at line 117 of file ImageCalc.cpp.
References BIAS::ImageBase::GetChannelCount(), BIAS::ImageBase::GetHeight(), BIAS::Image< StorageType >::GetImageData(), BIAS::ImageBase::GetWidth(), and BIAS::Image< StorageType >::Init().
|
static |
Divides each pixel from the input image by the scalar.
Definition at line 384 of file ImageCalc.cpp.
References BIAS::ImageBase::GetChannelCount(), BIAS::ImageBase::GetHeight(), BIAS::Image< StorageType >::GetImageData(), BIAS::ImageBase::GetWidth(), and BIAS::Image< StorageType >::Init().
|
static |
Computes the natural logarithm (base e) for each pixel.
Definition at line 411 of file ImageCalc.cpp.
References BIAS::ImageBase::GetChannelCount(), BIAS::ImageBase::GetHeight(), BIAS::Image< StorageType >::GetImageData(), BIAS::ImageBase::GetWidth(), and BIAS::Image< StorageType >::Init().
|
static |
Computes the common logarithm (base 10) for each pixel.
Definition at line 431 of file ImageCalc.cpp.
References BIAS::ImageBase::GetChannelCount(), BIAS::ImageBase::GetHeight(), BIAS::Image< StorageType >::GetImageData(), BIAS::ImageBase::GetWidth(), and BIAS::Image< StorageType >::Init().
|
static |
Computes the pixelwise product of the input images.
Definition at line 90 of file ImageCalc.cpp.
References BIAS::ImageBase::GetChannelCount(), BIAS::ImageBase::GetHeight(), BIAS::Image< StorageType >::GetImageData(), BIAS::ImageBase::GetWidth(), and BIAS::Image< StorageType >::Init().
|
static |
Multiplies the scalar value to each pixel of the input image.
Definition at line 363 of file ImageCalc.cpp.
References BIAS::ImageBase::GetChannelCount(), BIAS::ImageBase::GetHeight(), BIAS::Image< StorageType >::GetImageData(), BIAS::ImageBase::GetWidth(), and BIAS::Image< StorageType >::Init().
|
static |
Performs a pixelwise NAND on the input images.
The input images are interpreted binary: input pixel values == 0 are treated as FALSE and all values != 0 are interpreted as TRUE. Output image will be of same storage type as input images, but will contain only binary values, i.e. only 0 and 1.
Each image channel is treated individually.
Definition at line 183 of file ImageCalc.cpp.
References BIAS::ImageBase::GetChannelCount(), BIAS::ImageBase::GetHeight(), BIAS::Image< StorageType >::GetImageData(), BIAS::ImageBase::GetWidth(), and BIAS::Image< StorageType >::Init().
|
static |
Performs a pixelwise NOR on the input images.
The input images are interpreted binary: input pixel values == 0 are treated as FALSE and all values != 0 are interpreted as TRUE. Output image will be of same storage type as input images, but will contain only binary values, i.e. only 0 and 1.
Each image channel is treated individually.
Definition at line 249 of file ImageCalc.cpp.
References BIAS::ImageBase::GetChannelCount(), BIAS::ImageBase::GetHeight(), BIAS::Image< StorageType >::GetImageData(), BIAS::ImageBase::GetWidth(), and BIAS::Image< StorageType >::Init().
|
static |
Performs a pixelwise OR on the input images.
The input images are interpreted binary: input pixel values == 0 are treated as FALSE and all values != 0 are interpreted as TRUE. Output image will be of same storage type as input images, but will contain only binary values, i.e. only 0 and 1.
Each image channel is treated individually.
Definition at line 216 of file ImageCalc.cpp.
References BIAS::ImageBase::GetChannelCount(), BIAS::ImageBase::GetHeight(), BIAS::Image< StorageType >::GetImageData(), BIAS::ImageBase::GetWidth(), and BIAS::Image< StorageType >::Init().
|
static |
Computes the pixelwise difference of the input images.
The second image is subtracted from the first one.
Definition at line 63 of file ImageCalc.cpp.
References BIAS::ImageBase::GetChannelCount(), BIAS::ImageBase::GetHeight(), BIAS::Image< StorageType >::GetImageData(), BIAS::ImageBase::GetWidth(), and BIAS::Image< StorageType >::Init().
|
static |
Subtracts the scalar value from each pixel of the input image.
Definition at line 342 of file ImageCalc.cpp.
References BIAS::ImageBase::GetChannelCount(), BIAS::ImageBase::GetHeight(), BIAS::Image< StorageType >::GetImageData(), BIAS::ImageBase::GetWidth(), and BIAS::Image< StorageType >::Init().
|
static |
Performs a pixelwise XOR on the input images.
The input images are interpreted binary: input pixel values == 0 are treated as FALSE and all values != 0 are interpreted as TRUE. Output image will be of same storage type as input images, but will contain only binary values, i.e. only 0 and 1.
Each image channel is treated individually.
Definition at line 282 of file ImageCalc.cpp.
References BIAS::ImageBase::GetChannelCount(), BIAS::ImageBase::GetHeight(), BIAS::Image< StorageType >::GetImageData(), BIAS::ImageBase::GetWidth(), and BIAS::Image< StorageType >::Init().