The Raster to Vector Dialog Box

Introduction

This topic will explain the Raster to Vector dialog box, will explain where to find the function, and explain the options found in it. This topic will also explain how to use the Raster to Vector dialog box with quick steps, and provide links to related topics.

The Raster to Vector dialog box

The Raster to Vector dialog box defines the strategy used to vectorize images. This is the process of converting raster graphics into vector graphics. In other words, the software creates sketch geometry (lines, arcs, and/or splines) using the colors of each pixel in an image. BobCAM provides vectorization options for up to 64 colors when using the Multi-Color Strategy. This dialog box is not accessible until an image is loaded using the BobART tree.

To vectorize an image:

 

  • In the BobCAM Art Tree, right-click Images, and click Load Image.

The Image Location and Orientation dialog box displays.

  • Select a Planar Face, Plane or Edge that the image is to be oriented to. The Image Location on the selected Planar Face, Plane or Edge can be altered later.

  • Click (OK).

 

  • In the Open dialog box, select a file type, select an image file, and click Open.

 

  • After loading an image, right-click Image Name, and click Vectorize.

 

The Raster to Vector dialog box displays.

Parameters

Vectorizing Strategy

There two strategies to use when vectorizing images. Select either the 2-Level Black/White or Multi-Color Strategy as explained next:

 

2-Level (Black/White) Strategy

This option uses the Threshold Value to determine the vectorization based on the gray scale range of 1-255. You can either type a value in the Threshold Value box or you can use the Threshold Value slider. Use the preview window on the right to view the current setting. The minimum value (1) results in an all white preview, and the maximum value (255) results in a all black preview.

 

 

Multi-Color Strategy

This option uses the Threshold Value to determine the vectorization based on the gray scale range of 1-255. You can either type a value in the Threshold Value box or you can use the Threshold Value slider. Use the preview window on the right to view the current setting. The minimum value (1) results in an all white preview, and the maximum value (255) results in a all black preview.

  • # of Colors - sets the number of colors used for vectorization. You can select from a minimum of three colors up to a maximum of sixty-four colors. The colors display in the Colors to be Vectorized group.

  • Colors to be Vectorized - For the selected # of Colors, each color displays with a check box next to a preview of the color.

    Select the check box for any color that you want included in the vectorization.

    Clear the check box for any color that you do not want included in the vectorization.

  • Check All - selects the check box of all available colors.

  • Uncheck All - clears the check box of all available colors.

 

 

 

Vectorizing Parameters

 

  • Accuracy - determines the amount of each pixel used to generate a line segment. This value is a percentage value based on the size of the pixels. The default value 0.8 means that eight-tenths of each pixel are used to generate a line or arc segment. Increasing or decreasing this value may be necessary to improve the quality of the resulting vectorized profiles.

  • Remove Chains Less Than - allows you to clean up additional noise or unwanted profiles. The default value of 10 pixels means that if the system encounters an area of pixels of the same color, and the number of pixels in the grouping is less than or equal to 10, they are omitted from the final results.

  • With Arcs

    Select the check box to have the system generate arc segments when possible.

    Clear the check box to not allow arc creation.

  • With Splines

    Select the check box to have the system generate splines when possible.

    Clear the check box to not allow spline creation.

 

 

Image Size

 

  • Keep Aspect Ratio

    Keeps the X Size and Y Size values relative to each other. When one value is adjusted, the other automatically adjusts to keep this ratio intact.

    Will allow the ratio to be skewed so the X Size and Y Size values can be adjusted independently.

  • X Size - sets the length of the image along the X Axis.

  • Y Size - sets the width of the image along the Y Axis.

 

 

  • Create in New Sketch

    Creates a new Sketch.

    Updates the current Sketch.

  • OK - closes the dialog box and starts the vectorization calculation. The resulting sketch geometry displays in the graphics area when it finishes.

  • Cancel - cancels any changes and closes the dialog box.

The Vectorization Feature in the BobART Tree

The Vectorization feature and its shortcut commands are explained in the Vectorizing Images portion of the BobART Overview.

Quick Steps - Using the Raster to Vector Dialog Box

The first time that you click OK in the Raster to Vector dialog box, BobCAM automatically creates a SolidWorks sketch to contain the geometry from the vectorization result. When you edit the vectorization parameters and click OK, the resulting sketch geometry is automatically modified using the new parameters. The following provides an overview of using the Raster to Vector dialog box.

 

  1. Select the Vectorize Strategy that you want to use.

    The 2-Level Black and White Strategy is a good starting point for many images, but the Multi-color Strategy allows you to be more precise and target specific areas of the image.

  2. When using the 2-Level Black and White Strategy, adjust the Threshold value as needed. The preview inside the dialog box updates as you change the value.

  3. When using the Multi-color Strategy, select the Number of Colors you want to use for analyzing the image. The preview inside the dialog box automatically updates. Select the check box of each color you want to vectorize under Colors to Vectorize.

  4. You can change the Vectorization Parameters explained earlier in this topic, but you may want to use the default settings until viewing the result. You can then edit the feature and update the Vectorization Parameters as needed.

  5. Click OK to close the dialog box and create the vectorized geometry from the image.

 

For many images, you may only need to vectorize it one time to get the desired geometry, but more detailed images may require repeated vectorization. It is important to understand that editing the vectorization recreates the associated sketch using the new parameters.

 

Tip: When vectorizing an image more than one time (for more detailed images), you should create a copy of any sketch geometry that you want to keep so that the software doesn't replace it on the next vectorization. For example, you can copy a sketch from the Feature Manager design tree and paste it into a the tree to create a copy. You can use any SolidWorks method to copy the sketches, as long as you don't paste it into the sketch created for the vectorization by BobCAM.

 

  1. To edit the vectorization, do one of the following:

 

  • In the   BobCAM Art Tree, right-click Image-filename, and click Vectorization.

 

  • In the   BobCAM Art Tree, under Image-filename, right-click Vectorization and click Edit.

 

  1. Update the parameters as needed and click OK.

 

When you are finished with vectorization, you can use the sketch geometry for CAM features, emboss models, or SolidWorks features.

Related Topics

BobART Overview

How to Create an Emboss from Image

How to Vectorize Images