SCANTOOL(1L)

NAME
scantool - a program to scan images using a Microtek MS300A scanner.

SYNOPSIS
scantool [ -v ] [ -Wi ] [ -Wp x y ] [ -WP x y ]

DESCRIPTION
Scantool allows the user to scan in documents using a Microtek MS300A scanner, and turn the resulting image into a Sun rasterfile. This program uses either SunView or XView graphics. These graphics routines are fairly trivial, and have been isolated into a single file, so it would be relatively easy to write a set of graphics routines for another graphics system.

When you run scantool, a window is displayed. There is a black bar at the top with containing six headings. Hitting a mouse button when the cursor is above one of those six headings, will display a popup menu. These options are explained in more detail below, and also by selecting entries from the Help popup menu.

There are also four box toggle switches. Each toggle has two settings. There are toggles for setting the line mode, data transfer method, serial port and baud rate.

There are three buttons. The Scan button initiates a scan. Should you wish to cancel a scan once it has been started, then you should press the Canel button.

The Show button allows you to display the scanned rasterfile images in a separate window.

  Display mode.

The scanner can handle input from the image sensor in two modes: Line Art mode and Halftone mode. Line Art mode produces an all black-and-white image, while Halftone mode results in an image that appears to contain varying shades of gray.

In Line Art mode, the amount of light falling on the sensor is compared against a "threshold" determined by the Brightness and Contrast controls. Whenever it falls below the threshold, a black dot is sent to the Sun; when it exceeds the threshold a white dot is sent. This mode is normally used for material in which everything is either black or white.

Halftone mode is used to detect and reproduce finer differences in shading. In this mode the dots sent to the Sun are organised into squares, or "grains", of uniform size. By varying the ratio of black and white dots in the grains, different degrees of shading, or "gray levels", are achieved.

  Data transfer.

In order to reduce the amount of time needed to transmit a scanned image to the computer, the MS-300A can compress image data using a one- dimensional coding scheme based on CCITT Recommendation T.4 (modified Huffman code). By default the scanner will send compressed data to the computer.

  Serial connection.

The scanner connects to the computer using an RS232 connection. This is currently setup to allow you to select between the RS232 A and B ports. The baud rate can also be toggled between 9600 and 1920 baud.

  Brightness.

There are 14 Brightness levels to choose from. The effect of this control depends on whether the image is scanned in Line Art or Halftone mode.

In Line Art mode, the higher the Brightness setting the darker a spot must be in order for the scanner to consider it "black". Lower settings can therefore be used to get a sharper image if the original is too light or blurry, while higher settings can be used to prevent slightly shaded areas from coming out black in the scanned image.

In Halftone mode, the Brightness setting affects shading in all areas of the scanned image, both dark and light. The higher the value selected, the lighter the overall image; the lower the setting, the darker image.

  Contrast.

The Contrast control also has 14 different settings. The effect of this control in Line Art mode is identical to that of the Brightness control. In Halftone mode, a higher Contrast setting causes all but the darkest areas of the original document to come out lighter in the scanned image. Too high a setting can result in "glare spots" of pure white; too low a setting can make the image almost uniformly gray.

  Grain.

All the grains in any one halftone image are the same size (see the Mode help). It is desirable, however, to use different grain sizes for different kinds of images. The Grain control makes it possible to do this. Six different grain sizes are available: 2, 3, 4, 5, 6, and 8 dots square.

When smaller grain sizes (i.e. higher settings) are used, fine details in the original document are captured more clearly, but the smaller number of dot positions in the grains limits the scanner's "palette" of gray levels. A Grain setting of 11, for instance produces grains that are 2 dots high by 2 dots wide. With only 4 dot positions to fill, only 5 distinct gray levels are possible, from all white to all black.

  Resolution.

The Resolution control determines the degree of reduction of the scanned image relative to the original. Since the dots that make up the scanned image cannot be reduced in size, reduction is achieved by deleting dots at selected intervals when transmitting the image to the Sun, resulting in an effective resolution of less than the scanner's maximum of 300 dots per inch.

There are 16 possible Resolution settings, providing scaling operations from 25% to 100%.

  Setting the picture name.

There are various options that can be set via the Set popup menu. One of these is the picture name. This is the name of the file on the Sun that the scanned picture will be saved in. The default is a file called "Noname.rf".

  Setting the scaning frame.

The frame is the area to be scanned. Scantool allows you to scan an area as small as 1/8" x 1/8", or as large as 8.5" x 11". Using the Set Scanning Frame function in the Set menu, you can adjust the size and location of the frame in order to scan any part of the document that you feed into the scanner.

  Initiating a scan.

When you click the Scan button, scantool checks to see if the scanner is on line, i.e. powered up, properly connected and ready to receive commands.

If everything checks out OK, the current settings will be transmitted to the scanner, and the rollers will begin to turn. Actual scanning will begin after a document is detected by the paper sensor, which is located in the middle of the feed slot just below the top rollers.

OPTIONS

-v  Print the version number of this release of the scantool program.

-Wi Start the scantool program up in iconic form.

-Wp x y
    Start the open window position at x y

-WP x y
    Start the icon position at x y

FILES

/usr/local/lib/scantool/scantool.help

AUTHOR
Rich Burridge, Domain: richb@Aus.Sun.COM
PHONE: +61 2 413 2666   Path: {uunet,mcvax,ukc}!munnari!sunaus.oz!richb