5# include "../_cexports/c_foundation.h"
7# include "../global.hpp"
8# include "../image.hpp"
9# include "../exception.hpp"
63 return Internal::DoResCallObjectOut<Image>([&](
void *&resimg) {
80 template <
class RANGE>
81 inline typename TypedRange<std::unique_ptr<Image>, double, RANGE>::type
84 auto valuesRange = MakeRangeAdapter<double>(values, image.
PlanesCount());
86 return Internal::DoResCallObjectOut<Image>([&](
void *&resimg) {
88 return CVB_CALL_CAPI(
AddConstant(image.
Handle(),
const_cast<double *
>(valuesRange.Data()),
126 return Internal::DoResCallObjectOut<Image>([&](
void *&resimg) {
127 return CVB_CALL_CAPI(
144 template <
class RANGE>
145 inline typename TypedRange<std::unique_ptr<Image>, double, RANGE>::type
148 auto valuesRange = MakeRangeAdapter<double>(values, image.
PlanesCount());
150 return Internal::DoResCallObjectOut<Image>([&](
void *&resimg) {
188 return Internal::DoResCallObjectOut<Image>([&](
void *&resimg) {
204 template <
class RANGE>
205 inline typename TypedRange<std::unique_ptr<Image>, double, RANGE>::type
Subtract(
const Image &image,
208 auto valuesRange = MakeRangeAdapter<double>(values, image.
PlanesCount());
210 return Internal::DoResCallObjectOut<Image>([&](
void *&resimg) {
205 inline typename TypedRange<std::unique_ptr<Image>, double, RANGE>::type
Subtract(
const Image &image, {
…}
246 return Internal::DoResCallObjectOut<Image>([&](
void *&resimg) {
260 template <
class RANGE>
261 inline typename TypedRange<std::unique_ptr<Image>, double, RANGE>::type
Divide(
const Image &image,
264 auto valuesRange = MakeRangeAdapter<double>(values, image.
PlanesCount());
266 return Internal::DoResCallObjectOut<Image>([&](
void *&resimg) {
268 return CVB_CALL_CAPI(
DivideConstant(image.
Handle(),
const_cast<double *
>(valuesRange.Data()), resimg));
261 inline typename TypedRange<std::unique_ptr<Image>, double, RANGE>::type
Divide(
const Image &image, {
…}
297 return Internal::DoResCallObjectOut<Image>(
315 return Internal::DoResCallObjectOut<Image>([&](
void *&resimg) {
332 template <
class RANGE>
333 inline typename TypedRange<std::unique_ptr<Image>, double, RANGE>::type
SubtractAbs(
const Image &image,
336 auto valuesRange = MakeRangeAdapter<double>(values, image.
PlanesCount());
338 return Internal::DoResCallObjectOut<Image>([&](
void *&resimg) {
340 return CVB_CALL_CAPI(
333 inline typename TypedRange<std::unique_ptr<Image>, double, RANGE>::type
SubtractAbs(
const Image &image, {
…}
375 return Internal::DoResCallObjectOut<Image>([&](
void *&resimg) {
396 return Internal::DoResCallObjectOut<Image>([&](
void *&resimg) {
The Common Vision Blox image.
Definition decl_image.hpp:50
int PlanesCount() const noexcept
Get the number of planes for this image.
Definition decl_image.hpp:247
void * Handle() const noexcept
Classic API image handle.
Definition decl_image.hpp:237
cvbres_t DivideConstant(IMG ImgIn, double Values[], IMG &ImgOut)
cvbres_t MultiplyImages(IMG ImgIn1, IMG ImgIn2, cvbbool_t ScaleResults, IMG &ImgOut)
cvbres_t SquareImage(IMG ImgIn, cvbbool_t ScaleResults, IMG &ImgOut)
cvbres_t SubtractConstant(IMG ImgIn, double Values[], IMG &ImgOut)
cvbres_t AddImages(IMG ImgIn1, IMG ImgIn2, cvbbool_t ScaleResults, IMG &ImgOut)
cvbres_t MultiplyConstant(IMG ImgIn, double Values[], cvbbool_t ScaleResults, IMG &ImgOut)
cvbres_t SubtractConstantAbsolute(IMG ImgIn, double Values[], IMG &ImgOut)
cvbres_t DivideImages(IMG ImgIn1, IMG ImgIn2, long UpShift, IMG &ImgOut)
cvbres_t AddConstant(IMG ImgIn, double Values[], cvbbool_t ScaleResults, IMG &ImgOut)
cvbres_t SquareRootImage(IMG ImgIn, cvbbool_t ScaleResults, IMG &ImgOut)
cvbres_t SubtractImages(IMG ImgIn1, IMG ImgIn2, IMG &ImgOut)
cvbres_t AbsoluteImage(IMG ImgIn, IMG &ImgOut)
cvbres_t SubtractImagesAbsolute(IMG ImgIn1, IMG ImgIn2, IMG &ImgOut)
Namespace for collection of arithmetic functions from the Foundation package.
Definition arithmetic.hpp:27
PixelOverflow
Defines how arithmetic overflows and underflows are handled.
Definition arithmetic.hpp:31
@ Scale
Resulting pixel values are scaled according to the data type's range.
Definition arithmetic.hpp:33
@ Truncate
Resulting pixel values are truncated at the data type's min and max values.
Definition arithmetic.hpp:35
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.
Definition arithmetic.hpp:124
std::unique_ptr< Image > Absolute(const Image &image)
Determines the absolute values of the pixels in the input image.
Definition arithmetic.hpp:295
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.
Definition arithmetic.hpp:186
std::unique_ptr< Image > Square(const Image &image, PixelOverflow overflow)
Squares the pixel values of the input image to obtain the output image.
Definition arithmetic.hpp:373
SqrtPixelScaling
Defines the post processing of the Sqrt function.
Definition arithmetic.hpp:40
@ AsIs
Square root result is stored as is (no scaling).
Definition arithmetic.hpp:42
@ Yes
Square root result is scaled to the DataType's range.
Definition arithmetic.hpp:44
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.
Definition arithmetic.hpp:313
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...
Definition arithmetic.hpp:244
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 im...
Definition arithmetic.hpp:394
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.
Definition arithmetic.hpp:61
Namespace for the Foundation package.
Definition decl_metric_aqs12_calibration_piece.hpp:11
Root namespace for the Image Manager interface.
Definition c_bayer_to_rgb.h:17
@ Absolute
Scaled rangemap values represent absolute pixel position on sensor.
Definition core_3d.hpp:252