HALCON Reference Manual 10.0.2
Table of Contents / Filters / Texture ClassesClassesClasses | | | Operators

entropy_imageentropy_imageentropy_imageEntropyImageEntropyImage (Operator)

Name

entropy_imageentropy_imageentropy_imageEntropyImageEntropyImage — Calculate the entropy of gray values within a rectangular window.

Signature

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)

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

HImage HImage::EntropyImage(const HTuple& Width, const HTuple& Height) const

HImageArray HImageArray::EntropyImage(const HTuple& Width, const HTuple& Height) const

void HOperatorSetX.EntropyImage(
[in] IHUntypedObjectX* Image, [out] IHUntypedObjectX*ImageEntropy, [in] VARIANT Width, [in] VARIANT Height)

IHImageX* HImageX.EntropyImage(
[in] Hlong Width, [in] Hlong Height)

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

HImage HImage.EntropyImage(int width, int height)

Description

entropy_imageentropy_imageentropy_imageEntropyImageEntropyImage calculates the entropy of gray values in the image ImageImageImageImageimage within a rectangular mask of size (HeightHeightHeightHeightheight, WidthWidthWidthWidthwidth). The resulting image is returned in ImageEntropyImageEntropyImageEntropyImageEntropyimageEntropy, in which the entropy is multiplied by 32. If the parameters HeightHeightHeightHeightheight and WidthWidthWidthWidthwidth are even, they are changed to the next larger odd value. At the image borders the gray values are mirrored.

Parallelization

Parameters

ImageImageImageImageimage (input_object)  (multichannel-)image(-array) objectHImageHImageHImageXHobject (byte)

Image for which the entropy is to be calculated.

ImageEntropyImageEntropyImageEntropyImageEntropyimageEntropy (output_object)  (multichannel-)image(-array) objectHImageHImageHImageXHobject * (byte)

Entropy image.

WidthWidthWidthWidthwidth (input_control)  extent.x HTupleHTupleVARIANTHtuple (integer) (int / long) (Hlong) (Hlong) (Hlong)

Width of the mask in which the entropy is calculated.

Default value: 9

List of values: 3, 5, 7, 9, 11, 13, 15, 17, 19, 21, 23, 25

Suggested values: 3, 5, 7, 9, 11, 13, 15

Restriction: (3 <= Width) && odd(Width)

HeightHeightHeightHeightheight (input_control)  extent.y HTupleHTupleVARIANTHtuple (integer) (int / long) (Hlong) (Hlong) (Hlong)

Height of the mask in which the entropy is calculated.

Default value: 9

List of values: 3, 5, 7, 9, 11, 13, 15, 17, 19, 21, 23, 25

Suggested values: 3, 5, 7, 9, 11, 13, 15

Restriction: (3 <= Height) && odd(Height)

Example (HDevelop)

read_image(Image,'fabrik')
disp_image(Image,WindowHandle)
entropy_image(Image,Entropy1,9,9)
disp_image(Entropy1,WindowHandle)

Example (C)

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

Example (HDevelop)

read_image(Image,'fabrik')
disp_image(Image,WindowHandle)
entropy_image(Image,Entropy1,9,9)
disp_image(Entropy1,WindowHandle)

Example (HDevelop)

read_image(Image,'fabrik')
disp_image(Image,WindowHandle)
entropy_image(Image,Entropy1,9,9)
disp_image(Entropy1,WindowHandle)

Example (HDevelop)

read_image(Image,'fabrik')
disp_image(Image,WindowHandle)
entropy_image(Image,Entropy1,9,9)
disp_image(Entropy1,WindowHandle)

Result

entropy_imageentropy_imageentropy_imageEntropyImageEntropyImage returns 2 (H_MSG_TRUE) if all parameters are correct. If the input is empty the behaviour can be set via set_system('no_object_result',<Result>)set_system("no_object_result",<Result>)set_system("no_object_result",<Result>)SetSystem("no_object_result",<Result>)SetSystem("no_object_result",<Result>). If necessary, an exception is raised.

Possible Successors

disp_imagedisp_imagedisp_imageDispImageDispImage

Alternatives

entropy_grayentropy_grayentropy_grayEntropyGrayEntropyGray

See also

energy_gaborenergy_gaborenergy_gaborEnergyGaborEnergyGabor, entropy_grayentropy_grayentropy_grayEntropyGrayEntropyGray

Module

Foundation


Table of Contents / Filters / Texture ClassesClassesClasses | | | Operators
HALCON Reference Manual 10.0.2 Copyright © 1996-2011 MVTec Software GmbH