create_calib_descriptor_modelT_create_calib_descriptor_modelCreateCalibDescriptorModelCreateCalibDescriptorModelcreate_calib_descriptor_model (Operator)

Name

create_calib_descriptor_modelT_create_calib_descriptor_modelCreateCalibDescriptorModelCreateCalibDescriptorModelcreate_calib_descriptor_model — Create a descriptor model for calibrated perspective matching.

Signature

create_calib_descriptor_model(Template : : CamParam, ReferencePose, DetectorType, DetectorParamName, DetectorParamValue, DescriptorParamName, DescriptorParamValue, Seed : ModelID)

Herror T_create_calib_descriptor_model(const Hobject Template, const Htuple CamParam, const Htuple ReferencePose, const Htuple DetectorType, const Htuple DetectorParamName, const Htuple DetectorParamValue, const Htuple DescriptorParamName, const Htuple DescriptorParamValue, const Htuple Seed, Htuple* ModelID)

void CreateCalibDescriptorModel(const HObject& Template, const HTuple& CamParam, const HTuple& ReferencePose, const HTuple& DetectorType, const HTuple& DetectorParamName, const HTuple& DetectorParamValue, const HTuple& DescriptorParamName, const HTuple& DescriptorParamValue, const HTuple& Seed, HTuple* ModelID)

void HDescriptorModel::HDescriptorModel(const HImage& Template, const HCamPar& CamParam, const HPose& ReferencePose, const HString& DetectorType, const HTuple& DetectorParamName, const HTuple& DetectorParamValue, const HTuple& DescriptorParamName, const HTuple& DescriptorParamValue, Hlong Seed)

void HDescriptorModel::HDescriptorModel(const HImage& Template, const HCamPar& CamParam, const HPose& ReferencePose, const char* DetectorType, const HTuple& DetectorParamName, const HTuple& DetectorParamValue, const HTuple& DescriptorParamName, const HTuple& DescriptorParamValue, Hlong Seed)

void HDescriptorModel::HDescriptorModel(const HImage& Template, const HCamPar& CamParam, const HPose& ReferencePose, const wchar_t* DetectorType, const HTuple& DetectorParamName, const HTuple& DetectorParamValue, const HTuple& DescriptorParamName, const HTuple& DescriptorParamValue, Hlong Seed)   (Windows only)

void HDescriptorModel::CreateCalibDescriptorModel(const HImage& Template, const HCamPar& CamParam, const HPose& ReferencePose, const HString& DetectorType, const HTuple& DetectorParamName, const HTuple& DetectorParamValue, const HTuple& DescriptorParamName, const HTuple& DescriptorParamValue, Hlong Seed)

void HDescriptorModel::CreateCalibDescriptorModel(const HImage& Template, const HCamPar& CamParam, const HPose& ReferencePose, const char* DetectorType, const HTuple& DetectorParamName, const HTuple& DetectorParamValue, const HTuple& DescriptorParamName, const HTuple& DescriptorParamValue, Hlong Seed)

void HDescriptorModel::CreateCalibDescriptorModel(const HImage& Template, const HCamPar& CamParam, const HPose& ReferencePose, const wchar_t* DetectorType, const HTuple& DetectorParamName, const HTuple& DetectorParamValue, const HTuple& DescriptorParamName, const HTuple& DescriptorParamValue, Hlong Seed)   (Windows only)

HDescriptorModel HImage::CreateCalibDescriptorModel(const HCamPar& CamParam, const HPose& ReferencePose, const HString& DetectorType, const HTuple& DetectorParamName, const HTuple& DetectorParamValue, const HTuple& DescriptorParamName, const HTuple& DescriptorParamValue, Hlong Seed) const

HDescriptorModel HImage::CreateCalibDescriptorModel(const HCamPar& CamParam, const HPose& ReferencePose, const char* DetectorType, const HTuple& DetectorParamName, const HTuple& DetectorParamValue, const HTuple& DescriptorParamName, const HTuple& DescriptorParamValue, Hlong Seed) const

