Barcodes as URLs

Kevin Chiu
Columbia University
New York, NY


This program recognizes barcodes that contain URLs and launches the iPhone's browser with any URL that is detected.

System requirements

Installation instructions

Installation Preparation

  1. On your jailbroken iPhone, use the Installer application to install the BSD subsystem and SSH Server.

Application installation

  1. Go to Home Screen > Settings > Wifi and connect to a Wifi access point.
  2. Press the right arrow next to the access point you are connected to. Record the IP address of your phone.
  3. Connect to the same access point using a computer.
  4. cd to the directory with the application.
  5. Issue the following command where IP is the phone's IP address you recorder earlier.
    scp -r root@IP:/Applications
    Your password is most likely "alpine" without the quotes. Alternatively, you can use the SFTP program of your choice to do this transfer.
  6. Reboot the phone.


To launch the app, touch it from the home screen. To recognize a barcode, position the barcode into the field of view of the camera, and press the screen. The screen will freeze while the application is recognizing the barcode. If the recognition succeeds, Safari will launch the URL in the barcode. If the recognition fails, the camera preview will be unfrozen and you will be able to try the recognition again.

Program internal operation

Internally, the application uses the iPhone's camera to take a picture. The picture is then sent to a recognizer where it is decoded, if possible. When the picture is decoded, the decoded URL is passed to Safari, the phone's internal browser.

Things that do not work

The application has a very high failure rate under real world conditions. Also, it only works with URLs. Recognizing any other piece of encoded data may have unexpected results.

Useful enhancements

It may be helpful to implement a preprocessing step in which the retinex color constancy algorithm is performed. This would enhance the application's performance under difficult lighting situations.

Also, it would be nice if the application handled things other than URLs intelligently. For example, if address book information were encoded in the barcode, then a new contact entry should be created on the phone.

Acknowledgements for code and ideas borrowed

This program is largely based on the Open Source QR Code Library.