Friday, June 19, 2009

2D Barcodes

A robot must be able to correctly identify objects to complete many day to day household tasks such as beverage retrieval. These tasks can be made easier by using 2D bar codes to identify objects at a lower cost than RFID tagging.

Zebra Crossing is a "Multi-format 1D/2D barcode image processing library with clients for Android, Java, and iPhone"

The Zebra Crossing online decoder tool can decode the above image correctly.

However, it has some problems decoding real world images.

Even when they are cropped.

This decodes correctly, so it looks like the problem is once again non-euclidean geometry.

After adjusting the perspective manually with GIMP the image is finally decoded and recognized.

Based on the papers on IEEE Xplore it looks like there are a few solutions for inverse perspective mapping to compensate for distortions caused by projective geometry.

The paper "A General Scheme for Extracting QR Code from a non-uniform background in Camera Phones and Applications" by Yu-Hsuan Chang, Chung-Hua Chu and Ming-Syan Chen, looks like a good approach for these problems.

A different approach is used by Aldebaran Robotics' Nao which uses a 2D polar barcode similar to ShotCode. This was probably chosen for easy recognition and robustness. Unfortunately during the demo I saw, Nao had trouble recognizing the images reliably. This was likely due to the same problems discussed above. The main advantage would be that this type of bar code most likely requires a lower camera resolution than a QR Code would.

No comments: