Skip to content

fuzzy_perimeterFuzzyPerimeterFuzzyPerimeterfuzzy_perimeterfuzzy_perimeterπŸ”—

Short descriptionπŸ”—

fuzzy_perimeterFuzzyPerimeterFuzzyPerimeterfuzzy_perimeterfuzzy_perimeter β€” Calculate the fuzzy perimeter of a region.

SignatureπŸ”—

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

def fuzzy_perimeter_s( regions: HObject, image: HObject, apar: int, cpar: int ) -> floatHerror fuzzy_perimeter( const Hobject Regions, const Hobject Image, const Hlong Apar, const Hlong Cpar, double* Perimeter )

Herror T_fuzzy_perimeter( const Hobject Regions, const Hobject Image, const Htuple Apar, const Htuple Cpar, Htuple* Perimeter )

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

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

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

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

DescriptionπŸ”—

The operator fuzzy_perimeterFuzzyPerimeter is used to determine the differences of fuzzy membership between an image point and its neighbor points. The right and lower neighbor are taken into account. The fuzzy perimeter is then defined as follows:

\[\begin{eqnarray*} p(X) = \sum_{m=1}^{M-1} \sum_{n=1}^{N-1} |\mu_{X}(x_{m,n}) - \mu_{X}(x_{m,n+1})| + \sum_{m=1}^{M-1} \sum_{n=1}^{N-1} |\mu_{X}(x_{m,n}) - \mu_{X}(x_{m+1,n})| \end{eqnarray*}\]

where MxN is the size of the image, and \(u(x(m,n))\) is the fuzzy membership function (i.e., the input image). This implementation uses Zadeh’s Standard-S function, which is defined as follows:

\[\begin{eqnarray*} \mu_{X}(x) = \left\{ \begin{array}{lr} 0, &x \leq a \\ 2\left(\frac{x-a}{c-a}\right)^2,&a < x \leq b \\ 1- 2\left(\frac{x-a}{c-a}\right)^2,&b < x \leq c \\ 1, & c \leq x \end{array} \right. \end{eqnarray*}\]

The parameters \(a\), \(b\) and \(c\) obey the following restrictions: \(b = \frac{a+c}{2}\) is the inflection point of the function, \(\Delta b = b - a = c - b\) is the bandwidth, and for x = b \(\mu(x) = 0.5\) holds. In fuzzy_perimeterFuzzyPerimeter, the parameters Aparaparapar and Cparcparcpar are defined as follows: \(b\) is \(\frac{\textrm{Apar}+\textrm{Cpar}}{2}\).

AttentionπŸ”—

Note that for fuzzy_perimeterFuzzyPerimeter, 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 perimeter 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

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

Fuzzy perimeter of a region.

ExampleπŸ”—

(HDevelop)

* To find a Fuzzy Entropy from an Image
read_image(Image,'monkey')
fuzzy_perimeter(Trans,Trans,0,255,Per)
(C)
/* To find a Fuzzy Entropy from an Image */
read_image(&Image,"monkey")\;
fuzzy_perimeter(Trans,Trans,Apar,Bpar,&Per)\;

ResultπŸ”—

The operator fuzzy_perimeterFuzzyPerimeter 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_entropyFuzzyEntropy

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