HALCON Reference Manual 10.0.2
Table of Contents / Image / Features ClassesClassesClasses | | | Operators

entropy_grayentropy_grayentropy_grayEntropyGrayEntropyGray (Operator)

Name

entropy_grayentropy_grayentropy_grayEntropyGrayEntropyGray — Determine the entropy and anisotropy of images.

Signature

entropy_gray(Regions, Image : : : Entropy, Anisotropy)

Herror entropy_gray(const Hobject Regions, const Hobject Image, double* Entropy, double* Anisotropy)

Herror T_entropy_gray(const Hobject Regions, const Hobject Image, Htuple* Entropy, Htuple* Anisotropy)

Herror entropy_gray(Hobject Regions, Hobject Image, double* Entropy, double* Anisotropy)

Herror entropy_gray(Hobject Regions, Hobject Image, HTuple* Entropy, HTuple* Anisotropy)

double HRegion::EntropyGray(const HImage& Image, double* Anisotropy) const

HTuple HRegionArray::EntropyGray(const HImage& Image, HTuple* Anisotropy) const

void HOperatorSetX.EntropyGray(
[in] IHUntypedObjectX* Regions, [in] IHUntypedObjectX* Image, [out] VARIANT* Entropy, [out] VARIANT* Anisotropy)

VARIANT HImageX.EntropyGray(
[in] IHRegionX* Regions, [out] VARIANT* Anisotropy)

VARIANT HRegionX.EntropyGray(
[in] IHImageX* Image, [out] VARIANT* Anisotropy)

static void HOperatorSet.EntropyGray(HObject regions, HObject image, out HTuple entropy, out HTuple anisotropy)

HTuple HImage.EntropyGray(HRegion regions, out HTuple anisotropy)

double HImage.EntropyGray(HRegion regions, out double anisotropy)

HTuple HRegion.EntropyGray(HImage image, out HTuple anisotropy)

double HRegion.EntropyGray(HImage image, out double anisotropy)

Description

The operator entropy_grayentropy_grayentropy_grayEntropyGrayEntropyGray creates the histogram of relative frequencies of the gray values in the input image and calculates from these frequencies the entropy and the anisotropy coefficient for each region from RegionsRegionsRegionsRegionsregions according to the following formulae:

    Entropy:
                                 255
                                 ----
                                 \
                Entropy  =     - /     rel[i]  *  ld(rel[i])
                                 ----
                                  0

    Anisotropiy coefficient:
                                  k
                                 ----
                                 \
                                 /     rel[i]  *  ld(rel[i])
                                 ----
                                  0
                Anisotropy  =  -----------------------------
                                        Entropy

        where
                rel[i]  histogram of relative gray value frequencies
                i       Gray value of input image (0..255)
        and     k       Smallest possible gray value with sum(rel[i]) >= 0.5

Parallelization

Parameters

RegionsRegionsRegionsRegionsregions (input_object)  region(-array) objectHRegionHRegionHRegionXHobject

Regions where the features are to be determined.

ImageImageImageImageimage (input_object)  image objectHImageHImageHImageXHobject (byte)

Gray value image.

EntropyEntropyEntropyEntropyentropy (output_control)  real(-array) HTupleHTupleVARIANTHtuple (real) (double) (double) (double) (double)

Information content (entropy) of the gray values.

Assertion: (0 <= Entropy) && (Entropy <= 8)

AnisotropyAnisotropyAnisotropyAnisotropyanisotropy (output_control)  real(-array) HTupleHTupleVARIANTHtuple (real) (double) (double) (double) (double)

Measure of the symmetry of gray value distribution.

Complexity

If F is the area of the region the runtime complexity is O(F + 255).

Result

The operator entropy_grayentropy_grayentropy_grayEntropyGrayEntropyGray returns the value 2 (H_MSG_TRUE) if an image with defined gray values is entered and the parameters are correct. The behavior in case of empty input (no input images available) is set via the operator 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>), the behavior in case of empty region is set via set_system(::'empty_region_result',<Result>:)set_system("empty_region_result",<Result>)set_system("empty_region_result",<Result>)SetSystem("empty_region_result",<Result>)SetSystem("empty_region_result",<Result>). If necessary an exception is raised.

Alternatives

select_grayselect_grayselect_graySelectGraySelectGray

See also

entropy_imageentropy_imageentropy_imageEntropyImageEntropyImage, gray_histogray_histogray_histoGrayHistoGrayHisto, gray_histo_absgray_histo_absgray_histo_absGrayHistoAbsGrayHistoAbs, fuzzy_entropyfuzzy_entropyfuzzy_entropyFuzzyEntropyFuzzyEntropy, fuzzy_perimeterfuzzy_perimeterfuzzy_perimeterFuzzyPerimeterFuzzyPerimeter

Module

Foundation


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