select_gray select_gray SelectGray SelectGray (Operator)
Name
select_gray select_gray SelectGray SelectGray
— Select regions based on gray value features.
Signature
Herror select_gray (const Hobject Regions , const Hobject Image , Hobject* SelectedRegions , const char* Features , const char* Operation , double Min , double Max )
Herror T_select_gray (const Hobject Regions , const Hobject Image , Hobject* SelectedRegions , const Htuple Features , const Htuple Operation , const Htuple Min , const Htuple Max )
void SelectGray (const HObject& Regions , const HObject& Image , HObject* SelectedRegions , const HTuple& Features , const HTuple& Operation , const HTuple& Min , const HTuple& Max )
HRegion HRegion ::SelectGray (const HImage& Image , const HTuple& Features , const HString& Operation , const HTuple& Min , const HTuple& Max ) const
HRegion HRegion ::SelectGray (const HImage& Image , const HString& Features , const HString& Operation , double Min , double Max ) const
HRegion HRegion ::SelectGray (const HImage& Image , const char* Features , const char* Operation , double Min , double Max ) const
HRegion HRegion ::SelectGray (const HImage& Image , const wchar_t* Features , const wchar_t* Operation , double Min , double Max ) const
(Windows only)
static void HOperatorSet .SelectGray (HObject regions , HObject image , out HObject selectedRegions , HTuple features , HTuple operation , HTuple min , HTuple max )
HRegion HRegion .SelectGray (HImage image , HTuple features , string operation , HTuple min , HTuple max )
HRegion HRegion .SelectGray (HImage image , string features , string operation , double min , double max )
Description
The operator select_gray select_gray SelectGray SelectGray SelectGray
has a number of regions
(Regions Regions Regions Regions regions
) as input. For each of these regions the
(Features Features Features Features features
) are calculated. The region is transferred (duplicated)
into the output SelectedRegions SelectedRegions SelectedRegions SelectedRegions selectedRegions
, if each
(Operation Operation Operation Operation operation
= 'and') or at least one (Operation Operation Operation Operation operation
= 'or') of the calculated features is within the limits.
The limits are defined by the parameters Min Min Min Min min
and Max Max Max Max max
.
Thereby, Min Min Min Min min
and Max Max Max Max max
can also be set to 'min' "min" "min" "min" "min"
or 'max' "max" "max" "max" "max" , respectively, corresponding to setting the smallest
or largest value possible for this feature.
The parameter Image Image Image Image image
contains an image which returns the gray
values for calculating the features.
Condition:
'area'
Gray value volume of region
(see area_center_gray area_center_gray AreaCenterGray AreaCenterGray AreaCenterGray
)
'row'
Row index of the center of gravity
(see area_center_gray area_center_gray AreaCenterGray AreaCenterGray AreaCenterGray
)
'column'
Column index of the center of gravity
(see area_center_gray area_center_gray AreaCenterGray AreaCenterGray AreaCenterGray
)
'ra'
Major axis of equivallent ellipse
(see elliptic_axis_gray elliptic_axis_gray EllipticAxisGray EllipticAxisGray EllipticAxisGray
)
'rb'
Minor axis of equivallent ellipse
(see elliptic_axis_gray elliptic_axis_gray EllipticAxisGray EllipticAxisGray EllipticAxisGray
)
'phi'
Orientation of equivallent ellipse
(see elliptic_axis_gray elliptic_axis_gray EllipticAxisGray EllipticAxisGray EllipticAxisGray
)
'min'
Minimum gray value (see min_max_gray min_max_gray MinMaxGray MinMaxGray MinMaxGray
)
'max'
Maximum gray value (see min_max_gray min_max_gray MinMaxGray MinMaxGray MinMaxGray
)
'median'
Median gray value (see min_max_gray min_max_gray MinMaxGray MinMaxGray MinMaxGray
,
with Percent=50)
'mean'
Mean gray value (see intensity intensity Intensity Intensity Intensity
)
'deviation'
Deviation of gray values (see intensity intensity Intensity Intensity Intensity
)
'plane_deviation'
Deviation from the approximating plane
(see plane_deviation plane_deviation PlaneDeviation PlaneDeviation PlaneDeviation
)
'anisotropy'
Anisotropy (see entropy_gray entropy_gray EntropyGray EntropyGray EntropyGray
)
'entropy'
Entropy (see entropy_gray entropy_gray EntropyGray EntropyGray EntropyGray
)
'fuzzy_entropy'
Fuzzy entropie of region (see fuzzy_entropy fuzzy_entropy FuzzyEntropy FuzzyEntropy FuzzyEntropy
,
with a fuzzy function from Apar=0 to Cpar=255)
'fuzzy_perimeter'
Fuzzy perimeter of region (see fuzzy_perimeter fuzzy_perimeter FuzzyPerimeter FuzzyPerimeter FuzzyPerimeter
,
with a fuzzy function from Apar=0 to Cpar=255)
'moments_row'
Mixed moments along a row
(see moments_gray_plane moments_gray_plane MomentsGrayPlane MomentsGrayPlane MomentsGrayPlane
)
'moments_column'
Mixed moments along a column
(see moments_gray_plane moments_gray_plane MomentsGrayPlane MomentsGrayPlane MomentsGrayPlane
)
'alpha'
Approximating plane, parameter Alpha
(see moments_gray_plane moments_gray_plane MomentsGrayPlane MomentsGrayPlane MomentsGrayPlane
)
'beta'
Approximating plane, parameter Beta
(see moments_gray_plane moments_gray_plane MomentsGrayPlane MomentsGrayPlane MomentsGrayPlane
)
Attention
Note that the operator select_gray select_gray SelectGray SelectGray SelectGray
only considers
the given Regions Regions Regions Regions regions
and ignores any previously set domain
of the input image Image Image Image Image image
.
If only one feature is used the value of Operation Operation Operation Operation operation
is
meaningless. Several features are processed in the order in which
they are entered. The maximum number of features is limited to 100.
Execution Information
Multithreading type: reentrant (runs in parallel with non-exclusive operators).
Multithreading scope: global (may be called from any thread).
Automatically parallelized on tuple level.
Parameters
Regions Regions Regions Regions regions
(input_object) region-array →
object HRegion HRegion Hobject
Regions to be examined.
Image Image Image Image image
(input_object) singlechannelimage →
object HImage HImage Hobject (byte / direction / cyclic / int1 / int2 / uint2 / int4 / real)
Gray value image.
SelectedRegions SelectedRegions SelectedRegions SelectedRegions selectedRegions
(output_object) region-array →
object HRegion HRegion Hobject *
Regions having features within the limits.
Features Features Features Features features
(input_control) string(-array) →
HTuple HTuple Htuple (string) (string ) (HString ) (char* )
Names of the features.
Default value:
'mean'
"mean"
"mean"
"mean"
"mean"
List of values: 'alpha' "alpha" "alpha" "alpha" "alpha" , 'anisotropy' "anisotropy" "anisotropy" "anisotropy" "anisotropy" , 'area' "area" "area" "area" "area" , 'beta' "beta" "beta" "beta" "beta" , 'column' "column" "column" "column" "column" , 'deviation' "deviation" "deviation" "deviation" "deviation" , 'entropy' "entropy" "entropy" "entropy" "entropy" , 'fuzzy_entropy' "fuzzy_entropy" "fuzzy_entropy" "fuzzy_entropy" "fuzzy_entropy" , 'fuzzy_perimeter' "fuzzy_perimeter" "fuzzy_perimeter" "fuzzy_perimeter" "fuzzy_perimeter" , 'max' "max" "max" "max" "max" , 'mean' "mean" "mean" "mean" "mean" , 'median' "median" "median" "median" "median" , 'min' "min" "min" "min" "min" , 'moments_column' "moments_column" "moments_column" "moments_column" "moments_column" , 'moments_row' "moments_row" "moments_row" "moments_row" "moments_row" , 'phi' "phi" "phi" "phi" "phi" , 'plane_deviation' "plane_deviation" "plane_deviation" "plane_deviation" "plane_deviation" , 'ra' "ra" "ra" "ra" "ra" , 'rb' "rb" "rb" "rb" "rb" , 'row' "row" "row" "row" "row"
Operation Operation Operation Operation operation
(input_control) string →
HTuple HTuple Htuple (string) (string ) (HString ) (char* )
Logical connection of features.
Default value:
'and'
"and"
"and"
"and"
"and"
List of values: 'and' "and" "and" "and" "and" , 'or' "or" "or" "or" "or"
Min Min Min Min min
(input_control) number(-array) →
HTuple HTuple Htuple (real / integer / string) (double / int / long / string) (double / Hlong / HString) (double / Hlong / char*)
Lower limit(s) of features or 'min'.
Default value: 128.0
Suggested values: 0.5, 1.0, 10.0, 20.0, 50.0, 128.0, 255.0, 1000.0, 'min' "min" "min" "min" "min"
Max Max Max Max max
(input_control) number(-array) →
HTuple HTuple Htuple (real / integer / string) (double / int / long / string) (double / Hlong / HString) (double / Hlong / char*)
Upper limit(s) of features or 'max'.
Default value: 255.0
Suggested values: 0.5, 1.0, 10.0, 20.0, 50.0, 128.0, 255.0, 1000.0, 'max' "max" "max" "max" "max"
Complexity
If F is the area of the region and N the number of features
the runtime complexity is O(F * N).
Result
The operator select_gray select_gray SelectGray SelectGray SelectGray
returns the value 2 (H_MSG_TRUE) if the
input image has the defined gray values and the parameters are
correct. The behavior in case of empty input (no input images
available) is set via the operator
set_system(::'no_object_result',<Result>:) set_system("no_object_result",<Result>) SetSystem("no_object_result",<Result>) SetSystem("no_object_result",<Result>) SetSystem("no_object_result",<Result>)
,
the behavior in case of empty region is set via
set_system(::'empty_region_result',<Result>:) set_system("empty_region_result",<Result>) SetSystem("empty_region_result",<Result>) SetSystem("empty_region_result",<Result>) SetSystem("empty_region_result",<Result>)
.
If necessary an exception is raised.
Possible Predecessors
connection connection Connection Connection Connection
,
mean_image mean_image MeanImage MeanImage MeanImage
,
entropy_image entropy_image EntropyImage EntropyImage EntropyImage
,
sobel_amp sobel_amp SobelAmp SobelAmp SobelAmp
,
median_separate median_separate MedianSeparate MedianSeparate MedianSeparate
Possible Successors
select_shape select_shape SelectShape SelectShape SelectShape
,
shape_trans shape_trans ShapeTrans ShapeTrans ShapeTrans
,
reduce_domain reduce_domain ReduceDomain ReduceDomain ReduceDomain
,
count_obj count_obj CountObj CountObj CountObj
See also
deviation_image deviation_image DeviationImage DeviationImage DeviationImage
,
entropy_gray entropy_gray EntropyGray EntropyGray EntropyGray
,
intensity intensity Intensity Intensity Intensity
,
mean_image mean_image MeanImage MeanImage MeanImage
,
min_max_gray min_max_gray MinMaxGray MinMaxGray MinMaxGray
,
select_obj select_obj SelectObj SelectObj SelectObj
Module
Foundation