- Project Runeberg -  About Project Runeberg /
About Scanning and Images

Table of Contents / InnehÄll | << Previous | Next >>
  Project Runeberg | Like | Catalog | Recent Changes | Donate | Comments? |   

About Scanning and Images

This is the starting of a page about scanning (image capture) and the OCR (optical character recognition) process that is of vital importance to Project Runeberg.

Image input devices

Image input devices come in many fashions: flatbed scanners, handheld scanners, and video cameras. They all use some kind of CCD (charge coupled devices) to convert the light, reflected by the book page, to electrical signals. CCDs are long lines (1 dimensional) or arrays (2 dimensional) of light sensitive cells.

Mechanical scanners use line CCDs to capture one scan line, and a step motor (flatbed scanner) or muscular movement (handheld scanners) to let this line run over (scan) the book page.

Video (or still image) digital cameras use a CCD array instead and can take a "shot" of the page much faster. These cameras have shutters and lenses, just like ordinary cameras, but no film that has to be processed with chemicals.

What's in an Image

Images are made up by picture elements, pixels. Each pixel has exactly one color value or shade of grey.

The more dense the pixels are, the more detail you can see. This is measured in the number of dots per inch or dpi for the image. This determines how many pixels the image will have, for a given physical size. Typical densities or levels of resolution are between 70 dpi and 2400 dpi. Most personal computer screens display 72 dpi.

Depending on what kind of values are allowed for a pixel, we categorize images as color, greyscale, or black-white, the latter often called line art. For color and greyscale there can also be fewer or more detail in the shades of a color. This is measured by the number of bits per pixel (binary digits) used for storing the image in a computer.

Color images use a combination of three separate colors (red, green, blue) to express any color of the spectrum. Each one of these separate colors can occupy the same number of bits as a single greyscale value. For personal computers, it is very common to use 8 (eight) bits for a greyscale pixel and thus 24 for a color pixel. Eight bits are also called one byte, the basic unit for data storage in computers. A megabyte is a million bytes. A pixel in a line art image can only be black or white (not grey), and therefore only occupies 1 (one) bit (having the values zero or one).

Image Sizes and Compression

If you scan a 4 x 6 inch image in 200 dots per inch, the resulting image will have a size of 800 x 1200 dots or pixels. If this is a color image with 24 bits (3 bytes) per pixel, the image will require 2.88 megabyte of storage, or exactly two ordinary MS-DOS floppies.

However, most images have patterns that repeat, and therefore the image can be stored in a more intelligent way, using some method or algorithm for compression. One very common compression algorithm is called GIF, or Compuserve's Graphics Interchange Format.

Some compression formats exploit the fact that the human eye cannot see all the detail in an image, and therefore they sacrifice some of the information to compress the image even further. In this case, you will not get the same image if you decompress it. The JPEG format is an example of this, so called lossy compression. The GIF format uses lossless compression, but you pay for this by getting larger image files.

Images for OCR

If you capture images for the purpose of optical character recognition (OCR), the image must be detailed enough to tell the difference between letters.

When scanning for OCR, it is common to capture a line art image, because it is easy to separate the letters (black) from the background (white). However, most input devices (scanners, cameras) are color or greyscale. In a line-art image, all detail must be present in the resoution (more dots per inch), because each pixel can only be black or white. In a greyscale image, it is often possible to draw from the detail that is stored in each pixel, so this puts more moderate requirements on resolution. To some extent, a greyscale image can be converted to a line art image with larger resolution.

For most purpuses, a line art image of 300 dpi or 400 dpi is sufficient, while 200 dpi is sometimes too coarse. However, a greyscale scan of 200 dpi should sufficce


Figure: Grey scale image of fine print at 100 dpi (25 kbyte GIF)


Figure: Grey scale image of fine print at 200 dpi (39 kbyte GIF)


Figure: Line art image of fine print at 200 dpi (2.5 kbyte GIF)

To be continued...


Project Runeberg, Thu Jan 21 15:10:17 2010 (runeberg) (diff) (history) (download) << Previous Next >>
http://runeberg.org/admin/scan.html

Valid HTML 4.0! All our files are DRM-free