find_calib_descriptor_modelT_find_calib_descriptor_modelFindCalibDescriptorModelFindCalibDescriptorModelfind_calib_descriptor_model (算子)

名称

find_calib_descriptor_modelT_find_calib_descriptor_modelFindCalibDescriptorModelFindCalibDescriptorModelfind_calib_descriptor_model — 在图像中找到标定描述符模型的最佳匹配,并返回它们的三维姿态。

签名

find_calib_descriptor_model(Image : : ModelID, DetectorParamName, DetectorParamValue, DescriptorParamName, DescriptorParamValue, MinScore, NumMatches, CamParam, ScoreType : Pose, Score)

Herror T_find_calib_descriptor_model(const Hobject Image, const Htuple ModelID, const Htuple DetectorParamName, const Htuple DetectorParamValue, const Htuple DescriptorParamName, const Htuple DescriptorParamValue, const Htuple MinScore, const Htuple NumMatches, const Htuple CamParam, const Htuple ScoreType, Htuple* Pose, Htuple* Score)

void FindCalibDescriptorModel(const HObject& Image, const HTuple& ModelID, const HTuple& DetectorParamName, const HTuple& DetectorParamValue, const HTuple& DescriptorParamName, const HTuple& DescriptorParamValue, const HTuple& MinScore, const HTuple& NumMatches, const HTuple& CamParam, const HTuple& ScoreType, HTuple* Pose, HTuple* Score)

HPoseArray HDescriptorModel::FindCalibDescriptorModel(const HImage& Image, const HTuple& DetectorParamName, const HTuple& DetectorParamValue, const HTuple& DescriptorParamName, const HTuple& DescriptorParamValue, const HTuple& MinScore, Hlong NumMatches, const HCamPar& CamParam, const HTuple& ScoreType, HTuple* Score) const

HPose HDescriptorModel::FindCalibDescriptorModel(const HImage& Image, const HTuple& DetectorParamName, const HTuple& DetectorParamValue, const HTuple& DescriptorParamName, const HTuple& DescriptorParamValue, double MinScore, Hlong NumMatches, const HCamPar& CamParam, const HString& ScoreType, double* Score) const

HPose HDescriptorModel::FindCalibDescriptorModel(const HImage& Image, const HTuple& DetectorParamName, const HTuple& DetectorParamValue, const HTuple& DescriptorParamName, const HTuple& DescriptorParamValue, double MinScore, Hlong NumMatches, const HCamPar& CamParam, const char* ScoreType, double* Score) const

HPose HDescriptorModel::FindCalibDescriptorModel(const HImage& Image, const HTuple& DetectorParamName, const HTuple& DetectorParamValue, const HTuple& DescriptorParamName, const HTuple& DescriptorParamValue, double MinScore, Hlong NumMatches, const HCamPar& CamParam, const wchar_t* ScoreType, double* Score) const   ( Windows only)

HPoseArray HImage::FindCalibDescriptorModel(const HDescriptorModel& ModelID, const HTuple& DetectorParamName, const HTuple& DetectorParamValue, const HTuple& DescriptorParamName, const HTuple& DescriptorParamValue, const HTuple& MinScore, Hlong NumMatches, const HCamPar& CamParam, const HTuple& ScoreType, HTuple* Score) const

HPose HImage::FindCalibDescriptorModel(const HDescriptorModel& ModelID, const HTuple& DetectorParamName, const HTuple& DetectorParamValue, const HTuple& DescriptorParamName, const HTuple& DescriptorParamValue, double MinScore, Hlong NumMatches, const HCamPar& CamParam, const HString& ScoreType, double* Score) const

HPose HImage::FindCalibDescriptorModel(const HDescriptorModel& ModelID, const HTuple& DetectorParamName, const HTuple& DetectorParamValue, const HTuple& DescriptorParamName, const HTuple& DescriptorParamValue, double MinScore, Hlong NumMatches, const HCamPar& CamParam, const char* ScoreType, double* Score) const

HPose HImage::FindCalibDescriptorModel(const HDescriptorModel& ModelID, const HTuple& DetectorParamName, const HTuple& DetectorParamValue, const HTuple& DescriptorParamName, const HTuple& DescriptorParamValue, double MinScore, Hlong NumMatches, const HCamPar& CamParam, const wchar_t* ScoreType, double* Score) const   ( Windows only)

HPoseArray HCamPar::FindCalibDescriptorModel(const HImage& Image, const HDescriptorModel& ModelID, const HTuple& DetectorParamName, const HTuple& DetectorParamValue, const HTuple& DescriptorParamName, const HTuple& DescriptorParamValue, const HTuple& MinScore, Hlong NumMatches, const HTuple& ScoreType, HTuple* Score) const

