Skip to content

perf(vision): accelerate exact distance transform - #33

Merged
rsasaki0109 merged 1 commit into
mainfrom
agent/faster-exact-distance-transform
Jul 15, 2026
Merged

rsasaki0109 merged 1 commit into
mainfrom
agent/faster-exact-distance-transform

Conversation

@rsasaki0109

Copy link
Copy Markdown
Owner

Summary

  • accelerate exact unit-spacing EDT with compact binary-row distances, tiled transposes, and bounded Rayon dispatch
  • add explicit Rust/Python output and workspace reuse, including packed 0/255 input without a normalization copy
  • extend the OpenCV harness with allocate/reuse EDT rows and refresh README/Pages/roadmap receipts

Performance

  • native Criterion 4K allocate: ~451.63 ms before, ~75 ms after
  • native Criterion 4K reusable output/workspace: ~43 ms
  • Python/OpenCV 4K allocate gap: OpenCV 12.35x before, 1.63x after
  • Python/OpenCV 4K reuse gap: OpenCV 1.07x on the final interleaved run
  • canonical OpenCV accuracy: exact fraction 1.0 and max error 0.0 at VGA/1080p/4K

Machine-specific details and limitations are in notes/2026-07-15_exact_edt_acceleration.md.

Validation

  • cargo test -p spatialrust-vision --features full --lib (96 passed)
  • EDT full-feature property test (passed)
  • cargo clippy -p spatialrust-vision --features dense --all-targets -- -D warnings
  • focused Python binding tests and mypy.stubtest (passed)
  • OpenCV performance report contract (8 passed)
  • workspace rustdoc for spatialrust-vision (passed)
  • final seeded/interleaved OpenCV performance suite at VGA/1080p/4K (passed)

The broader full-feature Clippy command still reaches the existing spatialrust-camera/src/rgbd.rs manual div_ceil warning; this focused PR does not modify that unrelated baseline issue.

@rsasaki0109
rsasaki0109 merged commit 58f82dc into main Jul 15, 2026
86 of 92 checks passed
@rsasaki0109
rsasaki0109 deleted the agent/faster-exact-distance-transform branch July 15, 2026 11:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant