Skip to content

find_planar_uncalib_deformable_modelfind_planar_uncalib_deformable_modelFindPlanarUncalibDeformableModelFindPlanarUncalibDeformableModelfind_planar_uncalib_deformable_modelT_find_planar_uncalib_deformable_modelπŸ”—

Short descriptionπŸ”—

find_planar_uncalib_deformable_modelfind_planar_uncalib_deformable_modelFindPlanarUncalibDeformableModelFindPlanarUncalibDeformableModelfind_planar_uncalib_deformable_modelT_find_planar_uncalib_deformable_model β€” Find the best matches of a planar projective invariant deformable model in an image.

SignatureπŸ”—

find_planar_uncalib_deformable_model( image Image, deformable_model ModelID, angle.rad AngleStart, angle.rad AngleExtent, number ScaleRMin, number ScaleRMax, number ScaleCMin, number ScaleCMax, real MinScore, integer NumMatches, real MaxOverlap, integer NumLevels, real Greediness, string GenParamName, integer GenParamValue, out hom_mat2d HomMat2D, out real Score )find_planar_uncalib_deformable_model( Image : : ModelID, AngleStart, AngleExtent, ScaleRMin, ScaleRMax, ScaleCMin, ScaleCMax, MinScore, NumMatches, MaxOverlap, NumLevels, Greediness, GenParamName, GenParamValue : HomMat2D, Score )void FindPlanarUncalibDeformableModel( const HObject& Image, 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& GenParamName, const HTuple& GenParamValue, HTuple* HomMat2D, HTuple* Score )static void HOperatorSet.FindPlanarUncalibDeformableModel( HObject image, 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 genParamName, HTuple genParamValue, out HTuple homMat2D, out HTuple score )def find_planar_uncalib_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: MaybeSequence[int], greediness: float, gen_param_name: Sequence[str], gen_param_value: Sequence[Union[int, float, str]] ) -> Tuple[Sequence[float], Sequence[float]]

Herror T_find_planar_uncalib_deformable_model( const Hobject Image, 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 GenParamName, const Htuple GenParamValue, Htuple* HomMat2D, Htuple* Score )

HHomMat2DArray HDeformableModel::FindPlanarUncalibDeformableModel( const HImage& Image, double AngleStart, double AngleExtent, double ScaleRMin, double ScaleRMax, double ScaleCMin, double ScaleCMax, double MinScore, Hlong NumMatches, double MaxOverlap, const HTuple& NumLevels, double Greediness, const HTuple& GenParamName, const HTuple& GenParamValue, HTuple* Score ) const

HHomMat2D HDeformableModel::FindPlanarUncalibDeformableModel( const HImage& Image, double AngleStart, double AngleExtent, double ScaleRMin, double ScaleRMax, double ScaleCMin, double ScaleCMax, double MinScore, Hlong NumMatches, double MaxOverlap, Hlong NumLevels, double Greediness, const HTuple& GenParamName, const HTuple& GenParamValue, HTuple* Score ) const

HHomMat2DArray HImage::FindPlanarUncalibDeformableModel( const HDeformableModel& ModelID, double AngleStart, double AngleExtent, double ScaleRMin, double ScaleRMax, double ScaleCMin, double ScaleCMax, double MinScore, Hlong NumMatches, double MaxOverlap, const HTuple& NumLevels, double Greediness, const HTuple& GenParamName, const HTuple& GenParamValue, HTuple* Score ) const

HHomMat2D HImage::FindPlanarUncalibDeformableModel( 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& GenParamName, const HTuple& GenParamValue, HTuple* Score ) const

HHomMat2D[] HDeformableModel.FindPlanarUncalibDeformableModel( HImage image, double angleStart, double angleExtent, double scaleRMin, double scaleRMax, double scaleCMin, double scaleCMax, double minScore, int numMatches, double maxOverlap, HTuple numLevels, double greediness, HTuple genParamName, HTuple genParamValue, out HTuple score )

HHomMat2D HDeformableModel.FindPlanarUncalibDeformableModel( HImage image, double angleStart, double angleExtent, double scaleRMin, double scaleRMax, double scaleCMin, double scaleCMax, double minScore, int numMatches, double maxOverlap, int numLevels, double greediness, HTuple genParamName, HTuple genParamValue, out HTuple score )

HHomMat2D[] HImage.FindPlanarUncalibDeformableModel( HDeformableModel modelID, double angleStart, double angleExtent, double scaleRMin, double scaleRMax, double scaleCMin, double scaleCMax, double minScore, int numMatches, double maxOverlap, HTuple numLevels, double greediness, HTuple genParamName, HTuple genParamValue, out HTuple score )

