abs_imageabs_imageAbsImageAbsImageabs_image (算子名称)

名称

abs_imageabs_imageAbsImageAbsImageabs_image — 计算图像的绝对值(模数)。

参数签名

abs_image(Image : ImageAbs : : )

Herror abs_image(const Hobject Image, Hobject* ImageAbs)

Herror T_abs_image(const Hobject Image, Hobject* ImageAbs)

void AbsImage(const HObject& Image, HObject* ImageAbs)

HImage HImage::AbsImage() const

static void HOperatorSet.AbsImage(HObject image, out HObject imageAbs)

HImage HImage.AbsImage()

def abs_image(image: HObject) -> HObject

描述

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

abs_imageabs_imageAbsImageAbsImageAbsImageabs_image 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.

运行信息

参数表

ImageImageImageImageimageimage (input_object)  (multichannel-)image(-array) objectHImageHObjectHImageHobject (int1* / int2* / int4* / int8 / real* / complex*) *allowed for compute devices

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

ImageAbsImageAbsImageAbsImageAbsimageAbsimage_abs (output_object)  (multichannel-)image(-array) objectHImageHObjectHImageHobject * (byte / int2 / int4 / int8 / real)

Result image(s).

例程 (HDevelop)

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

结果

The operator abs_imageabs_imageAbsImageAbsImageAbsImageabs_image 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>:)set_system("no_object_result",<Result>)SetSystem("no_object_result",<Result>)SetSystem("no_object_result",<Result>)SetSystem("no_object_result",<Result>)set_system("no_object_result",<Result>)

参考其它

convert_image_typeconvert_image_typeConvertImageTypeConvertImageTypeConvertImageTypeconvert_image_type, power_bytepower_bytePowerBytePowerBytePowerBytepower_byte

模块

Foundation