select_grayselect_graySelectGraySelectGrayselect_gray (Operator)

Name

select_grayselect_graySelectGraySelectGrayselect_gray — Select regions based on gray value features.

Signature

select_gray(Regions, Image : SelectedRegions : Features, Operation, Min, Max : )

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)

def select_gray(regions: HObject, image: HObject, features: MaybeSequence[str], operation: str, min: MaybeSequence[Union[int, float, str]], max: MaybeSequence[Union[int, float, str]]) -> HObject

Description

The operator select_grayselect_graySelectGraySelectGraySelectGrayselect_gray has a number of regions (RegionsRegionsRegionsRegionsregionsregions) as input. For each of these regions the (FeaturesFeaturesFeaturesFeaturesfeaturesfeatures) are calculated. The region is transferred (duplicated) into the output SelectedRegionsSelectedRegionsSelectedRegionsSelectedRegionsselectedRegionsselected_regions, if each (OperationOperationOperationOperationoperationoperation = 'and'"and""and""and""and""and") or at least one (OperationOperationOperationOperationoperationoperation = 'or'"or""or""or""or""or") of the calculated features is within the limits. The limits are defined by the parameters MinMinMinMinminmin and MaxMaxMaxMaxmaxmax. Thereby, MinMinMinMinminmin and MaxMaxMaxMaxmaxmax can also be set to 'min'"min""min""min""min""min" or 'max'"max""max""max""max""max", respectively, corresponding to setting the smallest or largest value possible for this feature. The parameter ImageImageImageImageimageimage contains an image which returns the gray values for calculating the features.

Restriction:

Possible values for FeaturesFeaturesFeaturesFeaturesfeaturesfeatures:

Attention

Note that the operator select_grayselect_graySelectGraySelectGraySelectGrayselect_gray only considers the given RegionsRegionsRegionsRegionsregionsregions and ignores any previously set domain of the input image ImageImageImageImageimageimage. If only one feature is used the value of OperationOperationOperationOperationoperationoperation 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

Parameters

RegionsRegionsRegionsRegionsregionsregions (input_object)  region-array objectHRegionHObjectHRegionHobject

Regions to be examined.

ImageImageImageImageimageimage (input_object)  singlechannelimage objectHImageHObjectHImageHobject (byte / direction / cyclic / int1 / int2 / uint2 / int4 / real)

Gray value image.

SelectedRegionsSelectedRegionsSelectedRegionsSelectedRegionsselectedRegionsselected_regions (output_object)  region-array objectHRegionHObjectHRegionHobject *

Regions having features within the limits.

FeaturesFeaturesFeaturesFeaturesfeaturesfeatures (input_control)  string(-array) HTupleMaybeSequence[str]HTupleHtuple (string) (string) (HString) (char*)

Names of the features.

Default: 'mean' "mean" "mean" "mean" "mean" "mean"

List of values: 'alpha'"alpha""alpha""alpha""alpha""alpha", 'anisotropy'"anisotropy""anisotropy""anisotropy""anisotropy""anisotropy", 'area'"area""area""area""area""area", 'beta'"beta""beta""beta""beta""beta", 'column'"column""column""column""column""column", 'deviation'"deviation""deviation""deviation""deviation""deviation", 'entropy'"entropy""entropy""entropy""entropy""entropy", 'fuzzy_entropy'"fuzzy_entropy""fuzzy_entropy""fuzzy_entropy""fuzzy_entropy""fuzzy_entropy", 'fuzzy_perimeter'"fuzzy_perimeter""fuzzy_perimeter""fuzzy_perimeter""fuzzy_perimeter""fuzzy_perimeter", 'max'"max""max""max""max""max", 'mean'"mean""mean""mean""mean""mean", 'median'"median""median""median""median""median", 'min'"min""min""min""min""min", 'moments_column'"moments_column""moments_column""moments_column""moments_column""moments_column", 'moments_row'"moments_row""moments_row""moments_row""moments_row""moments_row", 'phi'"phi""phi""phi""phi""phi", 'plane_deviation'"plane_deviation""plane_deviation""plane_deviation""plane_deviation""plane_deviation", 'ra'"ra""ra""ra""ra""ra", 'rb'"rb""rb""rb""rb""rb", 'row'"row""row""row""row""row"

OperationOperationOperationOperationoperationoperation (input_control)  string HTuplestrHTupleHtuple (string) (string) (HString) (char*)

Logical connection of features.

Default: 'and' "and" "and" "and" "and" "and"

List of values: 'and'"and""and""and""and""and", 'or'"or""or""or""or""or"

MinMinMinMinminmin (input_control)  number(-array) HTupleMaybeSequence[Union[int, float, str]]HTupleHtuple (real / integer / string) (double / int / long / string) (double / Hlong / HString) (double / Hlong / char*)

Lower limit(s) of features or 'min'.

Default: 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""min"

MaxMaxMaxMaxmaxmax (input_control)  number(-array) HTupleMaybeSequence[Union[int, float, str]]HTupleHtuple (real / integer / string) (double / int / long / string) (double / Hlong / HString) (double / Hlong / char*)

Upper limit(s) of features or 'max'.

Default: 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""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_grayselect_graySelectGraySelectGraySelectGrayselect_gray 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>)set_system("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>)set_system("empty_region_result",<Result>). If necessary an exception is raised.

Possible Predecessors

connectionconnectionConnectionConnectionConnectionconnection, mean_imagemean_imageMeanImageMeanImageMeanImagemean_image, entropy_imageentropy_imageEntropyImageEntropyImageEntropyImageentropy_image, sobel_ampsobel_ampSobelAmpSobelAmpSobelAmpsobel_amp, median_separatemedian_separateMedianSeparateMedianSeparateMedianSeparatemedian_separate

Possible Successors

select_shapeselect_shapeSelectShapeSelectShapeSelectShapeselect_shape, shape_transshape_transShapeTransShapeTransShapeTransshape_trans, reduce_domainreduce_domainReduceDomainReduceDomainReduceDomainreduce_domain, count_objcount_objCountObjCountObjCountObjcount_obj

See also

deviation_imagedeviation_imageDeviationImageDeviationImageDeviationImagedeviation_image, entropy_grayentropy_grayEntropyGrayEntropyGrayEntropyGrayentropy_gray, intensityintensityIntensityIntensityIntensityintensity, mean_imagemean_imageMeanImageMeanImageMeanImagemean_image, min_max_graymin_max_grayMinMaxGrayMinMaxGrayMinMaxGraymin_max_gray, select_objselect_objSelectObjSelectObjSelectObjselect_obj

Module

Foundation