entropy_imageentropy_imageEntropyImageEntropyImageentropy_image(算子)

名称

entropy_imageentropy_imageEntropyImageEntropyImageentropy_image — 计算矩形窗口内灰度值的熵。

签名

entropy_image(Image : ImageEntropy : Width, Height : )

Herror entropy_image(const Hobject Image, Hobject* ImageEntropy, const Hlong Width, const Hlong Height)

Herror T_entropy_image(const Hobject Image, Hobject* ImageEntropy, const Htuple Width, const Htuple Height)

void EntropyImage(const HObject& Image, HObject* ImageEntropy, const HTuple& Width, const HTuple& Height)

HImage HImage::EntropyImage(Hlong Width, Hlong Height) const

static void HOperatorSet.EntropyImage(HObject image, out HObject imageEntropy, HTuple width, HTuple height)

HImage HImage.EntropyImage(int width, int height)

def entropy_image(image: HObject, width: int, height: int) -> HObject

描述

entropy_imageentropy_imageEntropyImageEntropyImageEntropyImageentropy_image calculates the entropy of gray values in the image ImageImageImageImageimageimage within a rectangular mask of size (HeightHeightHeightHeightheightheight, WidthWidthWidthWidthwidthwidth). The resulting image is returned in ImageEntropyImageEntropyImageEntropyImageEntropyimageEntropyimage_entropy, in which the entropy is multiplied by 32. If the parameters HeightHeightHeightHeightheightheightWidthWidthWidthWidthwidthwidth are even, they are changed to the next larger odd value. At the image borders the gray values are mirrored.

注意

请注意,若使用域缩减后的图像作为输入,滤波器算子可能会返回意外结果。请参阅 滤波器 一章

执行信息

参数

ImageImageImageImageimageimage (输入对象)  (multichannel-)image(-array) objectHImageHObjectHImageHobject (byte)

Image for which the entropy is to be calculated.

ImageEntropyImageEntropyImageEntropyImageEntropyimageEntropyimage_entropy (输出对象)  (multichannel-)image(-array) objectHImageHObjectHImageHobject * (byte)

Entropy image.

WidthWidthWidthWidthwidthwidth (输入控制)  extent.x HTupleintHTupleHtuple (integer) (int / long) (Hlong) (Hlong)

Width of the mask in which the entropy is calculated.

默认值: 9

建议值: 3, 5, 7, 9, 11, 13, 15, 17, 19, 21, 23, 25

限制: 3 <= Width && odd(Width)

HeightHeightHeightHeightheightheight (输入控制)  extent.y HTupleintHTupleHtuple (integer) (int / long) (Hlong) (Hlong)

Height of the mask in which the entropy is calculated.

默认值: 9

建议值: 3, 5, 7, 9, 11, 13, 15, 17, 19, 21, 23, 25

限制: 3 <= Height && odd(Height)

示例(HDevelop)

read_image(Image,'fabrik')
dev_display(Image)
entropy_image(Image,Entropy,9,9)
dev_display(Entropy)

示例(C)

read_image(&Image,"fabrik");
disp_image(Image,WindowHandle);
entropy_image(Image,&Entropy,9,9);
disp_image(Entropy,WindowHandle); 

示例(HDevelop)

read_image(Image,'fabrik')
dev_display(Image)
entropy_image(Image,Entropy,9,9)
dev_display(Entropy)

示例(HDevelop)

read_image(Image,'fabrik')
dev_display(Image)
entropy_image(Image,Entropy,9,9)
dev_display(Entropy)

示例(HDevelop)

read_image(Image,'fabrik')
dev_display(Image)
entropy_image(Image,Entropy,9,9)
dev_display(Entropy)

结果

entropy_imageentropy_imageEntropyImageEntropyImageEntropyImageentropy_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>)。如有必要,则抛出异常。

可能的后继

disp_imagedisp_imageDispImageDispImageDispImagedisp_image

替代

entropy_grayentropy_grayEntropyGrayEntropyGrayEntropyGrayentropy_gray

另见

energy_gaborenergy_gaborEnergyGaborEnergyGaborEnergyGaborenergy_gabor, entropy_grayentropy_grayEntropyGrayEntropyGrayEntropyGrayentropy_gray

模块

基础