---
estimated_steps: 8
estimated_files: 2
skills_used: []
---

# T04: VTracer vectorization (Mode B)

1. Add VTracer tracing to engine/pipeline/vectorize.py
2. Implement vtracer_trace() function:
   - Accepts preprocessed image (can be color for VTracer)
   - Calls vtracer with tunable params: colormode, hierarchical, filter_speckle, color_precision, layer_difference, corner_threshold, length_threshold, splice_threshold
   - Returns SVG string
3. Research vtracer Python bindings — may need vtracer pip package or subprocess
4. Test with photographic/noisy input
5. Compare Mode A vs Mode B output on same input

## Inputs

- `engine/pipeline/preprocessing.py`

## Expected Output

- `engine/pipeline/vectorize.py`

## Verification

cd engine && python -m pytest tests/test_vectorize.py -v -k vtracer
