find_local_deformable_model T_find_local_deformable_model FindLocalDeformableModel FindLocalDeformableModel find_local_deformable_model (算子)
名称
find_local_deformable_model T_find_local_deformable_model FindLocalDeformableModel FindLocalDeformableModel find_local_deformable_model — 在图像中找到局部可变形模型的最佳匹配。
签名
find_local_deformable_model (Image : ImageRectified , VectorField , DeformedContours : ModelID , AngleStart , AngleExtent , ScaleRMin , ScaleRMax , ScaleCMin , ScaleCMax , MinScore , NumMatches , MaxOverlap , NumLevels , Greediness , ResultType , GenParamName , GenParamValue : Score , Row , Column )
Herror T_find_local_deformable_model (const Hobject Image , Hobject* ImageRectified , Hobject* VectorField , Hobject* DeformedContours , const Htuple ModelID , const Htuple AngleStart , const Htuple AngleExtent , const Htuple ScaleRMin , const Htuple ScaleRMax , const Htuple ScaleCMin , const Htuple ScaleCMax , const Htuple MinScore , const Htuple NumMatches , const Htuple MaxOverlap , const Htuple NumLevels , const Htuple Greediness , const Htuple ResultType , const Htuple GenParamName , const Htuple GenParamValue , Htuple* Score , Htuple* Row , Htuple* Column )
void FindLocalDeformableModel (const HObject& Image , HObject* ImageRectified , HObject* VectorField , HObject* DeformedContours , const HTuple& ModelID , const HTuple& AngleStart , const HTuple& AngleExtent , const HTuple& ScaleRMin , const HTuple& ScaleRMax , const HTuple& ScaleCMin , const HTuple& ScaleCMax , const HTuple& MinScore , const HTuple& NumMatches , const HTuple& MaxOverlap , const HTuple& NumLevels , const HTuple& Greediness , const HTuple& ResultType , const HTuple& GenParamName , const HTuple& GenParamValue , HTuple* Score , HTuple* Row , HTuple* Column )
HImage HDeformableModel ::FindLocalDeformableModel (const HImage& Image , HImage* VectorField , HXLDCont* DeformedContours , double AngleStart , double AngleExtent , double ScaleRMin , double ScaleRMax , double ScaleCMin , double ScaleCMax , double MinScore , Hlong NumMatches , double MaxOverlap , Hlong NumLevels , double Greediness , const HTuple& ResultType , const HTuple& GenParamName , const HTuple& GenParamValue , HTuple* Score , HTuple* Row , HTuple* Column ) const
HImage HImage ::FindLocalDeformableModel (HImage* VectorField , HXLDCont* DeformedContours , const HDeformableModel& ModelID , double AngleStart , double AngleExtent , double ScaleRMin , double ScaleRMax , double ScaleCMin , double ScaleCMax , double MinScore , Hlong NumMatches , double MaxOverlap , Hlong NumLevels , double Greediness , const HTuple& ResultType , const HTuple& GenParamName , const HTuple& GenParamValue , HTuple* Score , HTuple* Row , HTuple* Column ) const
static void HOperatorSet .FindLocalDeformableModel (HObject image , out HObject imageRectified , out HObject vectorField , out HObject deformedContours , HTuple modelID , HTuple angleStart , HTuple angleExtent , HTuple scaleRMin , HTuple scaleRMax , HTuple scaleCMin , HTuple scaleCMax , HTuple minScore , HTuple numMatches , HTuple maxOverlap , HTuple numLevels , HTuple greediness , HTuple resultType , HTuple genParamName , HTuple genParamValue , out HTuple score , out HTuple row , out HTuple column )
HImage HDeformableModel .FindLocalDeformableModel (HImage image , out HImage vectorField , out HXLDCont deformedContours , double angleStart , double angleExtent , double scaleRMin , double scaleRMax , double scaleCMin , double scaleCMax , double minScore , int numMatches , double maxOverlap , int numLevels , double greediness , HTuple resultType , HTuple genParamName , HTuple genParamValue , out HTuple score , out HTuple row , out HTuple column )
HImage HImage .FindLocalDeformableModel (out HImage vectorField , out HXLDCont deformedContours , HDeformableModel modelID , double angleStart , double angleExtent , double scaleRMin , double scaleRMax , double scaleCMin , double scaleCMax , double minScore , int numMatches , double maxOverlap , int numLevels , double greediness , HTuple resultType , HTuple genParamName , HTuple genParamValue , out HTuple score , out HTuple row , out HTuple column )
def find_local_deformable_model (image : HObject, model_id : HHandle, angle_start : float, angle_extent : float, scale_rmin : float, scale_rmax : float, scale_cmin : float, scale_cmax : float, min_score : float, num_matches : int, max_overlap : float, num_levels : int, greediness : float, result_type : Sequence[str], gen_param_name : Sequence[str], gen_param_value : Sequence[Union[int, float, str]]) -> Tuple[HObject, HObject, HObject, Sequence[float], Sequence[float], Sequence[float]]
描述
算子 find_local_deformable_model find_local_deformable_model FindLocalDeformableModel FindLocalDeformableModel FindLocalDeformableModel find_local_deformable_model finds the best
NumMatches NumMatches NumMatches NumMatches numMatches num_matches instances of the locally deformable
model ModelID ModelID ModelID ModelID modelID model_id in the input Image Image Image Image image image . The model must have been
created previously by calling create_local_deformable_model create_local_deformable_model CreateLocalDeformableModel CreateLocalDeformableModel CreateLocalDeformableModel create_local_deformable_model or
read_deformable_model read_deformable_model ReadDeformableModel ReadDeformableModel ReadDeformableModel read_deformable_model 。
The model is searched within those points of the domain of the
image in which the model lies completely within the image.
This means that the model will not be found if it extends beyond
the borders of the image, even if it would achieve a score
greater than MinScore MinScore MinScore MinScore minScore min_score . Note that, if for a certain pyramid
level the model touches the image border, it might not be found
even if it lies completely within the original image.
As a rule of thumb, the model might not be found if its distance to
an image border falls below
.
This behavior can be changed with
set_system('border_shape_models','true') set_system("border_shape_models","true") SetSystem("border_shape_models","true") SetSystem("border_shape_models","true") SetSystem("border_shape_models","true") set_system("border_shape_models","true") , which will cause
models that extend beyond the image border to be found if they
achieve a score greater than MinScore MinScore MinScore MinScore minScore min_score . Here, points lying
outside the image are regarded as being occluded, i.e., they lower
the score. It should be noted that the runtime of the search will
increase in this mode.
Note further, that in rare cases, which occur typically only for
artificial images, the model might not be found also if for certain
pyramid levels them model touches the border of the reduced domain.
Then, it may help to enlarge the reduced domain by
using, e.g.,
dilation_circle dilation_circle DilationCircle DilationCircle DilationCircle dilation_circle 。
算子 find_local_deformable_model find_local_deformable_model FindLocalDeformableModel FindLocalDeformableModel FindLocalDeformableModel find_local_deformable_model returns the Row Row Row Row row row and
Column Column Column Column column column coordinates of the found instances.
Additionally, a rectified part of the image, the respective vector field, and
the contours of the found deformed model instance can be returned in
ImageRectified ImageRectified ImageRectified ImageRectified imageRectified image_rectified , VectorField VectorField VectorField VectorField vectorField vector_field , and DeformedContours DeformedContours DeformedContours DeformedContours deformedContours deformed_contours .
By default, these iconic objects are not returned. In case that they are
needed the parameter ResultType ResultType ResultType ResultType resultType result_type should be set to 'image_rectified',
'vector_field' and 'deformed_contours'.
The size of ImageRectified ImageRectified ImageRectified ImageRectified imageRectified image_rectified and VectorField VectorField VectorField VectorField vectorField vector_field is the smallest
axis-aligned rectangle of the domain of the image that was used to create
the local deformable model with create_local_deformable_model create_local_deformable_model CreateLocalDeformableModel CreateLocalDeformableModel CreateLocalDeformableModel create_local_deformable_model 。The size of the rectified image and the vector field can be expanded in all
directions by setting GenParamName GenParamName GenParamName GenParamName genParamName gen_param_name to 'expand_border' and the
respective GenParamValue GenParamValue GenParamValue GenParamValue genParamValue gen_param_value to the number of pixels. Optionally, a
specific direction can be selected with 'expand_border_top',
'expand_border_bottom', 'expand_border_left', and 'expand_border_right'.
Please note that the returned VectorField VectorField VectorField VectorField vectorField vector_field is in absolute coordinates
and can be used for convert_map_type convert_map_type ConvertMapType ConvertMapType ConvertMapType convert_map_type 。
The smoothness of the estimated deformation can be selected with
GenParamName GenParamName GenParamName GenParamName genParamName gen_param_name set to 'deformation_smoothness'. The value for
'deformation_smoothness' can be imagined as the size of a smoothing
filter to the estimated deformation field. A too small value expects
a strong deformation a too big value expects a rigid object. The
minimal value for 'deformation_smoothness' is 3, a typical value is
11, and the value can be increased further for only small global
deformations.
Finally, the score of each found instance is returned in Score Score Score Score score score .
The score is a number between 0 and 1, which is an approximate measure of how
much of the model is visible in the image.
For further explanation on the parameters used for the search of a local
deformable model we refer to the description of
find_planar_uncalib_deformable_model find_planar_uncalib_deformable_model FindPlanarUncalibDeformableModel FindPlanarUncalibDeformableModel FindPlanarUncalibDeformableModel find_planar_uncalib_deformable_model 。
执行信息
多线程类型:可重入(与非独占算子并行运行)。
多线程作用域:全局(可从任何线程调用)。
在内部数据级别上自动并行化。
参数
Image Image Image Image image image (输入对象) (multichannel-)image → object HImage HObject HImage Hobject (byte / uint2)
Input image in which the model should be found.
ImageRectified ImageRectified ImageRectified ImageRectified imageRectified image_rectified (输出对象) (multichannel-)image(-array) → object HImage HObject HImage Hobject * (byte / uint2)
Rectified image of the found model.
VectorField VectorField VectorField VectorField vectorField vector_field (输出对象) singlechannelimage(-array) → object HImage HObject HImage Hobject * (vector_field)
Vector field of the rectification transformation.
DeformedContours DeformedContours DeformedContours DeformedContours deformedContours deformed_contours (输出对象) xld_cont-array → object HXLDCont HObject HXLDCont Hobject *
Contours of the found instances of the model.
ModelID ModelID ModelID ModelID modelID model_id (输入控制) deformable_model → HDeformableModel , HTuple HHandle HTuple Htuple (handle) (IntPtr ) (HHandle ) (handle )
Handle of the model.
AngleStart AngleStart AngleStart AngleStart angleStart angle_start (输入控制) angle.rad → HTuple float HTuple Htuple (real) (double ) (double ) (double )
Smallest rotation of the model.
默认值:
-0.39
建议值:
-3.14, -1.57, -0.79, -0.39, -0.20, 0.0
AngleExtent AngleExtent AngleExtent AngleExtent angleExtent angle_extent (输入控制) angle.rad → HTuple float HTuple Htuple (real) (double ) (double ) (double )
Extent of the rotation angles.
默认值:
0.79
建议值:
6.29, 3.14, 1.57, 0.79, 0.39, 0.0
限制:
AngleExtent >= 0
ScaleRMin ScaleRMin ScaleRMin ScaleRMin scaleRMin scale_rmin (输入控制) number → HTuple float HTuple Htuple (real) (double ) (double ) (double )
Minimum scale of the model in row direction.
默认值:
1.0
建议值:
0.5, 0.6, 0.7, 0.8, 0.9, 1.0
限制:
ScaleRMin > 0
ScaleRMax ScaleRMax ScaleRMax ScaleRMax scaleRMax scale_rmax (输入控制) number → HTuple float HTuple Htuple (real) (double ) (double ) (double )
Maximum scale of the model in row direction.
默认值:
1.0
建议值:
1.0, 1.1, 1.2, 1.3, 1.4, 1.5
限制:
ScaleRMax >= ScaleRMin
ScaleCMin ScaleCMin ScaleCMin ScaleCMin scaleCMin scale_cmin (输入控制) number → HTuple float HTuple Htuple (real) (double ) (double ) (double )
Minimum scale of the model in column direction.
默认值:
1.0
建议值:
0.5, 0.6, 0.7, 0.8, 0.9, 1.0
限制:
ScaleCMin > 0
ScaleCMax ScaleCMax ScaleCMax ScaleCMax scaleCMax scale_cmax (输入控制) number → HTuple float HTuple Htuple (real) (double ) (double ) (double )
Maximum scale of the model in column direction.
默认值:
1.0
建议值:
1.0, 1.1, 1.2, 1.3, 1.4, 1.5
限制:
ScaleCMax >= ScaleCMin
MinScore MinScore MinScore MinScore minScore min_score (输入控制) real → HTuple float HTuple Htuple (real) (double ) (double ) (double )
Minimum score of the instances of the model to
be found.
默认值:
0.5
建议值:
0.3, 0.4, 0.5, 0.6, 0.7, 0.8, 0.9, 1.0
值范围:
0
≤
MinScore
MinScore
MinScore
MinScore
minScore
min_score
≤
1
最小增量:
0.01
建议增量:
0.05
NumMatches NumMatches NumMatches NumMatches numMatches num_matches (输入控制) integer → HTuple int HTuple Htuple (integer) (int / long) (Hlong ) (Hlong )
Number of instances of the model to be found
(or 0 for all matches).
默认值:
1
建议值:
0, 1, 2, 3, 4, 5, 10, 20
MaxOverlap MaxOverlap MaxOverlap MaxOverlap maxOverlap max_overlap (输入控制) real → HTuple float HTuple Htuple (real) (double ) (double ) (double )
Maximum overlap of the instances of the model
to be found.
默认值:
1.0
建议值:
0.0, 0.1, 0.2, 0.3, 0.4, 0.5, 0.6, 0.7, 0.8, 0.9, 1.0
值范围:
0
≤
MaxOverlap
MaxOverlap
MaxOverlap
MaxOverlap
maxOverlap
max_overlap
≤
1
最小增量:
0.01
建议增量:
0.05
NumLevels NumLevels NumLevels NumLevels numLevels num_levels (输入控制) integer → HTuple int HTuple Htuple (integer) (int / long) (Hlong ) (Hlong )
Number of pyramid levels used in the matching.
默认值:
0
值列表:
0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10
Greediness Greediness Greediness Greediness greediness greediness (输入控制) real → HTuple float HTuple Htuple (real) (double ) (double ) (double )
“Greediness” of the search heuristic (0: safe
but slow; 1: fast but matches may be missed).
默认值:
0.9
建议值:
0.0, 0.1, 0.2, 0.3, 0.4, 0.5, 0.6, 0.7, 0.8, 0.9, 1.0
值范围:
0
≤
Greediness
Greediness
Greediness
Greediness
greediness
greediness
≤
1
最小增量:
0.01
建议增量:
0.05
ResultType ResultType ResultType ResultType resultType result_type (输入控制) string-array → HTuple Sequence[str] HTuple Htuple (string) (string ) (HString ) (char* )
Switch for requested iconic result.
默认值:
[]
值列表:
[], 'deformed_contours' "deformed_contours" "deformed_contours" "deformed_contours" "deformed_contours" "deformed_contours" , 'image_rectified' "image_rectified" "image_rectified" "image_rectified" "image_rectified" "image_rectified" , 'vector_field' "vector_field" "vector_field" "vector_field" "vector_field" "vector_field"
GenParamName GenParamName GenParamName GenParamName genParamName gen_param_name (输入控制) string-array → HTuple Sequence[str] HTuple Htuple (string) (string ) (HString ) (char* )
The general parameter names.
默认值:
[]
值列表:
[], 'angle_step' "angle_step" "angle_step" "angle_step" "angle_step" "angle_step" , 'deformation_smoothness' "deformation_smoothness" "deformation_smoothness" "deformation_smoothness" "deformation_smoothness" "deformation_smoothness" , 'expand_border' "expand_border" "expand_border" "expand_border" "expand_border" "expand_border" , 'expand_border_bottom' "expand_border_bottom" "expand_border_bottom" "expand_border_bottom" "expand_border_bottom" "expand_border_bottom" , 'expand_border_left' "expand_border_left" "expand_border_left" "expand_border_left" "expand_border_left" "expand_border_left" , 'expand_border_right' "expand_border_right" "expand_border_right" "expand_border_right" "expand_border_right" "expand_border_right" , 'expand_border_top' "expand_border_top" "expand_border_top" "expand_border_top" "expand_border_top" "expand_border_top" , 'scale_c_step' "scale_c_step" "scale_c_step" "scale_c_step" "scale_c_step" "scale_c_step" , 'scale_r_step' "scale_r_step" "scale_r_step" "scale_r_step" "scale_r_step" "scale_r_step" , 'subpixel' "subpixel" "subpixel" "subpixel" "subpixel" "subpixel"
GenParamValue GenParamValue GenParamValue GenParamValue genParamValue gen_param_value (输入控制) integer-array → HTuple Sequence[Union[int, float, str]] HTuple Htuple (integer / real / string) (int / long / double / string) (Hlong / double / HString) (Hlong / double / char*)
Values of the general parameters.
默认值:
[]
值列表:
[], 'least_squares' "least_squares" "least_squares" "least_squares" "least_squares" "least_squares" , 'least_squares_high' "least_squares_high" "least_squares_high" "least_squares_high" "least_squares_high" "least_squares_high" , 'least_squares_very_high' "least_squares_very_high" "least_squares_very_high" "least_squares_very_high" "least_squares_very_high" "least_squares_very_high" , 'none' "none" "none" "none" "none" "none"
Score Score Score Score score score (输出控制) real-array → HTuple Sequence[float] HTuple Htuple (real) (double ) (double ) (double )
Scores of the found instances of the model.
Row Row Row Row row row (输出控制) real-array → HTuple Sequence[float] HTuple Htuple (real) (double ) (double ) (double )
Row coordinates of the found instances of the model.
Column Column Column Column column column (输出控制) real-array → HTuple Sequence[float] HTuple Htuple (real) (double ) (double ) (double )
Column coordinates of the found instances of the model.
结果
如果参数有效,算子
find_local_deformable_model find_local_deformable_model FindLocalDeformableModel FindLocalDeformableModel FindLocalDeformableModel find_local_deformable_model 返回值 2 ( H_MSG_TRUE )。如有必要,则抛出异常。
可能的前趋
create_local_deformable_model create_local_deformable_model CreateLocalDeformableModel CreateLocalDeformableModel CreateLocalDeformableModel create_local_deformable_model ,
create_local_deformable_model_xld create_local_deformable_model_xld CreateLocalDeformableModelXld CreateLocalDeformableModelXld CreateLocalDeformableModelXld create_local_deformable_model_xld ,
read_deformable_model read_deformable_model ReadDeformableModel ReadDeformableModel ReadDeformableModel read_deformable_model
模块
匹配