mirror of
https://github.com/opencv/opencv.git
synced 2026-07-29 15:23:05 +04:00
279bc4a27920e129ff1f3ddd6f61f645ce7c33d1
Add ColorHashTSDFVolume implementation #27823 # Add ColorHashTSDFVolume implementation [[#25155](https://github.com/opencv/opencv/issues/25155)] ## Description Added a new ColorHashTSDFVolume implementation that combines the benefits of HashTSDFVolume's efficient spatial hashing with color support. This provides memory-efficient RGB-D fusion with better performance compared to regular ColorTSDFVolume. ### Key Features - Hash-based spatial data structure for efficient storage - Color integration during volume updates - Raycast with color interpolation - Compatible with existing TSDF interfaces - CPU implementation with parallel processing support ### Implementation Details - Added new ColorHashTSDFVolume class with create() factory method - ColorVoxel structure combining TSDF and RGB data - Spatial hashing for efficient voxel lookup - Weighted running average for color updates - Trilinear interpolation during raycasting - Unit tests for basic operations and edge cases ### Files Modified/Added - modules/3d/src/rgbd/color_hash_volume.hpp - New header defining ColorHashTSDFVolume interface - modules/3d/src/rgbd/color_hash_volume.cpp - Implementation of ColorHashTSDFVolume - modules/3d/test/test_color_hash_volume.cpp - Unit tests ### Performance The implementation uses spatial hashing to only store voxels near surfaces, significantly reducing memory usage compared to regular ColorTSDFVolume while maintaining similar processing speed. ### Testing Added unit tests that verify: - Basic integration and raycasting operations - Empty volume handling - Memory usage patterns ### Future Work - GPU/OpenCL implementation - Additional color interpolation methods - Extended comparison tests with other volume types
OpenCV: Open Source Computer Vision Library
Resources
- Homepage: https://opencv.org
- Courses: https://opencv.org/courses
- Docs: https://docs.opencv.org/5.x/
- Q&A forum: https://forum.opencv.org
- previous forum (read only): http://answers.opencv.org
- Issue tracking: https://github.com/opencv/opencv/issues
- Additional OpenCV functionality: https://github.com/opencv/opencv_contrib
- Donate to OpenCV: https://opencv.org/support/
Contributing
Please read the contribution guidelines before starting work on a pull request.
Summary of the guidelines:
- One pull request per issue;
- Choose the right base branch;
- Include tests and documentation;
- Clean up "oops" commits before submitting;
- Follow the coding style guide.
Additional Resources
- Submit your OpenCV-based project for inclusion in Community Friday on opencv.org
- Subscribe to the OpenCV YouTube Channel featuring OpenCV Live, an hour-long streaming show
- Follow OpenCV on LinkedIn for daily posts showing the state-of-the-art in computer vision & AI
- Apply to be an OpenCV Volunteer to help organize events and online campaigns as well as amplify them
- Follow OpenCV on Mastodon in the Fediverse
- Follow OpenCV on Twitter
- OpenCV.ai: Computer Vision and AI development services from the OpenCV team.
Description
Languages
C++
87.6%
C
3.1%
Python
2.9%
CMake
2%
Java
1.5%
Other
2.7%