invert_imageinvert_imageInvertImageInvertImageinvert_image(算子)
名称
invert_imageinvert_imageInvertImageInvertImageinvert_image — 反转图像。
签名
def invert_image(image: HObject) -> HObject
描述
算子 invert_imageinvert_imageInvertImageInvertImageInvertImageinvert_image inverts the gray values of an image.
For images of the byte and cyclic type the result is
calculated
as:
g' = 255 - g
Images of the 'direction' type are transformed by
g' = (g + 90) modulo 180
In the case of signed types the values are negated. The resulting
image has the same pixel type as the input image.
单次调用可处理多张图像。每张输入图像将生成一张输出图像。
invert_imageinvert_imageInvertImageInvertImageInvertImageinvert_image can be executed on an OpenCL device for byte,
direction, cyclic, int1, int2,
uint2, int4, and real images.
执行信息
- 支持 OpenCL 计算设备。
- 多线程类型:可重入(与非独占算子并行运行)。
- 多线程作用域:全局(可从任何线程调用)。
- 在元组级别上自动并行化。
- 在通道级别上自动并行化。
- 在域级别上自动并行化。
参数
ImageImageImageImageimageimage (输入对象) (multichannel-)image(-array) → objectHImageHObjectHImageHobject (byte* / direction* / cyclic* / int1* / int2* / uint2* / int4* / int8 / real*) *允许用于计算设备
输入图像。
ImageInvertImageInvertImageInvertImageInvertimageInvertimage_invert (输出对象) (multichannel-)image(-array) → objectHImageHObjectHImageHobject * (byte / direction / cyclic / int1 / int2 / uint2 / int4 / int8 / real)
Image(s) with inverted gray values.
示例(HDevelop)
read_image(Orig,'fabrik')
invert_image(Orig,Invert)
dev_display(Invert)
示例(C)
read_image(&Orig,"fabrik");
invert_image(Orig,&Invert);
disp_image(Invert,WindowHandle);
示例(HDevelop)
read_image(Orig,'fabrik')
invert_image(Orig,Invert)
dev_display(Invert)
示例(HDevelop)
read_image(Orig,'fabrik')
invert_image(Orig,Invert)
dev_display(Invert)
示例(HDevelop)
read_image(Orig,'fabrik')
invert_image(Orig,Invert)
dev_display(Invert)
可能的后继
watershedswatershedsWatershedsWatershedsWatershedswatersheds
替代
scale_imagescale_imageScaleImageScaleImageScaleImagescale_image
另见
scale_imagescale_imageScaleImageScaleImageScaleImagescale_image,
add_imageadd_imageAddImageAddImageAddImageadd_image,
sub_imagesub_imageSubImageSubImageSubImagesub_image
模块
基础