select_grayselect_graySelectGraySelectGrayselect_gray (算子)

名称

select_grayselect_graySelectGraySelectGrayselect_gray — 根据灰度值特征选择区域。

签名

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

描述

算子 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:

注意

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.

执行信息

参数

RegionsRegionsRegionsRegionsregionsregions (输入对象)  region-array objectHRegionHObjectHRegionHobject

Regions to be examined.

ImageImageImageImageimageimage (输入对象)  singlechannelimage objectHImageHObjectHImageHobject (byte / direction / cyclic / int1 / int2 / uint2 / int4 / real)

灰度值图像。

SelectedRegionsSelectedRegionsSelectedRegionsSelectedRegionsselectedRegionsselected_regions (输出对象)  region-array objectHRegionHObjectHRegionHobject *

Regions having features within the limits.

FeaturesFeaturesFeaturesFeaturesfeaturesfeatures (输入控制)  string(-array) HTupleMaybeSequence[str]HTupleHtuple (string) (string) (HString) (char*)

Names of the features.

默认值: 'mean' "mean" "mean" "mean" "mean" "mean"

值列表: '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 (输入控制)  string HTuplestrHTupleHtuple (string) (string) (HString) (char*)

Logical connection of features.

默认值: 'and' "and" "and" "and" "and" "and"

值列表: 'and'"and""and""and""and""and", 'or'"or""or""or""or""or"

MinMinMinMinminmin (输入控制)  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'.

默认值: 128.0

建议值: 0.5, 1.0, 10.0, 20.0, 50.0, 128.0, 255.0, 1000.0, 'min'"min""min""min""min""min"

MaxMaxMaxMaxmaxmax (输入控制)  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'.

默认值: 255.0

建议值: 0.5, 1.0, 10.0, 20.0, 50.0, 128.0, 255.0, 1000.0, 'max'"max""max""max""max""max"

复杂度

If F is the area of the region and N the number of features the runtime complexity is O(F * N).

结果

算子 select_grayselect_graySelectGraySelectGraySelectGrayselect_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>:)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>)。如有必要,则抛出异常。

可能的前趋

connectionconnectionConnectionConnectionConnectionconnection, mean_imagemean_imageMeanImageMeanImageMeanImagemean_image, entropy_imageentropy_imageEntropyImageEntropyImageEntropyImageentropy_image, sobel_ampsobel_ampSobelAmpSobelAmpSobelAmpsobel_amp, median_separatemedian_separateMedianSeparateMedianSeparateMedianSeparatemedian_separate

可能的后继

select_shapeselect_shapeSelectShapeSelectShapeSelectShapeselect_shape, shape_transshape_transShapeTransShapeTransShapeTransshape_trans, reduce_domainreduce_domainReduceDomainReduceDomainReduceDomainreduce_domain, count_objcount_objCountObjCountObjCountObjcount_obj

另见

deviation_imagedeviation_imageDeviationImageDeviationImageDeviationImagedeviation_image, entropy_grayentropy_grayEntropyGrayEntropyGrayEntropyGrayentropy_gray, intensityintensityIntensityIntensityIntensityintensity, mean_imagemean_imageMeanImageMeanImageMeanImagemean_image, min_max_graymin_max_grayMinMaxGrayMinMaxGrayMinMaxGraymin_max_gray, select_objselect_objSelectObjSelectObjSelectObjselect_obj

模块

基础