Skip to content

cooc_feature_imageCoocFeatureImageCoocFeatureImagecooc_feature_imagecooc_feature_image🔗

Short description🔗

cooc_feature_imageCoocFeatureImageCoocFeatureImagecooc_feature_imagecooc_feature_image — Calculate a co-occurrence matrix and derive gray value features thereof.

Signature🔗

cooc_feature_image( region Regions, image Image, integer LdGray, integer Direction, out real Energy, out real Correlation, out real Homogeneity, out real Contrast )void CoocFeatureImage( const HObject& Regions, const HObject& Image, const HTuple& LdGray, const HTuple& Direction, HTuple* Energy, HTuple* Correlation, HTuple* Homogeneity, HTuple* Contrast )static void HOperatorSet.CoocFeatureImage( HObject regions, HObject image, HTuple ldGray, HTuple direction, out HTuple energy, out HTuple correlation, out HTuple homogeneity, out HTuple contrast )def cooc_feature_image( regions: HObject, image: HObject, ld_gray: int, direction: Union[int, str] ) -> Tuple[Sequence[float], Sequence[float], Sequence[float], Sequence[float]]

def cooc_feature_image_s( regions: HObject, image: HObject, ld_gray: int, direction: Union[int, str] ) -> Tuple[float, float, float, float]Herror cooc_feature_image( const Hobject Regions, const Hobject Image, const Hlong LdGray, const Hlong Direction, double* Energy, double* Correlation, double* Homogeneity, double* Contrast )

Herror T_cooc_feature_image( const Hobject Regions, const Hobject Image, const Htuple LdGray, const Htuple Direction, Htuple* Energy, Htuple* Correlation, Htuple* Homogeneity, Htuple* Contrast )

HTuple HImage::CoocFeatureImage( const HRegion& Regions, Hlong LdGray, const HTuple& Direction, HTuple* Correlation, HTuple* Homogeneity, HTuple* Contrast ) const

double HImage::CoocFeatureImage( const HRegion& Regions, Hlong LdGray, Hlong Direction, double* Correlation, double* Homogeneity, double* Contrast ) const

HTuple HRegion::CoocFeatureImage( const HImage& Image, Hlong LdGray, const HTuple& Direction, HTuple* Correlation, HTuple* Homogeneity, HTuple* Contrast ) const

double HRegion::CoocFeatureImage( const HImage& Image, Hlong LdGray, Hlong Direction, double* Correlation, double* Homogeneity, double* Contrast ) const

HTuple HImage.CoocFeatureImage( HRegion regions, int ldGray, HTuple direction, out HTuple correlation, out HTuple homogeneity, out HTuple contrast )

double HImage.CoocFeatureImage( HRegion regions, int ldGray, int direction, out double correlation, out double homogeneity, out double contrast )

HTuple HRegion.CoocFeatureImage( HImage image, int ldGray, HTuple direction, out HTuple correlation, out HTuple homogeneity, out HTuple contrast )

double HRegion.CoocFeatureImage( HImage image, int ldGray, int direction, out double correlation, out double homogeneity, out double contrast )

Description🔗

The call of cooc_feature_imageCoocFeatureImage corresponds to the consecutive execution of the operators gen_cooc_matrixGenCoocMatrix and cooc_feature_matrixCoocFeatureMatrix. If several direction matrices of the co-occurrence matrix are to be evaluated consecutively, it is more efficient to generate the matrix via gen_cooc_matrixGenCoocMatrix and then call the operator cooc_feature_matrixCoocFeatureMatrix for the resulting matrix. The parameter Directiondirectiondirection transfers the direction of the neighborhood in angle or 'mean'"mean". In the case of 'mean'"mean" the mean value is calculated in all four directions.

Attention🔗

Note that the operator cooc_feature_imageCoocFeatureImage only considers the given Regionsregionsregions and ignores any previously set domain of the input image Imageimageimage.

Execution information🔗

Execution information
  • Multithreading type: reentrant (runs in parallel with non-exclusive operators).

  • Multithreading scope: global (may be called from any thread).

Parameters🔗

Regionsregionsregions (input_object) region(-array) → objectHObjectHRegionHObjectHobject

Region to be examined.

Imageimageimage (input_object) singlechannelimage → object (byte)HObject (byte)HImage (byte)HObject (byte)Hobject (byte)

Corresponding gray values.

LdGrayldGrayld_gray (input_control) integer → (integer)HTuple (Hlong)HTuple (int / long)intHtuple (Hlong)

Number of gray values to be distinguished (\(2^{\textrm{LdGray}}\)).

Default: 66
List of values: 1, 2, 3, 4, 5, 6, 7, 81, 2, 3, 4, 5, 6, 7, 8

Directiondirectiondirection (input_control) integer → (integer / string)HTuple (Hlong / HString)HTuple (int / long / string)Union[int, str]Htuple (Hlong / char*)

Direction in which the matrix is to be calculated.

Default: 00
List of values: 0, 45, 90, 135, 'mean'0, 45, 90, 135, "mean"

Energyenergyenergy (output_control) real(-array) → (real)HTuple (double)HTuple (double)Sequence[float]Htuple (double)

Gray value energy.

Correlationcorrelationcorrelation (output_control) real(-array) → (real)HTuple (double)HTuple (double)Sequence[float]Htuple (double)

Correlation of gray values.

Homogeneityhomogeneityhomogeneity (output_control) real(-array) → (real)HTuple (double)HTuple (double)Sequence[float]Htuple (double)

Local homogeneity of gray values.

Contrastcontrastcontrast (output_control) real(-array) → (real)HTuple (double)HTuple (double)Sequence[float]Htuple (double)

Gray value contrast.

Result🔗

The operator cooc_feature_imageCoocFeatureImage returns the value 2 (H_MSG_TRUE) if an image with defined gray values (byte) is entered 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>:), the behavior in case of empty region is set via set_system(::'empty_region_result',<Result>:). If necessary an exception is raised.

Combinations with other operators🔗

Combinations

Possible predecessors

gen_cooc_matrixGenCoocMatrix

Alternatives

cooc_feature_matrixCoocFeatureMatrix

See also

intensityIntensity, min_max_grayMinMaxGray, entropy_grayEntropyGray, select_graySelectGray

Module🔗

Foundation