Scanning on the Canon CLC-500

To scan pictures, log into host VCANON. Change directory to where you will be depositing the image files. Scans are large, a full-page scan consumes roughly 35 MBytes. You shouldn't scan onto VCANON's local disk, because the Canon and the disk drive are on the same SCSI bus, which will cause scans to take twice as long. It is much faster to deposit the images onto an NFS server's disk, particularly those servers mounted using the ATM network. VCANON has an OC-3 (155 MBit/sec) ATM interface.

Some of these shell scripts are my private concoctions and live only in /vld/mike/bin. Enhance your shell PATH accordingly.

To scan a full 8.5-by-11 inch original, place the original on the scanner glass and run:

can-fullpage.sh basename
where "basename" is the name you wish to give the file; the actual file which is created will be called "basename-w4400-n3400.pix".

To scan an original of arbitrary size, place the original on the scanner glass, with the TOP edge of the original on the LEFT edge of the scanner glass, and run:

can-scan.sh [-b] width height basename [w_off h_off]
where width and height are specified in inches, and the optional -b flag indicates monochrome (black-and-white) mode, yeilding a .bw file instead of a .pix file.

Image Cropping

rlogin to an SGI which is running a full-screen framebuffer. Set FB_FILE=0, and DISPLAY=localhost:0. For convenience, make a sub-directory "big"; the script will move the uncropped originals there to get them out of the way. For each .pix or .bw image file, run:

pixcrop.sh file-w#-n#.pix
to select the area of interest. Coarse trimming will display lower-left, lower-right, upper-right, upper-left corners of the image (counter-clockwise), left-click on the corner pixel (if SGIPOINT is selected), or use FBPOINT semantics otherwise.

Image Touchup

To eliminate the slightly blue cast of some Canon scans, run:

colorcorr.sh file-w#-n#.pix

For fully interactive per-channel gamma and linear corrections, run:

fbcmap.tcl

Touchup with

do-edpix.sh file-w#-n#.pix
or use Adobe Photoshop. There are some special PhotoShop techniques that you might need to know for using PhotoShop with BRL-CAD .pix and .bw format files.

Preparation for Web Use (Shrinking, GIF, and JPEG encoding)

If no color improvements or flipping are required, the image may be shrunk (while preserving aspect ratio) using

reduce.sh file-w#-n#.pix 640 640

To experiment with a linear correction of intensity (adjusting DC offset and gain) as well as changing color saturation, run:

edit-ck.sh file-w#-n#.pix subfactor mulfactor saturate
to visually inspect the effect of your changes on the framebuffer. This essentially runs
    bwmod -s $subfactor -m $mulfactor < file | pixsaturate $saturate
on the image. (The pixsaturate step is omitted for .bw files). The defaults are subfactor=0, mulfactor=1.05, saturate=1.1, which tend to be good choices for photographic originals. For halftone color originals, start with:
edit-ck.sh file-w#-n#.pix 4 1.2 1.2
When you've found values you like, use:
edit-pix.sh file-w#-n#.pix subfactor mulfactor saturate  owidth oheight
to apply those arguments to the file, and prune down to size owidthxoheight. (The unmodified file is silently moved to the "big/" directory.) The argument lists are the same, allowing you to make use of your shell history mechanism to progress from one to the next. The default output size is 900x1150, for Web use a maximum size of 640x640 is recommended.

Once you have color corrected and reduced the image to the proper size (e.g. 640x480) for your application, run:

pix-jpeg-n-smallgif.sh file-w#-n#.pix
to make an archival-quality JPEG encoding (with no Gamma correction), and a 96x96 pixel limited colorspace GIF "thumbnail" (with Gamma correction factor of 2.2). This script will deposit two files into the current directory, "file.jpg" and "small-file.gif", and silently move the original .bw or .pix file into the "pix/" directory, if it exists.

To use these two images in an HTML document, use this bit of HTML:

    <a href="file.jpg">
        <img src="small-file.gif">
	file name or tag
    </a>
    Description of this image.
and will look like this:
eniac2 .

If the original image is monochrome (.bw file), then a fully lossless encoding can be made using the GIF format, while any JPEG encoding, even of "archival quality", will suffer some image degradation.


Notes to Myself

optional pixbreakup.sh to break the page into sub-images

To apply bwmod, flip, and reduce to reasonable sizes,
If color: edit-pix.sh
If monochrome: pix-bw.sh edit-pix.sh

In both cases, note that edit-pix.sh takes (up to) 4 args. The defaults are often reasonable, but not always optimal. It also prompts, to discover which way to rotate the image (if any). The parameters can be experimented with using edit-ck.sh

A good way to get GIF files from here, is to use pix-gif.sh bw-gif.sh Both take an optional gamma which defaults to 2.2, but is often set to 1.7

To make JPEG of either .pix or .bw, use pix-jpeg.sh

If the image is going to be used with Mosaic, this is probably a good time to create the postage-stamp file too, using small.sh small.sh -c -f file.pix 2.2

To make GIF, JPEG, and small-.gif for Mosaic all at once, run: pix-gif-jpeg-small.sh file.{pix,bw} [gam]

BEST of all, use on files in the desired final size: pix-jpeg-n-smallgif.sh

If the original was scanned with it's top edge against the left side of the Canon glass, then the original .pix file is in the correct orientation. In this case, no flipping is needed in edit-pix.sh, and the width/height parameters (#3 and #4 on command line) need to be exchanged.



Up | Prev | Next