Scanning and Image Processing

The following describes the procedure I use when scanning and processing images of coins, including the ones in my gallery at http://www.lotn.org/~calkinsc/coins. The following is not intended to imply this is the one and only method to produce images of coins, but it is the one that I have found to produce the best images - it works for me, but your milage may vary. The details are rather hardware and software dependent, but should be able to be generalized to other equipment and image processing packages. If you have any questions or comments, please feel free to ask me and direct them to calkinsc@lotn.org.

THE SETUP

THE PROCEDURE THE END

Addendum - The QX3

THE SETUP

The equipment that I use to produce my images is as follows.

The Scanner

The most important critera is to use a scanner of reasonable quality. What is "reasonable"? As coins are generally small relative to photographs and other typical items that are scanned, the scanner should have a reasonably high optical scanning resolution - this is normally measured in dots per inch, and especially if you wish to scan particularly tiny coins, 1200dpi or better is recommended. Scanners are often advertised with both an optical and an interpolated or other enhanced resolution. Interpolated pixels are essentially "faked" - an image scanned at a resolution higher than the optical resolution will produce a larger image, but the image won't contain any more information than one at the optical resolution. The larger image may actually look streaky or have other problems depending on the exact conditions of the scan.

The scanner I use is a UMAX Astra 1220S, with a 1200x600 optical scanning resoultion. I had previously used a UMAX Vista S6E with a 600x300 optical resolution, but upgraded to the Astra as the smallest coins I wished to scan, such as Maundy pennies, looked "muddy" as the resolution wasn't high enough to see much detail. The "S" in 1220S indicates the scanner has a SCSI interface. Scanners with a parallel interface would work just as well, but a SCSI scanner should operate somewhat faster - if one does a lot of scanning, this may make a difference in the long run. A SCSI scanner is typically a bit more expensive than a parallel scanner, however.

There are other ways to obtain a coin image - digital or film cameras come to mind - but I find a scanner is the most convenient. A camera allows greater control over lighting, but can require extra equipment (e.g. light or camera stands, special lenses) or a longer setup to produce consistent images. Digital cameras do not yet support the resolution of flatbed scanners, and film cameras require the film to be developed and a picture created before that picture can be scanned. If the equipment is of quality this may overall produce a better image than the scanner itself could, but is much more time consuming to take the image itself, let alone the delays of film processing.

The Computer

Scanned images rarely are perfect directly from the scanner, so some amount of image manipulation needs to be done. Having a machine which is capable of doing it relatively quickly helps reduce the "frustration factor" and let you finish up that much more quickly. My machine is a dual Pentium II-450 with 256 MB of RAM and a lot of free hard disk space. Memory is more important than CPU speed, especially as scanned images tend to be large - if the image can be manipulated entirely in memory, a slower processor will work as well as or better than a fast processor on a machine that has to continuously swap to disk. As soon as virtual memory is needed, performance will drop considerably. Also because scanned images tend to be large, a lot of working hard disk space is useful as the image is processed - the final image can be reduced in size, but as it is being manipulated several tens to a hundred megabyte or so of free disk space may be necessary to accomodate it (or other temporary files generated by the image processing software).

The Software

There are a number of image processing programs available, but I use the full version of PhotoShop 5.5 - I find it has the most features and can produce the nicest images relative to what I have used in the past. The full version of PhotoShop is rather expensive, however, which may preclude some from using it. The light version of PhotoShop, PhotoShop LE, often comes with scanners, but is missing certain features that I rely on when processing images. PhotoShop is also a memory and disk hog when processing images - it maintains several copies of each image for "undo" and other internal uses, so even if an image is of reasonable size, one might need 4 or 5 times its size worth of RAM or hard disk to process it. On certain images that I've processed, even 256MB of RAM hasn't been sufficient to keep PhotoShop from paging. Generally, all is well, however.

The scanner itself uses the VistaScan software, version 3.51 - by installing VistaScan, PhotoShop can use this from its Import->Twain 32... menu to perform the scan within the context of PhotoShop itself, rather than outside as the standalone scanner software allows.

THE PROCEDURE

