Sunday, November 16, 2008

How the scanner builds the image

How the scanner builds the image

When scanners only scanned in black and white, the actual scanning process was fairly straightforward. The scanner motor would move one step, capture a single horizontal line of the image from the CCD array, save the results, and move on. When color scanners hit the market, there were several possible ways to scan in color, each one with different advantages and disadvantages.
The first color scanners used a black-and-white CCD array and featured three colored lamps--red, green and blue--or used a single white lamp and had three colored filters for the CCD. The traditional way to scan in color was to scan the entire document three times, one pass for each color, and then build up a composite image that was sent back to the computer. This method had some marked disadvantages. If the image moved even the slightest bit during the scanning process, the resulting misregistration of colors would make the scan useless. (It was also slow, since it required the scan to be done three times in a row.)
One-pass color scanning was eventually introduced, although there were several different ways to pull off the same trick, each again with its own benefits and drawbacks. The first method was to simply scan the whole document once in white light with a color-sensitive CCD array--which required a CCD array that may be much more expensive to produce than a single black-and-white CCD. Another method was a variant on the old three-pass system: at each step of the scan, the scanner turned on the red, green, and blue lamps in sequence and recorded the results from each, creating a composite image at each step. Many current LED-based scanners use this method, since LEDs can be switched on and off very quickly.
There are two basic methods for scanning an image at a resolution lower than the hardware resolution of the scanner. Method 1 simply involves taking the output from certain pixels in the CCD. For instance, if you scanned at 300 DPI on a 600 DPI CCD, the scanner would only sample the results from every other CCD pixel. Method 2 involves scanning at the full resolution of the CCD and then downsampling the results in the scanner's own memory. Most better scanners do this instead, since it yields far more accurate results.
When color scanners scan in grayscale, there are also a number of methods used. Scanners with multiple lamps (such as LED-based scanners) often scan in grayscale by switching on the green lamp and scanning that as black-and-white. This does not always yield the most accurate results with colored documents, but works fine for most black-and-white originals and it is slightly faster than taking a three-channel color image and removing the chrominance values from it (which is how some other scanners work).
As we will find, every single one of the elements in this setup is critical to a good scanner. Let's examine each one in turn, starting with the lamp.

Lamps
Without a bright and consistent light source, no scanner can deliver good results. The vast majority of scanners these days use one of several basic types of lamp:
Cold-cathode fluorescent lamp. So named because they emit very little heat, which prevents image distortion and also prolongs the life of the lamp and other scanner elements.
Xenon-gas cold cathode lamp. Superior to fluorescent lamps, in that they come up to brightness faster and last longer, but they are also considerably more expensive. They also have the advantage of more closely resembling natural light.
LEDs. LEDs are now being used in many inexpensive scanners as light sources. For one, they use very little power, which makes it possible for a scanner to be powered by the USB or FireWire connection, and have a far greater lifespan than cold-cathode fluorescent light sources. LEDs are also much cheaper and more compact, making smaller, lighter scanners possible. The downside is that scanners that use LEDs don't quite provide the same level of richness of color or detail that non-LED scanners do.

Focus and lenses
There's also some variety in the type of lens in a scanner. Most cheaper scanners use a fixed-focus lens--the focus of the lens is set to what is just beyond the surface of the glass and nothing more than that. This is fine if you're putting a flat original on the bed, as is generally the case--although if you are scanning from a book where the spine does not lie completely flat, fixed-focus scanners will not be able to reliably reproduce what's near the spine as well as a scanner with focus control.
The more expensive and advanced scanners have focus control, where the focus of the lens is changed depending on the distance of the document from the glass and mirror. This not only helps you scan a three-dimensional object on the scanner but also provides better control over scans of slides or chromes in slide holders, since the slide holders places them slightly farther away from the lens than other objects. Also, cheaper scanners generally use plastic lenses; the more expensive and professional-quality scanners use genuine glass lenses.
Sensors
Scanners typically use two kinds of sensor arrays. The CCD, or Charge Coupled Device, is the most common type of sensor, and is usually very precise and accurate. It's also a time-tested technology: CCDs are used in many applications, including video and digital still cameras.
Another variety of sensor is the CIS, or Contact Image Sensor. CIS arrays are much smaller and more compact than CCDs, since the signal-amplification circuitry is placed directly onto the sensor itself. CISs are cheaper, but they also yield less impressive and often noisier-looking results, and the scans from CIS-based scanners often need more tweaking to look good. Most people will want to opt for having a CCD rather than a CIS array in their scanner at this point.
Once the scanner has the data, the information needs to be transferred to the host PC. There are, as you might imagine, a variety of ways to accomplish this--some of them extremely archaic but still being used today.

No comments: