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

Symmentry of gray values along a row.

symmetry calculates the symmetry along a line. For each pixel the gray values of both sides of the line are compared: The absolut 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 the summed up. sym := 255 - 255/MaskSize * SUMi (|g(i) - g(-i)|/255)^Exponent Pixels with a high symmetry have large gray values.


Attention

Currently only horizontal search lines are implemented


Parameters

Image (input_object)
(multichannel-)image(-array) -> object : byte
Input image.

ImageSymmetry (output_object)
(multichannel-)image(-array) -> object : byte
Symmetry image.

MaskSize (input_control)
number -> integer
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 <= 1000
Minimum increment: 1
Recommended increment: 2

Direction (input_control)
number -> real
Angle of test direction.
Default value: 0.0
Suggested values: 0.0
Typical range of values: 0.0 <= Direction <= 0.0

Exponent (input_control)
number -> real
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 <= 1.0
Minimum increment: 0.01
Recommended increment: 0.1
Restriction: (0 < Exponent) && (Exponent <= 1)


Example
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 symmetry 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>:). If necessary an exception handling is raised.


Parallelization Information

symmetry is reentrant and automatically parallelized (on tuple level, channel level, domain level).


Possible Successors

threshold


Module

Image filters



Copyright © 1996-2005 MVTec Software GmbH