HDescriptorModel HImage::CreateCalibDescriptorModel(const HCamPar& CamParam, const HPose& ReferencePose, const wchar_t* DetectorType, const HTuple& DetectorParamName, const HTuple& DetectorParamValue, const HTuple& DescriptorParamName, const HTuple& DescriptorParamValue, Hlong Seed) const   (Windows only)

HDescriptorModel HCamPar::CreateCalibDescriptorModel(const HImage& Template, const HPose& ReferencePose, const HString& DetectorType, const HTuple& DetectorParamName, const HTuple& DetectorParamValue, const HTuple& DescriptorParamName, const HTuple& DescriptorParamValue, Hlong Seed) const

HDescriptorModel HCamPar::CreateCalibDescriptorModel(const HImage& Template, const HPose& ReferencePose, const char* DetectorType, const HTuple& DetectorParamName, const HTuple& DetectorParamValue, const HTuple& DescriptorParamName, const HTuple& DescriptorParamValue, Hlong Seed) const

HDescriptorModel HCamPar::CreateCalibDescriptorModel(const HImage& Template, const HPose& ReferencePose, const wchar_t* DetectorType, const HTuple& DetectorParamName, const HTuple& DetectorParamValue, const HTuple& DescriptorParamName, const HTuple& DescriptorParamValue, Hlong Seed) const   (Windows only)

HDescriptorModel HPose::CreateCalibDescriptorModel(const HImage& Template, const HCamPar& CamParam, const HString& DetectorType, const HTuple& DetectorParamName, const HTuple& DetectorParamValue, const HTuple& DescriptorParamName, const HTuple& DescriptorParamValue, Hlong Seed) const

HDescriptorModel HPose::CreateCalibDescriptorModel(const HImage& Template, const HCamPar& CamParam, const char* DetectorType, const HTuple& DetectorParamName, const HTuple& DetectorParamValue, const HTuple& DescriptorParamName, const HTuple& DescriptorParamValue, Hlong Seed) const

HDescriptorModel HPose::CreateCalibDescriptorModel(const HImage& Template, const HCamPar& CamParam, const wchar_t* DetectorType, const HTuple& DetectorParamName, const HTuple& DetectorParamValue, const HTuple& DescriptorParamName, const HTuple& DescriptorParamValue, Hlong Seed) const   (Windows only)

static void HOperatorSet.CreateCalibDescriptorModel(HObject template, HTuple camParam, HTuple referencePose, HTuple detectorType, HTuple detectorParamName, HTuple detectorParamValue, HTuple descriptorParamName, HTuple descriptorParamValue, HTuple seed, out HTuple modelID)

public HDescriptorModel(HImage template, HCamPar camParam, HPose referencePose, string detectorType, HTuple detectorParamName, HTuple detectorParamValue, HTuple descriptorParamName, HTuple descriptorParamValue, int seed)

void HDescriptorModel.CreateCalibDescriptorModel(HImage template, HCamPar camParam, HPose referencePose, string detectorType, HTuple detectorParamName, HTuple detectorParamValue, HTuple descriptorParamName, HTuple descriptorParamValue, int seed)

HDescriptorModel HImage.CreateCalibDescriptorModel(HCamPar camParam, HPose referencePose, string detectorType, HTuple detectorParamName, HTuple detectorParamValue, HTuple descriptorParamName, HTuple descriptorParamValue, int seed)

HDescriptorModel HCamPar.CreateCalibDescriptorModel(HImage template, HPose referencePose, string detectorType, HTuple detectorParamName, HTuple detectorParamValue, HTuple descriptorParamName, HTuple descriptorParamValue, int seed)

HDescriptorModel HPose.CreateCalibDescriptorModel(HImage template, HCamPar camParam, string detectorType, HTuple detectorParamName, HTuple detectorParamValue, HTuple descriptorParamName, HTuple descriptorParamValue, int seed)

def create_calib_descriptor_model(template: HObject, cam_param: Sequence[Union[float, int, str]], reference_pose: Sequence[Union[float, int]], detector_type: str, detector_param_name: Sequence[str], detector_param_value: Sequence[Union[int, float, str]], descriptor_param_name: Sequence[str], descriptor_param_value: Sequence[Union[int, float, str]], seed: int) -> HHandle