As given above, this isn't the one and only way to create coin scans, but its the one that I use and have had good luck with. Some of the steps may seem obvious, but I include them anyway in some detail as even some of the obvious steps have pitfalls.

Scan The Coin

A Word On Proofs

A mention of scanning proof coins should be made here. Modern proofs, due to the mirror fields reflect light very very well. This can cause additional offset reflections (since the light from the scanner itself is offset) to be captured. Suppose the coin is in a plastic capsule and is lying on the scan bed - a reflection could be seen off of the interior face of the capsule as well as off of the scan bed. This is part of a scan of an Eisenhower dollar that shows this effect:

Scanner-induced doubling can easily be seen in the fields of the various coin features. Several of the brightest features have washed out the scanner and have created green streaks as well. Making a proof coin look "proof" can take a lot of hand editing, although the result can be impressive, as the similar fragment of a proof Susan B. Anthony shows:

Removal of the scan-induced features follows similar techniques as described in Remove Dust. The idea is that the stronger the mirror, the blacker the reflection will be. Perfect proofs have perfectly black mirrors, so painting (or erasing) the affected areas with black corrects the image and restores the proof effect. These manipulations, since so much human labor is involved, can make a proof coin take an hour or two to completely process, rather than the 15 minutes of a circulation (or non mirror proof) strike.

Rotate The Coin Image

Remove The Image Background

