close_edges_length — 使用边缘振幅图像闭合边缘间隙。
close_edges_length(Edges, Gradient : ClosedEdges : MinAmplitude, MaxGapLength : )
close_edges_length closes gaps in the output of an edge
detector, and thus tries to produce complete object contours. This
operator expects as input the edges (Edges) and amplitude
image (Gradient) returned by typical edge operators,
such as edges_image or sobel_amp.
Contours are closed in two steps: First, one pixel wide gaps in the
input contours are closed, and isolated points are eliminated. After
this, open contours are extended by up to MaxGapLength
points by adding edge points until either the contour is closed or
no more significant edge points can be found. A gradient is
regarded as significant if it is larger than
MinAmplitude. The neighboring points examined as
possible new edge points are the point in the direction of the
contour and its two adjacent points in an 8-neighborhood. For each
of these points, the sum of its gradient and the maximum gradient of
that points three possible neighbors is calculated (look
ahead of length 1). The point with the maximum
sum is then chosen as the new edge point.
Note that filter operators may return unexpected results if an image with a reduced domain is used as input. Please refer to the chapter 滤波器.
Edges (input_object) region(-array) → object
Region containing one pixel thick edges.
Gradient (input_object) singlechannelimage → object (byte / uint2)
Edge amplitude (gradient) image.
ClosedEdges (output_object) region(-array) → object
Region containing closed edges.
MinAmplitude (input_control) integer → (integer)
Minimum edge amplitude.
默认值: 16
建议值: 5, 8, 10, 12, 16, 20, 25, 30, 40, 50
值范围:
0
≤
MinAmplitude
≤
255
最小增量: 1
建议增量: 1
MaxGapLength (input_control) integer → (integer)
Maximal number of points by which edges are extended.
默认值: 3
建议值: 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 12, 15, 20, 30, 40, 50, 70, 100
值范围:
1
≤
MaxGapLength
≤
127
最小增量: 1
建议增量: 1
sobel_amp(Image,&EdgeAmp,"sum_abs",5); threshold(EdgeAmp,&EdgeRegion,40.0,255.0); skeleton(EdgeRegion,&ThinEdge); close_edges_length(ThinEdge,EdgeAmp,&CloseEdges,15,3);
close_edges_length returns 2 (
H_MSG_TRUE)
if all parameters are
correct. If the input is empty the behavior can be set via
set_system('no_object_result',<Result>). If
necessary, an exception is raised.
edges_image,
sobel_amp,
threshold,
skeleton
close_edges,
dilation1,
closing
M. Üsbeck: “Untersuchungen zur echtzeitfähigen Segmentierung”; Studienarbeit, Bayerisches Forschungszentrum für Wissensbasierte Systeme (FORWISS), Erlangen, 1993.
Foundation