Raster to Vector

MagicTracer Conversion Software
[ Documentation ] [ Getting Started: 3 ]

Getting Started With MagicTracer Part 3

Step 1. Start with the Logo again

Let’s take another look at the logo we first saw in Getting Started 1. As before, use the Open Image command (shortcut key Ctrl+I or menu command File -> Open Image | Read More) to load sturalogo.gif. This image is actually somewhat small – some of the detail could get lost in processing.

Let’s double the image dimensions (menu shortcut Alt+I, R or menu command Image -> Resample | Read More). Set the Size Factor to 2, and select an Interpolation method of “Bicubic(hard).” Click OK when you are done. To avoid image-processing problems later, go ahead and remove transparency on the GIF (menu shortcut Alt+I, Y or menu command Image -> Remove Transparency | Read More).

The details are now more readily apparent. We basically have two colors that we are interested in tracing: Red, and Black. This time, instead of processing the image up front, we’re going to go straight into the Vector Conversion wizard.

Step 2. Start the Vector Conversion: Phase 1

Start the Vector Convert command (shortcut key V or menu command Vector -> Vector Convert | Read More). Check the boxes for “Keep Original Image” and “Enable Real-time Preview.” Color Reduction should be unchecked, and Line Thinning enabled with an Amount of 4. Do NOT click the OK button yet, however. The default Threshold value should be somewhere around 200. You will see a nice, clean outline of the borders around the white areas of the image. At first glance this looks pretty good.

Now let’s compare the outline so far to our original image. Click on the titlebar of MagicTracer to shift the focus back to the application (again, do NOT close the Vector Convert dialog box). Press F6 to enable Overlap Mode. Now you should see the traced outlines overlaid on a faded copy of the original image. We can now see that part of the black text has not been outlined. How can we trace the black and the red separately?

Note: if you already saw the overlaid images, and pressing F6 just shows you a black-and-white outline, press F6 again to restore Overlap Mode. F6 simply toggles it on and off. (shortcut key F6 or menu command View -> Overlap Mode | Read More)

We will approach this vector conversion project in two phases: First we’ll trace the dark text, then the lighter box with its enclosed letter.

Click on the titlebar of the Vector Convert dialog box to re-activate it. Adjust the Threshold slider bar downwards until only the black text is outlined, somewhere between 50 and 70. Click OK when the black text is traced to your satisfaction. We chose a Threshold of 60.

The next dialog box is the one that creates vectors from the outline image just generated. Place a check beside both “Remove All Existing Lines” and “Enable Real-time Preview.”

Note: now you don’t see the red-and-black logo image, but only the traced outlines that were generated in the previous step. That’s because the vectors are being generated from the traced outlines, not the entire original image. Don’t worry though – your full image is still around. MagicTracer is just working on a temporary copy at the moment.

Adjust the sliders to best fit the lines and curves to the traced outline. In the sample project provided, we settled on the following settings:

When you’re satisfied with your own settings, click OK. You’ll see that the color image is back in place, and you can see your vector entities overlaid on top of it (shortcut key F6 or menu command View -> Overlap Mode | Read More). Our project so far has been saved as GettingStarted3Logo1.mtp, if you’d like to compare results.

Step 3. Vector Conversion: Phase 2

Now, we’ve traced the black, and it’s time to trace the red. Return to Image mode (shortcut key F5 or menu command View -> Switch Display Mode | Read More). Use the Polygon Select Tool to select the text portion that lies outside the red box (shortcut key Shift+P or menu command Selection -> Polygon Select | Read More).

Delete the selected region. Don’t be afraid to use Undo and try again until you get it right. You may want to restore the white area by removing transparency (menu shortcut Alt+I, Y or menu command Image -> Remove Transparency | Read more).

Now run the Vector Convert command again. This time, adjust the Threshold slider to a higher value, until only the red box and the white “S” are outlined. We settled on 200 exactly. Turn on Overlap Mode (shortcut key F6 or menu command View -> Overlap Mode | Read More) and experiment with the Threshold values until you like the result, then press OK.

In the next dialog box, be sure to UNCHECK the box for “Remove All Existing Lines” – we want to add the new lines to the ones we did previously. As before, tweak the settings to best fit the outlines. We settled for exactly the same settings as before, only unchecking the “Remove” box. Click OK when you’re happy. We saved our version as GettingStarted3Logo2.mtp.

Step 4. Finishing up

For our final trick, we will restore the full image. Press F5 again to return to Image Mode, and Undo until the black text returns (shortcut key Ctrl+Z or menu command Edit -> Undo | Read More). Our version has been saved as GettingStarted3Logo3.mtp.

Step 5. Save the vector data

Of course, the ultimate goal of the vector conversion process is to obtain a file that we can load into a vector graphics program or a CAD program. MagicTracer can save files in two popular CAD formats: DXF and DesignCAD. MagicTracer can also save files as SVG and EPS two popular formats for graphics programs.

We’ll save this one in DXF format, which may possibly be the most widely accepted vector format on the planet. To do so, activate the Save Vector File command (shortcut key Ctrl+Shift+S, menu command File -> Save Vector File | Read More). Under the “Save as Type” option, choose DXF files. Then enter a filename, such as “gettingstarted3.dxf,” browse to your preferred save folder, then click the Save button.