It is a good idea to remove any part of the image which is not related to the coin - this can reduce file size and otherwise improve the look of the final image. There are a number of ways to do this using the various tools of PhotoShop.
  • By using the Marquee Tool. PhotoShop allows selections to be made that are rectangular or elliptical. By selecting the elliptical tool (click on the dashed square in the main palette and hold the mouse button down - a popup menu will appear showing other marquee types - select the dashed circle), selections can be made that are exactly the correct diameter for the coin. Once the elliptical marquee is active, go to the Marquee Options tool palette - this palette allows specific parameters to be set for the marquee - set the Style to be Fixed Size and type in values (which must be equal to get a circle) for the Width and Height. Return to the coin image, hold down the ALT key, and click with the mouse in the center of the coin. Holding down ALT will place the marquee - the selection circle - by its center. You can use the arrow keys to move the selection to fine tune it to enclose the coin completely. If the diameter is too large or too small, press CTRL-D to clear the selection, type in new numbers for Width and Height, and try again. When the correct size is found, press CTRL-C to copy it to the clipboard, CTRL-N to open a new window - PhotoShop defaults to setting the size of the new window to match the size of what is on the clipboard - and click on OK to create a new empty window. Press CTRL-V to paste the selection in the new window - the hatch pattern indicates that there are no pixels outside the coin, and thus the background is removed.
    Note that while this works for milled coins, hammered coins or other oddly shaped coins aren't circular. The above method is the fastest of the selection methods given here, but isn't always the most appropriate choice. As shown here, a good selection should touch the very edge of the coin, as with this milled shilling - spade coins, however, are not round:

  • By the Lasso Tool. Just under the Marquee Tool is the Lasso Tool. The normal lasso looks like a rope - this is for freeform selections. Clicking the mouse button on it to display a menu shows other lassos - the Polygonal Lasso allows one to connect points by straight lines and is most useful. The background of a coin can then be "cut away" - the lasso selecting a region around the edge of an irregularly shaped coin, and once the selection is closed, CTRL-X cuts the enclosed region out. Alternatively the coin itself can be selected, and the copy and paste to a new window method above can be used. It takes a bit longer to select in this way, but its the easiest method for irregular coins.
  • By the Magic Wand. To the right of the Lasso Tool is the Magic Wand. This tool selects pixels by color, and may be used to select the background in one fell swoop instead of piece by piece as with the Lasso Tool. It also has the ability to select colors similar (within a tolerance) to the current color, so if the background differs slightly (e.g. black to not quite black) it still may be able to select the full region. It may, however, select part of the coin instead if the colors of the coin are close enough to the color clicked on. Areas can be unselected by holding ALT and using the other selection tools, but often this tool is more work than its worth unless the color to be selected is uniform. For instance, if the Lasso Tool is used to cut out parts of the background, the backround may be replaced instead by the PhotoShop background color, e.g. white. Once the background is all white and if there isn't any white in the coin, the Magic Wand tool can be used to select all of the white at once. Inverting the selection (via the Select) menu then selects everthing that isn't already selected - swaps selecting the background for selecting the coin instead. Again, cutting and pasting to a new window will create an image which has the background removed.
  • Safety First. As always, save the file. To maintain the empty background as empty, it must be saved as a PhotoShop (.PSD) file. Do the same for the other face and save it as well.

    Place The Faces Side By Side

    I like to have the obverse next to the reverse in a single image.
  • Get the size of one face. Choose the image of one of the faces, press CTRL-A to select the whole image, and CTRL-C to copy. If you had used the Marquee Tool to select both faces originally, you can go on to the next step. If you didn't, go to Image->Image Size (or File->New) and write down the width and height shown.
  • Set the Width of the other face. Go to the image of the other face. Choose Image->Canvas Size. If both faces are the same size, the dropdown next to Width can be changed to "Percent" rather than "Inches" and 200% typed for the new size. If the faces are not the same size, add the width written down of the other face to the one given for this face.
  • Set the Height of the other face. In that same dialog, the Height may need to be adjusted. Again, if the faces are the same, no changes need to be made. If the height of the first face (the one that you pressed CTRL-C on) is greater than the one here, set the Height of this face to match the other face. If its equal or less, leave it alone.
  • Shift the face to the correct position. Next to the Width and Height settings are nine squares, and by default the center square is pressed. The pressed square indicates where the current image will be when the canvas size is changed. With the square in the center, the face will remain in the center of the newly enlarged window - not what you want. You want to select either the left square (if the face being resized is the obverse) or the right square (if the face being resized is the reverse).
  • Resize the canvas. Click on OK. The canvas will now resize and the current image shift where the pressed square said it should go. The face should be up against either the left or right side of the window, and a large empty space on the other side.
  • Paste the other face in. If CTRL-V is pressed to paste the other face in, the image will be pasted in the center of the open window - this may require extra effort to shift the image into place, but there is an easier way. Shrink the window horizontally so the amount that is visible is smaller than the empty space (if, say, the image was 1000 pixels wide to contain 2 500 pixel faces, shrink the window to, say, 400 pixels - a value smaller than 500). Scroll the window all the way to the edge so only the empty space is seen an none of the face currently in the window. Be sure the scroll bar is as far over as it can go - you must be right to the edge. Now use CTRL-V to paste. The first face now falls exactly in the empty space, right next to the face that was already there - by being all the way over to the edge and having less area visible than the size of the face to paste, PhotoShop knows to paste the image right up to the edge of the window, where you want it to go.
  • Safety First. Once again, save the resulting image. The windows of the individual faces can be closed as you won't be needing them again.
  • Of course, a corresponding procedure works if you wish to place the faces top to bottom, or you wish to place a different image altogether (such as a magnification) next to the coin. Reduce the problem to two images, increase the canvas size of one by the appropriate dimensions, and paste the other in.

    Adjust The Image Histogram

    Scans often come out too dark, too light, or otherwise washed out. Through PhotoShop's adjusting of the image levels, most of this can be compensated for.

    Sharpen The Image

    With the intensities now adjusted, a small amount of sharpening to the lightness channel can be applied which will bring out even more detail. Scanners seem to scan "soft" where edges aren't always as crisp as they should be - a small amount of sharpening restores this crispness. Again, it should be done only to the lightness channel to prevent the colors from skewing.

    Remove Dust

    Depending on how clean the scanbed was this step may be skipped, but small dust particles can be removed from the resulting image.
  • Return to full color. Click on the composite Lab channel in the Channels palette to return to full color, rather than the grayscale of the lightness channel.
  • Rubber stamp away the dust. Select the Rubber Stamp tool, the fourth tool in the left column of the main palette (it looks like a hand stamp). This tool allows you to paint on one place of the image using the colors of another place of the image. Look at the image and find a dust particle - you can use + and - to magnify and reduce the image in the window to get a closer look at one. Hold down ALT and click on the image on a place with a color similar to what would be under the dust particle - for instance, on a copper coin that has a dust particle, click on a place of the image that has the same tone of copper as would be under the dust. Now release ALT, and click (and drag, if its a large particle) with the mouse over the dust particle. PhotoShop will now paint using the color from where you clicked when you were holding ALT. Note that it paints using the color from the relative distance as the mouse currently is from where you clicked - it doesn't use the exact same color all the time. This is often better as even the most perfect coins still have surfaces that vary slightly - always painting with a single color, e.g. brown for a copper coin, will replace the white dust particle with a brown smudge that doesn't blend in with the coin surface. Repeat this procedure (ALT click, then paint) for any other dust particles that you find.
  • WARNING WARNING WARNING WARNING Note that this will also allow you to brush away any defects in the coin itself - the pixel showing a dust particle is no different than a pixel showing a scratch, dent or hole in the coin. If you are trying to create an "ideal" picture of a certain type of coin you may wish to brush away blemishes and defects, but if you are trying to represent the coin as it is, don't make any modifications that would change the surface itself. It would be easy to, say, deceive a prospective buyer of a coin you are selling to represent it other than it is. As an example, I have a damaged U.S. Seated Dollar - the top image is how the coin actually is in real life. The bottom, however...

    Note how the coin surface is a mottled grey - this is why painting with a single color isn't helpful to remove dust particles - a swipe with a solid color would stand out as much as the particle itself would - by painting with the mottled grey, however, the image looks much more believable.

    Save The Image

    Finally, the resulting image can be saved as the procedure is complete.
  • Return to RGB color space. Choose Image->Mode->RGB Color and the image is converted. Its important to return to RGB mode as most file formats won't support any color mode other than RGB.
  • Save the file as a JPEG. I like JPEG as the final medium as the files are small yet the full 24 bit color is maintained. JPEG images can also be viewed by all graphical web browsers nowadays, so there is no danger of someone not being able to view the image. As JPEG is lossy, it should only be used for the last step. The amount of loss is controlled by the "quality" factor when saving the file. I use PhotoShop's "High" quality setting - in version 5.5, that represents a value of 8 out of 12, in earlier versions it represented 6 out of 10. Lower quality factors reduce file size but increase the blockiness of the image.
    When saving the file I typically give the file a suffix matching the resolution of the image - in this case, _1200 as it was a 1200 DPI scan. That Civil War Token could then have the name, say, cwtoken3_1200.jpg. The resulting filesize, though much smaller than the original TIFF (or PSD) scanned image, is still too large for the web, though I keep the image in case I need the full version in the future.
  • Save other resolutions for convenient web access. Choose Image->Image Size and select "Percent" as the units. Change the value to 50% and click OK. The image is now 1/2 the size in each dimension, so 1/4th the size in area. Save it again with the same prefix, but a _600 suffix. Resize, and save as _300. Resize and save as _150. The _600 and _150 sizes are now suitable for my web site as the full image, and thumbnail, respectively.

    THE END

    That's it. Its long to describe, but the steps themselves aren't complicated - a non proof coin can be scanned, processed, and saved in about 15 minutes. This method is probably impractical for coin collections that change rapidly (e.g. a dealer's stock), but are good for galleries of static (or increasing) collections, or for providing representative images of types.

    Addendum - The QX3

    Although the majority of my images are taken and processed as described above, I have obtained an Intel Play QX3 digial microscope for further images. Although technically a kids toy, its surprisingly good for imaging small coin features such as doubling. This microscope has three magnification settings - 10x, 60x, and 200x, and captures images in 352x240 by default. 60x I have found the most useful for most of the images I have made, though 200x is occasionally useful - a Morgan dollar mintmark won't completely fit in the field of view at 200x though, so the feature to image really does need to be tiny for 200x to be useful.

    Although the microscope comes with its own software to capture images, it also ships with a TWAIN driver - images can be captured via PhotoShop just as with a regular scanner. I thus acquire and process images in a similar way as to what is described above.