《zw版·Halcon-delphi系列原创教程》 Halcon分类函数007, match,图像匹配
为方便阅读,在不影响说明的前提下,笔者对函数进行了简化:
- :: 用符号“**”,替换:“procedure”
- :: 用大写字母“X”,替换:“IHUntypedObjectX”
- :: 省略了字符:“const”、“OleVariant”
【示例】 说明
函数:
procedure AddNoiseWhiteContourXld( const Contours: IHUntypedObjectX; out NoisyContours: IHUntypedObjectX; NumRegrPoints: OleVariant; Amp: OleVariant);
简化后为:
** AddNoiseWhiteContourXld( Contours: X; out NoisyContours: X; NumRegrPoints, Amp);
1 ** BestMatch( Image: X; TemplateID, MaxError, SubPixel, out Row, out Column, out Error); 2 说明, best_match,寻找一个模板和一个图像的最佳匹配。 3 4 ** BestMatchMg( Image: X; TemplateID, MaxError, SubPixel, NumLevels, WhichLevels, out Row, out Column, out Error); 5 说明, best_match_mg,在金字塔中寻找最佳灰度值匹配。 6 7 ** BestMatchPreMg( ImagePyramid: X; TemplateID, MaxError, SubPixel, NumLevels, WhichLevels, out Row, out Column, out Error); 8 说明, best_match_pre_mg,在预生成的金字塔中寻找最佳灰度值匹配。 9 10 ** BestMatchRot( Image: X; TemplateID, AngleStart, AngleExtend, MaxError, SubPixel, out Row, out Column, out Angle, out Error); 11 说明, best_match_rot,寻找一个模板和一个旋转图像的最佳匹配。 12 13 ** BestMatchRotMg( Image: X; TemplateID, AngleStart, AngleExtend, MaxError, SubPixel, NumLevels, out Row, out Column, out Angle, out Error); 14 说明, best_match_rot_mg,寻找一个模板和一个旋转金字塔的最佳匹配。 15 16 ** ClearAllSurfaceMatchingResults; 17 说明, 清除所有表面匹配数据 18 19 ** ClearSurfaceMatchingResult( SurfaceMatchingResultID); 20 说明, 清除表面匹配数据 21 22 ** ExhaustiveMatch( Image: X; RegionOfInterest: X; ImageTemplate: X; out ImageMatch: X; Mode); 23 说明, exhaustive_match,模板和图像的匹配。 24 25 ** ExhaustiveMatchMg( Image: X; ImageTemplate: X; out ImageMatch: X; Mode, Level, Threshold); 26 说明, exhaustive_match_mg,在一个分辨率塔式结构中匹配模板和图像。 27 28 ** FastMatch( Image: X; out Matches: X; TemplateID, MaxError); 29 说明, fast_match,寻找一个模板和一个图像的所有好的匹配。 30 31 ** FastMatchMg( Image: X; out Matches: X; TemplateID, MaxError, NumLevel); 32 说明, fast_match_mg,在金字塔中寻找所有好的灰度值匹配。 33 34 ** FindAnisoShapeModel( Image: X; ModelID, AngleStart, AngleExtent, ScaleRMin, ScaleRMax, ScaleCMin, ScaleCMax, MinScore, NumMatches, MaxOverlap, SubPixel, NumLevels, Greediness, out Row, out Column, out Angle, out ScaleR, out ScaleC, out Score); 35 说明, find_aniso_shape_model,在一个图像中找出一个各向异性尺度不变轮廓的最佳匹配。 36 37 ** FindAnisoShapeModels( Image: X; ModelIDs, AngleStart, AngleExtent, ScaleRMin, ScaleRMax, ScaleCMin, ScaleCMax, MinScore, NumMatches, MaxOverlap, SubPixel, NumLevels, Greediness, out Row, out Column, out Angle, out ScaleR, out ScaleC, out Score, out Model); 38 说明, find_aniso_shape_models,找出多重各向异性尺度不变轮廓模型的最佳匹配。 39 40 ** FindCalibDescriptorModel( Image: X; ModelID, DetectorParamName, DetectorParamValue, DescriptorParamName, DescriptorParamValue, MinScore, NumMatches, CamParam, ScoreType, out Pose, out Score); 41 说明, 检测校准描述模型 42 43 ** FindComponentModel( Image: X; ComponentModelID, RootComponent, AngleStartRoot, AngleExtentRoot, MinScore, NumMatches, MaxOverlap, IfRootNotFound, IfComponentNotFound, PosePrediction, MinScoreComp, SubPixelComp, NumLevelsComp, GreedinessComp, out ModelStart, out ModelEnd, out Score, out RowComp, out ColumnComp, out AngleComp, out ScoreComp, out ModelComp); 44 说明, find_component_model,在一个图像中找出一个组件模型的最佳匹配。 45 46 ** FindLocalDeformableModel( Image: X; out ImageRectified: X; out VectorField: X; out DeformedContours: X; ModelID, AngleStart, AngleExtent, ScaleRMin, ScaleRMax, ScaleCMin, ScaleCMax, MinScore, NumMatches, MaxOverlap, NumLevels, Greediness, ResultType, ParamName, ParamValue, out Score, out Row, out Column); 47 48 ** FindNccModel( Image: X; ModelID, AngleStart, AngleExtent, MinScore, NumMatches, MaxOverlap, SubPixel, NumLevels, out Row, out Column, out Angle, out Score); 49 说明, find_ncc_model,找出一个图像中的一个NCC模型的最佳匹配。 50 51 ** FindPlanarCalibDeformableModel( Image: X; ModelID, AngleStart, AngleExtent, ScaleRMin, ScaleRMax, ScaleCMin, ScaleCMax, MinScore, NumMatches, MaxOverlap, NumLevels, Greediness, ParamName, ParamValue, out Pose, out CovPose, out Score); 52 说明, 检测校准平面变形模型 53 54 ** FindPlanarUncalibDeformableModel( Image: X; ModelID, AngleStart, AngleExtent, ScaleRMin, ScaleRMax, ScaleCMin, ScaleCMax, MinScore, NumMatches, MaxOverlap, NumLevels, Greediness, ParamName, ParamValue, out HomMat2d, out Score); 55 说明, 检测无校准平面变形模型 56 57 ** FindScaledShapeModel( Image: X; ModelID, AngleStart, AngleExtent, ScaleMin, ScaleMax, MinScore, NumMatches, MaxOverlap, SubPixel, NumLevels, Greediness, out Row, out Column, out Angle, out Scale, out Score); 58 说明, find_scaled_shape_model,在一个图像中找出一个尺度不变轮廓模型的最佳匹配。 59 60 ** FindScaledShapeModels( Image: X; ModelIDs, AngleStart, AngleExtent, ScaleMin, ScaleMax, MinScore, NumMatches, MaxOverlap, SubPixel, NumLevels, Greediness, out Row, out Column, out Angle, out Scale, out Score, out Model); 61 说明, find_scaled_shape_models,找出多重尺度不变轮廓模型的最佳匹配。 62 63 ** FindShapeModel( Image: X; ModelID, AngleStart, AngleExtent, MinScore, NumMatches, MaxOverlap, SubPixel, NumLevels, Greediness, out Row, out Column, out Angle, out Score); 64 说明, find_shape_model,在一个图像中找出一个轮廓模型的最佳匹配。 65 66 ** FindShapeModels( Image: X; ModelIDs, AngleStart, AngleExtent, MinScore, NumMatches, MaxOverlap, SubPixel, NumLevels, Greediness, out Row, out Column, out Angle, out Score, out Model); 67 说明, find_shape_models,找出多重轮廓模型的最佳匹配。 68 69 ** FindSurfaceModel( SurfaceModelID, ObjectModel3D, RelSamplingDistance, KeyPointFraction, MinScore, ReturnResultHandle, GenParamName, GenParamValue, out Pose, out Score, out SurfaceMatchingResultID); 70 说明, 找出表面模型 71 72 ** FindUncalibDescriptorModel( Image: X; ModelID, DetectorParamName, DetectorParamValue, DescriptorParamName, DescriptorParamValue, MinScore, NumMatches, ScoreType, out HomMat2d, out Score); 73 说明, 找出无校准平面变形模型 74 75 ** GetFoundComponentModel( out FoundComponents: X; ComponentModelID, ModelStart, ModelEnd, RowComp, ColumnComp, AngleComp, ScoreComp, ModelComp, ModelMatch, MarkOrientation, out RowCompInst, out ColumnCompInst, out AngleCompInst, out ScoreCompInst); 76 说明, get_found_component_model,返回一个组件模型的一个创建例子的组件。 77 78 ** GetSurfaceMatchingResult( SurfaceMatchingResultID, ResultName, ResultIndex, out ResultValue); 79 说明, 获取表面匹配结果 80 81 ** MatchEssentialMatrixRansac( Image1: X; Image2: X; Rows1, Cols1, Rows2, Cols2, CamMat1, CamMat2, GrayMatchMethod, MaskSize, RowMove, ColMove, RowTolerance, ColTolerance, Rotation, MatchThreshold, EstimationMethod, DistanceThreshold, RandSeed, out EMatrix, out CovEMat, out Error, out Points1, out Points2); 82 说明, 按RANSA算法匹配矩阵 83 84 ** MatchFourierCoeff( RealCoef1, ImaginaryCoef1, RealCoef2, ImaginaryCoef2, MaxCoef, Damping, out Distance); 85 说明, match_fourier_coeff,两个元组的相似性。 86 87 ** MatchFunct1DTrans( Function1, Function2, Border, Params, UseParams, out Params, out ChiSquare, out Covar); 88 说明, match_funct_1d_trans,计算两个函数传递参数。 89 90 ** MatchFundamentalMatrixDistortionRansac( Image1: X; Image2: X; Rows1, Cols1, Rows2, Cols2, GrayMatchMethod, MaskSize, RowMove, ColMove, RowTolerance, ColTolerance, Rotation, MatchThreshold, EstimationMethod, DistanceThreshold, RandSeed, out FMatrix, out Kappa, out Error, out Points1, out Points2); 91 说明, 按RANSA算法匹配矩阵,有失真度参数 92 93 ** MatchFundamentalMatrixRansac( Image1: X; Image2: X; Rows1, Cols1, Rows2, Cols2, GrayMatchMethod, MaskSize, RowMove, ColMove, RowTolerance, ColTolerance, Rotation, MatchThreshold, EstimationMethod, DistanceThreshold, RandSeed, out FMatrix, out CovFMat, out Error, out Points1, out Points2); 94 说明, 按RANSA算法匹配矩阵,基本匹配 95 96 ** MatchRelPoseRansac( Image1: X; Image2: X; Rows1, Cols1, Rows2, Cols2, CamPar1, CamPar2, GrayMatchMethod, MaskSize, RowMove, ColMove, RowTolerance, ColTolerance, Rotation, MatchThreshold, EstimationMethod, DistanceThreshold, RandSeed, out RelPose, out CovRelPose, out Error, out Points1, out Points2); 97 说明, 按RANSA算法匹配相对位置 98 99 ** ProjMatchPointsDistortionRansac( Image1: X; Image2: X; Rows1, Cols1, Rows2, Cols2, GrayMatchMethod, MaskSize, RowMove, ColMove, RowTolerance, ColTolerance, Rotation, MatchThreshold, EstimationMethod, DistanceThreshold, RandSeed, out HomMat2d, out Kappa, out Error, out Points1, out Points2); 100 说明, Ransac算法节点投影失真计算 101 102 ** ProjMatchPointsDistortionRansacGuided( Image1: X; Image2: X; Rows1, Cols1, Rows2, Cols2, GrayMatchMethod, MaskSize, HomMat2dGuide, KappaGuide, DistanceTolerance, MatchThreshold, EstimationMethod, DistanceThreshold, RandSeed, out HomMat2d, out Kappa, out Error, out Points1, out Points2); 103 说明, Ransac引导算法节点投影失真计算 104 105 ** ProjMatchPointsRansac( Image1: X; Image2: X; Rows1, Cols1, Rows2, Cols2, GrayMatchMethod, MaskSize, RowMove, ColMove, RowTolerance, ColTolerance, Rotation, MatchThreshold, EstimationMethod, DistanceThreshold, RandSeed, out HomMat2d, out Points1, out Points2); 106 说明, Ransac算法,投影节点匹配 107 108 ** ProjMatchPointsRansacGuided( Image1: X; Image2: X; Rows1, Cols1, Rows2, Cols2, GrayMatchMethod, MaskSize, HomMat2dGuide, DistanceTolerance, MatchThreshold, EstimationMethod, DistanceThreshold, RandSeed, out HomMat2d, out Points1, out Points2); 109 说明, Ransac引导算法,投影节点匹配 110 111 ** RefineSurfaceModelPose( SurfaceModelID, ObjectModel3D, InitialPose, MinScore, ReturnResultHandle, GenParamName, GenParamValue, out Pose, out Score, out SurfaceMatchingResultID); 112 说明, 细化表面模型 113 114 ** SelectMatchingLines( RegionIn: X; out RegionLines: X; AngleIn, DistIn, LineWidth, Thresh, out AngleOut, out DistOut); 115 说明, select_matching_lines,选取HNF中线的集合中匹配区域最好的线。 116 117 ** TupleRegexpMatch( Data, Expression, out Matches); 118 说明, tuple_regexp_match,利用公式提取子链。 119 120 ** TupleRegexpTest( Data, Expression, out NumMatches); 121 说明, tuple_regexp_test,测试一个字符串是否满足一个规则公式的要求。
时间: 2024-10-12 16:32:36