mult_image — 将两幅图像相乘。
mult_image(Image1, Image2 : ImageResult : Mult, Add : )
mult_image multiplies two images. The gray values
(g1,g2) of the input images (Image1) are
transformed as follows:
g' := g1 * g2 * Mult + Add
若发生溢出或下溢,数值将被截断。
请注意,循环和方向图像不存在此情况。
单次调用可处理多张图像。此时两个输入参数包含相同数量的图像,这些图像将成对进行处理。每处理一对图像,系统将生成一张输出图像。
mult_image 可在 OpenCL 设备上执行,适用于 byte、int1、int2、
uint2、int4、real、direction、cyclic 和 complex 图像。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 implementation.
Image1 (输入对象) (multichannel-)image(-array) → object (byte* / int1* / int2* / uint2* / int4* / int8 / real* / direction* / cyclic* / complex*) *允许用于计算设备
图像 1。
Image2 (输入对象) (multichannel-)image(-array) → object (byte* / int1* / int2* / uint2* / int4* / int8 / real* / direction* / cyclic* / complex*) *允许用于计算设备
图像 2。
ImageResult (输出对象) (multichannel-)image(-array) → object (byte / int1 / int2 / uint2 / int4 / int8 / real / direction / cyclic / complex)
Result image(s) by the product.
Mult (输入控制) number → (real / integer)
Factor for gray range adaption.
默认值: 0.005
建议值: 0.001, 0.01, 0.5, 1.0, 2.0, 3.0, 5.0, 10.0
值范围:
-255.0
≤
Mult
≤
255.0
最小增量: 0.001
建议增量: 0.1
Add (输入控制) number → (real / integer)
Value for gray range adaption.
默认值: 0
建议值: 0.0, 128.0, 256.0
值范围:
-512.0
≤
Add
≤
512.0
最小增量: 0.01
建议增量: 1.0
read_image(Image1,'fabrik') dev_display (Image1) read_image(Image2,'monkey') dev_display (Image2) mult_image (Image1, Image2, Result, 0.01, 10) dev_display (Result)
算子 mult_image 在参数正确时返回值 2 ( H_MSG_TRUE )。当输入为空(无可用输入图像)时可设置行为通过算子 set_system(::'no_object_result',<Result>:)。如有必要,则抛出异常。
add_image,
sub_image,
div_image
add_image,
sub_image,
div_image
基础