fit_surface_second_orderfit_surface_second_orderFitSurfaceSecondOrderFitSurfaceSecondOrderfit_surface_second_order (算子)

名称

fit_surface_second_orderfit_surface_second_orderFitSurfaceSecondOrderFitSurfaceSecondOrderfit_surface_second_order — 通过二阶表面计算灰度值矩和近似值。

签名

fit_surface_second_order(Regions, Image : : Algorithm, Iterations, ClippingFactor : Alpha, Beta, Gamma, Delta, Epsilon, Zeta)

Herror fit_surface_second_order(const Hobject Regions, const Hobject Image, const char* Algorithm, const Hlong Iterations, double ClippingFactor, double* Alpha, double* Beta, double* Gamma, double* Delta, double* Epsilon, double* Zeta)

Herror T_fit_surface_second_order(const Hobject Regions, const Hobject Image, const Htuple Algorithm, const Htuple Iterations, const Htuple ClippingFactor, Htuple* Alpha, Htuple* Beta, Htuple* Gamma, Htuple* Delta, Htuple* Epsilon, Htuple* Zeta)

void FitSurfaceSecondOrder(const HObject& Regions, const HObject& Image, const HTuple& Algorithm, const HTuple& Iterations, const HTuple& ClippingFactor, HTuple* Alpha, HTuple* Beta, HTuple* Gamma, HTuple* Delta, HTuple* Epsilon, HTuple* Zeta)

HTuple HImage::FitSurfaceSecondOrder(const HRegion& Regions, const HString& Algorithm, Hlong Iterations, double ClippingFactor, HTuple* Beta, HTuple* Gamma, HTuple* Delta, HTuple* Epsilon, HTuple* Zeta) const

double HImage::FitSurfaceSecondOrder(const HRegion& Regions, const HString& Algorithm, Hlong Iterations, double ClippingFactor, double* Beta, double* Gamma, double* Delta, double* Epsilon, double* Zeta) const

double HImage::FitSurfaceSecondOrder(const HRegion& Regions, const char* Algorithm, Hlong Iterations, double ClippingFactor, double* Beta, double* Gamma, double* Delta, double* Epsilon, double* Zeta) const

double HImage::FitSurfaceSecondOrder(const HRegion& Regions, const wchar_t* Algorithm, Hlong Iterations, double ClippingFactor, double* Beta, double* Gamma, double* Delta, double* Epsilon, double* Zeta) const   ( Windows only)

HTuple HRegion::FitSurfaceSecondOrder(const HImage& Image, const HString& Algorithm, Hlong Iterations, double ClippingFactor, HTuple* Beta, HTuple* Gamma, HTuple* Delta, HTuple* Epsilon, HTuple* Zeta) const

double HRegion::FitSurfaceSecondOrder(const HImage& Image, const HString& Algorithm, Hlong Iterations, double ClippingFactor, double* Beta, double* Gamma, double* Delta, double* Epsilon, double* Zeta) const

double HRegion::FitSurfaceSecondOrder(const HImage& Image, const char* Algorithm, Hlong Iterations, double ClippingFactor, double* Beta, double* Gamma, double* Delta, double* Epsilon, double* Zeta) const

double HRegion::FitSurfaceSecondOrder(const HImage& Image, const wchar_t* Algorithm, Hlong Iterations, double ClippingFactor, double* Beta, double* Gamma, double* Delta, double* Epsilon, double* Zeta) const   ( Windows only)

static void HOperatorSet.FitSurfaceSecondOrder(HObject regions, HObject image, HTuple algorithm, HTuple iterations, HTuple clippingFactor, out HTuple alpha, out HTuple beta, out HTuple gamma, out HTuple delta, out HTuple epsilon, out HTuple zeta)

HTuple HImage.FitSurfaceSecondOrder(HRegion regions, string algorithm, int iterations, double clippingFactor, out HTuple beta, out HTuple gamma, out HTuple delta, out HTuple epsilon, out HTuple zeta)

double HImage.FitSurfaceSecondOrder(HRegion regions, string algorithm, int iterations, double clippingFactor, out double beta, out double gamma, out double delta, out double epsilon, out double zeta)

HTuple HRegion.FitSurfaceSecondOrder(HImage image, string algorithm, int iterations, double clippingFactor, out HTuple beta, out HTuple gamma, out HTuple delta, out HTuple epsilon, out HTuple zeta)

double HRegion.FitSurfaceSecondOrder(HImage image, string algorithm, int iterations, double clippingFactor, out double beta, out double gamma, out double delta, out double epsilon, out double zeta)

