ImageGraphics

ImageGraphics[image]

returns the content of image in the form of scalable vector graphics.

ImageGraphics[image,n]

uses up to n colors for the vector graphics.

ImageGraphics[image,colors]

creates vector graphics containing the specified colors.

Details and Options

  • ImageGraphics is also known as image vectorization or auto tracing.
  • ImageGraphics works with arbitrary 2D images and returns a Graphics object.
  • ImageGraphics has the same options as Graphics, with the following changes and additions:
  • DistanceFunctionAutomaticany distance supported in ColorDistance
    MethodAutomaticmethod to determine color segment contours
    MinColorDistanceAutomaticminimum color distance
  • Possible settings for Method include:
  • "Exact"exact representation of the contour
    "LinearSeparable"approximate contour by local linear separation
    {"LinearSeparable",α}merge and smooth segments with direction changes smaller than α
    "MarchingSquares"contour computed using marching squares
    "DualMarchingSquares"contour computed using dual marching squares

Examples

open allclose all

Basic Examples  (2)

Convert a color image into vector graphics:

In[1]:=
Click for copyable input
Out[1]=

Convert a natural image to vector graphics using 8 colors:

In[1]:=
Click for copyable input
Out[1]=

Scope  (3)

Options  (3)

Applications  (3)

Properties & Relations  (1)

Possible Issues  (3)

See Also

ImageMesh  Image  Graphics  Rasterize  ColorQuantize  DominantColors

Introduced in 2017
(11.1)
| Updated in 2018
(11.3)