本文介绍了OpenCV IOS实时模板匹配的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想创建一个应用程序(在iPhone上)执行此操作:

I'd like to create an app (on iPhone) which does this:

我有一个模板图像(徽标或任何对象)我想喜欢在相机视图中找到并在找到它的地方放置一个图层并跟踪它!

I have a template image (a logo or any object) and I'd like to find that in camera view and put a layer on the place of where it is found and tracking it!

这是一个带OpenCV的无标记AR!

It is a markless AR with OpenCV!

我阅读了一些文档和书籍以及Q&在这里,但遗憾的是

I read some docs and books and Q&A-s here, but sadly

实际上我想创造一些东西或某事。

actually i'd like to create something like this or something like this.

如果有人可以向我发送一些源代码或一个非常有用的教程(一步一步),我真的很开心!!!

If anyone can send to me some source code or a really useful tutorial (step by step) i'd really be happy!!!

谢谢!

推荐答案

实现这一点并不简单 - 它涉及增强现实与模板匹配相结合和3D渲染。

Implementing this is not trivial - it involves Augmented Reality combined with template matching and 3D rendering.

粗略轮廓:


  1. 使用某种稳定的特征提取以从输入视频流获得特征。 (例如,参见)。

  2. 结合这些功能和反投影来估计相机参数和姿势。 (有关讨论,请参阅,但请注意,这些通常需要校准模式等作为棋盘格。)

  3. 使用模板匹配扫描图像以查找目标图像的色块,然后使用要素和相机参数来确定对象的姿势。

  4. 向前应用相机和对象变换并将替换图像渲染到场景中。

  1. Use some sort of stable feature extraction to obtain features from the input video stream. (eg. see FAST in OpenCV).
  2. Combine these features and back-project to estimate the camera parameters and pose. (See Camera Calibration for a discussion, but note that these usually require calibration pattern such as a checkerboard.)
  3. Use template matching to scan the image for patches of your target image, then use the features and camera parameters to determine the pose of the object.
  4. Apply the camera and object transforms forward and render the replacement image into the scene.

实现所有这些将需要很多研究和辛勤工作!

Implementing all this will require much research and hard work!

网上有一些你可能会觉得有用的文章:

There are a few articles on the web you might find useful:





  • Simple Augmented Reality for OpenCV
  • A minimal library for Augmented Reality
  • AR with NyartToolkit

您可能想研究一些可用的AR库和框架。维基百科有一个很好的清单:

You might like to investigate some of the AR libraries and frameworks available. Wikipedia has a good list:



  • AR Software

值得注意的是高通公司的工具包,它不是FLOSS,但看起来非常强大。

Notable is Qualcomm's toolkit, which is not FLOSS but appears highly capable.

这篇关于OpenCV IOS实时模板匹配的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

08-22 16:11