mirror of
https://github.com/opencv/opencv.git
synced 2026-07-21 19:33:03 +04:00
279bc4a279
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