HPose HCamPar::FindCalibDescriptorModel(const HImage& Image, const HDescriptorModel& ModelID, const HTuple& DetectorParamName, const HTuple& DetectorParamValue, const HTuple& DescriptorParamName, const HTuple& DescriptorParamValue, double MinScore, Hlong NumMatches, const HString& ScoreType, double* Score) const

HPose HCamPar::FindCalibDescriptorModel(const HImage& Image, const HDescriptorModel& ModelID, const HTuple& DetectorParamName, const HTuple& DetectorParamValue, const HTuple& DescriptorParamName, const HTuple& DescriptorParamValue, double MinScore, Hlong NumMatches, const char* ScoreType, double* Score) const

HPose HCamPar::FindCalibDescriptorModel(const HImage& Image, const HDescriptorModel& ModelID, const HTuple& DetectorParamName, const HTuple& DetectorParamValue, const HTuple& DescriptorParamName, const HTuple& DescriptorParamValue, double MinScore, Hlong NumMatches, const wchar_t* ScoreType, double* Score) const   ( Windows only)

static HTuple HPose::FindCalibDescriptorModel(const HImage& Image, const HDescriptorModel& ModelID, const HTuple& DetectorParamName, const HTuple& DetectorParamValue, const HTuple& DescriptorParamName, const HTuple& DescriptorParamValue, const HTuple& MinScore, Hlong NumMatches, const HCamPar& CamParam, const HTuple& ScoreType, HPoseArray* Pose)

double HPose::FindCalibDescriptorModel(const HImage& Image, const HDescriptorModel& ModelID, const HTuple& DetectorParamName, const HTuple& DetectorParamValue, const HTuple& DescriptorParamName, const HTuple& DescriptorParamValue, double MinScore, Hlong NumMatches, const HCamPar& CamParam, const HString& ScoreType)

double HPose::FindCalibDescriptorModel(const HImage& Image, const HDescriptorModel& ModelID, const HTuple& DetectorParamName, const HTuple& DetectorParamValue, const HTuple& DescriptorParamName, const HTuple& DescriptorParamValue, double MinScore, Hlong NumMatches, const HCamPar& CamParam, const char* ScoreType)

double HPose::FindCalibDescriptorModel(const HImage& Image, const HDescriptorModel& ModelID, const HTuple& DetectorParamName, const HTuple& DetectorParamValue, const HTuple& DescriptorParamName, const HTuple& DescriptorParamValue, double MinScore, Hlong NumMatches, const HCamPar& CamParam, const wchar_t* ScoreType)   ( Windows only)

static void HOperatorSet.FindCalibDescriptorModel(HObject image, HTuple modelID, HTuple detectorParamName, HTuple detectorParamValue, HTuple descriptorParamName, HTuple descriptorParamValue, HTuple minScore, HTuple numMatches, HTuple camParam, HTuple scoreType, out HTuple pose, out HTuple score)

HPose[] HDescriptorModel.FindCalibDescriptorModel(HImage image, HTuple detectorParamName, HTuple detectorParamValue, HTuple descriptorParamName, HTuple descriptorParamValue, HTuple minScore, int numMatches, HCamPar camParam, HTuple scoreType, out HTuple score)

HPose HDescriptorModel.FindCalibDescriptorModel(HImage image, HTuple detectorParamName, HTuple detectorParamValue, HTuple descriptorParamName, HTuple descriptorParamValue, double minScore, int numMatches, HCamPar camParam, string scoreType, out double score)

HPose[] HImage.FindCalibDescriptorModel(HDescriptorModel modelID, HTuple detectorParamName, HTuple detectorParamValue, HTuple descriptorParamName, HTuple descriptorParamValue, HTuple minScore, int numMatches, HCamPar camParam, HTuple scoreType, out HTuple score)

HPose HImage.FindCalibDescriptorModel(HDescriptorModel modelID, HTuple detectorParamName, HTuple detectorParamValue, HTuple descriptorParamName, HTuple descriptorParamValue, double minScore, int numMatches, HCamPar camParam, string scoreType, out double score)

HPose[] HCamPar.FindCalibDescriptorModel(HImage image, HDescriptorModel modelID, HTuple detectorParamName, HTuple detectorParamValue, HTuple descriptorParamName, HTuple descriptorParamValue, HTuple minScore, int numMatches, HTuple scoreType, out HTuple score)

HPose HCamPar.FindCalibDescriptorModel(HImage image, HDescriptorModel modelID, HTuple detectorParamName, HTuple detectorParamValue, HTuple descriptorParamName, HTuple descriptorParamValue, double minScore, int numMatches, string scoreType, out double score)

