Vision node
Image Trace
Traces the outlines in an image (Apple Vision contours) into one Points path with a pen-lift between contours — for Scope Voice, Lines Visualize, Path. Threshold sets the contrast Vision looks for, Invert for a dark pen on light paper; Simplify straightens wobbles; Max Points is the budget (on a scope the samples ARE the resolution), the smallest contours go first. Runs at Update Rate on a background task; coordinates in Grafit units, the shorter edge −1…1.
Inputs
| Port | Type | Default |
|---|---|---|
| ImageAny image: a camera, a drawing held up to it, a Text as Image, a rendered scene. | image | — |
| ThresholdHow much contrast an edge needs to count, 0…1 (Vision’s contrast adjustment). Low finds faint edges and noise, high only the bold strokes. | float | 0.5 |
| InvertOn for a dark pen on light paper; off for light shapes on a dark background. | bool | false |
| SimplifyStraightens wobbles: points closer than this to the line between their neighbours are dropped (0 keeps every point, 1 = up to 2 % of the image). | float | 0.3 |
| Max PointsThe budget for the whole path — on a scope the samples per revolution are the resolution. The smallest contours are dropped first, then the survivors thinned. | int | 600 |
| Min ContourContours with fewer points than this are noise and are dropped. | int | 4 |
| OrderAs found, nearest-neighbour (short jumps for the scope), or largest first (the budget keeps the important ones). | int | 2 |
| Working SizeVision works on a copy no larger than this (longest edge, px): 256 is fast and enough for a scope, 1024 for fine drawings. | int | 256 |
| Update RateTraces per second on a background task; the last result is served in between. | float | 15 |
Outputs
| Port | Type |
|---|---|
| Points | structure |
| Contours | int |
| Count | int |
How It Works
Image Trace turns any image into one ordered Points path of its outlines. It runs Apple Vision's contour detection on a background task at Update Rate, simplifies the result, and emits a single path with a pen-lift between contours — a non-finite point, which is exactly the convention Scope Voice and Lines Visualize understand.
Threshold sets the contrast Vision looks for, and Invert handles a dark pen on light paper. Simplify straightens wobbles out of the traced line. Max Points is the budget — on a scope the samples are the resolution — and when the budget is tight the smallest contours are dropped first. Min Contour discards specks, Order chooses how the contours are strung together, and Working Size trades trace detail against cost.
Coordinates come out in Grafit units, with the shorter edge spanning −1…1, so the path drops straight into any points consumer.
Use Cases
- Draw with a pen — Hold a drawing up to the camera and hear it through Scope Voice; the ink becomes the timbre.
- Live tracer — Into Lines Visualize: a camera feed rendered as a moving contour drawing.
- Vectorise a render — Trace a generator's own output and re-draw it as lines, or sweep geometry along it.
- Silhouette extraction — The outline of a person or an object as a path a Path node can smooth and route.
- Handwriting — Trace written text and animate the stroke with a Timeline.
Tips
- Raise Threshold for cleaner, fewer contours; lower it to pick up faint edges — but expect noise.
- Update Rate is a background cost. 10–15 Hz is plenty for a hand-held drawing; raise it only for fast motion.
- Max Points is the single most important knob for Scope Voice: too many and the pitch wanders, too few and the drawing loses its shape.
- Working Size below the source resolution is usually fine and much cheaper — the contours are smoothed anyway.
- Run the result through Path when you want the contours re-ordered or re-sampled before use.
Open Image Trace in the interactive catalog →
Image Trace is one of 381 nodes in Grafit Pro.
Free download. Every feature for 7 days, no card. Then €99.99 once — or keep playing your projects as a Player.