Detect marker with opencv and python


I am trying to detect a marker in a webcam video feed and overlay it with a 3d object - pretty much exactly like this:

I know artoolkit is the best module for this, but I was hoping to just use opencv in python since I dont know nearly enough c/c++ to be able to use artoolkit. I am hoping someone will be able to get me on the right track towards detecting the marker and determining its location and orientation etc since I have no idea how best to go about this or what functions I should be using.

10/27/2013 2:38:19 PM

OpenCV doesn't have marker detection / tracking functionality out of box. However it provides all algorithms needed so it's fairly easy to implement your own one. The article you are referring to uses OpenCV only for video grabbing. The marker detection is done by NyARToolkit which is derived from ARToolkit. NyARToolkit have 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. e.g

The introductory documentation can help you understand the process of marker detection even if you decide not to use ARToolkit.

5/1/2010 3:16:54 AM

Licensed under: CC-BY-SA with attribution
Not affiliated with: Stack Overflow