static HTuple HPose.FindCalibDescriptorModel(HImage image, HDescriptorModel modelID, HTuple detectorParamName, HTuple detectorParamValue, HTuple descriptorParamName, HTuple descriptorParamValue, HTuple minScore, int numMatches, HCamPar camParam, HTuple scoreType, out HPose[] pose)

double HPose.FindCalibDescriptorModel(HImage image, HDescriptorModel modelID, HTuple detectorParamName, HTuple detectorParamValue, HTuple descriptorParamName, HTuple descriptorParamValue, double minScore, int numMatches, HCamPar camParam, string scoreType)

def find_calib_descriptor_model(image: HObject, model_id: HHandle, 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]], min_score: MaybeSequence[float], num_matches: int, cam_param: Sequence[Union[float, int, str]], score_type: MaybeSequence[str]) -> Tuple[Sequence[Union[float, int]], Sequence[Union[float, int]]]

def find_calib_descriptor_model_s(image: HObject, model_id: HHandle, 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]], min_score: MaybeSequence[float], num_matches: int, cam_param: Sequence[Union[float, int, str]], score_type: MaybeSequence[str]) -> Tuple[Sequence[Union[float, int]], Union[float, int]]

描述

算子 find_calib_descriptor_modelfind_calib_descriptor_modelFindCalibDescriptorModelFindCalibDescriptorModelFindCalibDescriptorModelfind_calib_descriptor_model finds the best NumMatchesNumMatchesNumMatchesNumMatchesnumMatchesnum_matches matches of the descriptor model ModelIDModelIDModelIDModelIDmodelIDmodel_id in ImageImageImageImageimageimage. The descriptor model must have been created previously by calling create_calib_descriptor_modelcreate_calib_descriptor_modelCreateCalibDescriptorModelCreateCalibDescriptorModelCreateCalibDescriptorModelcreate_calib_descriptor_model or read_descriptor_modelread_descriptor_modelReadDescriptorModelReadDescriptorModelReadDescriptorModelread_descriptor_model

The operator returns the 3D PosePosePosePoseposepose (in camera coordinate system) of the template object found in the search ImageImageImageImageimageimage. As two different cameras can be used for the model generation and the online search, the camera parameters of the camera used to create ImageImageImageImageimageimage have to be set in CamParamCamParamCamParamCamParamcamParamcam_param

The detection process is the same as for find_uncalib_descriptor_modelfind_uncalib_descriptor_modelFindUncalibDescriptorModelFindUncalibDescriptorModelFindUncalibDescriptorModelfind_uncalib_descriptor_model。The setting of DetectorParamNameDetectorParamNameDetectorParamNameDetectorParamNamedetectorParamNamedetector_param_name, DetectorParamValueDetectorParamValueDetectorParamValueDetectorParamValuedetectorParamValuedetector_param_value, DescriptorParamNameDescriptorParamNameDescriptorParamNameDescriptorParamNamedescriptorParamNamedescriptor_param_name, DescriptorParamValueDescriptorParamValueDescriptorParamValueDescriptorParamValuedescriptorParamValuedescriptor_param_value, MinScoreMinScoreMinScoreMinScoreminScoremin_score, NumMatchesNumMatchesNumMatchesNumMatchesnumMatchesnum_matches and ScoreTypeScoreTypeScoreTypeScoreTypescoreTypescore_type are explained with find_uncalib_descriptor_modelfind_uncalib_descriptor_modelFindUncalibDescriptorModelFindUncalibDescriptorModelFindUncalibDescriptorModelfind_uncalib_descriptor_model。After the object was detected, and using the world (from reference plane) coordinates of the matched model points (explained with create_calib_descriptor_modelcreate_calib_descriptor_modelCreateCalibDescriptorModelCreateCalibDescriptorModelCreateCalibDescriptorModelcreate_calib_descriptor_model), the pose of the object is computed similarly to applying vector_to_posevector_to_poseVectorToPoseVectorToPoseVectorToPosevector_to_pose operator.

The point correspondences for each object can be queried with get_descriptor_model_pointsget_descriptor_model_pointsGetDescriptorModelPointsGetDescriptorModelPointsGetDescriptorModelPointsget_descriptor_model_points

注意

Note that the domain of the search image should contain the whole object to be searched for because interest points are only extracted inside the domain of the search image. This means that if the domain does not contain the full object to be searched for, the resulting ScoreScoreScoreScorescorescore will decrease. Note also that matches may be found even if the reference point (origin) of the model lies outside of the domain of the search image. Both is in contrast to shape-based matching, where the domain of the search image defines the search space for the reference point of the model.

