【发布时间】:2016-07-06 14:43:10
【问题描述】:
我需要在图像上查找对象,因此我尝试使用 AForge 库来完成。我从非常简单的图案和图片开始,但识别精度已经很糟糕了。我正在使用 ExhaustiveTemplateMatching:
ExhaustiveTemplateMatching tm = new ExhaustiveTemplateMatching(0);
Bitmap img = new Bitmap("C:/img.bmp");
Bitmap pat = new Bitmap("C:/pat.bmp");
TemplateMatch[] matchings = tm.ProcessImage(img, pat);
Debug.WriteLine("Similar: " + matchings[0].Similarity);
这是我的模式:
那是我的图像(它只是旋转的图案)。它只有 0,7400396 相似度:
这实际上等于图案与黑色方块的相似度 (0,7373355):
我做错了什么,准确度如此之低?我该如何改进它?
【问题讨论】:
-
尝试在构造函数中更改 ExhaustiveTemplate 匹配器的阈值,请参阅-aforgenet.com/framework/docs/html/… ExhaustiveTemplateMatching tm = new ExhaustiveTemplateMatching(0.9f);
-
它如何帮助更好地识别模式?该参数是关于不将低相似度对象写入匹配数组。
-
你是怎么解决你的问题的?
标签: c# image-processing computer-vision pattern-matching aforge