Tracing is the process of creating drawings from images. By using the pixels of an image as a guide we can trace over the image and create points, lines and areas in a drawing. The tracing process is like laying a sheet of tracing paper onto a photograph and then drawing lines with a pen to outline what is seen in the photo. The photo image is thus converted into a line drawing. Tracing is also called vectorization in older GIS systems.
To trace an image we use a map where the drawing layer in which objects are created appears about the image layer. We can then see both the drawing as well as the image being traced. There are two main methods of tracing within Manifold:
At any time we can draw points, lines and areas freehand using the pixels within an image as a guide.
Tracing tools use pixels in the image layer as a guide to create objects in the drawing layer semi-automatically. For example, the Trace Point command will create a point at the center of a pixel cloud.
When tracing an image we will usually use a combination of the above methods. When working with compressed images we can use freehand tracing only, since compressed images do not allow any manipulation as is necessary with tracing tools.
Suppose we would like to create a drawing by tracing over a satellite image of San Francisco Bay.
If we insert a new drawing into the project and then insert a map that has the drawing in a layer above the image we can use the Tools toolbar to draw points, lines and areas into the drawing using the image as a guide. The illustration above shows we have added six points and have drawn a magenta line.
If we turn off the image layer in the map we can see just the drawing that has been created.
Typical Workflow for Tracing
Most tracing of images in GIS is a five step process:
· Acquiring the image.
· Georegistering the image.
· Preparing the image for better tracing.
· Tracing the image.
· Editing the resultant drawing.
Acquisition of the image is a key step that often drives what happens in the rest of the process. Scanned images of paper maps are often used in tracing projects. Modern scanners have a bewildering array of options that can result in very different image characteristics for the scanned image. For example, some scanner settings will result in Moiré patterns when printed images are scanned at certain scanner resolution settings. We must learn to operate our scanner software well so that the images we use do not introduce any unnecessary difficulties.
Georegistering the image places it in correct relationship to the location of the drawing and the projections that are being used. This is accomplished via control points referenced to known locations.
Preparing the image involves using Manifold image commands to reduce clutter in the image and to clean up parts of the image that will interfere with tracing. We will often make several copies of the image (we do this after georegistering so all the copies are correctly georegistered as well) so that each copy can be differently processed. Preparation might involve relatively simple procedures such as using Threshold to pick out different colors and make all the rest of the image black or white. We might reduce the number of colors or otherwise simplify the image. We might even apply more involved procedures such as manually editing out text or other items that would interfere with automatic tracing tools. When certain very important parts of the image such as a particular region need to be traced we may take the time to select the region, smooth the selection and then adjust the color within the region to a single color so that it can be automatically traced.
Tracing the image is usually straightforward but time consuming. There is a basic trade-off between quality of tracing and the speed with which tracing is accomplished. Using automated tools is faster but results in lower quality tracing. The highest quality tracing is usually accomplished with the simplest methods: trace points at key intersections and then use those points to create lines and areas in the drawing. Areas are often best created by first tracing lines and then using those lines to build areas within the drawing.
Editing the resultant drawing is an inevitable step in any tracing project. It is often much faster to assume from the very beginning that a substantial amount of editing will be done in the drawing. One can then focus on tracing only those parts of the image necessary to build up the drawing as desired. We will often edit the drawing in one window while leaving the map with both the drawing and the image open in another window. We can then easily switch between editing just in the drawing or tracing and editing with the image as a guide.
Freehand Tracing vs. Automatic Tracing
In this documentation, we refer to manual tracing where the operator draws points, lines and areas as freehand tracing. The Freehand tracing topic provides tips for such work.
Tracing where Manifold creates points, lines and areas is called automatic tracing. The Tracing Tools topic discusses tools available for our use in automatic tracing. Surprisingly, it is often faster and more effective to limit the amount of automatic tracing we would like Manifold to perform.
That humans see what appear to be distinct objects in raster images is a trick of human cognition: there are no objects in images, only patterns of colored pixels within a continuous sea of pixels. Humans learn at a very early age to automatically recognize certain patterns of pixels as distinct things. We can do so even give a lot of extraneous pixel junk and other clutter that our brains automatically filter out.
It is the most natural thing in the world for a human to trace a straight line over a fuzzy, pixelated representation of a line; however, programming this simple human action so that computers can trace a straight line through the same fuzzy pixel cloud has proven remarkably difficult. There are no automatic tracing programs that produce entirely satisfactory results in all cases. At best, certain subtasks can be reliably performed if a human operator participates in the process by giving hints to the computer. We give hints to Manifold on what we way by setting the parameters in the Tool Properties pane for tracing commands.
Part of the difficulty in programming the process is the nature of human choice. All images contain ambiguities. We may think in some cases that it is "obvious" how to trace a particular image but this is usually because we unconsciously assume that "of course" certain choices will be made in a given way. When we trace the image manually we make those choices the way we want to make them without thinking twice.
One key aspect of choice is that images are intrinsically imprecise. At the pixel level images are full of ambiguities and imprecision. A very important part of tracing is making a continuous set of small decisions as to where different features are located and where they start and stop. At times this can be quite arbitrary and is simply a matter of "eyeball" judgement. We know how we like to make those judgements but our computer does not.
Everyone would love a tracing program that could take any image and automatically convert it into a vector drawing, pausing only to read our minds to know what it is we would like to do in the case of any ambiguity. So far there is no such program that comes remotely close to this objective. Most "fully automated" tracing programs are instead used to create an intermediate drawing that is then used as the raw material for manual corrections. Basically, the final drawing is created by manually editing the output of a "fully automated" program.
The Manifold viewpoint is that it is faster to use a semi-automated process right from the start. For these reasons the Manifold tracing tools assume that an alert operator usually will participate in the tracing process. The operator makes the big choices by pointing and clicking and by setting parameters while the computer does the drudge work of averaging pixel clouds to find good centerlines for lines and central locations for points.
See the Freehand tracing topic for manual tracing and the Tracing Tools topic for use of automatic tracing tools.
Historical Note on Digitizing Tablets
At times users may be curious why Manifold does not support digitizing tablets as a means of converting paper maps or other paper documents into vector data. The reason is that using scanners is much lower cost, much more efficient and much higher accuracy.
Digitizing tablets were flat panels to which a paper map or other document could be attached. A user could move a sensing stylus or puck to different locations on the paper and press a button to note that location (sensing electronics built into the tablet could determine the location of the stylus or puck at the moment the button was pushed). The tablet could then output the various locations so collected, which the associated tablet software could assemble into points or lines as desired. Some tablets provided more sophisticated functions, whereby the tablet could be used as a sort of mechanical user interface (UI) system together with a computer monitor, allowing the user to click the puck on sections of the tablet marked with a command menu.
Digitizing tablets made sense in an era when computers were weak and had very limited capabilities. Before mice and windowing graphical user interfaces (GUIs) became ubiquitous it made sense to cobble up a mechanical interface that allowed point-and-click interfaces no matter how primitive. Digitizing tablets also had the benefit of producing a relatively small stream of data, only the locations clicked, which could fit within the memory and data processing limitations of computers in that era.
In modern times, of course, the Windows metaphor is universal with every computer equipped with a mouse. Scanners have become so inexpensive that less than $50 buys a scanner that can scan at over 1400 DPI in full color. Once an image of a paper map has been scanned into a computer at high resolution, we can then use the full power of the computer to digitize that image as we would like.
An important benefit of using scanned images is accuracy. Humans cannot position a digitizing stylus or puck on paper with accuracy greater than about 10 DPI. However, once an image has been scanned at very high DPI we can then use the power of the computer to zoom into that image and click onto individual pixels if so desired. That gives humans the power to click with accuracy of thousands of DPI, if desired.
Working with scanned images also allows the computer to assist us with tracing tools such as semi-automated tracing, georegistration of image layers, overlays of other layers at the same time and similar assistance unavailable with a digitizing tablet. For example, a user wishing to create a new vector drawing of some region for which only paper maps are available might scan in a paper map, georegister that image using control points and then also link in an overhead satellite photo from an image server, displaying the scanned paper map image with partial opacity in a map over the satellite image.
Tracing can then proceed as a freehand tracing interpolation guided by the user's eye between what the paper map shows (which might be inaccurate due to printing or other errors) and what the satellite photo shows. The result can thus be better than using either a scanned paper map or a satellite image alone.