HHomMat2D HImage.FindPlanarUncalibDeformableModel( 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 genParamName, HTuple genParamValue, out HTuple score )

DescriptionπŸ”—

The operator find_planar_uncalib_deformable_modelFindPlanarUncalibDeformableModel finds the best NumMatchesnumMatchesnum_matches instances of the perspectively distorted deformable model ModelIDmodelIDmodel_id in the input image Imageimageimage. The model must have been created previously by calling create_planar_uncalib_deformable_modelCreatePlanarUncalibDeformableModel or read_deformable_modelReadDeformableModel.

HomMat2DhomMat2Dhom_mat_2d determines the projective transformation (homography), which describes the position of the found matches. In case several objects are found, the different homographies are concatenated. Then, a single homography can be extracted using tuple_select_range(HomMat2D,Index*9,(Index+1)*9-1, SelectedHomMat2D). The different results are sorted according to their Scorescorescore in descending order.

The row and column coordinates of the origin of the deformable model within the search image can be determined calling projective_trans_pixel(HomMat2D,0,0,Row,Column). Usually the origin of the model is the center of gravity of the image region used to create the deformable model calling create_planar_uncalib_deformable_modelCreatePlanarUncalibDeformableModel. The origin can be modified using set_deformable_model_originSetDeformableModelOrigin.

The model contours of found instances can be visualized using projective_trans_contour_xldProjectiveTransContourXld with the HomMat2DhomMat2Dhom_mat_2d and the original model contour, which has been extracted previously using get_deformable_model_contoursGetDeformableModelContours.

The Scorescorescore is a number between 0 and 1 and may indicate how much of the model is visible within the image.

Example: Half of the model is occluded in the search image. As a result, the Scorescorescore of this match can not exceed 0.50.5.

Input parameters in detailπŸ”—

Output parameters in detailπŸ”—

Execution informationπŸ”—

Execution information
  • Multithreading type: reentrant (runs in parallel with non-exclusive operators).

  • Multithreading scope: global (may be called from any thread).

  • Automatically parallelized on internal data level.

ParametersπŸ”—

Imageimageimage (input_object) (multichannel-)image β†’ object (byte / uint2)object (byte / uint2)HObject (byte / uint2)HImage (byte / uint2)HObject (byte / uint2)Hobject (byte / uint2)

Input image in which the model should be found.

ModelIDmodelIDmodel_id (input_control) deformable_model β†’ (handle)(handle)HTuple (HHandle)HDeformableModel, HTuple (IntPtr)HHandleHtuple (handle)

Handle of the model.

AngleStartangleStartangle_start (input_control) angle.rad β†’ (real)(real)HTuple (double)HTuple (double)floatHtuple (double)

Smallest rotation of the model.

Default: -0.39-0.39
Suggested values: -3.14, -1.57, -0.79, -0.39, -0.20, 0.0-3.14, -1.57, -0.79, -0.39, -0.20, 0.0

AngleExtentangleExtentangle_extent (input_control) angle.rad β†’ (real)(real)HTuple (double)HTuple (double)floatHtuple (double)

Extent of the rotation angles.

Default: 0.780.78
Suggested values: 6.29, 3.14, 1.57, 0.79, 0.39, 0.06.29, 3.14, 1.57, 0.79, 0.39, 0.0
Restriction: AngleExtent >= 0

ScaleRMinscaleRMinscale_rmin (input_control) number β†’ (real)(real)HTuple (double)HTuple (double)floatHtuple (double)

Minimum scale of the model in row direction.

Default: 1.01.0
Suggested values: 0.5, 0.6, 0.7, 0.8, 0.9, 1.00.5, 0.6, 0.7, 0.8, 0.9, 1.0
Restriction: ScaleRMin > 0

ScaleRMaxscaleRMaxscale_rmax (input_control) number β†’ (real)(real)HTuple (double)HTuple (double)floatHtuple (double)

Maximum scale of the model in row direction.

Default: 1.01.0
Suggested values: 1.0, 1.1, 1.2, 1.3, 1.4, 1.51.0, 1.1, 1.2, 1.3, 1.4, 1.5
Restriction: ScaleRMax >= ScaleRMin

ScaleCMinscaleCMinscale_cmin (input_control) number β†’ (real)(real)HTuple (double)HTuple (double)floatHtuple (double)

Minimum scale of the model in column direction.

Default: 1.01.0
Suggested values: 0.5, 0.6, 0.7, 0.8, 0.9, 1.00.5, 0.6, 0.7, 0.8, 0.9, 1.0
Restriction: ScaleCMin > 0

ScaleCMaxscaleCMaxscale_cmax (input_control) number β†’ (real)(real)HTuple (double)HTuple (double)floatHtuple (double)

Maximum scale of the model in column direction.