def fit_surface_second_order(regions: HObject, image: HObject, algorithm: str, iterations: int, clipping_factor: float) -> Tuple[Sequence[float], Sequence[float], Sequence[float], Sequence[float], Sequence[float], Sequence[float]]

def fit_surface_second_order_s(regions: HObject, image: HObject, algorithm: str, iterations: int, clipping_factor: float) -> Tuple[float, float, float, float, float, float]

描述

算子 fit_surface_second_orderfit_surface_second_orderFitSurfaceSecondOrderFitSurfaceSecondOrderFitSurfaceSecondOrderfit_surface_second_order calculates the gray value moments and the parameters of the approximation of the gray values by a second order surface. The calculation is done by minimizing the distance between the gray values and the surface. A second order surface is described by the following formula:

and are the center coordinates of the intersection of the input region with the full image domain. By the minimization process the parameters from AlphaAlphaAlphaAlphaalphaalpha to ZetaZetaZetaZetazetazeta is calculated.

The algorithm used for the fitting can be selected via AlgorithmAlgorithmAlgorithmAlgorithmalgorithmalgorithm:

'regression'"regression""regression""regression""regression""regression"

Standard 'least squares' fitting.

'huber'"huber""huber""huber""huber""huber"

Weighted 'least squares' fitting, where the impact of outliers is decreased based on the approach of Huber.

'tukey'"tukey""tukey""tukey""tukey""tukey"

Weighted 'least squares' fitting, where outliers are ignored based on the approach of Tukey.

The parameter ClippingFactorClippingFactorClippingFactorClippingFactorclippingFactorclipping_factor (a scaling factor for the standard deviation) controls the amount of damping outliers: The smaller the value chosen for ClippingFactorClippingFactorClippingFactorClippingFactorclippingFactorclipping_factor the more outliers are detected. The detection of outliers is repeated. The parameter IterationsIterationsIterationsIterationsiterationsiterations specifies the number of iterations. If 'regression'"regression""regression""regression""regression""regression" is set for AlgorithmAlgorithmAlgorithmAlgorithmalgorithmalgorithm IterationsIterationsIterationsIterationsiterationsiterations is ignored.

注意

Note that the operator fit_surface_second_orderfit_surface_second_orderFitSurfaceSecondOrderFitSurfaceSecondOrderFitSurfaceSecondOrderfit_surface_second_order 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 / uint2 / direction / cyclic / real)

Corresponding gray values.

AlgorithmAlgorithmAlgorithmAlgorithmalgorithmalgorithm (输入控制)  string HTuplestrHTupleHtuple (string) (string) (HString) (char*)

Algorithm for the fitting.

默认值: 'regression' "regression" "regression" "regression" "regression" "regression"

值列表: 'huber'"huber""huber""huber""huber""huber", 'regression'"regression""regression""regression""regression""regression", 'tukey'"tukey""tukey""tukey""tukey""tukey"

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

Maximum number of iterations (unused for 'regression').

默认值: 5

限制: Iterations >= 0

ClippingFactorClippingFactorClippingFactorClippingFactorclippingFactorclipping_factor (输入控制)  real HTuplefloatHTupleHtuple (real) (double) (double) (double)

Clipping factor for the elimination of outliers.

默认值: 2.0

值列表: 1.0, 1.5, 2.0, 2.5, 3.0

限制: ClippingFactor > 0

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

Parameter Alpha of the approximating surface.

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

Parameter Beta of the approximating surface.

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

Parameter Gamma of the approximating surface.

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

Parameter Delta of the approximating surface.

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

Parameter Epsilon of the approximating surface.

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

Parameter Zeta of the approximating surface.

结果

算子 fit_surface_second_orderfit_surface_second_orderFitSurfaceSecondOrderFitSurfaceSecondOrderFitSurfaceSecondOrderfit_surface_second_order 返回值 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。如有必要,则抛出异常。

可能的后继

gen_image_surface_second_ordergen_image_surface_second_orderGenImageSurfaceSecondOrderGenImageSurfaceSecondOrderGenImageSurfaceSecondOrdergen_image_surface_second_order

另见

moments_gray_planemoments_gray_planeMomentsGrayPlaneMomentsGrayPlaneMomentsGrayPlanemoments_gray_plane, fit_surface_first_orderfit_surface_first_orderFitSurfaceFirstOrderFitSurfaceFirstOrderFitSurfaceFirstOrderfit_surface_first_order

模块

基础