OpenCV IOS real-time template matching

佐手、 提交于 2019-12-18 03:48:09

问题


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!

It is a markless AR with OpenCV!

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!!!

Thank you!


回答1:


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

A rough outline:

  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

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

  • AR Software

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



来源:https://stackoverflow.com/questions/10583062/opencv-ios-real-time-template-matching

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!