get_shape_model_paramsT_get_shape_model_paramsGetShapeModelParamsGetShapeModelParamsget_shape_model_params (算子)
名称
get_shape_model_paramsT_get_shape_model_paramsGetShapeModelParamsGetShapeModelParamsget_shape_model_params — 返回形状模型的参数。
签名
void GetShapeModelParams(const HTuple& ModelID, HTuple* NumLevels, HTuple* AngleStart, HTuple* AngleExtent, HTuple* AngleStep, HTuple* ScaleMin, HTuple* ScaleMax, HTuple* ScaleStep, HTuple* Metric, HTuple* MinContrast)
HTuple HShapeModel::GetShapeModelParams(double* AngleStart, double* AngleExtent, double* AngleStep, HTuple* ScaleMin, HTuple* ScaleMax, HTuple* ScaleStep, HString* Metric, Hlong* MinContrast) const
Hlong HShapeModel::GetShapeModelParams(double* AngleStart, double* AngleExtent, double* AngleStep, double* ScaleMin, double* ScaleMax, double* ScaleStep, HString* Metric, Hlong* MinContrast) const
static void HOperatorSet.GetShapeModelParams(HTuple modelID, out HTuple numLevels, out HTuple angleStart, out HTuple angleExtent, out HTuple angleStep, out HTuple scaleMin, out HTuple scaleMax, out HTuple scaleStep, out HTuple metric, out HTuple minContrast)
HTuple HShapeModel.GetShapeModelParams(out double angleStart, out double angleExtent, out double angleStep, out HTuple scaleMin, out HTuple scaleMax, out HTuple scaleStep, out string metric, out int minContrast)
int HShapeModel.GetShapeModelParams(out double angleStart, out double angleExtent, out double angleStep, out double scaleMin, out double scaleMax, out double scaleStep, out string metric, out int minContrast)
def get_shape_model_params(model_id: HHandle) -> Tuple[Sequence[int], float, float, float, Sequence[float], Sequence[float], Sequence[float], str, int]
def get_shape_model_params_s(model_id: HHandle) -> Tuple[int, float, float, float, float, float, float, str, int]
描述
算子 get_shape_model_paramsget_shape_model_paramsGetShapeModelParamsGetShapeModelParamsGetShapeModelParamsget_shape_model_params returns the parameters
of the shape model ModelIDModelIDModelIDModelIDmodelIDmodel_id that were used to create it
using create_shape_modelcreate_shape_modelCreateShapeModelCreateShapeModelCreateShapeModelcreate_shape_model, create_scaled_shape_modelcreate_scaled_shape_modelCreateScaledShapeModelCreateScaledShapeModelCreateScaledShapeModelcreate_scaled_shape_model,
or create_aniso_shape_modelcreate_aniso_shape_modelCreateAnisoShapeModelCreateAnisoShapeModelCreateAnisoShapeModelcreate_aniso_shape_model。In particular, this output can
be used to check the parameters NumLevelsNumLevelsNumLevelsNumLevelsnumLevelsnum_levels,
AngleStepAngleStepAngleStepAngleStepangleStepangle_step, ScaleStepScaleStepScaleStepScaleStepscaleStepscale_step, and MinContrastMinContrastMinContrastMinContrastminContrastmin_contrast if
they were determined automatically during the model creation with
create_shape_modelcreate_shape_modelCreateShapeModelCreateShapeModelCreateShapeModelcreate_shape_model, create_scaled_shape_modelcreate_scaled_shape_modelCreateScaledShapeModelCreateScaledShapeModelCreateScaledShapeModelcreate_scaled_shape_model, or
create_aniso_shape_modelcreate_aniso_shape_modelCreateAnisoShapeModelCreateAnisoShapeModelCreateAnisoShapeModelcreate_aniso_shape_model。
If the ModelIDModelIDModelIDModelIDmodelIDmodel_id was adapted with
adapt_shape_model_high_noiseadapt_shape_model_high_noiseAdaptShapeModelHighNoiseAdaptShapeModelHighNoiseAdaptShapeModelHighNoiseadapt_shape_model_high_noise, NumLevels contains two values: the
highest pyramid level and the estimated lowest pyramid level.
If the shape model was created using create_shape_modelcreate_shape_modelCreateShapeModelCreateShapeModelCreateShapeModelcreate_shape_model or
create_scaled_shape_modelcreate_scaled_shape_modelCreateScaledShapeModelCreateScaledShapeModelCreateScaledShapeModelcreate_scaled_shape_model a single value is returned in
ScaleMinScaleMinScaleMinScaleMinscaleMinscale_min, ScaleMaxScaleMaxScaleMaxScaleMaxscaleMaxscale_max, and ScaleStepScaleStepScaleStepScaleStepscaleStepscale_step. This
parameters corresponds to the isotropic scaling parameters of the
shape model. If the shape model was created using
create_aniso_shape_modelcreate_aniso_shape_modelCreateAnisoShapeModelCreateAnisoShapeModelCreateAnisoShapeModelcreate_aniso_shape_model two values each are returned in the
above three parameters. Here, the first value of the respective
parameter refers to the scaling in the row direction, while the
second value refers to the scaling in the column direction.
Note that the parameters OptimizationOptimizationOptimizationOptimizationoptimizationoptimization and
ContrastContrastContrastContrastcontrastcontrast that also can be determined automatically during
the model creation cannot be queried by using
get_shape_model_paramsget_shape_model_paramsGetShapeModelParamsGetShapeModelParamsGetShapeModelParamsget_shape_model_params. If their value is of interest
determine_shape_model_paramsdetermine_shape_model_paramsDetermineShapeModelParamsDetermineShapeModelParamsDetermineShapeModelParamsdetermine_shape_model_params should be used instead.
执行信息
- 多线程类型:可重入(与非独占算子并行运行)。
- 多线程作用域:全局(可从任何线程调用)。
- 未采用并行化处理。
参数
ModelIDModelIDModelIDModelIDmodelIDmodel_id (输入控制) shape_model → HShapeModel, HTupleHHandleHTupleHtuple (handle) (IntPtr) (HHandle) (handle)
Handle of the model.
NumLevelsNumLevelsNumLevelsNumLevelsnumLevelsnum_levels (输出控制) integer(-array) → HTupleSequence[int]HTupleHtuple (integer) (int / long) (Hlong) (Hlong)
Number of pyramid levels.
AngleStartAngleStartAngleStartAngleStartangleStartangle_start (输出控制) angle.rad → HTuplefloatHTupleHtuple (real) (double) (double) (double)
Smallest rotation of the pattern.
AngleExtentAngleExtentAngleExtentAngleExtentangleExtentangle_extent (输出控制) angle.rad → HTuplefloatHTupleHtuple (real) (double) (double) (double)
Extent of the rotation angles.
Assertion:
AngleExtent >= 0
AngleStepAngleStepAngleStepAngleStepangleStepangle_step (输出控制) angle.rad → HTuplefloatHTupleHtuple (real) (double) (double) (double)
Step length of the angles (resolution).
Assertion:
AngleStep >= 0 && AngleStep <= pi / 2
ScaleMinScaleMinScaleMinScaleMinscaleMinscale_min (输出控制) number(-array) → HTupleSequence[float]HTupleHtuple (real) (double) (double) (double)
Minimum scale of the pattern.
Assertion:
ScaleMin > 0
ScaleMaxScaleMaxScaleMaxScaleMaxscaleMaxscale_max (输出控制) number(-array) → HTupleSequence[float]HTupleHtuple (real) (double) (double) (double)
Maximum scale of the pattern.
Assertion:
ScaleMax >= ScaleMin
ScaleStepScaleStepScaleStepScaleStepscaleStepscale_step (输出控制) number(-array) → HTupleSequence[float]HTupleHtuple (real) (double) (double) (double)
Scale step length (resolution).
Assertion:
ScaleStep >= 0
MetricMetricMetricMetricmetricmetric (输出控制) string → HTuplestrHTupleHtuple (string) (string) (HString) (char*)
Match metric.
MinContrastMinContrastMinContrastMinContrastminContrastmin_contrast (输出控制) number → HTupleintHTupleHtuple (integer) (int / long) (Hlong) (Hlong)
Minimum contrast of the objects in the search images.
结果
如果模型的句柄有效,算子
get_shape_model_paramsget_shape_model_paramsGetShapeModelParamsGetShapeModelParamsGetShapeModelParamsget_shape_model_params 返回值 2 ( H_MSG_TRUE )。如有必要,则抛出异常。
可能的前趋
create_shape_modelcreate_shape_modelCreateShapeModelCreateShapeModelCreateShapeModelcreate_shape_model,
create_scaled_shape_modelcreate_scaled_shape_modelCreateScaledShapeModelCreateScaledShapeModelCreateScaledShapeModelcreate_scaled_shape_model,
create_aniso_shape_modelcreate_aniso_shape_modelCreateAnisoShapeModelCreateAnisoShapeModelCreateAnisoShapeModelcreate_aniso_shape_model,
read_shape_modelread_shape_modelReadShapeModelReadShapeModelReadShapeModelread_shape_model
替代
get_generic_shape_model_paramget_generic_shape_model_paramGetGenericShapeModelParamGetGenericShapeModelParamGetGenericShapeModelParamget_generic_shape_model_param
另见
find_shape_modelfind_shape_modelFindShapeModelFindShapeModelFindShapeModelfind_shape_model,
find_scaled_shape_modelfind_scaled_shape_modelFindScaledShapeModelFindScaledShapeModelFindScaledShapeModelfind_scaled_shape_model,
find_aniso_shape_modelfind_aniso_shape_modelFindAnisoShapeModelFindAnisoShapeModelFindAnisoShapeModelfind_aniso_shape_model,
find_shape_modelsfind_shape_modelsFindShapeModelsFindShapeModelsFindShapeModelsfind_shape_models,
find_scaled_shape_modelsfind_scaled_shape_modelsFindScaledShapeModelsFindScaledShapeModelsFindScaledShapeModelsfind_scaled_shape_models,
find_aniso_shape_modelsfind_aniso_shape_modelsFindAnisoShapeModelsFindAnisoShapeModelsFindAnisoShapeModelsfind_aniso_shape_models
模块
匹配