libkoki is an open source C computer vision library for finding and estimating the position of libkoki markers in an image. Unlike ARToolkit-based fiducial marker systems (and similar) that find the best match from a list of known markers, libkoki markers use a code grid that contains both error detection and correction. ARToolkit has problems with false positives, whereby markers are seen even when they are not present. libkoki’s error detection and correction significantly improves on this.

libkoki was initially developed for use by Student Robotics, who run an anual autonomous robotics competition for 16-18 year olds around Europe. The competition arena has numerous markers around it, identifying boundaries and items of interest, and the robots use the information from libkoki to plan their movements.


  • 200+ unique codes available for use
  • world position estimation, given a marker of known size
  • Operates on OpenCV’s IplImage, a common format
  • V4L2 helper functions for streaming from webcams
  • Error correction using Hamming(7,4) codes, and error detection using CRC12
  • Operates on a frame-by-frame basis, so both video and still images can be used
  • Python bindings


libkoki, the C library:


pykoki, the ctypes-based Python bindings for libkoki:


kokimarker, the Python library for generating libkoki markers:


You can download the above by cloning the URIs above, e.g. git clone git:// Note that Git will be required to do so.

Until this page is expanded, feel free to contact me if you need any help.


The Student Robotics 2012 Final: