create_calib_descriptor_modelT_create_calib_descriptor_modelCreateCalibDescriptorModelCreateCalibDescriptorModelcreate_calib_descriptor_model (算子)
名称
create_calib_descriptor_modelT_create_calib_descriptor_modelCreateCalibDescriptorModelCreateCalibDescriptorModelcreate_calib_descriptor_model — 创建用于标定透视匹配的描述符模型。
签名
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
描述
算子 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。
执行信息
- 多线程类型:可重入(与非独占算子并行运行)。
- 多线程作用域:全局(可从任何线程调用)。
- 未采用并行化处理。
此算子返回一个句柄。请注意,即使该句柄被用作特定算子的输入参数,这些算子仍可能改变此句柄类型的实例状态。
参数
TemplateTemplateTemplateTemplatetemplatetemplate (输入对象) singlechannelimage → objectHImageHObjectHImageHobject (byte / uint2)
Input image whose domain will be used to create
the model.
CamParamCamParamCamParamCamParamcamParamcam_param (输入控制) 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 (输入控制) 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 (输入控制) string → HTuplestrHTupleHtuple (string) (string) (HString) (char*)
The type of the detector.
默认值:
'lepetit'
"lepetit"
"lepetit"
"lepetit"
"lepetit"
"lepetit"
值列表:
'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 (输入控制) attribute.name-array → HTupleSequence[str]HTupleHtuple (string) (string) (HString) (char*)
The detector's parameter names.
默认值:
[]
值列表:
'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 (输入控制) 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.
默认值:
[]
建议值:
0.08, 1, 1.2, 3, 15, 30, 1000, 'on'"on""on""on""on""on", 'off'"off""off""off""off""off"
DescriptorParamNameDescriptorParamNameDescriptorParamNameDescriptorParamNamedescriptorParamNamedescriptor_param_name (输入控制) attribute.name-array → HTupleSequence[str]HTupleHtuple (string) (string) (HString) (char*)
The descriptor's parameter names.
默认值:
[]
值列表:
'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 (输入控制) 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.
默认值:
[]
建议值:
0.5, 1.4, 11, 21, 30, -180, 180, 'on'"on""on""on""on""on", 'off'"off""off""off""off""off"
SeedSeedSeedSeedseedseed (输入控制) integer → HTupleintHTupleHtuple (integer) (int / long) (Hlong) (Hlong)
The seed for the random number generator.
默认值:
42
ModelIDModelIDModelIDModelIDmodelIDmodel_id (输出控制) descriptor_model → HDescriptorModel, HTupleHHandleHTupleHtuple (handle) (IntPtr) (HHandle) (handle)
The handle to the descriptor model.
可能的前趋
points_lepetitpoints_lepetitPointsLepetitPointsLepetitPointsLepetitpoints_lepetit,
points_harrispoints_harrisPointsHarrisPointsHarrisPointsHarrispoints_harris,
reduce_domainreduce_domainReduceDomainReduceDomainReduceDomainreduce_domain
可能的后继
get_descriptor_model_paramsget_descriptor_model_paramsGetDescriptorModelParamsGetDescriptorModelParamsGetDescriptorModelParamsget_descriptor_model_params,
find_calib_descriptor_modelfind_calib_descriptor_modelFindCalibDescriptorModelFindCalibDescriptorModelFindCalibDescriptorModelfind_calib_descriptor_model
另见
get_descriptor_model_paramsget_descriptor_model_paramsGetDescriptorModelParamsGetDescriptorModelParamsGetDescriptorModelParamsget_descriptor_model_params,
find_calib_descriptor_modelfind_calib_descriptor_modelFindCalibDescriptorModelFindCalibDescriptorModelFindCalibDescriptorModelfind_calib_descriptor_model
参考文献
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.
模块
匹配