Description

The operator create_calib_descriptor_modelcreate_calib_descriptor_modelCreateCalibDescriptorModelCreateCalibDescriptorModelCreateCalibDescriptorModelcreate_calib_descriptor_model prepares a descriptor model, which is used for calibrated descriptor-based matching, from a template image that is passed in TemplateTemplateTemplateTemplatetemplatetemplate (usually the domain of the image is reduced to an ROI showing only the object of interest). Note that the part of the object that is visible in the TemplateTemplateTemplateTemplatetemplatetemplate image needs to be planar.

The internal camera parameters CamParamCamParamCamParamCamParamcamParamcam_param and the ReferencePoseReferencePoseReferencePoseReferencePosereferencePosereference_pose, which describes the 3D position and orientation of the object plane shown in TemplateTemplateTemplateTemplatetemplatetemplate, are used to internally calculate a model coordinate system. The origin of this model coordinate system is obtained by projecting the center of gravity of an internally rectified version of the template image onto the object plane. The axes of the model coordinate system are built such that they are parallel to the axes of Reference Pose. To obtain a descriptor model from the template image, the points extracted by the detector in the internally rectified template image are projected onto the object plane as well. Their coordinates in the model coordinate system are stored as world coordinates in the model. This model then can be used for the pose estimation of a searched object as described with find_calib_descriptor_modelfind_calib_descriptor_modelFindCalibDescriptorModelFindCalibDescriptorModelFindCalibDescriptorModelfind_calib_descriptor_model.

A descriptor model created by the use of create_calib_descriptor_modelcreate_calib_descriptor_modelCreateCalibDescriptorModelCreateCalibDescriptorModelCreateCalibDescriptorModelcreate_calib_descriptor_model can also be used in find_uncalib_descriptor_modelfind_uncalib_descriptor_modelFindUncalibDescriptorModelFindUncalibDescriptorModelFindUncalibDescriptorModelfind_uncalib_descriptor_model to determine a homography. In contrast, it is not possible to use a model created by create_uncalib_descriptor_modelcreate_uncalib_descriptor_modelCreateUncalibDescriptorModelCreateUncalibDescriptorModelCreateUncalibDescriptorModelcreate_uncalib_descriptor_model in find_calib_descriptor_modelfind_calib_descriptor_modelFindCalibDescriptorModelFindCalibDescriptorModelFindCalibDescriptorModelfind_calib_descriptor_model.

The descriptor model describes a set of points of interest. It stores their locations and discriminative descriptions of their local gray value neighborhood. The interest point extraction is parametrized by DetectorTypeDetectorTypeDetectorTypeDetectorTypedetectorTypedetector_type, DetectorParamNameDetectorParamNameDetectorParamNameDetectorParamNamedetectorParamNamedetector_param_name and DetectorParamValueDetectorParamValueDetectorParamValueDetectorParamValuedetectorParamValuedetector_param_value. The respective descriptor around the interest points is parametrized by DescriptorParamNameDescriptorParamNameDescriptorParamNameDescriptorParamNamedescriptorParamNamedescriptor_param_name and DescriptorParamValueDescriptorParamValueDescriptorParamValueDescriptorParamValuedescriptorParamValuedescriptor_param_value. The parameter SeedSeedSeedSeedseedseed seeds the random number generator, which is used during the construction of the descriptor implemented with randomized ferns. The returned ModelIDModelIDModelIDModelIDmodelIDmodel_id is a reference to the generated descriptor model. For further explanation on the descriptor model and its parameter we refer to the description of create_uncalib_descriptor_modelcreate_uncalib_descriptor_modelCreateUncalibDescriptorModelCreateUncalibDescriptorModelCreateUncalibDescriptorModelcreate_uncalib_descriptor_model.

