0

I have been using Illustrator's Image Trace (LiveTrace on or before CS5) for many years. I would like to replicate a similar result with open-source software. I assumed that Illustrator would first quantize the raster image into the determined colors and then apply edge-detection with a version of Ramer-Douglas-Peucker for vectors. I get different results in Illustrator or Inkscape, with the original image or with a quantized version of the image.

source images

Here is part of the original image showing a mouth:

part of original image

and here is the quantized version with 5 clusters (following the OpenCV documentation):

part of quantized image

results in Illustrator

I used these settings for Image Trace:

Illustrator LiveTrace settings

The result with the original image is:

Result of Illustrator LiveTrace on original image

The result with the quantized image is:

Result of Illustrator LiveTrace on quantized image

results in Inkscape

The settings in Inkscape are below. I'm not sure if the settings in the top box affect the bottom one. It has fewer settings than Illustrator.

Inkscape Trace Bitmap settings

The result with the original image is:

result in Inkscape with original image

The result with the quantized image is:

result in Inkscape with quantized image

questions

Results are different with the original versus the quantized image, and with Illustrator versus Inkscape. I like Illustrator with the original image better because the continuous line of the mouth gives a certain charm to the image and it also removes noise in the image, such as the patch of a different color above the mouth.

I once found a link describing the Image Trace algorithm in a few papers and now can no longer find it. Thanks to @BilleyKerr's comment, I understand that Image Trace is proprietary and probably a trade secret, so I will never know exactly how it works. My questions are:

  • how does Trace Bitmap work?
  • how can I get a result similar to Image Trace inside Inkscape, e.g. with threshold and level of blur?
  • I have found other command-line tools that vectorize a raster image, such as Potrace, ardeco, and rastertovector, has anyone used those or others with results and tuning settings similar to Image Trace?
10
  • 1
    Your first question is beyond the scope of GDSE. How Adobe's LiveTrace works is not a graphic design question, and no doubt an Adobe trade secret. Adobe doesn't share their source code - so nobody knows for sure. As for getting the exact same result in Inkscape, I think it's highly unlikely. You may be able to get close but there's no way they will ever be exactly the same. – Billy Kerr Feb 29 '20 at 19:29
  • 1
    Try tweaking the options in the 'options' tab for a cleaner result. Blur isn't taken into account, blur the image first, then import into Inkscape. Potrace is what Inkscape is using. – Moini Mar 1 '20 at 0:09
  • 1
    Just FYI.. Live Trace isn't Live Trace since CS6. It was rewritten for CS6, ground up, to be Image Trace in Illustrator. – Scott Mar 1 '20 at 8:53
  • 1
    You don't ask especially little. I guess most of us struggle with photo tracings and are happy if something acceptable pops out with reasonably few colors and low number of objects. We simply haven't the energy reserve which is needed to adjust for ex Inkscape to generate the same artifacts as Illustrator's tracing make. We rather use other ways than tracing to get our images. I suggest you at first process & edit & redraw the image in raster domain so that posterizing it gives reasonably good image if it must be traced. – user287001 Mar 1 '20 at 10:06
  • 1
    I draw for a living. Tracing isn't something which I rely on, at least not for any actual usable artwork. No matter how good it may be with any number of tools out there.. it's still aways a mess compared to actually drawing something. – Scott Mar 1 '20 at 10:07

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.