根据图像的轮廓模板标定来进行图像匹配查找检测有无是视觉检测中最为常见的需求之一,
1.进行示例图的局部位置进行轮廓标定生成。
2.设置查找区域,加快查找效率,以及设置一些其他运行参数。
3.进行多图查找试运行。
创建模板
public int Creattemplate()
{
if (templateRegion != null)
{
if (Regionmask != null)
{
HOperatorSet.Difference(templateRegion, Regionmask, out templateRegion);
}
HOperatorSet.ReduceDomain(template, templateRegion, out reducedImage);
}
HTuple areatmp, rowtmp, coltmp;
HOperatorSet.AreaCente