Image Tracing Explained: Thresholds, Corners and Nodes
Image tracing is not one algorithm. It is a pipeline: quantize the colors, trace the boundaries, fit curves to the edges, then simplify the result. Here is what each stage actually does and where the common tracing mistakes come from.
November 3, 2026 · 9 min read
When you load a raster image into a tracer and click the button, the software does not magically know which pixels are part of a logo and which are part of the background. It does not understand that the black pixels form letters or that the white pixels are supposed to stay white. All it sees is a grid of color values. Image tracing is the process of turning that grid into vector paths — and every tracer on the market uses roughly the same pipeline to do it.
The pipeline has four stages: preprocess the image to make the edges cleaner, quantize the colors so there are fewer of them, trace the boundaries between color regions, then fit curves to those boundaries and simplify the result. Each stage has settings that control how aggressive it is, and most tracing failures come from pushing one stage too hard. This guide walks through the pipeline in order, explains what each stage does, and shows which settings matter.
Stage one: preprocessing
Before a tracer can find edges, it needs clean edges to find. Real-world images rarely have them. A photo has continuous tone and soft gradients. A scanned document has JPEG compression artifacts, sensor noise, and uneven lighting. A logo saved as PNG might have anti-aliasing halos where the designer tried to make it look smooth on a white background.
Desaturate or convert to grayscale
Most tracers work in grayscale or indexed color, not full RGB. If you feed in a color photo, the tracer converts it to grayscale before processing. You can often get better results by doing this step yourself in an image editor, where you have control over which channel to use or how the luminance is weighted. For a logo that is mostly red on white, extracting the red channel gives you higher contrast than a standard grayscale conversion.
Adjust contrast and brightness
A tracer finds edges by looking for sharp changes in brightness. If the image is low-contrast or unevenly lit, the edges will be mushy and the tracer will either miss them or put the boundary in the wrong place. Boosting contrast before tracing sharpens the decision. The trade-off: too much contrast turns gradients into hard steps, and too much brightness adjustment clips detail in the highlights or shadows.
Blur or sharpen
Blurring suppresses noise and small details, which can make the traced output cleaner. Sharpening accentuates edges, which can help the tracer find faint boundaries. Most users should leave this alone and let the tracer handle it, but if your source image is unusually noisy or soft, a light blur or sharpen can help.
Stage two: quantization
A photograph has millions of possible colors. A traced vector file typically has between two and twenty. Quantization is the process of reducing the input to a fixed palette. The tracer groups similar colors together, then treats each group as a single flat color. The number of colors in the palette determines how many distinct shapes the tracer will create.
Number of colors
This is the single most important setting in the whole pipeline. Set it too low and the tracer merges regions that should be separate. Set it too high and the tracer creates a separate shape for every subtle gradient or shadow, which produces a bloated file full of overlapping paths. For a logo or line art, two to five colors is typical. For a photo-style illustration, eight to sixteen. Beyond that you are usually tracing noise.
Color mode: full color vs. black and white
Most tracers offer a black-and-white mode that skips quantization and instead thresholds the image at a single brightness cutoff. Pixels brighter than the threshold become white; pixels darker become black. This is the right choice for scanned line art, text, or any image that is genuinely monochrome. It is the wrong choice for anything with gradients or multiple colors, because you lose all the intermediate tones.
Threshold value
In black-and-white mode, the threshold determines where the boundary between black and white lands. A threshold of 128 (middle gray) treats anything brighter than half-white as white. For a clean logo on a white background, this usually works. For a scanned document with uneven lighting, you might need to lower the threshold to capture faint text, or raise it to suppress page texture.
| Setting | What it controls | Typical mistake |
|---|---|---|
| Number of colors | How many distinct shapes the tracer creates | Too many colors = bloated file, overlapping paths |
| Black/white threshold | Brightness cutoff in monochrome mode | Fixed at 128 when image has uneven lighting |
| Palette mode | Automatic palette vs. custom colors | Letting tracer pick colors when source has gradients |
Stage three: boundary tracing
Once the image is quantized, the tracer walks the edge between each pair of colors and records the boundary as a sequence of points. The algorithm is usually a variant of marching squares or a contour-following method. The output at this stage is a polygon — a path made of straight line segments, one segment between each pair of adjacent pixels.
Speckle suppression
Noise in the source image produces tiny isolated regions in the quantized version. A single stray pixel becomes a one-pixel square. A cluster of three pixels becomes a three-pixel blob. These are almost never intentional shapes. A good tracer offers a speckle suppression setting that discards regions smaller than a threshold. Measured in pixels, this determines the smallest feature the tracer will keep.
Corner detection
A polygon from the boundary trace follows the pixel grid, which means every edge is either horizontal, vertical, or stair-stepped at 45 degrees. Real artwork has corners at arbitrary angles. The tracer looks for places where the polygon changes direction sharply and marks them as corners. These corners will later become corner nodes in the final curve, while the smooth sections will become smooth nodes.
Stage four: curve fitting
A polygon made of hundreds of short line segments is not a useful vector. The next stage fits cubic Bezier curves to the polygon, replacing long runs of line segments with a single smooth curve. The algorithm is usually a least-squares fit that tries to minimize the distance between the original polygon and the fitted curve.
Curve tolerance or fitting error
This setting controls how closely the fitted curve must match the original polygon. A tight tolerance produces curves that hug the polygon closely, which means more control points and a larger file. A loose tolerance allows the curve to deviate further, which means fewer control points and a smaller file. The right value depends on what you plan to do with the output. For a logo that will be scaled to billboard size, you want tight tolerance. For a decorative illustration that will only ever be seen at thumbnail size, you can get away with loose.
Corner threshold
When the tracer finds a corner in the polygon, it needs to decide whether to create a sharp corner node or a smooth node. A sharp corner has independent control handles on each side; a smooth node has aligned handles. The corner threshold sets the angle below which a corner is considered sharp. A threshold of 90 degrees means any corner sharper than 90 degrees gets a corner node. A threshold of 180 degrees means all corners are smooth, which produces a very fluid result but loses hard edges.
Simplification: node reduction
After curve fitting, the tracer runs a simplification pass that looks for consecutive Bezier segments that can be merged into a single segment without exceeding the fitting error. This is where most of the file-size savings happen. The trade-off: aggressive simplification loses fine detail. For technical drawings, you usually want minimal simplification. For organic shapes, you can push it further.
| Stage | Key setting | What it controls |
|---|---|---|
| Preprocess | Contrast/brightness | How sharp the edges are before tracing |
| Quantize | Number of colors | How many shapes the tracer creates |
| Trace | Speckle suppression | Smallest feature size in pixels |
| Fit curves | Curve tolerance | How closely curves match pixel edges |
| Simplify | Node threshold | How many nodes survive simplification |
Layer by color vs. single silhouette
Most tracers offer two output modes: one path per color, or a single merged silhouette. The layer-by-color mode creates a separate path for each color in the quantized palette, stacked in painter order. This is the right choice when you want to edit individual colors later or when you need to send the file to a process that expects separated layers, like screen printing. The single-silhouette mode traces only the outermost boundary and discards interior detail. This is the right choice for a stencil or a shape that will be cut from a single material.
When to use layer-by-color
Use this mode when the source has multiple distinct regions that you want to keep separate. A logo with a colored icon and colored text. A map with different regions colored differently. A schematic with color-coded lines. The output will have one path per color, and you can change the colors or rearrange the layers in a vector editor afterward.
When to use single silhouette
Use this mode when you only care about the overall shape. A profile silhouette. A rubber stamp. A stencil for spray paint. The output will be a single path, possibly with holes for interior cutouts, and all the color information is discarded.
Common tracing problems and how to fix them
Most tracing failures come from a mismatch between the source image and the tracer settings. Here are the patterns that come up over and over.
Too many paths, file size is huge
The color count is set too high, so the tracer is creating a separate path for every subtle gradient or shadow in the source. Lower the color count to 4–8 and see if the output still captures the important features. If it does, you are done. If it does not, the source image might not be suitable for tracing.
Edges are jagged or stair-stepped
The curve tolerance is set too loose, so the fitted curves deviate from the pixel boundaries by more than one pixel. Tighten the tolerance until the curves follow the edges. If that makes the file too large, the source resolution might be too low. See Best Resolution for Vectorizing.
Small details are missing
Speckle suppression is set too high, so the tracer is discarding features you wanted to keep. Lower the speckle threshold to zero and see if the details reappear. If they do, you can dial the threshold back up until it only removes noise. If they do not, the details might be below the resolution of the source image.
Corners are too round or too sharp
The corner threshold is wrong for the subject matter. For geometric shapes and technical drawings, lower the threshold to 60–90 degrees so corners stay sharp. For organic shapes and hand-drawn artwork, raise it to 120–150 degrees so the curves flow smoothly.
Tools and software
Adobe Illustrator has a built-in Image Trace feature that runs the full pipeline and gives you sliders for most of the settings. Inkscape has Trace Bitmap under the Path menu, with a simpler interface and fewer options. Both are good for interactive work where you can preview the result and tweak settings until it looks right.
For batch processing, command-line tracers like Potrace or AutoTrace offer scriptable interfaces and fine-grained control. PNG-to-SVG converters often wrap one of these libraries and expose a subset of the settings. For photos and complex illustrations, specialized tools like Vector Magic or Adobe Capture use machine learning to improve the boundary detection, but they still run a similar pipeline under the hood.
Related resources
For guidance on preparing a source image before tracing, see Best Resolution for Vectorizing. For advice on whether to upscale a low-resolution image first, see Upscaling Before Vectorizing. For optimizing the traced output, see SVG Optimization Guide. For production workflows that involve tracing, see Batch Conversion Workflows.
Frequently asked questions
What is the difference between image tracing and vectorization?
They are the same thing. Image tracing is the process of converting a raster image into vector paths. Vectorization is the general term for that process. Both describe the same pipeline: quantize colors, trace boundaries, fit curves, and simplify.
How many colors should I use when tracing a logo?
For a simple logo, two to five colors is typical. For a more complex icon or illustration, six to ten. Beyond that you are usually tracing gradients or shadows that will bloat the file. If the traced output has dozens of overlapping paths, lower the color count.
Why does my traced image look jagged?
The curve tolerance is set too loose, so the fitted Bezier curves deviate from the pixel edges by more than one pixel. Tighten the tolerance setting until the curves follow the edges. If that makes the file too large, the source resolution might be too low.
Can I trace a photograph and get a good result?
Depends on what you mean by good. If you want a posterized or stenciled version with flat colors, yes. If you want something that looks like the original photo, no. Tracing discards continuous tone and replaces it with hard edges. For photo-realistic results, keep it raster or use a different technique.
How do I remove noise and small specks from the traced output?
Raise the speckle suppression threshold. This tells the tracer to discard any region smaller than a certain number of pixels. Start at 2–4 pixels and increase until the noise disappears. If you also lose details you wanted to keep, the source image needs cleaning before tracing.
Sources
Convert files for this workflow
Try it on your own file
Drop in an image or an SVG and see the result before you pay. No signup is required to preview.