Many augmented reality applications are based on the detection and reconstruction of the orientation and position of some markers.
First step is the detection of black-on-white squares in an image. We implemented (just for fun) such an algorithm. This algorithm is based on an article by Martin Hirzer in 2008. The marker detection is edge based, and therefore pretty stable under changing or not homogeneous lightning conditions. Also notice the correctly detected marker at the bottom of the image, although one edge is partially occluded by a pencil.
In the first image you can see three (correctly) detected markers. In the second image step 3 of the algorithm is shown: the detection of line segments in de image.
Please check out our blog post. Here you can find a full explanation of the algorithm used, some more images and a video of the marker detection in action: