The Science of Raster to Vector Conversion

Resolution in Vectorization

You may have noticed that some raster images appear sharper than others and are less pixelated when zoomed in at the same level. This is as a result of the difference in resolution, as raster images are resolution-dependent. The resolution of an image is what determines its clarity and quality.

Resolution is the number of pixels per inch of the raster image. It is measured in PPI (Pixels Per Inch). In higher quality images, the number of pixels per inch is relatively higher compared to lower quality images. Therefore, the higher the PPI, the higher the resolution, and the higher the resolution, the better the quality.

Raster to vector conversion

The majority of the digital images we come in contact with are raster images (such as JPEG, PNG and TIFF). These images are made up of numerous tiny colored squares known as pixels. It is widely used because of its easy accessibility, ease of sharing, compatibility with a plethora of browsers and applications. With all these advantages, raster images have various disadvantages including resolution dependency and their inability to retain their properties as when created. For example, you can’t download a raster image, let’s say a logo and edit to your specification, or a building plan that would be modified (Changing of roof size, the position of the door, and others).

Vector images, on the other hand, don’t have these problems. This is where raster to vector conversion otherwise known as vectorization comes to play. Vectorization is the process of converting a raster image to a vector image. Vector images are popular in the design and engineering industries and are made up of 2D points connected with curves (such as vector bezier curves) and lines known as paths. These images retain their sharpness when zoomed because they are not resolution-dependent like raster images. Their edges and filled areas are presented as mathematical gradients, making them arbitrarily magnifiable. Vectorization is also important for the retrieval of lost information. They can be downloaded into CAD applications or other applications for editing and modification.

How resolution affects raster to vector conversion 

There are many applications available for vectorization, such as Corel Draw, Inkscape, Protrace, and Scan2CAD. Vectorization is carried out by a process called image tracing. Tracing can be done manually or automatically. As we stated earlier, a raster image consists of numerous tiny pixels packed together. The tracing of an image with a higher number of pixels is way easier, as you comfortably get the curves and edges as the pixels are very close. You are not likely to achieve a quality vector image from a grainy, blurry, or messy raster image. 

Furthermore,  a raster image’s resolution is crucial in raster to vector conversion as it determines how well the shapes on the image are defined. Better defined shapes will result in better raster to vector conversion.

For example, consider the curve below.

smooth raster curve

On a raster image, this curve is represented by numerous square pixels.

The images below show the pixel representation of the curve at lower and lower resolutions.

  slightly pixelated curvepixelated curve

At the higher resolutions of the images, the pixels are small and can translate the curve’s shape relatively well. If these images are vectorized, a vector curve would be obtained.

The images below, on the other hand, display the pixel representation of the raster curve at gradually reducing resolutions.

  pixelated curvepixelated curvepixelated curvepixelated curvepixelated curvepixelated curve


 As the resolution of the image reduces, the PPI reduces and the pixels become too large to represent the curve. At this point, they no longer form a curved shape. If the image is vectorized at this resolution, the vector image wouldn’t show a curve as there’s actually no curve in the raster image.

Considering these, the importance of resolution in raster to vector conversion is apparent. Images with higher resolutions (higher number of PPI) are better for conversion than those with lower resolutions. Therefore a more accurate conversion tolerance can be expected with images of a suitable image quality.