Default: 1.01.0
Suggested values: 1.0, 1.1, 1.2, 1.3, 1.4, 1.51.0, 1.1, 1.2, 1.3, 1.4, 1.5
Restriction: ScaleCMax >= ScaleCMin

MinScoreminScoremin_score (input_control) real β†’ (real)(real)HTuple (double)HTuple (double)floatHtuple (double)

Minimum score of the instances of the model to be found.

Default: 0.50.5
Suggested values: 0.3, 0.4, 0.5, 0.6, 0.7, 0.8, 0.9, 1.00.3, 0.4, 0.5, 0.6, 0.7, 0.8, 0.9, 1.0
Value range: 0 ≀ MinScore ≀ 1
Minimum increment: 0.01
Recommended increment: 0.05

NumMatchesnumMatchesnum_matches (input_control) integer β†’ (integer)(integer)HTuple (Hlong)HTuple (int / long)intHtuple (Hlong)

Number of instances of the model to be found (or 0 for all matches).

Default: 11
Suggested values: 0, 1, 2, 3, 4, 5, 10, 200, 1, 2, 3, 4, 5, 10, 20

MaxOverlapmaxOverlapmax_overlap (input_control) real β†’ (real)(real)HTuple (double)HTuple (double)floatHtuple (double)

Maximum overlap of the instances of the model to be found.

Default: 1.01.0
Suggested values: 0.0, 0.1, 0.2, 0.3, 0.4, 0.5, 0.6, 0.7, 0.8, 0.9, 1.00.0, 0.1, 0.2, 0.3, 0.4, 0.5, 0.6, 0.7, 0.8, 0.9, 1.0
Value range: 0 ≀ MaxOverlap ≀ 1
Minimum increment: 0.01
Recommended increment: 0.05

NumLevelsnumLevelsnum_levels (input_control) integer(-array) β†’ (integer)(integer)HTuple (Hlong)HTuple (int / long)MaybeSequence[int]Htuple (Hlong)

Number of pyramid levels used in the matching (and lowest pyramid level to use if \(|\textrm{NumLevels}| = 2\)).

Default: 00
List of values: 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 100, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10

Greedinessgreedinessgreediness (input_control) real β†’ (real)(real)HTuple (double)HTuple (double)floatHtuple (double)

β€œGreediness” of the search heuristic (0: safe but slow; 1: fast but matches may be missed).

Default: 0.90.9
Suggested values: 0.0, 0.1, 0.2, 0.3, 0.4, 0.5, 0.6, 0.7, 0.8, 0.9, 1.00.0, 0.1, 0.2, 0.3, 0.4, 0.5, 0.6, 0.7, 0.8, 0.9, 1.0
Value range: 0 ≀ Greediness ≀ 1
Minimum increment: 0.01
Recommended increment: 0.05

GenParamNamegenParamNamegen_param_name (input_control) string-array β†’ (string)(string)HTuple (HString)HTuple (string)Sequence[str]Htuple (char*)

The general parameter names.

Default: [][]
List of values: [], 'angle_change_restriction', 'angle_step', 'aniso_scale_change_restriction', 'scale_c_step', 'scale_r_step', 'subpixel'[], "angle_change_restriction", "angle_step", "aniso_scale_change_restriction", "scale_c_step", "scale_r_step", "subpixel"

GenParamValuegenParamValuegen_param_value (input_control) integer-array β†’ (integer / real / string)(integer / real / string)HTuple (Hlong / double / HString)HTuple (int / long / double / string)Sequence[Union[int, float, str]]Htuple (Hlong / double / char*)

Values of the general parameters.

Default: [][]
List of values: [], 'least_squares', 'least_squares_high', 'least_squares_very_high', 'none'[], "least_squares", "least_squares_high", "least_squares_very_high", "none"

HomMat2DhomMat2Dhom_mat_2d (output_control) hom_mat2d(-array) β†’ (real)(real)HTuple (double)HHomMat2D, HTuple (double)Sequence[float]Htuple (double)

Homographies between model and found instances.

Scorescorescore (output_control) real-array β†’ (real)(real)HTuple (double)HTuple (double)Sequence[float]Htuple (double)

Score of the found instances of the model.

ResultπŸ”—

If the parameters are valid, the operator find_planar_uncalib_deformable_modelFindPlanarUncalibDeformableModel returns the value 2 (H_MSG_TRUE). If necessary an exception is raised.

Combinations with other operatorsπŸ”—

Combinations

Possible predecessors

create_planar_uncalib_deformable_modelCreatePlanarUncalibDeformableModel, read_deformable_modelReadDeformableModel

Alternatives

find_planar_calib_deformable_modelFindPlanarCalibDeformableModel

ModuleπŸ”—

Matching