Category Archives: Code

A tool for labelling the pose of objects in 3D monocular videos

labellerpicAs a part of my project on monocular 3D model-based tracking, I created a GUI tool for labelling poses in video sequences. The tool will interpolate between labelled frames, reducing the work required by the user in labelling the frames.

The idea is to use this labelled data with image-space error measures, since the eye of the labeller will almost certainly not distinguish the depths of objects with any degree of certainty. This is okay because in the first instance we are interested in human-level performance. This idea is discussed further in sections 3.7 and 7.2 of my thesis.

The labelling tool can be found here:

If you make use of this software, please cite our paper:

Duff, D. J., Mörwald, T., Stolkin, R., & Wyatt, J. (2011). Physical simulation for monocular 3D model based tracking. In Proceedings of the IEEE International Conference on Robotics and Automation. Presented at the ICRA, Shanghai, China: IEEE. doi:doi:10.1109/ICRA.2011.5980535 – Preprint available at

CCalc/SWI Prolog/Point Cloud Library — external predicate example

While I was preparing a guest lecture, I created the following example of a SWI Prolog external predicate interfacing into the Point Cloud Library (PCL). A CCalc (action language interpreter built with SWI Prolog) example is provided also. The readme should do the explaining.

The toy example given is multi-robot path planning with obstacles obtained by finding the ground plane and then counting points above the plane (the example uses cropped Kinect data from one of the PCL sample files).

Python interface to CCalc

As a part of my work I have created and am using a Python interface to CCalc, an interpreter for a portion of the C+ action language. The Python interface communicates with the program via pexpect. It may be of use to someone.

The latest version is here:

If you use it in academic work, please cite the following work:

Duff, D.J., Erdem, E., Patoğlu, V. (2013). Integration of 3D Object Recognition and Planning for Robotic Manipulation: A Preliminary Report. Knowledge Representation and Reasoning in Robotics Workshop at ICLP 2013, Istanbul, Turkey. Available at

Simple Python Colour Tracker

A couple of months ago I spent a couple of days and whipped up this exceedingly simple Python colour blob tracker for a project of a friend. It is very simple but it should get the job done for applications that only need to track the image position of some simple coloured objects. Unlike much of my code, it is self-contained and I have made it to be easily usable and so it may be of use to someone.

It can be used standalone or from your python script and instructions are given on the repository landing page. You set it to learn a nearest-neighbour pixel colour classifier (where the exemplars are found by k-NN clustering) which it will then use to track image blobs (using a rather adhoc but computationally efficient method).

The code can be found here: