This tutorial describes how to convert a scanned image into vector art. This process is called tracing or vectorization, and can either be done manually or using an automatic tool. In this tutorial, we explain how to use Vector Magic to perform this conversion quickly and easily.
This tutorial does apply to:
It does not apply to:
This tutorial uses Vector Magic Desktop Edition. You can download a trial version from the desktop application page.
The Online Edition is very similar to the Fully Automatic mode in the Desktop Edition. The user interface looks slightly different, and there's no transparency support. With those caveats in mind, you can also use the Online Edition to follow this tutorial.
Scanning hardware and software varies between manufacturers, so I will keep my remarks as general as possible. The following remarks are guidelines only; please experiment with your particular hardware, software, and source material to find the best choices for your particular case. I have found:
For black and white or grayscale source material, choose the grayscale scanning option.
In order to illustrate some of the characteristics of scans, I've done a little experiment.
In this section, I will describe my findings. As I indicated in the best practices section above, I concluded that it doesn't really make any sense to scan at higher than 300 dpi. Sure, scanning at 600 dpi, gives you an image of twice the size, but it is also twice as blurry.
Zooming in on an edge in the image is instructive.
In the 150 dpi case, the blurring at the edge is essentially just one pixel wide. This is how it should be. If the edge is infinitely sharp, then it should only be seen by one pixel in the scanner's sensor. That pixel should then be some appropriate gray, depending on how far across the pixel the edge actually lay.
In the 300 dpi case, the blurring spans two or three pixels, indicating that some blurring has occurred. It is not clear whether this is due to limitations of the physical sensors or some processing done by the scanner or the scanner software. In either case, the effective resolution of this image is not 300 dpi.
Likewise in the 600 dpi case, where the blurring spans three or four pixels. Again, such a blurry result should be considered to have a much lower effective resolution.
In this case, I think it would make the most sense to scan at 150 dpi. In cases where a better scanner were available, it might make sense to scan at 300 dpi.
I have elected to use the 150 dpi scan. Using Vector Magic Desktop Edition, I vectorize it with the following steps:
By and large, the result is very good. There are a few corners that are slightly rounded in the result but that are sharp in the original, but for the most part the vectorized result matches the original quite well. The SVG output from this vectorization may be downloaded here.
The screen shots below show a zoomed in section of the result.The first image is the vectorized result, the second image is the corresponding section of the bitmap, and the third image is an overlay of the vector paths on top of the bitmap original. In this section, the result appears crisp and clean, and clearly reproduces the original shape very well.
Unfortunately, not all source images are as crisp and clean as the previous example. That example was generated by printing a vector graphic with a laser printer and then immediately scanning it back in. The following example is much more challenging.
This scan is much more typical of scans. The person who scanned it made the mistake of leaving the scanner in color mode, so there are color edge artifacts along the shape boundaries. The original print quality appears to have been poor, and the shape is generally irregular, as though it were hand drawn. A size-reduced version of the image is shown below, and the full resolution version may be found here.
The following zoom view illustrates some of the challenges of this source image.
The discoloration is clearly visible. The tops of the white shapes are tinted blue and the bottoms red. The edges also appear highly irregular.
Again, I use Vector Magic Desktop Edition to vectorize this image. In this case, I try both "Medium" and "Low" quality settings to see how they turn out.
It should be noted that when a large image, such as this one, is loaded into Vector Magic Desktop Edition, the program analyzes the image to determine whether it makes sense to reduce the size of the image. Please note that the resize function that is used is very carefully selected to improve the quality as much as possible through effective use of pixel averaging. Most resizing features in commercial bitmap editors do not perform scaling operations in this way, so please rely on Vector Magic to perform any shrinking operations. And never increase the size of a bitmap before loading it into Vector Magic. Such efforts only ever reduce the quality of the result.
The next three images show highly zoomed in views of the original scan and the two vectorized results. The first is the original, the second is from the low result, and the third is from the medium result.
Which of the two results is better is a matter of preference. The low result uses fewer nodes and results in a simpler geometry, while the medium reconstructs the geometry more faithfully but uses more nodes. I personally prefer the medium input quality result but I can see the merits of both.
I have included one final image of the paths from the medium result over the top of the bitmap. As usual, you can see that the paths very closely follow the source bitmap. This characteristic is one of the great strengths of Vector Magic relative to other auto-vectorization tools.
This tutorial has provided guidelines and advice for how to best vectorize scans using Vector Magic Desktop Edition. A number of practical tips were provided to help you get the most out of your source material and your scanner. And we showed two example of scans being vectorized: the first was a high quality scan of a crisp good-quality original, and the second was a low-quality scan of a low-quality original.
I strongly encourage you to play around with this. Vector Magic can be a powerful tool for vectorizing scans if used properly.
Your image had transparency in it, so it has been flattened on a white background.
The Desktop Edition has full transparency support.
Your image was very large, so it has been shrunk to a reasonable size.
You can configure Pre-Crop in the Settings dialog.
The Desktop Edition does not have this limitation.
While the online editor is a very powerful tool, don't overdo it. If you need to do massive edits, it's probably better to work in a vector editor.
You can do a maximum of 1,000 edits. Further edits will be lost.
Select a color above, then use the eye-dropper on the image to change it.
Scan or drawing?
Spots between edges?
Extremely jagged edges?
Detail level Instructions
The purpose of this page is to let you manually correct segmentation mistakes made by Vector Magic. The segmentation is the crude partitioning of the image into pieces that are then smoothed to produce the final vector art.
Flip between the original bitmap, the segmentation and the vectorized result to see where there are errors.
Sometimes the finer details are not recovered automatically and you get a pinching effect in the result. The Finder can help point out some of these tricky areas - you need to edit the pixels so that the region you are interested in has a clear path.
Sometimes there are remnants of anti-aliasing left in the segmentation. The Zap tool helps you here by splitting a segment into pieces and merging these with the neighboring segments.
Try it out! You can always undo or reset your edits.
Edits made are saved to the server when you hit Next. Edits will be lost if you leave or reload this page before saving.
We're terribly sorry, but we encountered an error analyzing your image:
We're terribly sorry, but we encountered an error vectorizing your image:
We're terribly sorry, but we encountered an error fetching your image's segmentation.
This should be temporary, please try again in a few seconds.