ClassesClassesClassesClasses | | | | Operators

symmetrysymmetrySymmetrysymmetrySymmetrySymmetry (Operator)

Name

symmetrysymmetrySymmetrysymmetrySymmetrySymmetry — Symmetry of gray values along a row.

Signature

symmetry(Image : ImageSymmetry : MaskSize, Direction, Exponent : )

Herror symmetry(const Hobject Image, Hobject* ImageSymmetry, const Hlong MaskSize, double Direction, double Exponent)

Herror T_symmetry(const Hobject Image, Hobject* ImageSymmetry, const Htuple MaskSize, const Htuple Direction, const Htuple Exponent)

Herror symmetry(Hobject Image, Hobject* ImageSymmetry, const HTuple& MaskSize, const HTuple& Direction, const HTuple& Exponent)

HImage HImage::Symmetry(const HTuple& MaskSize, const HTuple& Direction, const HTuple& Exponent) const

HImageArray HImageArray::Symmetry(const HTuple& MaskSize, const HTuple& Direction, const HTuple& Exponent) const

void Symmetry(const HObject& Image, HObject* ImageSymmetry, const HTuple& MaskSize, const HTuple& Direction, const HTuple& Exponent)

HImage HImage::Symmetry(Hlong MaskSize, double Direction, double Exponent) const

void HOperatorSetX.Symmetry(
[in] IHUntypedObjectX* Image, [out] IHUntypedObjectX*ImageSymmetry, [in] VARIANT MaskSize, [in] VARIANT Direction, [in] VARIANT Exponent)

IHImageX* HImageX.Symmetry(
[in] Hlong MaskSize, [in] double Direction, [in] double Exponent)

static void HOperatorSet.Symmetry(HObject image, out HObject imageSymmetry, HTuple maskSize, HTuple direction, HTuple exponent)

HImage HImage.Symmetry(int maskSize, double direction, double exponent)

Description

symmetrysymmetrySymmetrysymmetrySymmetrySymmetry calculates the symmetry along a line. For each pixel the gray values of both sides of the line are compared: The absolute value of the differences of gray values with same distance to the pixel is computed. Each of these differences is weighted by the exponent (after division by 255) and then summed up.

Pixels with a high symmetry have large gray values.

Attention

Currently only horizontal search lines are implemented. Note that the parameter DirectionDirectionDirectionDirectionDirectiondirection exists for future extensions and can currently only have the value 0.0.

Parallelization

Parameters

ImageImageImageImageImageimage (input_object)  (multichannel-)image(-array) objectHImageHImageHImageHImageXHobject (byte)

Input image.

ImageSymmetryImageSymmetryImageSymmetryImageSymmetryImageSymmetryimageSymmetry (output_object)  (multichannel-)image(-array) objectHImageHImageHImageHImageXHobject * (byte)

Symmetry image.

MaskSizeMaskSizeMaskSizeMaskSizeMaskSizemaskSize (input_control)  number HTupleHTupleHTupleVARIANTHtuple (integer) (int / long) (Hlong) (Hlong) (Hlong) (Hlong)

Extension of search area.

Default value: 40

Suggested values: 3, 5, 7, 10, 15, 20, 25, 30, 40, 50, 60, 70, 80, 100, 120, 140, 180

Typical range of values: 3 ≤ MaskSize MaskSize MaskSize MaskSize MaskSize maskSize ≤ 1000

Minimum increment: 1

Recommended increment: 2

DirectionDirectionDirectionDirectionDirectiondirection (input_control)  number HTupleHTupleHTupleVARIANTHtuple (real) (double) (double) (double) (double) (double)

Angle of test direction.

Default value: 0.0

Suggested values: 0.0

Typical range of values: 0.0 ≤ Direction Direction Direction Direction Direction direction ≤ 0.0

ExponentExponentExponentExponentExponentexponent (input_control)  number HTupleHTupleHTupleVARIANTHtuple (real) (double) (double) (double) (double) (double)

Exponent for weighting.

Default value: 0.5

Suggested values: 0.1, 0.2, 0.3, 0.4, 0.5, 0.7, 0.8, 0.9, 1.0

Typical range of values: 0.05 ≤ Exponent Exponent Exponent Exponent Exponent exponent ≤ 1.0

Minimum increment: 0.01

Recommended increment: 0.1

Restriction: 0 < Exponent && Exponent <= 1

Example (HDevelop)

read_image(Image,'monkey')
symmetry(Image,ImageSymmetry,70,0.0,0.5)
threshold(ImageSymmetry,SymmPoints,170,255)

Result

If the parameter values are correct the operator symmetrysymmetrySymmetrysymmetrySymmetrySymmetry returns the value 2 (H_MSG_TRUE) 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>)SetSystem("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

thresholdthresholdThresholdthresholdThresholdThreshold

Module

Foundation


ClassesClassesClassesClasses | | | | Operators