使用 openCV 进行自然特征跟踪 - 评估选项

发布于 2024-11-06 21:05:56 字数 365 浏览 5 评论 0原文

简而言之,使用 OpenCv 在网络摄像头源中实现特定图像(照片/图形/徽标)跟踪的可用选项有哪些?特别是,我正在尝试整理有关以下内容的意见:

  1. HaarTraining 是否会过度杀伤力(考虑到它不是 3D 对象而只是要跟踪的图像)还是唯一的出路?

  2. 已尝试过模板匹配、基于颜色的检测,但这些根本无法在不同的照明/比例/方向下提供可靠的跟踪。

  3. SIFT、SURF 特征匹配在视频中的工作是否与静态图像一样可靠 比较?

我是 OpenCV 的相对初学者,从我之前对 SO 的询问(非常有用的回复)可以看出。对于使用 OpenCV 开始 NFT 实施,有什么线索或链接可以提供良好的资源吗?

In brief, what are the available options for implementing the Tracking of a particular Image(A photo/graphic/logo) in webcam feed using OpenCv?In particular i am trying to collate opinion about the following:

  1. Would HaarTraining be overkill(considering that it is not 3d objects but simply Images to be tracked) or is it the only way out?

  2. Have tried Template Matching, Color-based detection but these don't offer reliable tracking under varying illumination/Scale/Orientation at all.

  3. Would SIFT,SURF feature matching work as reliably in video as with static image
    comparison?

Am a relative beginner to OpenCV , as is evident by my previous queries on SO (very helpful replies). Any cues or links to what could be good resources for beginning NFT implementation with OpenCV?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

他是夢罘是命 2024-11-13 21:05:56

您能多谈谈您的要求吗?即,您期望什么类型的外观变化/您对环境有多少控制权。在速度/功率/资源占用方面您有什么类型的限制?

如果没有这些,我只能对你所说的3条路径进行一些一般性的评估。

1.
Haar 会工作得又好又快,特别是在识别方面。

请注意,Haar 不适用于 3D,除非您使用完整的模板进行训练以涵盖各种视角。 Haar 级联的典型应用是 Viola Jones 的人脸检测系统,该系统主要针对正面人脸(当然可以进行许多其他方面的训练)

有关使用 OpenCV 进行 Haar 训练的教程,请参阅 此处

2.
尝试使用 NCC 或更好的 Lucas Kanade 跟踪(cvCalcOpticalFlowPyrLK,它是一个从粗到细的 LK 中的金字塔 - 4 级金字塔通常效果很好)作为模板。通常最多可缩放 10% 或旋转 10 度,无需更改模板。除此之外,您还可以拥有自动演变的模板,这些模板会随着时间的推移而变化。

有关快速光流/跟踪教程,请参阅

3.
SIFT/SURF 确实效果很好。我建议采取一些额外的几何验证步骤来消除虚假匹配。

我有点担心所涉及的计算时间。如果没有显着的照明/缩放/平面内旋转,那么 SIFT 可能是多余的。如果您确实需要它,请查看 Changchang Wu 出色的 SIFTGPU 实现。注意:第三方,不是 OpenCV。

Can you talk a bit more about your requirements? Namely, what type of appearance variations do you expect/how much control you have over the environment. What type of constraints do you have in terms of speed/power/resource footprint?

Without those, I can only give some general assessment to the 3 paths you are talking about.

1.
Haar would work well and fast, particularly for instance recognition.

Note that Haar doesn't work all that well for 3D unless you train with a full spectrum of templates to cover various perspectives. The poster child application of Haar cascades is Viola Jones' face detection system which is largely geared towards frontal faces (can certainly be trained for many other things)

For a tutorial on doing Haar training using OpenCV, see here.

2.
Try NCC or better yet, Lucas Kanade tracking (cvCalcOpticalFlowPyrLK which is a pyramidal as in coarse-to-fine LK - a 4 level pyramid usually works well) for a template. Usually good upto 10% scale or 10 degrees rotation without template changes. Beyond that, you can have automatically evolving templates which can drift over time.

For a quick Optical Flow/tracking tutorial, see this.

3.
SIFT/SURF would indeed work very well. I'd suggest some additional geometric verification step to remove spurious matches.

I'd be a bit concerned about the amount of computational time involved. If there isn't significant illumination/scale/in-plane rotation, then SIFT is probably overkill. If you truly need it, check out Changchang Wu's excellent SIFTGPU implmentation. Note: 3rd party, not OpenCV.

‖放下 2024-11-13 21:05:56

看来,除非是一个业余爱好项目,否则单独应用这些方法都无法带来可靠的结果。也许某些自适应算法或多或少可以接受。例如,请参阅一个著名的开源项目,他们在其中使用机器学习。

It seems that none of the methods when applied alone could bring reliable results unless it is a hobby project. Probably some adaptive algorithm would be more or less acceptable. For example see a famous opensource project where they use machine learning.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文