logo

1 303 279 1021

Loading

Live Chat

All Issues

Golden Software Newsletter

Our newsletters are filled with interesting technical tips, news of how people are using Surfer, Grapher, Voxler, MapViewer, Didger and Strater, and (of course!) great illustrations.

Subscribe to Our Newsletter

Issue 59

How to Get the Most Out of the Vectorize Image Command in Didger 4

Didger 4 includes the astounding capability to automatically digitize polylines and polygons in an image. This time saving feature often provides better digitized images than manually digitizing. Three very common uses of the Vectorize Imagecommand are automatically digitizing logs, graphs, and contours. The quality of the image and the number of colors in the image will determine the effectiveness of the Vectorize Image command. Pre-processing the image using the filters under Image | Processing Filters and/or modifying the settings in the Vectorize Image dialog box may help get better results.

Image Processing Options:
Image pre-processing is a good option to consider when working with 24-bit images or when the vectorization results are less than expected. True color images can create potential problems in vectorization, since the individual pixels making up what looks to be a solid color, can in fact vary in color. This could cause the pixels to end up being disconnected and result in poorly formed lines. It is generally wise to create an image with the least number of colors necessary and formatting the lines to vectorize as solid as possible for the vectorization process.

Preprocessing Filters
There are many pre-processing options available to modify the image 
so that the vectorization results are the best they can be.
  1. Use the Image | Processing Filters | Image Erosion and Dilation option to solidify the lines. In order to thicken the lines and eliminate any gaps change the Method to Dilation and the Pass Size to 1.
  2. Use one of the color filters to try and outline or enhance the lines (i.e. Convert to GrayscaleConvert to Black and WhiteColor Reduction, or Modify Image Colors under the main Image menu). For example, if you want to digitize only the blue lines in a true color image, go to Image | Processing Filters | Color Reduction and select the Popularity Method and 4 colors. This will reduce the number of colors in the image to help Didger pick out only the color of interest (blue).
  3. Adjusting the contrast or brightness might also help to remove minor extraneous lines and leave only the thick lines that Didger can easily vectorize.

Vectorize Image Options:

Vectorize Image dialog
There are several options for setting the criteria for
selecting objects to be vectorized in the Vectorize Image dialog.
  1. If the objects you are interested in digitizing are particular colors, the best way to digitize these automatically is to use the Colors to Vectorize | Selected Colors option. Select this radio button, move your cursor over the image, and click on the color you want to digitize. If you want to digitize more colors, click the Add button and select an additional color from the image. For each color, you can select individual color tolerance levels, edge detection methods, and post processing options.
  2. If the objects you are interested in digitizing are linework, the best option for Edge Detection Method is Standard Object Thinning.
  3. In the Vectorize Image dialog, you can try increasing the Color Tolerance. If the image is saved in low quality (i.e. JPG), sometimes the colors that may look solid are made up of many similar colored pixels. Increasing the Color Tolerance will help Didger ignore these slight color differences.
  4. In the Vectorize Image dialog, you can try decreasing the Min Pixel Length. If Didger can't detect a long string of pixels with the specifications made in the Vectorize Image dialog, no polylines or polygons will be created. Decreasing the minimum pixel length may help since Didger can then vectorize small portions of polylines or polygons.

Specific Case Examples:
Below are some specific examples of images and tips you can use to automatically digitize them more effectively:

  1. Color Graph with Different Color Grid Lines
    1. If you have multiple colored lines in one graph with grid lines that are not the same color you can use theVectorize Image command to digitize each line.
    2. To use this command select the image in the Data Manager by clicking on it and click Image | Vectorize Image.
    3. To digitize the lines, use the Selected Color option in the Vectorize Image dialog, click on one of the colored lines to set the color to digitize from, and change the Edge Detection Method to Standard Object Thinning.
    4. Adding additional colors to digitize from in the Selected Colors box in the Vectorize Image dialog will allow the program to digitize multiple lines at once.
      Vectorize Color Image
      Image of the Vectorize Image dialog with each color from the graph selected for the selection criteria.
      Graph with Color Lines

      Vectorized Lines

      Image of a graph with four colored lines
      and gray grid lines.
      Image of the four digitized lines using the
      Vectorize Image command on the colored graph.
  2. Black and White Image with Black Grid Lines

    If there is no color difference between the lines in a graph, the axis, and the grid lines (they are all black lines), using the Vectorize Image command may not work very well. You can try either erasing the extra markings using software like Adobe Photoshop or manually digitize the lines in Didger using the Digitize | Polyline command. With some images, manual digitizing will still be the best solution.

    Black Graph with Black Grid Lines
    Image of a black and white graph using black grid lines.
    1. To manually digitize a graph import the image into Didger and click Digitize | Polyline.
    2. When using the Digitize Polyline command be sure to create a new polyline for each line in the graph and trace each line exactly. (For more precision when digitizing zoom in on the image) 
      Vectorized Black and White Graph

      Digitize Polyline Curves

      Image of the black and white graph digitized
      using the Vectorize Image command.
      Image of the individually digitized polylines from the
      graph using the Digitize Polyline command.
  3. Image with Faint Lines
    The Vectorize Image command can be used even if the image you are digitizing has faint lines
    1. The example below is a contour map and the contour lines themselves are very faint.
    2. When using the Vectorize Image command with faint lines, you need to apply filters to the image first in order to make the lines more visible for Didger; otherwise the lines will not be detected or digitized. 
      Contour Map

      Vectorized Contour Map

      Image of the contour map before
      vectorization command or filters were used.
      Image of the digitized contour lines 
      with no filters resulting in a blank image.
    3. Two filters that work very well for contour maps are the Image Erosion and Dilation filter and the Convert to Black and White filter.
    4. To use the first filter select the image in the Data Manager, click Image | Processing Filters | Image Erosion and Dilation, change the Method to "Dilation", and the Pass Size to "1". The Pass Size may need to be increased to provide a better resulting image but this depends on the original image and what the modified image looks like after the filter is used.
    5. To use the second filter select the image in the Data Manager, click Image | Processing Filters | Convert to Black and White, leave the method as Intensity Threshold, and move the slider to the right until you can see the contours in the Sample Output. The slider should be moved to a number between 231 and 252. TheConvert to Black and White filter is used to make the contour lines more visible by changing the pixel color from light gray to dark black. The dark black lines are easier for Didger to identify when using theVectorize Image command.
      Convert to Black and White dialog
      Image of Black and White filter with the options in step e selected.
    6. After applying both filters you can now use the Vectorize Image command to digitize all the contour lines. 
      Contour Map After Filters

      Vectorized Contour Map

      Image of contour map after filters were applied. Image of digitized contour lines using the 
      Filters and the Vectorize Image command.
 

Trusted by over 10,000 Companies and Schools


Snow Depth Map for Colorado Ski Resorts

Image Interested in creating a cool map of snow depth for Colorado Ski Resorts? Here's how to do it! First you'll need to get the snow depth information... Read More

Subscribe to Our Newsletter

Enter your email address below to receive email notifications of product updates and our newsletter, filled with helpful technical tips and case studies.