Industry news

How 2-D Bar Codes Work

Writer: admin Time:2021-12-06 19:32 Browse:

2-D bar codes can hold mountains of information, compared to their low-tech 1-D predecessors.
2-D bar codes can hold mountains of information, compared to their low-tech 1-D predecessors.

In the summer of 1974 at a grocery store in Troy, Ohio, an event first took place that would forever change the way we purchase things: A clerk scanned the UPC code on a pack of Wrigley's gum [source: Collins]. UPC codes exploded in popularity after hitting the market, and today you can find them on practically every product on the shelves. Like all bar codes, UPC codes bridged the physical and digital worlds, providing anyone with a bar code scanner instantaneous access to the data that a bar code contains.

Like all of the first bar code formats, UPC codes were 1-D, meaning they only carried information in one direction. One-dimensional codes worked fine for carrying small amounts of data like numeric product codes, but as the digital world became more complex, the need for a bar code capable of carrying more data became apparent.

One solution still used today is the stacked bar code, which, as the name implies, contain a number of 1-D codes piled one on top of another. Although stacked bar codes can accommodate more information than their traditional 1-D counterparts, they can quickly grow very large in order to store more data and can be difficult to read. In order to have a bar code that was small in size, easy to read and capable of holding both a large amount of data and a large variety of character types, the market called for a new approach. Enter 2-D bar codes.

As you might have guessed, 2-D bar codes (sometimes called matrix codes) carry information in two directions: vertically and horizontally. Accordingly, 2-D bar codes are capable of holding tens and even hundreds of times as much information as 1-D bar codes. For instance, one of the most popular 2-D bar code formats, Denso Wave's QR Code, can hold more than 7,000 digits or 4,000 characters of text, whereas even the most complex 1-D codes top out around 20 characters. 2-D bar codes are also small and easy to scan.

Still, 2-D codes aren't perfect for every application. Because they're more complex than 1-D codes, they require more powerful scanners to decode. What's more, many people are simply unfamiliar with the technology, which hinders widespread adoption. But thanks to the smartphone in your pocket, that may all be about to change. Read on to find out why.

Diagram of a 2-D bar code
Diagram of a 2-D bar code

When the now ubiquitous UPC code first started making waves in the 1970s, retailers everywhere recognized the potential immediately. Unfortunately, the technology faced something of a Catch-22. Retailers refused to buy the expensive scanners needed to read the codes until manufacturers began putting UPC codes on all of their products, and manufacturers stonewalled on adopting them until they knew retailers could read the codes [source:Rawsthorne]. Eventually, large retailers like Kmart jumped in to kick-start the technology.

Fortunately for proponents of 2-D bar codes, we buy millions of scanners every year in the form of our smartphones. Common models like the iPhone, BlackBerry and Android all have the capability to read the most popular 2-D bar code formats, helping to clear perhaps the largest hurdle to their widespread adoption. But how does a smartphone -- or any bar code scanner, for that matter -- actually make sense of the seemingly unintelligible patterns of lines and squares that 2-D bar codes contain? Part of the answer lies in the design of the bar code itself, which is created from the ground up to make the scanning process as accurate and speedy as possible.

Let's check out of one of the most widespread types of 2-D bar codes, QR Codes, to see how its design helps bar code scanners read the data it contains. For starters, every QR Code contains a finder pattern, an arrangement of squares that help the scanner detect the size of the QR Code, the direction it's facing and even the angle at which the code is being scanned. Next, every QR Code contains an alignment pattern, another pattern of squares devised to help scanners determine if the 2-D bar code is distorted (perhaps it's placed on a round surface, for instance). QR Codes also have margins for error, meaning that even if part of the code is smudged or obscured, the code can often still be scanned.

But even a perfectly designed bar code would be nothing without sophisticated software capable of recognizing the bar code's alignment patterns and decoding the data. For instance, the scanning software used to read QR Codes has some pretty impressive capabilities. Once the  smartphone's camera processes the code's image, the software goes to work analyzing the image. By calculating the ratio between the black and white areas of the code, it can quickly identify which squares are part of the alignment patterns and which squares contain actual data. Using the QR Code's built-in patterns and error correction, the software can also compensate for any distortion or obscured areas of the bar code. After the software has digitally "reconstructed" the QR Code, it examines the jumble of black and white squares in the QR Code's data section and outputs the data contained within.

Of course, QR Code is only one example of a 2-D bar code. For instance, the shipping company UPS uses a format called MaxiCode, which can be scanned very quickly as packages fly down the conveyor belt, whereas the U.S. Department of Defense has adopted DataMatrix, a 2-D bar code format capable of holding a lot of information in a very small area. Regardless of the format, 2-D bar codes contain both data and built-in patterns to help the scanner decode the information each bar code contains, and in many cases, one device can read a variety of different formats, even traditional 1-D bar codes.

If you want to create your own, you'll find several great 2-D bar code generators online. They let you adjust everything from the format you want to use to the size of the code, so the next time you're putting up a flyer for your local garage sale, consider adding a 2-D bar code with your home address at the bottom. Who knows how many smartphone-carrying bargain hunters you might attract?


If you can think of a way to sell a product, it's probably been done: blimps with giant company logos, televisions streaming ads to the backseats of taxicabs and even advertisements printed in edible ink on food. Nothing is off-limits from advertisers. But even they have long faced a difficult challenge as they try to determine how effective their physical ads really are; regardless of the medium, they can only guess how many people end up buying products or learning more about their company because of a particular ad. That all changed with 2-D bar codes. For the first time, companies could simply add a 2-D bar code to their advertisement and directly track how many times consumers scanned the code. If someone did scan it, the advertisers could then track whether that person went on to visit the company's Web site or even purchase a particular product.

Putting the technology to use, the fashion company Tommy Bahama added a 2-D bar code into Esquire Magazine that, when scanned, took readers directly to a Web page featuring the pair of sunglasses shown in the magazine ad. With one click of their mouse (or smartphone), readers could then buy the sunglasses for a cool $138 a pop. Not only did the codes help Tommy Bahama sell a lot of sunglasses, they also helped the company learn more about their customers, telling the company what time of day and part of the country an ad was scanned.

Target is another company exploring the capabilities of 2-D bar codes, adding QR codes to its magazine advertisements. Curious readers can scan the codes and instantly watch a video from a famous interior designer explaining how to use the product in the home. Advertisers say this level of interactivity is perfect for a new generation of tech-savvy consumers who want instantaneous access to product information, reviews and more. In fact, the codes have become such a popular way to advertise in Japan that they're even found on billboards, where they can be scanned at highway speeds from a passing car.

Currently, the codes aren't as popular in the United States as they are in Japan, so data on just how many advertisers are using them and what sort of results they've been getting is hard to come by. Still, as more people purchase smartphones and learn about the capabilities of QR Codes, 2-D bar codes may take off much like their 1-D predecessors.



SVOTON Technology co., LTD

Skype: olivia_4907

Tel: +86-029-89054166


Add: No. 97 Changping Road, Shahe Town, Changping District, Beijing, China