gen_cooc_matrixgen_cooc_matrixGenCoocMatrixGenCoocMatrixgen_cooc_matrix (算子)

名称

gen_cooc_matrixgen_cooc_matrixGenCoocMatrixGenCoocMatrixgen_cooc_matrix — 计算图像中某个区域的共生矩阵。

签名

gen_cooc_matrix(Regions, Image : Matrix : LdGray, Direction : )

Herror gen_cooc_matrix(const Hobject Regions, const Hobject Image, Hobject* Matrix, const Hlong LdGray, const Hlong Direction)

Herror T_gen_cooc_matrix(const Hobject Regions, const Hobject Image, Hobject* Matrix, const Htuple LdGray, const Htuple Direction)

void GenCoocMatrix(const HObject& Regions, const HObject& Image, HObject* Matrix, const HTuple& LdGray, const HTuple& Direction)

HImage HImage::GenCoocMatrix(const HRegion& Regions, Hlong LdGray, Hlong Direction) const

HImage HRegion::GenCoocMatrix(const HImage& Image, Hlong LdGray, Hlong Direction) const

static void HOperatorSet.GenCoocMatrix(HObject regions, HObject image, out HObject matrix, HTuple ldGray, HTuple direction)

HImage HImage.GenCoocMatrix(HRegion regions, int ldGray, int direction)

HImage HRegion.GenCoocMatrix(HImage image, int ldGray, int direction)

def gen_cooc_matrix(regions: HObject, image: HObject, ld_gray: int, direction: int) -> HObject

描述

算子 gen_cooc_matrixgen_cooc_matrixGenCoocMatrixGenCoocMatrixGenCoocMatrixgen_cooc_matrix determines from the input regions how often the gray values i and j are located next to each other in a certain direction (0, 45, 90, 135 degrees), stores this number in the co-occurrence matrix at the locations (i,j) and (j,i) (the matrix is symmetrical), and finally scales the matrix with the number of entries. LdGrayLdGrayLdGrayLdGrayldGrayld_gray indicates the number of gray values to be distinguished (namely ).

Example: Input image with gray values (scaled with LdGrayLdGrayLdGrayLdGrayldGrayld_gray=2)

Co-occurrence matrix (not scaled):

注意

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

执行信息

参数

RegionsRegionsRegionsRegionsregionsregions (输入对象)  region(-array) objectHRegionHObjectHRegionHobject

Region to be checked.

ImageImageImageImageimageimage (输入对象)  singlechannelimage objectHImageHObjectHImageHobject (byte)

Image providing the gray values.

MatrixMatrixMatrixMatrixmatrixmatrix (输出对象)  image(-array) objectHImageHObjectHImageHobject * (real)

Co-occurrence matrix (matrices).

LdGrayLdGrayLdGrayLdGrayldGrayld_gray (输入控制)  integer HTupleintHTupleHtuple (integer) (int / long) (Hlong) (Hlong)

Number of gray values to be distinguished ( ).

默认值: 6

值列表: 1, 2, 3, 4, 5, 6, 7, 8

值范围: LdGray LdGray LdGray LdGray ldGray ld_gray (lin)

最小增量: 1

建议增量: 1

DirectionDirectionDirectionDirectiondirectiondirection (输入控制)  integer HTupleintHTupleHtuple (integer) (int / long) (Hlong) (Hlong)

Direction of neighbor relation.

默认值: 0

值列表: 0, 45, 90, 135

结果

算子 gen_cooc_matrixgen_cooc_matrixGenCoocMatrixGenCoocMatrixGenCoocMatrixgen_cooc_matrix 返回值 2 ( H_MSG_TRUE) if an image with defined gray values is entered 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>)。如有必要,则抛出异常。

可能的前趋

draw_regiondraw_regionDrawRegionDrawRegionDrawRegiondraw_region, gen_circlegen_circleGenCircleGenCircleGenCirclegen_circle, gen_ellipsegen_ellipseGenEllipseGenEllipseGenEllipsegen_ellipse, gen_rectangle1gen_rectangle1GenRectangle1GenRectangle1GenRectangle1gen_rectangle1, gen_rectangle2gen_rectangle2GenRectangle2GenRectangle2GenRectangle2gen_rectangle2, thresholdthresholdThresholdThresholdThresholdthreshold, erosion_circleerosion_circleErosionCircleErosionCircleErosionCircleerosion_circle, binomial_filterbinomial_filterBinomialFilterBinomialFilterBinomialFilterbinomial_filter, gauss_filtergauss_filterGaussFilterGaussFilterGaussFiltergauss_filter, smooth_imagesmooth_imageSmoothImageSmoothImageSmoothImagesmooth_image, sub_imagesub_imageSubImageSubImageSubImagesub_image

替代

cooc_feature_imagecooc_feature_imageCoocFeatureImageCoocFeatureImageCoocFeatureImagecooc_feature_image

另见

cooc_feature_matrixcooc_feature_matrixCoocFeatureMatrixCoocFeatureMatrixCoocFeatureMatrixcooc_feature_matrix

模块

基础