创建NCC模板
LIntExport void CreateNccModel(
const HObject& Template,
const HTuple& NumLevels,
const HTuple& AngleStart,
const HTuple& AngleExtent,
const HTuple& AngleStep,
const HTuple& Metric,
HTuple* ModelID);
//参数1:模板图像
//参数2:金字塔层数,默认"auto",参考值"auto",0-10,用于多尺度匹配,金字塔的层数越大,找到匹配使用的时间就越小
//参数3:匹配时起始角度
//参数4:匹配时角度范围
//参数5:匹配时旋转角度的步长,默认"auto",参考值>=0
//参数6:匹配方法,默认"use_polarity",参考值"use_polarity","ignore_global_polarity"
//参数7:输出模板ID
public static void CreateNccModel(
HObject template,
HTuple numLevels,
HTuple angleStart,
HTuple angleExtent,
HTuple angleStep,
HTuple metric,
out HTuple modelID);
查找NCC模板
LIntExport void FindNccModel(
const HObject& Image,
const HTuple& ModelID,
const HTuple& AngleStart,
const HTuple& AngleExtent,
const HTuple& MinScore,
const HTuple& NumMatches,
const HTuple& MaxOverlap,
const HTuple& SubPixel,
const HTuple& NumLevels,
HTuple* Row,
HTuple* Column,
HTuple* Angle,
HTuple* Score);
//参数1:输入图像
//参数2:模板ID
//参数3:匹配时的起始角度
//参数4:匹配时的角度范围
//参数5:匹配时最小得分,默认=0.5
//参数6:匹配时的最大数量,默认=1
//参数7:多个匹配结果的重叠系数,默认=0.5,值=0,不能重叠,值=1,所有匹配结果,参考值>=0 && <=1
//参数8:是否使用亚像素精度提取,默认值="false",参考值"false","true"
//参数9:匹配时,搜索金字塔层数,默认值0,参考值0-10
//参数10:贪婪程度,默认0.9,参考值>=0 && <=1
//参数11:输出轮廓中心(Row)
//参数12:输出轮廓中心(Column)
//参数13:输出轮廓角度
//参数14:输出轮廓得分
public static void FindNccModel(
HObject image,
HTuple modelID,
HTuple angleStart,
HTuple angleExtent,
HTuple minScore,
HTuple numMatches,
HTuple maxOverlap,
HTuple subPixel,
HTuple numLevels,
out HTuple row,
out HTuple column,
out HTuple angle,
out HTuple score);
读取NCC模板
LIntExport void ReadNccModel(
const HTuple& FileName,
HTuple* ModelID);
//参数1:模板文件
//参数2:输出模板ID
public static void ReadNccModel(
HTuple fileName,
out HTuple modelID)
写NCC模板
LIntExport void WriteNccModel(
const HTuple& ModelID,
const HTuple& FileName);
//参数1:模板ID
//参数2:模板文件
public static void WriteNccModel(
HTuple modelID,
HTuple fileName);
用于NCC匹配,归一化,快速匹配
不支持大小缩放匹配