September 1, 2011

Barcodes: Promising tools for horticulture?

The green industry should consider tapping into the instant information today's barcodes provide.

BY COLIN BECKINGHAM

Fred goes into a landscaper's yard and searches through the trees displayed for sale. He sees a tree that looks suitable for a use he has in mind, but the label on the tree does not give enough information for him to be able to make a choice. He looks around for a human helper and sees several who are already engrossed in helping other customers. He'll have to wait. Then he notes that one of the tags on the tree has a QR (Quick Response) barcode that he vaguely recognizes. He pulls out his smart phone, uses the phone's camera to focus in on the barcode and snaps the image. Automatically the browser in the phone opens a website at a page that gives comprehensive information about the tree. Fred finds that the page is authoritative, it confirms his thinking, he loads the tree onto a cart, pays, and is on his way, secure in the thought he has made the right choice.

Somehow, the phone recognized the format of the barcode, was able to decode its information and found that it contained a Uniform Resource Locator (web page address in http:// format). The barcode not only contained the website name but also additional instructions, so the phone knew that it should open the browser, find the website and pass on the instructions. And the website knew what to do, presenting the right page with the specific information needed.

While this imaginary scenario would be unusual in a landscaper's yard, it is all quite feasible with today's technology — and commonly used already in other industries.

The old situation
There's nothing new about barcodes. The first barcode was invented in 1948, and they have gone through a number of changes and improvements since then. Barcodes are commonplace today in shipping labels, inventory control and point-of-sale systems, and are widely used in the horticulture industry. The common one-dimensional (1-D) barcode most often translates into a simple number, which identifies a record in a database, containing all related information. In a garden centre, this might be the price, name and cultural information, speeding up the checkout process while making it far less subject to error, as well as providing extra information that supports the sales activity.

We are starting to see these 1-D barcodes on printed receipts. This is really handy at the returns desk, where a quick scan of the receipt brings up not only detail about the items purchased, but the entire master sales record including place, date and time, method of payment and current warranty status.

Using your camera on a 1-D barcode would not get you very far. While it might yield the unique number of the tree in the vendor's database, the camera would not know what to do with it. There's just not enough information encoded.

What is new
Barcodes can now be square and come in other shapes. The rectangular shape of 1-D barcodes is intended to deal with error correction and helping the barcode scanner read it easily, but the barcode still contains only one number. Two-dimensional (2-D) barcodes can contain thousands of alphanumeric characters.

Here are three different types (among many) of 2-D barcodes. The three examples illustrated all say the same thing, "http://www.landscapetrades.com, " the URL of the on-line pages of Landscape Trades magazine:







There are a number of free on-line services which allow you to create and decode these barcodes, which separate you from the nitty-gritty of generating and decoding single examples. If you have a printed version, you can scan with a phone or a flatbed scanner, to get an image for decoding. If you are viewing an on-line version, simply copy the image. Once you have the image, submit it to one of the on-line decoders. You can even use a smart phone to scan an image displayed on your monitor.

The Microsoft tag can justifiably claim to be the most advanced of the three, since it grew out of the QR code project, and expands on the same idea using colours and shapes. However its compact size and colour requirements might not make it a good choice if you need to print it on a narrow POS receipt with a black ribbon using a dot matrix print head.

Barcode contents
The contents of these barcodes or tags can be entirely arbitrary. You can say "Hello, I am an English hawthorn (Crataegus oxyacantha). I grow to 15 ft. or 5 m tall, prefer full sun, flower in May and am not particular regarding soil type. Watch out, I have thorns™ Or you can say the same thing in French or Portuguese, or say the same thing in English and French and Portuguese all on the same tag. It's your call.

Since web pages can contain even more information, it is an easy leap to just encode a URL which leads to the same type of information.

For example, take the Plantapedia database run by Peter Rofner of Richmond Nursery, near Ottawa. Using a URL such as: http://www.plantapedia.ca/plants.php?mode=details&id=830 takes us straight to a page about Rosa glauca — redleaf rose. It's a simple matter of changing the "id=xxx" part to take us to a different plant.

The QR code in more detail
For those interested in a close-up of how to use one of these codes in a practical context, consider the QR barcode. For an open-source enthusiast such as myself there is only one way to go, with my own tools operated locally on a Linux server.

There are open source software tools available for coding and decoding these images with no limitations (apart from size restrictions) on use or content.

A generator which works well is available from:
http://fukuchi.org/works/qrencode/manual/index.html
and a reader which can decode the pictures using Java is available at:
http://qrcode.sourceforge.jp/

With these tools you can very quickly and automatically encode and decode QR codes on the fly. Having your own server allows you to generate a large number of codes and with no user intervention, freeing up time to do other things. On an older machine you can generate 500 URL QR barcodes in less than five seconds.

Practical for horticulture?
On the golf course, you come up to the tee on the 14th hole, scan the QR code by the ball washer and immediately find a web page detailing the distance to the hole, overview of hazards, the names of all the members who holed-in-one there, and estimated time to the 19th hole given current players on the course.

On the side of a piece of equipment, a QR code links back to a database which contains the details of all the fluid capacities and major part numbers for filters, and indicates when it was last serviced and by whom.

At a garden centre point of sale checkout you are generally interested in one thing, identifying the product and quantity as quickly as possible, and likely a 1-D barcode on the tag is all that is required. However in the display area, there is room for 2-D barcodes to provide information that otherwise would have to be printed and is liable to become out of date or fade in the sun. There's also the issue of space on a small plant tag. While the Microsoft colour barcode might fit, a QR code would likely call for a much larger plant tag.

On an invoice for a lawn tractor, for support purposes you want to be able to give a customer access to your on-line server which records past and future servicing details of the machine, so you print a QR code on the invoice. Then the customer can scan the code at any time and access the information through a URL. In this way there can be a number of barcodes on the invoice; one for the vendor, one for the warranty provider and one for the manufacturer. QR and other codes are particularly valuable when the URL is long and complex, where a customer might make a keyboard error and end up in the wrong place. Many businesses are introducing barcodes by offering specials or prizes to customers willing to use them.

Technology for today
2-D barcodes are here and now, working accurately to condense complex information into a convenient image. They are cheaper than RFID tags, and more importantly, they are immediately accessible to the vendor and customer using existing, non-specialist tools.

Do 3-D barcodes exist? Yes — some consider that the addition of colour in the image adds a third dimension. Others use a true 3-D approach; they are not very common, but they work on 2-D  principles, where each of the component squares or triangles has a height dimension as well as length and width. The height is calculated by measuring the time it takes for the light beam to be reflected back to the scanner. Such 3-D barcodes are capable of storing huge amounts of information.

The problem for the horticulture industry might be that customers consider these barcodes too strange to be useful. How many of your customers have smart phones capable of decoding the images you offer, and how many would use them? A few years ago we might have asked the same question about DVD players. It costs very little to participate in this new idea (printing and dovetailing with existing software), with the benefit of gaining firsthand experience in a new technology, and the security that experience brings.
Colin Beckingham is a freelance writer living in eastern Ontario, with experience in the green industry. He works professionally with open-source solutions in the areas of database management, accounting, voice control and telecommunications.