Token detection with opencv and python
I'm trying to detect a marker in a webcam video and overlay it onto a 3D object - something like this: http://www.morethantechnical.com/2009/06/28/augmented-reality-with-nyartoolkit-opencv-opengl/
I know artoolkit is the best module for this, but I was hoping to just use opencv in python as I don't know almost enough c / C ++ to be able to use artoolkit. I hope someone can get me on the right track of detecting the marker and determining its location and orientation, etc., since I have no idea how best to do this or what features I should use.
source to share
OpenCV has no marker detection / tracking functionality. However, it provides all the required algorithms, so it is quite easy to implement your own. The article you mean uses OpenCV for video capture only. The marker definition is done by the NyARToolkit, which is derived from the ARToolkit. NyARToolkit has versions for Java, C # and ActionScript.
ARToolkit is mostly written in plain C without using fancy C ++ features. It's probably easier to use than you thought. The documentation contains well explained tutorials. for example http://www.hitl.washington.edu/artoolkit/documentation/devstartup.htm
The introductory documentation can help you understand the marker detection process, even if you choose not to use ARToolkit.
source to share
I think the most used way to detect markers using python and open CV is by using SURF descriptors. I found this video and the associated code very helpful which you can find in this page . You can download the code here . I don't know how to overlay it on a 3D object, but I'm pretty sure you can do something with pygame or matplotlib.
source to share