Skip to content

abs_imageAbsImageAbsImageabs_imageabs_imageπŸ”—

Short descriptionπŸ”—

abs_imageAbsImageAbsImageabs_imageabs_image β€” Calculate the absolute value (modulus) of an image.

SignatureπŸ”—

abs_image( image Image, out image ImageAbs )void AbsImage( const HObject& Image, HObject* ImageAbs )static void HOperatorSet.AbsImage( HObject image, out HObject imageAbs )def abs_image( image: HObject ) -> HObject

Herror abs_image( const Hobject Image, Hobject* ImageAbs )

Herror T_abs_image( const Hobject Image, Hobject* ImageAbs )

HImage HImage::AbsImage( ) const

HImage HImage.AbsImage( )

DescriptionπŸ”—

The operator abs_imageAbsImage calculates the absolute gray values of images of any type and stores the result in ImageAbsimageAbsimage_abs. The power spectrum of complex images is calculated as a real image. For a Imageimageimage of type β€˜int1’, ImageAbsimageAbsimage_abs is of type byte. For Imageimageimage of other signed types the type of the input image is used for ImageAbsimageAbsimage_abs. The behavior in case of overflows or underflows is undefined. The operator abs_imageAbsImage generates a logical copy of unsigned images.

abs_imageAbsImage can be executed on an OpenCL device for int1, int2, int4, real, and complex images. However, since for OpenCL 1.0 only single precision floating point is supported for all devices, and not all rounding modes are supported, the OpenCL implementation can produce slightly different results from the scalar or SIMD implementations.

Execution informationπŸ”—

Execution information
  • Supports OpenCL compute devices.

  • Multithreading type: reentrant (runs in parallel with non-exclusive operators).

  • Multithreading scope: global (may be called from any thread).

  • Automatically parallelized on tuple level.

  • Automatically parallelized on channel level.

  • Automatically parallelized on domain level.

ParametersπŸ”—

Imageimageimage (input_object) (multichannel-)image(-array) β†’ object (int1* / int2* / int4* / int8 / real* / complex*)HObject (int1* / int2* / int4* / int8 / real* / complex*)HImage (int1* / int2* / int4* / int8 / real* / complex*)HObject (int1* / int2* / int4* / int8 / real* / complex*)Hobject (int1* / int2* / int4* / int8 / real* / complex*) *allowed for compute devices

Image(s) for which the absolute gray values are to be calculated.

ImageAbsimageAbsimage_abs (output_object) (multichannel-)image(-array) β†’ object (byte / int2 / int4 / int8 / real)HObject (byte / int2 / int4 / int8 / real)HImage (byte / int2 / int4 / int8 / real)HObject (byte / int2 / int4 / int8 / real)Hobject * (byte / int2 / int4 / int8 / real)

Result image(s).

ExampleπŸ”—

(HDevelop)

convert_image_type (Image, ImageInt2, 'int2')
texture_laws (ImageInt2, ImageTexture, 'el', 2, 5)
abs_image (ImageTexture, ImageTexture)

ResultπŸ”—

The operator abs_imageAbsImage returns the value 2 (H_MSG_TRUE). The behavior in case of empty input (no input images available) is set via the operator set_system(::'no_object_result',<Result>:)

Combinations with other operatorsπŸ”—

Combinations

See also

convert_image_typeConvertImageType, power_bytePowerByte

ModuleπŸ”—

Foundation