mirror of
https://github.com/visioncortex/vtracer.git
synced 2026-09-10 22:28:39 -07:00
1.9 KiB
Generated
1.9 KiB
Generated
Roadmap and Verification
Milestones
Each milestone leaves the repo building and tested.
- Scaffold — new workspace (
crates/vtracer-core,crates/vtracer); IR + stage traits; port the existing stacked pipeline behind them, behavior-identical; golden-SVG snapshot tests over the sample images; CLI ported to clap 4 (range validation viavalue_parser, no morepanic!). - Writer + optimizer —
VectorDocwriter with relative/shorthand encoding,QuantizePass,SimplifyPass; byte-size benchmark vs the 0.6.x output; rasterize-and-diff regression (resvg) proving visual equivalence. - Color fitting —
FixedPalette(OKLab nearest) +AutoQuantize+ adjacent-region merge;--palette/--palette-fileCLI. - Mosaic — boundary-graph module + open-polyline fitting (see mosaic.md);
--hierarchical cutoutswitched to the true mosaic; full unit/property test suite. - Bindings — pyo3 port,
vtracer-wasm, the npm package undernodejs/; deletewebapp/; CI covers crates.io + PyPI + npm releases.
Verification strategy
- Unit — hand-crafted label maps for mosaic (checkerboard, T-junction, nested islands, border-touching, self-loops); fitter round-trips; writer encoding cases.
- Snapshot — golden SVGs for the sample images per preset/mode; asserted byte-size budget for the optimizer.
- Property (proptest) — mosaic invariants: every boundary edge used exactly twice; shoelace area == pixel counts; PixelFitter rasterize round-trip is byte-identical to the label map; fitted deviation ≤ 0.5 px budget; endpoints exact on lattice nodes.
- Visual — rasterize output with resvg; pixel-diff/SSIM against the input (thresholded) and against pre-rewrite output for stacked mode; mosaic diffs confined to a ~1-px boundary band.
- Targets —
cargo build --target wasm32-unknown-unknown -p vtracer-core -p vtracer-wasm;maturin buildwithpython-binding;npm testinnodejs/.