如果您使用 EmguCV,SURF 特征示例(StopSign 检测器)将是一个很好的起点。另一种(可能是互补的)方法是使用 MatchTemplate(..) 方法。
然而,我发现的示例和教程似乎专门处理图像检测而不是分类。我不需要在更大的图像中找到图像的实例,只需确定图像中的符号类型。
通过在图像中查找符号的实例,您实际上是在对其进行分类。不知道为什么你认为这不是你需要的。
Image<Gray, float> imgMatch = imgSource.MatchTemplate(imgTemplate, Emgu.CV.CvEnum.TM_TYPE.CV_TM_CCOEFF_NORMED);
double[] min, max;
Point[] pointMin, pointMax;
imgMatch.MinMax(out min, out max, out pointMin, out pointMax);
//max[0] is the score
if (max[0] >= (double) myThreshold)
{
Rectangle rect = new Rectangle(pointMax[0], new Size(imgTemplate.Width, imgTemplate.Height));
imgSource.Draw(rect, new Bgr(Color.Aquamarine), 1);
}
那个 max[0] 给出了最佳匹配的分数。