The parameters and the location of the final descriptor points can be determined with get_descriptor_model_paramsget_descriptor_model_paramsGetDescriptorModelParamsGetDescriptorModelParamsGetDescriptorModelParamsget_descriptor_model_params and get_descriptor_model_pointsget_descriptor_model_pointsGetDescriptorModelPointsGetDescriptorModelPointsGetDescriptorModelPointsget_descriptor_model_points.

create_calib_descriptor_modelcreate_calib_descriptor_modelCreateCalibDescriptorModelCreateCalibDescriptorModelCreateCalibDescriptorModelcreate_calib_descriptor_model stores the detector type, detector parameters and descriptor parameters, which are used in every succeeding call of find_calib_descriptor_modelfind_calib_descriptor_modelFindCalibDescriptorModelFindCalibDescriptorModelFindCalibDescriptorModelfind_calib_descriptor_model or find_uncalib_descriptor_modelfind_uncalib_descriptor_modelFindUncalibDescriptorModelFindUncalibDescriptorModelFindUncalibDescriptorModelfind_uncalib_descriptor_model. The reference point (origin) of the model is the center of gravity of the template's ROI. Its coordinates can be changed by set_descriptor_model_originset_descriptor_model_originSetDescriptorModelOriginSetDescriptorModelOriginSetDescriptorModelOriginset_descriptor_model_origin.

Execution Information

This operator returns a handle. Note that the state of an instance of this handle type may be changed by specific operators even though the handle is used as an input parameter by those operators.

Parameters

TemplateTemplateTemplateTemplatetemplatetemplate (input_object)  singlechannelimage objectHImageHObjectHImageHobject (byte / uint2)

Input image whose domain will be used to create the model.

CamParamCamParamCamParamCamParamcamParamcam_param (input_control)  campar HCamPar, HTupleSequence[Union[float, int, str]]HTupleHtuple (real / integer / string) (double / int / long / string) (double / Hlong / HString) (double / Hlong / char*)

The parameters of the internal orientation of the camera.

ReferencePoseReferencePoseReferencePoseReferencePosereferencePosereference_pose (input_control)  pose HPose, HTupleSequence[Union[float, int]]HTupleHtuple (real / integer) (double / int / long) (double / Hlong) (double / Hlong)

The reference pose of the object in the reference image.

DetectorTypeDetectorTypeDetectorTypeDetectorTypedetectorTypedetector_type (input_control)  string HTuplestrHTupleHtuple (string) (string) (HString) (char*)

The type of the detector.

Default value: 'lepetit' "lepetit" "lepetit" "lepetit" "lepetit" "lepetit"

List of values: 'harris'"harris""harris""harris""harris""harris", 'harris_binomial'"harris_binomial""harris_binomial""harris_binomial""harris_binomial""harris_binomial", 'lepetit'"lepetit""lepetit""lepetit""lepetit""lepetit"

DetectorParamNameDetectorParamNameDetectorParamNameDetectorParamNamedetectorParamNamedetector_param_name (input_control)  attribute.name-array HTupleSequence[str]HTupleHtuple (string) (string) (HString) (char*)

The detector's parameter names.

Default value: []

List of values: 'alpha'"alpha""alpha""alpha""alpha""alpha", 'check_neighbor'"check_neighbor""check_neighbor""check_neighbor""check_neighbor""check_neighbor", 'mask_size_grd'"mask_size_grd""mask_size_grd""mask_size_grd""mask_size_grd""mask_size_grd", 'mask_size_smooth'"mask_size_smooth""mask_size_smooth""mask_size_smooth""mask_size_smooth""mask_size_smooth", 'min_check_neighbor_diff'"min_check_neighbor_diff""min_check_neighbor_diff""min_check_neighbor_diff""min_check_neighbor_diff""min_check_neighbor_diff", 'min_score'"min_score""min_score""min_score""min_score""min_score", 'radius'"radius""radius""radius""radius""radius", 'sigma_grad'"sigma_grad""sigma_grad""sigma_grad""sigma_grad""sigma_grad", 'sigma_smooth'"sigma_smooth""sigma_smooth""sigma_smooth""sigma_smooth""sigma_smooth", 'subpix'"subpix""subpix""subpix""subpix""subpix", 'threshold'"threshold""threshold""threshold""threshold""threshold"

