symmetry — 一行灰度值的对称性。
symmetry(Image : ImageSymmetry : MaskSize, Direction, Exponent : )
symmetry 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.
Currently only horizontal search lines are implemented.
Note that the parameter Direction exists for future extensions and can
currently only have the value 0.0.
请注意,若使用域缩减后的图像作为输入,滤波器算子可能会返回意外结果。请参阅 滤波器 一章
Image (输入对象) (multichannel-)image(-array) → object (byte)
输入图像。
ImageSymmetry (输出对象) (multichannel-)image(-array) → object (byte)
Symmetry image.
MaskSize (输入控制) number → (integer)
Extension of search area.
默认值: 40
建议值: 3, 5, 7, 10, 15, 20, 25, 30, 40, 50, 60, 70, 80, 100, 120, 140, 180
值范围:
3
≤
MaskSize
≤
1000
最小增量: 1
建议增量: 2
Direction (输入控制) number → (real)
Angle of test direction.
默认值: 0.0
建议值: 0.0
值范围:
0.0
≤
Direction
≤
0.0
Exponent (输入控制) number → (real)
Exponent for weighting.
默认值: 0.5
建议值: 0.1, 0.2, 0.3, 0.4, 0.5, 0.7, 0.8, 0.9, 1.0
最小增量: 0.01
建议增量: 0.1
限制:
0 < Exponent && Exponent <= 100
read_image(Image,'monkey') symmetry(Image,ImageSymmetry,70,0.0,0.5) threshold(ImageSymmetry,SymmPoints,170,255)
如果参数值正确,算子 symmetry 返回值 2 (H_MSG_TRUE)当输入为空(无可用输入图像)时,可设置行为通过算子 set_system(::'no_object_result',<Result>:)。如有必要,则抛出异常。
基础