roundness — 轮廓的形状系数。这里的圆度是圆周到中心的距离变化系数。和 Circularity 圆形度不同,Circularity 是和圆的相似程度。
算子 roundness examines the distance between the
contour and the center of the area. In particular the mean
distance (Distance), the deviation from the mean distance
(Sigma) and two shape features derived therefrom are determined.
Roundness is the relation between mean value and standard
deviation, and Sides indicates the number of polygon pieces
if a regular polygon is concerned.
In the documentation of this chapter (Regions / Features), you can find an image illustrating regions which vary in their mean distance, distance deviation, roundness and number of polygon pieces.
The contour for calculating the features is determined depending on the
global neighborhood (see set_system).
Calculation:
If p is the center of the area, the pixels and F the area of the contour.
If more than one region is passed the results are stored in tuples, the index of a value in the tuple corresponding to the index of a region in the input.
In case of empty region all parameters have the value 0.0 if no other
behavior was set (see set_system).
Regions (输入对象) region(-array) → object
待检查的区域。
Distance (输出控制) real(-array) → (real)
Mean distance from the center.
Assertion:
Distance >= 0.0
Roundness (输出控制) real(-array) → (real)
Shape factor for roundness.
Assertion:
Roundness <= 1.0
Sides (输出控制) real(-array) → (real)
Number of polygon sides.
Assertion:
Sides >= 0
If F is the area of a region the mean runtime complexity is O(sqrt(F)).
算子 roundness 在输入不为空时返回值 2 ( H_MSG_TRUE )。当输入为空(无可用输入区域)时,可设置行为通过算子 set_system('no_object_result',<Result>),
the behavior in case of empty region is set via
set_system('empty_region_result',<Result>)。如有必要,则抛出异常。
threshold,
regiongrowing,
connection
R. Haralick, L. Shapiro “Computer and Robot Vision” Addison-Wesley, 1992, pp. 61
基础