Pi-Tag Fiducial Marker Detector

Recently, I’ve been looking at various fiducial markers for computer vision applications. While some of these markers, such as AprilTags, have readily available reference implementations, others have no published code. While one of the markers I was looking at, Pi-Tags, does not have a reference implementation, it does have a third party implementation in the form of a Robot Operating System (ROS) module, cob_fiducials; this is great for robotics applications using ROS, but problematic otherwise. Since I wasn’t interested in using the detector with ROS, I separated it out into a standalone library. Additionally, I modified the detector to add a function that just returns the image pixel coordinates of the detected markers instead of calculating their poses, and added the ellipse refinement step1 that was mentioned in the Pi-Tag paper.2

Detected Pi-Tag


  1. Ouellet, Jean-Nicolas, and Patrick Hébert. “Precise ellipse estimation without contour point extraction.” Machine Vision and Applications 21, no. 1 (2009): 59.  

  2. Bergamasco, Filippo, Andrea Albarelli, and Andrea Torsello. “Pi-tag: a fast image-space marker design based on projective invariants.” Machine vision and applications 24, no. 6 (2013): 1295-1310.  

This entry was posted in and tagged , , , . Bookmark the permalink.

6 Responses to Pi-Tag Fiducial Marker Detector

  1. Ha says:

    Hi,
    Your blog is awesome. I am having a project that uses Pi-tag for camera pose estimation. I clone the your GitHub respository and try to use cmake to run the source code, but it’s not possible. Can you tell me how to run the software?
    Thank you very much.

    • Matthew Petroff says:

      Is there an error? cmake builds the program but does not run it. I would highly recommend doing this on Linux, and you need to make sure the dependencies listed in the readme are installed. Details for using the test program are also included in the readme.

      • Manh-Ha Hoang says:

        I found the problem. It is the pointer shared_ptr. I need add SET(CMAKE_CXX_FLAGS "-std=c++0x") in cmake in order to run the code. The test program is ./pitag-test modelfile imagefile. I know the image file is tag images, but how about the format of modelfile? Is it .xml file?. Can you upload the file sample?
        Thank you :)

        • Matthew Petroff says:

          The markers/tag0.xml file in the repository is an example model file. Any of the other model files from cobs_fiducials work as well.

  2. Bulduk says:

    Hi, thank you very much for this Information.

    I use this Tags for my bachelor thesis. There I have to use greater Marker. Therefore I have to modify the params to detect this greater pi-Tags. But the algorithm still not detects the greater Marker.
    What would be your advice?

    Thank you

Leave a Reply to Matthew Petroff Cancel reply

Your email address will not be published. Required fields are marked *