gray_featuresgray_featuresGrayFeaturesGrayFeaturesgray_features (Operator)

Name

gray_featuresgray_featuresGrayFeaturesGrayFeaturesgray_features — Calculates gray value features for a set of regions.

Signature

gray_features(Regions, Image : : Features : Value)

Herror gray_features(const Hobject Regions, const Hobject Image, const char* Features, double* Value)

Herror T_gray_features(const Hobject Regions, const Hobject Image, const Htuple Features, Htuple* Value)

void GrayFeatures(const HObject& Regions, const HObject& Image, const HTuple& Features, HTuple* Value)

HTuple HRegion::GrayFeatures(const HImage& Image, const HTuple& Features) const

double HRegion::GrayFeatures(const HImage& Image, const HString& Features) const

double HRegion::GrayFeatures(const HImage& Image, const char* Features) const

double HRegion::GrayFeatures(const HImage& Image, const wchar_t* Features) const   (Windows only)

static void HOperatorSet.GrayFeatures(HObject regions, HObject image, HTuple features, out HTuple value)

HTuple HRegion.GrayFeatures(HImage image, HTuple features)

double HRegion.GrayFeatures(HImage image, string features)

def gray_features(regions: HObject, image: HObject, features: MaybeSequence[str]) -> Sequence[float]

def gray_features_s(regions: HObject, image: HObject, features: MaybeSequence[str]) -> float

Description

gray_featuresgray_featuresGrayFeaturesGrayFeaturesGrayFeaturesgray_features has a set of regions (RegionsRegionsRegionsRegionsregionsregions) as input. For each of these regions the features (FeaturesFeaturesFeaturesFeaturesfeaturesfeatures) are calculated and returned in ValueValueValueValuevaluevalue. Possible values for FeaturesFeaturesFeaturesFeaturesfeaturesfeatures:

'area'

Gray value volume of region (see area_center_grayarea_center_grayAreaCenterGrayAreaCenterGrayAreaCenterGrayarea_center_gray)

'row'

Row index of the center of gravity (see area_center_grayarea_center_grayAreaCenterGrayAreaCenterGrayAreaCenterGrayarea_center_gray)

'column'

Column index of the center of gravity (see area_center_grayarea_center_grayAreaCenterGrayAreaCenterGrayAreaCenterGrayarea_center_gray)

'ra'

Major axis of equivalent ellipse (see elliptic_axis_grayelliptic_axis_grayEllipticAxisGrayEllipticAxisGrayEllipticAxisGrayelliptic_axis_gray)

'rb'

Minor axis of equivalent ellipse (see elliptic_axis_grayelliptic_axis_grayEllipticAxisGrayEllipticAxisGrayEllipticAxisGrayelliptic_axis_gray)

'phi'

Orientation of equivalent ellipse (see elliptic_axis_grayelliptic_axis_grayEllipticAxisGrayEllipticAxisGrayEllipticAxisGrayelliptic_axis_gray)

'min'

Minimum gray value (see min_max_graymin_max_grayMinMaxGrayMinMaxGrayMinMaxGraymin_max_gray)

'max'

Maximum gray value (see min_max_graymin_max_grayMinMaxGrayMinMaxGrayMinMaxGraymin_max_gray)

'median'

Median gray value (see min_max_graymin_max_grayMinMaxGrayMinMaxGrayMinMaxGraymin_max_gray, with Percent=50)

'mean'

Mean gray value (see intensityintensityIntensityIntensityIntensityintensity)

'deviation'

Deviation of gray values (see intensityintensityIntensityIntensityIntensityintensity)

'plane_deviation'

Deviation from the approximating plane (see plane_deviationplane_deviationPlaneDeviationPlaneDeviationPlaneDeviationplane_deviation)

'anisotropy'

Anisotropy (see entropy_grayentropy_grayEntropyGrayEntropyGrayEntropyGrayentropy_gray)

'entropy'

Entropy (see entropy_grayentropy_grayEntropyGrayEntropyGrayEntropyGrayentropy_gray)

'fuzzy_entropy'

Fuzzy entropy of region (see fuzzy_entropyfuzzy_entropyFuzzyEntropyFuzzyEntropyFuzzyEntropyfuzzy_entropy, with a fuzzy function from Apar=0 to Cpar=255)

'fuzzy_perimeter'

Fuzzy perimeter of region (see fuzzy_perimeterfuzzy_perimeterFuzzyPerimeterFuzzyPerimeterFuzzyPerimeterfuzzy_perimeter, with a fuzzy function from Apar=0 to Cpar=255)

'moments_row'

Mixed moments along a row (see moments_gray_planemoments_gray_planeMomentsGrayPlaneMomentsGrayPlaneMomentsGrayPlanemoments_gray_plane)

'moments_column'

Mixed moments along a column (see moments_gray_planemoments_gray_planeMomentsGrayPlaneMomentsGrayPlaneMomentsGrayPlanemoments_gray_plane)

'alpha'

Approximating plane, parameter Alpha (see moments_gray_planemoments_gray_planeMomentsGrayPlaneMomentsGrayPlaneMomentsGrayPlanemoments_gray_plane)

'beta'

Approximating plane, parameter Beta (see moments_gray_planemoments_gray_planeMomentsGrayPlaneMomentsGrayPlaneMomentsGrayPlanemoments_gray_plane)

Attention

Several features are processed in the order in which they are entered.

Note that the operator gray_featuresgray_featuresGrayFeaturesGrayFeaturesGrayFeaturesgray_features only considers the given RegionsRegionsRegionsRegionsregionsregions and ignores any previously set domain of the input image ImageImageImageImageimageimage.

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.

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

Names of the features.

Default value: '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"

ValueValueValueValuevaluevalue (output_control)  real(-array) HTupleSequence[float]HTupleHtuple (real) (double) (double) (double)

Values of the features.

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 gray_featuresgray_featuresGrayFeaturesGrayFeaturesGrayFeaturesgray_features returns the value 2 (H_MSG_TRUE) if the input image has the defined gray values and the parameters are correct. 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_grayselect_graySelectGraySelectGraySelectGrayselect_gray, shape_transshape_transShapeTransShapeTransShapeTransshape_trans, reduce_domainreduce_domainReduceDomainReduceDomainReduceDomainreduce_domain, count_objcount_objCountObjCountObjCountObjcount_obj

See also

select_grayselect_graySelectGraySelectGraySelectGrayselect_gray, 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