拾叁[13],NCC模板匹配,函数CreateNccModel/FindNccModel/ReadNccModel/WriteNccModel

2023-12-18 17:23:23

函数CreateNccModel

函数功能

创建NCC模板

C++形式

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

C#形式

public static void CreateNccModel(
HObject template, 
HTuple numLevels, 
HTuple angleStart, 
HTuple angleExtent, 
HTuple angleStep, 
HTuple metric, 
out HTuple modelID);

函数FindNccModel

函数功能

查找NCC模板

C++形式

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:输出轮廓得分

C#形式

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);

?函数ReadNccModel

函数功能

读取NCC模板

C++形式

LIntExport void ReadNccModel(
const HTuple& FileName, 
HTuple* ModelID);

//参数1:模板文件
//参数2:输出模板ID

C#形式

public static void ReadNccModel(
HTuple fileName, 
out HTuple modelID)

?函数WriteNccModel

函数功能

写NCC模板

C++形式

LIntExport void WriteNccModel(
const HTuple& ModelID, 
const HTuple& FileName);

//参数1:模板ID
//参数2:模板文件

C#形式

public static void WriteNccModel(
HTuple modelID, 
HTuple fileName);

附注

用于NCC匹配,归一化,快速匹配

不支持大小缩放匹配

文章来源:https://blog.csdn.net/FairyTailQ/article/details/135064709
本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。