select_gray — 根据灰度值特征选择区域。
算子 select_gray has a number of regions
(Regions) as input. For each of these regions the
(Features) are calculated. The region is transferred (duplicated)
into the output SelectedRegions, if each
(Operation = 'and') or at least one (Operation
= 'or') of the calculated features is within the limits.
The limits are defined by the parameters Min and Max.
Thereby, Min and Max can also be set to 'min'
or 'max', respectively, corresponding to setting the smallest
or largest value possible for this feature.
The parameter Image contains an image which returns the gray
values for calculating the features.
Restriction:
Possible values for Features:
'area':Gray value volume of region
(see area_center_gray)
'row':Row index of the center of gravity
(see area_center_gray)
'column':Column index of the center of gravity
(see area_center_gray)
'ra':Major axis of equivalent ellipse
(see elliptic_axis_gray)
'rb':Minor axis of equivalent ellipse
(see elliptic_axis_gray)
'phi':Orientation of equivalent ellipse
(see elliptic_axis_gray)
'min':Minimum gray value
(see min_max_gray)
'max':Maximum gray value
(see min_max_gray)
'median':Median gray value
(see min_max_gray, with Percent=50)
'mean':Mean gray value
(see intensity)
'deviation':Deviation of gray values
(see intensity)
'plane_deviation':Deviation from the approximating plane
(see plane_deviation)
'anisotropy':Anisotropy
(see entropy_gray)
'entropy':Entropy
(see entropy_gray)
'fuzzy_entropy':Fuzzy entropy of region
(see fuzzy_entropy, with a fuzzy function from
Apar=0 to Cpar=255)
'fuzzy_perimeter':Fuzzy perimeter of region
(see fuzzy_perimeter, with a fuzzy function from
Apar=0 to Cpar=255)
'moments_row':Mixed moments along a row
(see moments_gray_plane)
'moments_column':Mixed moments along a column
(see moments_gray_plane)
'alpha':Approximating plane, parameter Alpha
(see moments_gray_plane)
'beta':Approximating plane, parameter Beta
(see moments_gray_plane)
Note that the operator select_gray only considers
the given Regions and ignores any previously set domain
of the input image Image.
If only one feature is used the value of Operation is
meaningless. Several features are processed in the order in which
they are entered. The maximum number of features is limited to 100.
Regions (输入对象) region-array → object
Regions to be examined.
Image (输入对象) singlechannelimage → object (byte / direction / cyclic / int1 / int2 / uint2 / int4 / real)
灰度值图像。
SelectedRegions (输出对象) region-array → object
Regions having features within the limits.
Features (输入控制) string(-array) → (string)
Names of the features.
默认值: 'mean'
值列表: 'alpha', 'anisotropy', 'area', 'beta', 'column', 'deviation', 'entropy', 'fuzzy_entropy', 'fuzzy_perimeter', 'max', 'mean', 'median', 'min', 'moments_column', 'moments_row', 'phi', 'plane_deviation', 'ra', 'rb', 'row'
Operation (输入控制) string → (string)
Logical connection of features.
默认值: 'and'
值列表: 'and', 'or'
Min (输入控制) number(-array) → (real / integer / string)
Lower limit(s) of features or 'min'.
默认值: 128.0
建议值: 0.5, 1.0, 10.0, 20.0, 50.0, 128.0, 255.0, 1000.0, 'min'
Max (输入控制) number(-array) → (real / integer / string)
Upper limit(s) of features or 'max'.
默认值: 255.0
建议值: 0.5, 1.0, 10.0, 20.0, 50.0, 128.0, 255.0, 1000.0, 'max'
If F is the area of the region and N the number of features the runtime complexity is O(F * N).
算子 select_gray 返回值 2 (
H_MSG_TRUE)
if the
input image has the defined gray values and the parameters are
correct.当输入为空(无可用输入图像)时可设置行为通过算子 set_system(::'no_object_result',<Result>:),
the behavior in case of empty region is set via
set_system(::'empty_region_result',<Result>:)。如有必要,则抛出异常。
connection,
mean_image,
entropy_image,
sobel_amp,
median_separate
select_shape,
shape_trans,
reduce_domain,
count_obj
deviation_image,
entropy_gray,
intensity,
mean_image,
min_max_gray,
select_obj
基础