创建组件模板
LIntExport void CreateComponentModel(
const HObject& ModelImage,
const HObject& ComponentRegions,
const HTuple& VariationRow,
const HTuple& VariationColumn,
const HTuple& VariationAngle,
const HTuple& AngleStart,
const HTuple& AngleExtent,
const HTuple& ContrastLowComp,
const HTuple& ContrastHighComp,
const HTuple& MinSizeComp,
const HTuple& MinContrastComp,
const HTuple& MinScoreComp,
const HTuple& NumLevelsComp,
const HTuple& AngleStepComp,
const HTuple& OptimizationComp,
const HTuple& MetricComp,
const HTuple& PregenerationComp,
HTuple* ComponentModelID,
HTuple* RootRanking);
//参数1:模板图片
//参数2:输入区域
//参数3:输入垂直方向组件模型变化,参考值>=0,参考值0,1,2,3,4,5,10,20,30,40,50,100,150,
//参数4:输入水平方向组件模型变化,参考值>=0,参考值0,1,2,3,4,5,10,20,30,40,50,100,150,
//参数5:输入按某一角度组件模型变化,参考值>=0,参考值,0.0,0.017,0.035,0.05,0.07,0.09,0.17,0.35,0.52,0.67,0.87
//参数6:匹配时起始角度
//参数7:匹配时角度范围
//参数8:输入差别下限值
//参数9:输入差别上限值
//参数10:模板轮廓区域的最小尺寸
//参数11:金字塔层数
//参数12:输入匹配旋转角度
//参数13:模板优化/模板创建方法,默认"auto"
//参数14:模板匹配的方法,默认"use_polarity"
//参数15:是否重新生成组件,默认"false",参考值"false","true"
//参数16:输出模板ID
//参数17:输出组件模式排名
//参数13的参考值
//"auto"
//"none"
//"point_reduction_low",减少点数
//"point_reduction_medium",减少点数
//"point_reduction_high",减少点数
//参数14参考值
//"use_polarity",使用极性
//"ignore_global_polarity",忽略全局极性
//"ignore_local_polarity",忽略局部极性
//"ignore_color_polarity",忽略颜色极性
查找组件模板匹配
LIntExport void FindComponentModel(
const HObject& Image,
const HTuple& ComponentModelID,
const HTuple& RootComponent,
const HTuple& AngleStartRoot,
const HTuple& AngleExtentRoot,
const HTuple& MinScore,
const HTuple& NumMatches,
const HTuple& MaxOverlap,
const HTuple& IfRootNotFound,
const HTuple& IfComponentNotFound,
const HTuple& PosePrediction,
const HTuple& MinScoreComp,
const HTuple& SubPixelComp,
const HTuple& NumLevelsComp,
const HTuple& GreedinessComp,
HTuple* ModelStart,
HTuple* ModelEnd,
HTuple* Score,
HTuple* RowComp,
HTuple* ColumnComp,
HTuple* AngleComp,
HTuple* ScoreComp,
HTuple* ModelComp);
//参数1:输入图像
//参数2:模板ID
//参数3:根组件索引,参考值,0,1,2,3,4,5,6,7,8
//参数4:匹配时的起始角度
//参数5:匹配时的角度范围
//参数6:匹配时最小得分
//参数7:匹配时的最大数量,默认=1
//参数8:多个匹配结果的重叠系数,默认=0.5,值=0,不能重叠,值=1,所有匹配结果,参考值>=0 && <=1
//参数9:如果没有发现根组件,则执行,默认"stop_search"
//参数10:如果组件一个都未发现,则执行,默认"prune_branch"
//参数11:输入组件姿态,默认"none"
//参数12:与匹配模型最小匹配值,默认值0.5,参考值>=0 && <=1
//参数13:是否使用亚像素精度提取,默认值="least_squares"
//参数14:匹配时,搜索金字塔层数,默认值0,参考值0-10
//参数15:贪婪程度,默认0.9,参考值>=0 && <=1
//参数16:输出被发现的组件模型对应的组件起始索引
//参数17:输出被发现的组件模型对应的组件结束索引
//参数18:输出组件的得分(多个得分值)
//参数19:输出组件的Row
//参数20:输出组件的Column
//参数21:输出组件的角度
//参数22:输出组件的得分
//参数23:输出组件的索引
//参数9参考值
//"stop_search",停止搜索
//"select_new_root",//选择新目录
//参数10参考值
//"prune_branch",去除分支
//"search_from_upper",上层搜索
//"search_from_best",最大程度搜索
//参数11参考值
//"none",
//"from_neighbors",从邻近
//"from_all",从全部
//参数13参考值
//"least_squares"
//"none"
//"interpolation"
//"least_squares_high"
//"least_squares_very_high"
//"max_deformation 1"
//"max_deformation 2"
//"max_deformation 3"
//"max_deformation 4"
//"max_deformation 5"
//"max_deformation 6"
public static void FindComponentModel(
HObject image,
HTuple componentModelID,
HTuple rootComponent,
HTuple angleStartRoot,
HTuple angleExtentRoot,
HTuple minScore,
HTuple numMatches,
HTuple maxOverlap,
HTuple ifRootNotFound,
HTuple ifComponentNotFound,
HTuple posePrediction,
HTuple minScoreComp,
HTuple subPixelComp,
HTuple numLevelsComp,
HTuple greedinessComp,
out HTuple modelStart,
out HTuple modelEnd,
out HTuple score,
out HTuple rowComp,
out HTuple columnComp,
out HTuple angleComp,
out HTuple scoreComp,
out HTuple modelComp);