执行信息

参数

ImageImageImageImageimageimage (输入对象)  singlechannelimage objectHImageHObjectHImageHobject (byte / uint2)

Input image where the model should be found.

ModelIDModelIDModelIDModelIDmodelIDmodel_id (输入控制)  descriptor_model HDescriptorModel, HTupleHHandleHTupleHtuple (handle) (IntPtr) (HHandle) (handle)

The handle to the descriptor model.

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.

默认值: []

值列表: 'guided_matching'"guided_matching""guided_matching""guided_matching""guided_matching""guided_matching", 'min_score_descr'"min_score_descr""min_score_descr""min_score_descr""min_score_descr""min_score_descr"

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

Values of the descriptor's parameters.

默认值: []

建议值: 0.0, 0.001, 0.005, 0.01, 'on'"on""on""on""on""on", 'off'"off""off""off""off""off"

MinScoreMinScoreMinScoreMinScoreminScoremin_score (输入控制)  real(-array) HTupleMaybeSequence[float]HTupleHtuple (real) (double) (double) (double)

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

默认值: 0.2

建议值: 0.1, 0.2, 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

NumMatchesNumMatchesNumMatchesNumMatchesnumMatchesnum_matches (输入控制)  integer HTupleintHTupleHtuple (integer) (int / long) (Hlong) (Hlong)

Maximal number of found instances.

默认值: 1

建议值: 1, 2, 3, 4

限制: NumMatches >= 1

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

Camera parameter (inner orientation) obtained from camera calibration.

ScoreTypeScoreTypeScoreTypeScoreTypescoreTypescore_type (输入控制)  string(-array) HTupleMaybeSequence[str]HTupleHtuple (string) (string) (HString) (char*)

Score type to be evaluated in ScoreScoreScoreScorescorescore

默认值: 'num_points' "num_points" "num_points" "num_points" "num_points" "num_points"

值列表: 'inlier_ratio'"inlier_ratio""inlier_ratio""inlier_ratio""inlier_ratio""inlier_ratio", 'num_points'"num_points""num_points""num_points""num_points""num_points"

PosePosePosePoseposepose (输出控制)  pose(-array) HPose, HTupleSequence[Union[float, int]]HTupleHtuple (real / integer) (double / int / long) (double / Hlong) (double / Hlong)

3D pose of the object.

ScoreScoreScoreScorescorescore (输出控制)  number(-array) HTupleSequence[Union[float, int]]HTupleHtuple (real / integer) (double / int / long) (double / Hlong) (double / Hlong)

Score of the found instances according to the ScoreType input.

示例(HDevelop)

*  Perform camera calibration (with standard calibration plate)
calibrate_cameras (CalibDataID, Error)
get_calib_data (CalibDataID, 'camera', 0, 'params', CamParam)
*  World coordinate system is defined by calibration plate in first image
get_calib_data (CalibDataID, 'calib_obj_pose',  [0,0], 'pose', \
                ObjInCameraPose)
*  Compensate thickness of plate
set_origin_pose(ObjInCameraPose, 0, 0, 0.0006, WorldPose)

* Create descriptor model:
create_calib_descriptor_model (Image,CamParam,WorldPose, \
                               'harris',[],[],[],[],42,ModelID)

get_descriptor_model_params (ModelID,DetectorType, \
                             DetectorParamName,DetectorParamValue, \
                             DescriptorParamName,DescriptorParamValue)
write_descriptor_model (ModelID,'simple_example.dsm')

read_descriptor_model ('simple_example.dsm',ModelID)
find_calib_descriptor_model (SearchImage,ModelID,[],[],[],[],0.2,1, \
                             CamParam,['num_points','inlier_ratio'], \
                             Pose,Score)

可能的前趋

create_calib_descriptor_modelcreate_calib_descriptor_modelCreateCalibDescriptorModelCreateCalibDescriptorModelCreateCalibDescriptorModelcreate_calib_descriptor_model, read_descriptor_modelread_descriptor_modelReadDescriptorModelReadDescriptorModelReadDescriptorModelread_descriptor_model

另见

vector_to_posevector_to_poseVectorToPoseVectorToPoseVectorToPosevector_to_pose, points_lepetitpoints_lepetitPointsLepetitPointsLepetitPointsLepetitpoints_lepetit, create_calib_descriptor_modelcreate_calib_descriptor_modelCreateCalibDescriptorModelCreateCalibDescriptorModelCreateCalibDescriptorModelcreate_calib_descriptor_model

模块

匹配