How to scan a drawing for raster to vector conversion

Not all drawings can be scanned to create a raster image that can be used for raster to vector conversion. For example:

  • Some drawings are so faint or so dirty that whatever you do you will not be able to create a clean enough scan for conversion.
  • Some drawings or drawing details are too small to scan well enough for vectorization, regardless of the scanning resolution you use.
  • Some drawings contain so many overlapping details - for example text written over drawing lines - that even if you get a perfect scan no raster to vector converter will be able to unscramble the information.

However, given a suitable drawing in good enough condition to scan well, you can eliminate many raster to vector conversion problems by being aware of the information on this page.

Color, grayscale or monochrome?

Most scanners give you the option of scanning in color, grayscale or monochrome. These options have different names depending on the make of scanner you have.

Color

Your scanner's color option will normally create a raster image that contains 16.7 million colors. Color images can be very large. An E/A0 size drawing scanned in color at 300 dpi will take up about 385Mb of memory.

You should only use this option if you are scanning a color drawing with a view to converting it to a color DXF file. Do not use your scanner's color option if you are scanning a black and white drawing - it is easy to do this by accident as most scanners default to color.

If you are scanning a color drawing with a view to converting it to a color DXF file, experiment with your scanner's settings until the colors on the raster image are as high contrast, vibrant and saturated as possible.

Grayscale

Your scanner's grayscale option (often called black and white photo) will normally create an image that contains 256 shades of gray. Grayscale images can be very large. An E/A0 size drawing scanned in grayscale at 300 dpi will take up about 128Mb of memory.

Grayscale images are not normally suitable for raster to vector conversion. You should only select grayscale if you are going to convert the grayscale image to black and white after scanning using your converter's threshold functions (see below).

Monochrome

Your scanner's monochrome option (often called line art, black and white drawing or 1 bit) will create a much smaller image that contains two colors - black and white.

This is the option you should normally choose when scanning a drawing for raster to vector conversion.

Thresholding

When you scan a drawing in monochrome your scanner or scanning software has to make a decision about which parts of the drawing to set to black in the raster image and which to set to white. This is called thresholding.

If your drawing is clean and sharp this is not normally a problem. However if your drawing has faint lines or a dirty or tinted background you will have to experiment with your scanner's settings until you get a raster image where, as far as possible, the parts of the raster image that are supposed to be black are black and the parts that are supposed to be white are white.

If your scanner or scanning software sets too much of the drawing to white, it may contain breaks and holes and faint parts may be lost. If your scanner or scanning software sets too much of the drawing to black, text characters may "bleed" so that white spaces within them or between them become filled and speckles and dirt may appear in the background.

Too much white Too much black
Optimal  
 

While some scanners have good automatic thresholding and / or have software that makes setting an appropriate threshold easy, getting the best threshold on other scanners requires endless rescans.

Some raster to vector conversion programs also include a thresholding capability. If your raster to vector converter includes thresholding, you may want to scan your drawing in grayscale and then use your converter's threshold functions to create a black and white image after scanning. This will allow you to experiment with different levels of black and white without having to rescan the drawing.

For more information on thresholding, see Explaining the threshold - a vital setting for successful raster to vector-conversion.

Resolution

It is not true that "the higher the scanner resolution, the better the vectorization results". In fact, a high resolution scan can sometimes give you worse results than a low resolution scan!

That said, you should be aware that while you can decrease the resolution of an image after scanning you cannot increase it. Increasing resolution after scanning will not regain any lost detail. It will simply exacerbate "steps" in the image that will decrease the quality of any raster to vector conversion.

Therefore, it is better to err on the side of too high resolution rather than too low resolution when scanning. If you find your scan resolution is too high you can always decrease it after the fact.

For most line drawings, a scan resolution of 200 to 400 dpi is optimal. However, if a drawing is small (e.g. a logo) or has fine detail, you may need a higher resolution.

Here are some pointers for choosing the right resolution:

  • If you are scanning a line drawing aim for lines about 5 pixels thick.

  • Lines and outlines should look smooth, not stepped:

    Smooth - GOOD Stepped - BAD
  • Text characters and entities that are close together should be separated by clean white space:

    Completely
    separated -
    GOOD
    Incompletely
    separated -
    BAD
    Completely
    unseparated -
    BAD

    Note that the separation of close together entities is dependent on selecting an appropriate threshold (see above) as well as on selecting an appropriate resolution.

For more information on resolution, see our articles about resolution.

Saving raster images

We recommend that you save your scanned drawings as TIFF files. If your scanned drawing is black and white, save it as a Group 4 TIFF file. This will compress the file without causing a loss in its quality.

DO NOT save your images as JPEG. JPEG uses "lossy compression", which means that it discards data it thinks you can do without. This causes it to decrease the quality of scanned drawings by blurring the details and adding speckle artifacts.

The smudging and gray "clouds" surrounding the lines in the image below are typical artifacts caused by saving a drawing as JPEG.

Once you have damaged an image by saving it as JPEG, you cannot undo the damage by simply converting the JPEG image to TIFF. You will need to rescan the drawing.

VERY IMPORTANT: CHECK YOUR SCAN!

After scanning, check your scan.

  • Make sure that the full extents of the drawing have been captured.

  • Make sure the scan is not skew.

    If the scan is skew, rescan the drawing straight. While most raster to vector converters can deskew scans, deskewing can decrease the quality of the scan, particularly if the scan is very skew.

  • Make sure that any text is legible.

  • Make sure that text characters and entities that are close together are separated by clean white space.

    If they touch partially or completely, you need to experiment with your threshold settings and or scanning resolution.

  • Make sure that the drawing lines are solid, not broken.

       

    If they are broken, you need to experiment with your threshold settings and or scanning resolution.