Skip to content

fuzzy_entropyFuzzyEntropyFuzzyEntropyfuzzy_entropyfuzzy_entropyπŸ”—

Short descriptionπŸ”—

fuzzy_entropyFuzzyEntropyFuzzyEntropyfuzzy_entropyfuzzy_entropy β€” Determine the fuzzy entropy of regions.

SignatureπŸ”—

fuzzy_entropy( region Regions, image Image, integer Apar, integer Cpar, out real Entropy )void FuzzyEntropy( const HObject& Regions, const HObject& Image, const HTuple& Apar, const HTuple& Cpar, HTuple* Entropy )static void HOperatorSet.FuzzyEntropy( HObject regions, HObject image, HTuple apar, HTuple cpar, out HTuple entropy )def fuzzy_entropy( regions: HObject, image: HObject, apar: int, cpar: int ) -> Sequence[float]

def fuzzy_entropy_s( regions: HObject, image: HObject, apar: int, cpar: int ) -> floatHerror fuzzy_entropy( const Hobject Regions, const Hobject Image, const Hlong Apar, const Hlong Cpar, double* Entropy )

Herror T_fuzzy_entropy( const Hobject Regions, const Hobject Image, const Htuple Apar, const Htuple Cpar, Htuple* Entropy )

HTuple HImage::FuzzyEntropy( const HRegion& Regions, Hlong Apar, Hlong Cpar ) const

HTuple HRegion::FuzzyEntropy( const HImage& Image, Hlong Apar, Hlong Cpar ) const

HTuple HImage.FuzzyEntropy( HRegion regions, int apar, int cpar )

HTuple HRegion.FuzzyEntropy( HImage image, int apar, int cpar )

DescriptionπŸ”—

fuzzy_entropyFuzzyEntropy calculates the fuzzy entropy of a fuzzy set. To do so, the image is regarded as a fuzzy set. The entropy then is a measure of how well the image approximates a white or black image. It is defined as follows:

\[\begin{eqnarray*} \begin{array}{lcr} H(X) & = &\frac{1}{M N ln 2}\sum_{l}T_{e}(l)h(l) \\ \end{array} \end{eqnarray*}\]

where MxN is the size of the image, and \(h(l)\) is the histogram of the image. Furthermore,

\[\begin{eqnarray*} \begin{array}{lcr} T_{e}(l) & = &-\mu(l)\ln \mu(l) - (1-\mu(l))\ln(1 - \mu(l)) \\ \end{array} \end{eqnarray*}\]

Here, \(u(x(m,n))\) is a fuzzy membership function defining the fuzzy set (see fuzzy_perimeterFuzzyPerimeter). The same restrictions hold as in fuzzy_perimeterFuzzyPerimeter.

AttentionπŸ”—

Note that for fuzzy_entropyFuzzyEntropy, the Regionsregionsregions must lie completely within the previously defined domain. Otherwise an exception is raised.

Execution informationπŸ”—

Execution information
  • Multithreading type: reentrant (runs in parallel with non-exclusive operators).

  • Multithreading scope: global (may be called from any thread).

ParametersπŸ”—

Regionsregionsregions (input_object) region(-array) β†’ objectHObjectHRegionHObjectHobject

Regions for which the fuzzy entropy is to be calculated.

Imageimageimage (input_object) singlechannelimage β†’ object (byte)HObject (byte)HImage (byte)HObject (byte)Hobject (byte)

Input image containing the fuzzy membership values.

Aparaparapar (input_control) integer β†’ (integer)HTuple (Hlong)HTuple (int / long)intHtuple (Hlong)

Start of the fuzzy function.

Default: 00
Suggested values: 0, 5, 10, 20, 50, 1000, 5, 10, 20, 50, 100
Value range: 0 ≀ Apar ≀ 255 (lin)
Minimum increment: 1
Recommended increment: 5

Cparcparcpar (input_control) integer β†’ (integer)HTuple (Hlong)HTuple (int / long)intHtuple (Hlong)

End of the fuzzy function.

Default: 255255
Suggested values: 50, 100, 150, 200, 220, 25550, 100, 150, 200, 220, 255
Value range: 0 ≀ Cpar ≀ 255 (lin)
Minimum increment: 1
Recommended increment: 5
Restriction: Apar <= Cpar

Entropyentropyentropy (output_control) real(-array) β†’ (real)HTuple (double)HTuple (double)Sequence[float]Htuple (double)

Fuzzy entropy of a region.

ExampleπŸ”—

(HDevelop)

* To find a Fuzzy Entropy from an Image
read_image(Image,'monkey')
fuzzy_entropy(Trans,Trans,0,255,Entro)
(C)
/* To find a Fuzzy Entropy from an Image */
read_image(&Image,'monkey')\;
fuzzy_entropy(Trans,Trans,0,255,&Entro)\;

ResultπŸ”—

The operator fuzzy_entropyFuzzyEntropy returns the value 2 (H_MSG_TRUE) if the parameters are correct. Otherwise an exception is raised.

Combinations with other operatorsπŸ”—

Combinations

See also

fuzzy_perimeterFuzzyPerimeter

ReferencesπŸ”—

M.K. Kundu, S.K. Pal: ``Automatic selection of object enhancement operator with quantitative justification based on fuzzy set theoretic measuresβ€™β€˜; Pattern Recognition Letters 11; 1990; pp. 811-829.

ModuleπŸ”—

Foundation