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

Calculate the entropy of gray values within a rectangular window.

::entropy_image calculates the entropy of gray values in the image Image within a rectangular mask of size (Height, Width). The resulting image is returned in ImageEntropy, in which the entropy is multiplied by 32. If the parameters Height and Width are even, they are changed to the next larger odd value. At the image borders the gray values are mirrored.


Parameters

Image (input_object)
(multichannel-)image(-array) -> Hobject: HImage(Array) ( byte )
Image for which the entropy is to be calculated.

ImageEntropy (output_object)
(multichannel-)image(-array) -> Hobject * : HImage(Array) ( byte )
Entropy image.

Width (input_control)
extent.x -> HTuple.long
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)

Height (input_control)
extent.y -> HTuple.long
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
read_image(&Image,"fabrik");
disp_image(Image,WindowHandle);
entropy_image(Image,&Entropy1,9,9);
disp_image(Entropy1,WindowHandle); 

Result

::entropy_image returns 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>). If necessary, an exception handling is raised.


Possible Successors

::disp_image


Alternatives

::entropy_gray


See also

::energy_gabor, ::entropy_gray


Module

Image filters



Copyright © 1996-2002 MVTec Software GmbH