DetectorParamValueDetectorParamValueDetectorParamValueDetectorParamValuedetectorParamValuedetector_param_value (input_control)  attribute.value-array HTupleSequence[Union[int, float, str]]HTupleHtuple (integer / real / string) (int / long / double / string) (Hlong / double / HString) (Hlong / double / char*)

Values of the detector's parameters.

Default value: []

Suggested values: 0.08, 1, 1.2, 3, 15, 30, 1000, 'on'"on""on""on""on""on", 'off'"off""off""off""off""off"

DescriptorParamNameDescriptorParamNameDescriptorParamNameDescriptorParamNamedescriptorParamNamedescriptor_param_name (input_control)  attribute.name-array HTupleSequence[str]HTupleHtuple (string) (string) (HString) (char*)

The descriptor's parameter names.

Default value: []

List of values: 'depth'"depth""depth""depth""depth""depth", 'max_rot'"max_rot""max_rot""max_rot""max_rot""max_rot", 'max_scale'"max_scale""max_scale""max_scale""max_scale""max_scale", 'min_rot'"min_rot""min_rot""min_rot""min_rot""min_rot", 'min_scale'"min_scale""min_scale""min_scale""min_scale""min_scale", 'number_ferns'"number_ferns""number_ferns""number_ferns""number_ferns""number_ferns", 'patch_size'"patch_size""patch_size""patch_size""patch_size""patch_size", 'tilt'"tilt""tilt""tilt""tilt""tilt"

DescriptorParamValueDescriptorParamValueDescriptorParamValueDescriptorParamValuedescriptorParamValuedescriptor_param_value (input_control)  attribute.value-array HTupleSequence[Union[int, float, str]]HTupleHtuple (integer / real / string) (int / long / double / string) (Hlong / double / HString) (Hlong / double / char*)

Values of the descriptor's parameters.

Default value: []

Suggested values: 0.5, 1.4, 11, 21, 30, -180, 180, 'on'"on""on""on""on""on", 'off'"off""off""off""off""off"

SeedSeedSeedSeedseedseed (input_control)  integer HTupleintHTupleHtuple (integer) (int / long) (Hlong) (Hlong)

The seed for the random number generator.

Default value: 42

ModelIDModelIDModelIDModelIDmodelIDmodel_id (output_control)  descriptor_model HDescriptorModel, HTupleHHandleHTupleHtuple (handle) (IntPtr) (HHandle) (handle)

The handle to the descriptor model.

Possible Predecessors

points_lepetitpoints_lepetitPointsLepetitPointsLepetitPointsLepetitpoints_lepetit, points_harrispoints_harrisPointsHarrisPointsHarrisPointsHarrispoints_harris, reduce_domainreduce_domainReduceDomainReduceDomainReduceDomainreduce_domain

Possible Successors

get_descriptor_model_paramsget_descriptor_model_paramsGetDescriptorModelParamsGetDescriptorModelParamsGetDescriptorModelParamsget_descriptor_model_params, find_calib_descriptor_modelfind_calib_descriptor_modelFindCalibDescriptorModelFindCalibDescriptorModelFindCalibDescriptorModelfind_calib_descriptor_model

See also

get_descriptor_model_paramsget_descriptor_model_paramsGetDescriptorModelParamsGetDescriptorModelParamsGetDescriptorModelParamsget_descriptor_model_params, find_calib_descriptor_modelfind_calib_descriptor_modelFindCalibDescriptorModelFindCalibDescriptorModelFindCalibDescriptorModelfind_calib_descriptor_model

References

V. Lepetit and P. Fua: “Keypoint Recognition using Randomized Trees.“ IEEE Transactions on Pattern Analysis and Machine Intelligence, Vol. 28, Nr. 9, pp. 1465-1479, 2006.
M. Ozuysal, P. Fua, and V. Lepetit: “Fast Keypoint Recognition in Ten Lines of Code.“ In Proceedings of Conference on Computer Vision and Pattern Recognition, 2007.

Module

Matching