abs_image绝对图像abs_image绝对图像AbsImage绝对图像AbsImage绝对图像abs_image绝对图像 (算子)
名称
abs_image绝对图像abs_image绝对图像AbsImage绝对图像AbsImage绝对图像abs_image绝对图像 — 计算图像的绝对值(模)。
签名
def abs_image(image: HObject) -> HObject
描述
算子 abs_imageabs_imageAbsImageAbsImageAbsImageabs_image 计算任意类型图像的绝对灰度值,并将结果存储在 ImageAbsImageAbsImageAbsImageAbsimageAbsimage_abs中。real 图像的功率谱将作为实数图像进行计算。对于类型为 'int1' 的 ImageImageImageImageimageimage , ImageAbsImageAbsImageAbsImageAbsimageAbsimage_abs 类型为 byte。对于其他有符号类型的 ImageImageImageImageimageimage , ImageAbsImageAbsImageAbsImageAbsimageAbsimage_abs 采用输入图像的类型。溢出或下溢情况下的行为未定义。该算子 abs_imageabs_imageAbsImageAbsImageAbsImageabs_image 对无符号图像生成逻辑副本。
abs_imageabs_imageAbsImageAbsImageAbsImageabs_image 可在 OpenCL 设备上执行,适用于 int1、
int2、 int4、 real 和 complex 图像。
然而,由于 OpenCL 1.0 仅支持所有设备使用单精度浮点运算,且并非所有舍入模式均被支持,因此 OpenCL 实现可能会产生与标量或 SIMD 实现略有差异的结果。
执行信息
- 支持 OpenCL 计算设备。
- 多线程类型:可重入(与非独占算子并行运行)。
- 多线程作用域:全局(可从任何线程调用)。
- 在元组级别上自动并行化。
- 在通道级别上自动并行化。
- 在域级别上自动并行化。
参数
ImageImageImageImageimageimage (输入控制) (multichannel-)image(-array) → objectHImageHObjectHImageHobject (int1* / int2* / int4* / int8 / real* / complex*) *允许用于计算设备
需计算绝对灰度值的图像。
ImageAbsImageAbsImageAbsImageAbsimageAbsimage_abs (输出对象) (multichannel-)image(-array) → objectHImageHObjectHImageHobject * (byte / int2 / int4 / int8 / real)
结果图像。
示例(HDevelop)
convert_image_type (Image, ImageInt2, 'int2')
texture_laws (ImageInt2, ImageTexture, 'el', 2, 5)
abs_image (ImageTexture, ImageTexture)
结果
算子 abs_imageabs_imageAbsImageAbsImageAbsImageabs_image 返回值 2 (
H_MSG_TRUE)
。当输入为空(无可用输入图像)时的行为通过算子 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
模块
基础