moments_gray_planemoments_gray_planeMomentsGrayPlaneMomentsGrayPlanemoments_gray_plane (算子)

名称

moments_gray_planemoments_gray_planeMomentsGrayPlaneMomentsGrayPlanemoments_gray_plane — 通过平面计算灰度值矩和近似值。

签名

moments_gray_plane(Regions, Image : : : MRow, MCol, Alpha, Beta, Mean)

Herror moments_gray_plane(const Hobject Regions, const Hobject Image, double* MRow, double* MCol, double* Alpha, double* Beta, double* Mean)

Herror T_moments_gray_plane(const Hobject Regions, const Hobject Image, Htuple* MRow, Htuple* MCol, Htuple* Alpha, Htuple* Beta, Htuple* Mean)

void MomentsGrayPlane(const HObject& Regions, const HObject& Image, HTuple* MRow, HTuple* MCol, HTuple* Alpha, HTuple* Beta, HTuple* Mean)

void HImage::MomentsGrayPlane(const HRegion& Regions, HTuple* MRow, HTuple* MCol, HTuple* Alpha, HTuple* Beta, HTuple* Mean) const

void HImage::MomentsGrayPlane(const HRegion& Regions, double* MRow, double* MCol, double* Alpha, double* Beta, double* Mean) const

void HRegion::MomentsGrayPlane(const HImage& Image, HTuple* MRow, HTuple* MCol, HTuple* Alpha, HTuple* Beta, HTuple* Mean) const

void HRegion::MomentsGrayPlane(const HImage& Image, double* MRow, double* MCol, double* Alpha, double* Beta, double* Mean) const

static void HOperatorSet.MomentsGrayPlane(HObject regions, HObject image, out HTuple MRow, out HTuple MCol, out HTuple alpha, out HTuple beta, out HTuple mean)

void HImage.MomentsGrayPlane(HRegion regions, out HTuple MRow, out HTuple MCol, out HTuple alpha, out HTuple beta, out HTuple mean)

void HImage.MomentsGrayPlane(HRegion regions, out double MRow, out double MCol, out double alpha, out double beta, out double mean)

void HRegion.MomentsGrayPlane(HImage image, out HTuple MRow, out HTuple MCol, out HTuple alpha, out HTuple beta, out HTuple mean)

void HRegion.MomentsGrayPlane(HImage image, out double MRow, out double MCol, out double alpha, out double beta, out double mean)

def moments_gray_plane(regions: HObject, image: HObject) -> Tuple[Sequence[float], Sequence[float], Sequence[float], Sequence[float], Sequence[float]]

def moments_gray_plane_s(regions: HObject, image: HObject) -> Tuple[float, float, float, float, float]

描述

算子 moments_gray_planemoments_gray_planeMomentsGrayPlaneMomentsGrayPlaneMomentsGrayPlanemoments_gray_plane calculates the gray value moments and the parameters of the approximation of the gray values by a plane. The calculation is carried out according to the following formula: where is the plane, , the center, and , , and the scaled moments of RegionsRegionsRegionsRegionsregionsregions

The parameters AlphaAlphaAlphaAlphaalphaalpha, BetaBetaBetaBetabetabeta and MeanMeanMeanMeanmeanmean describe a plane above the region: Thus AlphaAlphaAlphaAlphaalphaalpha indicates the gradient in the direction of the line axis (“down”), BetaBetaBetaBetabetabeta the gradient in the direction of the column axis (to the “right”).

注意

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

执行信息

参数

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

Regions to be checked.

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

Corresponding gray values.

MRowMRowMRowMRowMRowmrow (输出控制)  real(-array) HTupleSequence[float]HTupleHtuple (real) (double) (double) (double)

Mixed moments along a line.

MColMColMColMColMColmcol (输出控制)  real(-array) HTupleSequence[float]HTupleHtuple (real) (double) (double) (double)

Mixed moments along a column.

AlphaAlphaAlphaAlphaalphaalpha (输出控制)  real(-array) HTupleSequence[float]HTupleHtuple (real) (double) (double) (double)

Parameter Alpha of the approximating plane.

BetaBetaBetaBetabetabeta (输出控制)  real(-array) HTupleSequence[float]HTupleHtuple (real) (double) (double) (double)

Parameter Beta of the approximating plane.

MeanMeanMeanMeanmeanmean (输出控制)  real(-array) HTupleSequence[float]HTupleHtuple (real) (double) (double) (double)

Mean gray value.

结果

算子 moments_gray_planemoments_gray_planeMomentsGrayPlaneMomentsGrayPlaneMomentsGrayPlanemoments_gray_plane 返回值 2 ( H_MSG_TRUE) if an image with the defined gray values ('byte'"byte""byte""byte""byte""byte") 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, regiongrowingregiongrowingRegiongrowingRegiongrowingRegiongrowingregiongrowing

另见

intensityintensityIntensityIntensityIntensityintensity, moments_region_2ndmoments_region_2ndMomentsRegion2ndMomentsRegion2ndMomentsRegion2ndmoments_region_2nd

参考文献

R. Haralick, L. Shapiro; “Computer and Robot Vision”; Addison-Wesley, 1992, pp 75-76

模块

基础