It’s easy to see why people want to convert from raster to vector. Vectorization means your image becomes easily editable at any scale. Raster-to-vector conversion is often billed as the easiest CAD process to learn – just upload the file, click a button and out comes the perfect vector drawing. While it can seem simple at times, it’s not really a one-click process. It is common that some level of ‘cleaning’ will be required for the raster image before you put it through the conversion process. Here, Scan2CAD’s in-house experts weigh in on the 10 most essential raster tips that everyone should master. These guys have road-tested every tip on the Internet and even incorporated them into the Scan2CAD raster-to-vector conversion engine. Secret tricks of the trade? Right this way…
1. Change your raster image’s resolution
The rule of thumb is that lines should be 4-5 pixels thick. You can zoom into your image to check. For best results, we recommend an image resolution of at least 300 dpi. If your image has a particularly low DPI you can increase the scale in Scan2CAD (by clicking Raster Effects > Scale).
2. Reduce colors
In an ideal world, all images that you’re converting to vector would be monocolor (black and white). This gives you the clearest possible contrast between the background (typically white) and the foreground (typically black – these being the elements you wish to vectorize).
Commonly, however, even an image that appears black and white may be formed of hundreds of colors on the grayscale.
Reducing colors is important because a conversion engine will detect every shade as a separate region in the image. Therefore, if you converted an image with complex colors into vector then you will have a large number of separate vector entities in your image, rather than smooth, solid lines, text, and polygons.
Of course, it is common that you wish to keep multiple colors in your image (for example, maps containing several colors). For these images, reducing to black and white is likely to be inappropriate – instead, you should reduce the image to as few colors as possible whilst still maintaining the necessary detail of the image. Scan2CAD comes equipped with a function to reduce colors automatically – it will map all colors in an image to a number of colors of your choosing. Learn more about editing raster colors here.
3. Clean the background
In the same vein as color reduction, you may need to clean your background even if it looks clear when zoomed out. If, for example, you have an image with a white background, you may have distortion bleeding into the white background. If you do not remove these distorted areas prior to vectorization, you will convert them to vector. In these cases, the fastest way to clean the image background is by reducing the colors.
Simple or Adaptive Threshold in the Raster Effects Menu will do the job for black and white images. The color segment tool will also achieve this for images formed of multiple colors.
4. Negate the image
This raster effect can be applied if you’ve got a negative image (white lines on black). Scan2CAD assumes that all images are positive images (black lines on white), so you may end up having very different results after vectorization.
5. Thicken lines
Gaps or broken lines are especially common when scanning pencil-drawn sketches or faint prints. Thickening the lines/pixels should be done with care since using this tool too liberally can result in unwanted joined lines or touching entities which would deteriorate the quality of your vector.
6. Remove speckles
There are two ways to do this: either by using the Despeckle Tool or by manually erasing them using the Freehand Erase Tool. With the former, you can define how large the speckles are (in terms of pixels) and any marks of this size or larger would be automatically erased.
7. Remove holes
Just as there are stray pixels to remove, there are also gaps to fill in solid objects. Holes usually appear when the scan is too faint. The steps really are self-explanatory—just click Raster Effects > Clean > Remove Holes.
8. Smooth the image
How closely do you want to trace around the edges of your raster image? The Smooth Raster Effect removes “hairs” on your image, which are usually a result of scanning at too high a resolution, or when scanning a pencil-drawn sketch. The scanner then picks out details that aren’t usually visible by the human eye. If left un-smoothed, the conversion engine will draw vectors at these loose ends.
9. Deskew the image
If images are scanned at a slight angle, what appears as straight lines in the raster image won’t be converted into clean, straight lines in the vector. Scan2CAD comes equipped with deskewing tools to fix these issues. However, heavy use of deskewing tools can have a negative impact on image quality, so if your image is very heavily skewed, it would be better to rescan the image (if possible) for optimum results.
10. Adding a border
Conversion engines cannot vectorize shapes that are right at the image edge. Luckily, this is quick to fix: simply select Raster Effects Menu > Border. Then, insert a suitable border width in pixels. Of course, if your scanned image has a large border or if you’ve inserted a border with too large a width, simply cropping the image would remove the unnecessary border.
To learn more about each of these effects, check out our comprehensive user manual. On the other hand, if you’re curious and just want to test each feature out, then you can—you don’t even have to read the instructions! It’s easy to click on them and see how each feature works with your very own eyes.