Skip to content

Beat OpenCV dense RGB-D depth_to_xyz - #17

Merged
rsasaki0109 merged 1 commit into
mainfrom
optimize-rgbd-vs-opencv
Jul 15, 2026
Merged

rsasaki0109 merged 1 commit into
mainfrom
optimize-rgbd-vs-opencv

Conversation

@rsasaki0109

Copy link
Copy Markdown
Owner

Summary

  • Add dense depth_to_xyz_dense / _into with an audited x86_64 AVX2 fill path and Python depth_to_xyz(..., out=) for streaming reuse.
  • Optimize colored rgbd_to_point_cloud and document fair OpenCV comparison (dense XYZ, not PointCloud packing).
  • Harness gates median alloc + into speed vs cv.rgbd.depthTo3d; README/CHANGELOG note local ~1.4–2.2× wins.

Test plan

  • cargo test -p spatialrust-camera --release
  • maturin develop --release in crates/spatialrust-py
  • python bench/opencv_rgbd_comparison/run.py ×5 (ALL_PASS)
  • Optional: pytest crates/spatialrust-py/tests/test_bindings.py -k depth_to_xyz

Add dense H×W×3 fill (including out= reuse) and gate the harness on alloc/into medians so SpatialRust stays ahead of cv.rgbd.depthTo3d.
@rsasaki0109
rsasaki0109 merged commit e78cb49 into main Jul 15, 2026
82 of 88 checks passed
@rsasaki0109
rsasaki0109 deleted the optimize-rgbd-vs-opencv branch July 15, 2026 05:54
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