函数CreateLocalDeformableModel
函数功能
创建局部的可变形匹配模板
C++模式
LIntExport void CreateLocalDeformableModel(
const HObject& Template,
const HTuple& NumLevels,
const HTuple& AngleStart,
const HTuple& AngleExtent,
const HTuple& AngleStep,
const HTuple& ScaleRMin,
const HTuple& ScaleRMax,
const HTuple& ScaleRStep,
const HTuple& ScaleCMin,
const HTuple& ScaleCMax,
const HTuple& ScaleCStep,
const HTuple& Optimization,
const HTuple& Metric,
const HTuple& Contrast,
const HTuple& MinContrast,
const HTuple& GenParamName,
const HTuple& GenParamValue,
HTuple* ModelID);
//参数1:模板图像
//参数2:金字塔层数,默认"auto"
//参数3:匹配时起始角度
//参数4:匹配时角度范围
//参数5:匹配时旋转角度的步长,默认"auto",参考值>=0
//参数6:Row方向最小缩放比列
//参数7:Row方向最大缩放比列
//参数8:Row方向缩放比列步长
//参数9:Column方向最小缩放比列
//参数10:Column方向最大缩放比列
//参数11:Column方向缩放比列步长
//参数12:模板优化/模板创建方法,默认"auto"
//参数13:模板匹配的方法,默认"use_polarity"
//参数14:对比度增强系数
//参数15:最小对比度阈值,默认"auto",参考值 < 参数8的值
//参数16:输入一般参数名称,默认"",参考值"","part_size"
//参数17:输入一般参数名称,默认"",参考值"","small","medium","big"
//参数18:输出的模板ID
//参数12的参考值
//"auto"
//"none"
//"point_reduction_low",减少点数
//"point_reduction_medium",减少点数
//"point_reduction_high",减少点数
//"pregenneration",预先存储到内存,会快
//"no_pregenneration",预先存储到内存,会慢
//参数13参考值
//"use_polarity",使用极性
//"ignore_global_polarity",忽略全局极性
//"ignore_local_polarity",忽略局部极性
//"ignore_color_polarity",忽略颜色极性
C#模式
public static void CreateLocalDeformableModel(
HObject template,
HTuple numLevels,
HTuple angleStart,
HTuple angleExtent,
HTuple angleStep,
HTuple scaleRMin,
HTuple scaleRMax,
HTuple scaleRStep,
HTuple scaleCMin,
HTuple scaleCMax,
HTuple scaleCStep,
HTuple optimization,
HTuple metric,
HTuple contrast,
HTuple minContrast,
HTuple genParamName,
HTuple genParamValue, out HTuple modelID)
函数FindLocalDeformableModel
函数功能
找出图像中一个局部可变形模板的最佳匹配
C++模式
LIntExport void FindLocalDeformableModel(
const HObject& Image,
HObject* ImageRectified,
HObject* VectorField,
HObject* DeformedContours,
const HTuple& ModelID,
const HTuple& AngleStart,
const HTuple& AngleExtent,
const HTuple& ScaleRMin,
const HTuple& ScaleRMax,
const HTuple& ScaleCMin,
const HTuple& ScaleCMax,
const HTuple& MinScore,
const HTuple& NumMatches,
const HTuple& MaxOverlap,
const HTuple& NumLevels,
const HTuple& Greediness,
const HTuple& ResultType,
const HTuple& GenParamName,
const HTuple& GenParamValue,
HTuple* Score,
HTuple* Row,
HTuple* Column);
//参数1:输入图像
//参数2:输出匹配图像结果
//参数3:输出句柄变形模型的矢量
//参数4:输出被模型发现的等高线
//参数5:模板ID
//参数6:匹配时的起始角度
//参数7:匹配时的角度范围
//参数8:Row方向最小缩放比例
//参数9:Row方向最大缩放比例
//参数10:Column方向最小缩放比例
//参数11:Column方向最大缩放比例
//参数12:匹配时最小得分,默认=0.5
//参数13:匹配时的最大数量,默认=1
//参数14:多个匹配结果的重叠系数,默认=0.5,值=0,不能重叠,值=1,所有匹配结果,参考值>=0 && <=1
//参数15:匹配时,搜索金字塔层数,默认值0,参考值0-10
//参数16:贪婪程度,默认0.9,参考值>=0 && <=1
//参数17:结果类型
//参数18:输入参数名称
//参数19:输入参数值
//参数20:输出得分
//参数21:输出匹配轮廓的Row
//参数22:输出匹配轮廓的Column
//参数17参考值
//""
//"image_rectified",图像校正
//"deformed_contours",变形轮廓
//"vector_field",向量场
参数18参考值
//""
//"subpixel",亚像素
//"angle_step",角度步长
//"scale_r_step",Row方向比例步长
//"scale_c_step",Column方向比例步长
//"deformation_smoothness",畸形平滑度
//"expander_border",边沿扩大
//"expander_border_top",上边沿扩大
//"expander_border_bottom",下边沿扩大
//"expander_border_left",左边沿扩大
//"expander_border_right",右边沿扩大
参数15参考值
//""
//"none"
//"least_squares"
//"least_squares_high"
//"least_squares_very_high"
C#模式
public static void FindLocalDeformableModel(
HObject image,
out HObject imageRectified,
out HObject vectorField,
out HObject deformedContours,
HTuple modelID,
HTuple angleStart,
HTuple angleExtent,
HTuple scaleRMin,
HTuple scaleRMax,
HTuple scaleCMin,
HTuple scaleCMax,
HTuple minScore,
HTuple numMatches,
HTuple maxOverlap,
HTuple numLevels,
HTuple greediness,
HTuple resultType,
HTuple genParamName,
HTuple genParamValue,
out HTuple score,
out HTuple row,
out HTuple column);
附注:
匹配模板时,可以匹配图像上具有局部变形的模板