Linux Means Business
The United States Postal Service deployed over 900 Linux-based systems throughout the United States in 1997 to automatically recognize the destination addresses on mail pieces. Each system consists of five dual Pentium Pro 200MHz (PP200) computers and one single PP200, all running Linux.
The USPS already had the mail-piece scanners and some old custom computers that recognized the addresses. This project connected the Linux computers to each scanner in order to run more modern OCR (optical character recognition) algorithms supplied by RAF Technology Inc. This system was designed by me during the time I was Vice President of Engineering at RAF Technology Inc.
One of the five Linux boxes has a monitor, keyboard, mouse, CD-ROM and floppy—the other four are headless. Each has 128MB RAM and a 2.5GB hard drive. The mail pieces are scanned at 212dpi at a rate of 12 per second. The binary image is sent to one of the Linux boxes via a custom cable and receiver board. The board packs the bits and uses DMA (direct memory access) to transfer the data over the PCI bus. The receiving computer runs a process that compresses the images and routes them via Ethernet to one of 10 identical processes, two for each CPU, that do the hand-print recognition and machine-print recognition. Those algorithms recognize the text from the image in less than a second and return the ASCII results to a database on a separate computer that looks up the zip code. The slave computers are connected on a subnet with the master which has a second Ethernet card connected to the rest of the computers associated with the scanner. The local network is 10Mbps Ethernet and handles the compressed binary images sent to the slaves and the ASCII results received from the slaves.
Originally, I planned to run only machine-print recognition algorithms, which use far fewer resources than hand-print recognition algorithms. The majority of the mail stream is machine-printed addresses. The original system was designed to have four single PP200s, each with 32MB RAM. Only one was to have a CD, hard disk and monitor. The others, called slaves, would have no mass storage and would boot off the ROM on the Ethernet card. Just before the system was to be deployed, the USPS decided that the hand-print recognition developed by SUNY Buffalo was accurate enough to include in the system. We reconfigured the slaves to have a 2.5GB hard disk and 128MB RAM.
I shopped for the best combination of size, speed and cost for the slave computers and settled on a tidy 3.5-inch high rack chassis from Tri Map International. One other choice was a passive back plane with up to four PC-on-a-card computers. PC-on-a-card computers are basically ISA cards with a complete PC on them. The card gets power from the back plane, and you can plug four cards at a time into one back plane, since the back plane is separated into four separate ISA busses. The theory is that you can put more CPUs into a smaller package. The passive back plane takes up 7 inches of vertical space on the rack for the four CPUs. The width and depth of the rack is basically fixed. The problem was that PC-on-a-card computers were quite expensive and didn't support the fastest CPUs. At that time, I could only get P166s on a card when PP200s were available in the Baby AT form factor. The Baby AT form factor is the extremely popular PC motherboard type that has the big round keyboard plug. I was much more comfortable recommending the baby AT form factor because replacement motherboards would be available forever. The best choice turned out to be the nifty 3.5-inch high chassis. So for 7 inches of vertical space, I got two PP200s instead of four P166s, at a much lower cost and with a more common motherboard.
As I worked on this project, computers just kept getting faster. By the time we deployed, we put two dual PP200s in the 3.5-inch chassis and the PC-on-a-card computers were still only capable of taking P200s. It is not clear what would be the best choice today. Pentium IIs come on a big riser card that won't fit in the 3.5-inch chassis. The 3.5-inch chassis required a special board that bent the Ethernet card 90 degrees, so it was parallel to the motherboard. This limited the number of cards that could be plugged in; fortunately, I needed only the Ethernet card.
Linux was an excellent OS for this application. To make the OS and OCR software run in 32MB RAM with no swap, the kernel was recompiled with only the essentials—an impossibility with a Microsoft OS. Because Linux is free, I didn't have to worry about license fees. The device driver for the custom card was relatively painless to develop, and I must say Linux “product support” was far superior to anything else I've used. When I had trouble allocating large amounts of real memory in the kernel, I e-mailed a question and always received a quick response. As it turned out, I needed to muck with the source code and recompile, as a large amount of real memory was needed for a side project in which the USPS wanted to capture 8-bit gray-scale images.
The scanners, already in place, could produce 8-bit gray-scale data. Unfortunately, at 12 images per second the gray-scale data arrives at a rate of 28MBps. The capture card and PCI bus would be able to deliver the data to the PC's RAM, but the disk wouldn't be able to store it fast enough. I set up the PCI card to fill RAM with images until no space was left. The data would then be read from the device driver and written to the disk. While the data is written to the disk, the scanner continues to run at 12 mail-pieces per second, but the PCI card just ignores the images until the RAM has been freed up. With this system, the USPS can capture a decent sampling of gray-scale mail-piece images in real time.
The USPS told me they were having another company build a custom, portable, gray-scale, data-capture machine, in order to be able to capture sample images throughout the USA. I told them an expensive custom solution was not necessary because I could build one in a few weeks for a few thousand dollars each. I did this by putting together several luggable Linux boxes. I used the portable-style computer case that has a color flat-panel display and a full-size keyboard that snaps against the screen. Since I needed to put a tape drive and a PCI card in the PC, I couldn't use a laptop. I had no problems getting an X Window System server running on the portables. The setup would have worked without X, but it was important to the USPS to be able to look at the images on the spot. These data-capture units, as setup, gave them just what they needed and worked great.
Webinar: 8 Signs You’re Beyond Cron
11am CDT, April 29th
Join Linux Journal and Pat Cameron, Director of Automation Technology at HelpSystems, as they discuss the eight primary advantages of moving beyond cron job scheduling. In this webinar, you’ll learn about integrating cron with an enterprise scheduler.Join us!
|Play for Me, Jarvis||Apr 16, 2015|
|Drupageddon: SQL Injection, Database Abstraction and Hundreds of Thousands of Web Sites||Apr 15, 2015|
|Non-Linux FOSS: .NET?||Apr 13, 2015|
|Designing Foils with XFLR5||Apr 08, 2015|
|diff -u: What's New in Kernel Development||Apr 07, 2015|
- Drupageddon: SQL Injection, Database Abstraction and Hundreds of Thousands of Web Sites
- Play for Me, Jarvis
- Non-Linux FOSS: .NET?
- Designing Foils with XFLR5
- Not So Dynamic Updates
- Flexible Access Control with Squid Proxy
- New Products
- New GeekGuide: Beyond Cron
- Users, Permissions and Multitenant Sites