Skip to content

Add allocation-light Canny path - #47

Merged
rsasaki0109 merged 1 commit into
mainfrom
agent/canny-fast-path
Jul 15, 2026
Merged

Add allocation-light Canny path#47
rsasaki0109 merged 1 commit into
mainfrom
agent/canny-fast-path

Conversation

@rsasaki0109

Copy link
Copy Markdown
Owner

What changed

  • make ordinary 3×3 canny() avoid public intermediate images
  • add safe strided canny_into and reusable CannyWorkspace
  • add Python out= / workspace support and a focused OpenCV harness
  • refresh the README CPU vision table and GitHub Pages algorithm catalog with measured results

Why

The previous implementation always materialized gradients, magnitude, and suppression images even when callers only requested the final edge map. That allocation and conversion overhead made the published OpenCV comparison stale after the newer reusable CPU work.

Impact

The focused OpenCV 4.13 receipt is bit-exact across 300 randomized cases. The standalone OpenCV lead is reduced from the superseded 10.66×–12.65× table row to 1.65×–1.77× on reusable document-line profiles. OpenCV still leads, and Epic 118D remains open.

Validation

  • cargo test -p spatialrust-vision --features imgproc-canny (25 passed)
  • cargo clippy -p spatialrust-vision --features imgproc-canny -- -D warnings
  • cargo check --manifest-path crates/spatialrust-py/Cargo.toml
  • Python binding Canny tests (2 passed)
  • focused VGA/1080p/4K harness, 300 randomized bit-exact cases

@rsasaki0109
rsasaki0109 marked this pull request as ready for review July 15, 2026 23:32
@rsasaki0109
rsasaki0109 merged commit ab31e91 into main Jul 15, 2026
86 of 92 checks passed
@rsasaki0109
rsasaki0109 deleted the agent/canny-fast-path branch July 15, 2026 23:36
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