Vectorization of Bitmaps

Note

Available since Synfig Studio 1.4.0.

Synfig Studio can convert raster (bitmap) images into vector artwork constructed from outlines. The vectorization algorithm is ported from OpenToonz animation software by Ankit Kumar Dwivedi.

Video Tutorial



What does Vectorization mean?

There are two common ways to represent a two-dimensional image:

  • Raster (or Bitmap) Graphics
  • Vector Graphics

In Bitmap Graphics image is stored as a two-dimensional grid of pixels. This is great for storing images of any complexity (i.e. photos), but transformation (i.e. scaling) of bitmap image usually results in quality loss - it becomes blurry and pixelated.

In Vector Graphics image is constructed from elements which described by mathematical formulas. As result, it is possible to transform such images without quality loss.

For more information about Raster and Vector graphics you can refer to this page.

It is very common situation when user have an input artwork as raster image (i.e. scanned sketch) and wants to convert it inot vector graphics. The process of conversion from raster to vector is called vectorization.

Usage

Right-click any Image Layer in Layers Panel and select “Convert to Vector” command.

../_images/convert_to_vector.png

You will see a dialog box with the following settings:

../_images/vector_dialog_box.png
  • Threshold - sets the value of the darkest pixels to be taken into account to detect lines to be converted to vector.
  • Accuracy - sets how much the vector stroke will follow the shape of the original drawing lines. High values create more precise strokes but makes them more complex.
  • Despeckling - ignores during the conversion small areas generated by the image noise; the higher the value, the larger the areas ignored.
  • Max thickness - sets the maximum vector stroke thickness; if this value is low very thick lines will be converted in two centerline strokes defining the line outline; if this value is high, they will be converted in a single centerline stroke.

Click “Convert” button and the image will be converted into a vector outlines (you will see a new Group Layer created).

Note

Synfig currently supports only centerline vectorization

Examples

../_images/vectorization-output-1.png ../_images/vectorization-output-2.png