KAIST-VCLAB / texturefusion

[CVPR2020] TextureFusion: High-Quality Texture Acquisition for Real-Time RGB-D Scanning
Other
121 stars 21 forks source link

Wrong preallocation of d_voxelZeroCross #10

Open grungeguitarist opened 1 year ago

grungeguitarist commented 1 year ago

Since d_voxelZeroCross is a list of (zero-crossing) voxels (and not voxel blocks), it should be allocated with the size... 'sizeof(int3) params.m_numSDFBlocks params.m_SDFBlockSize params.m_SDFBlockSize params.m_SDFBlockSize' and not... 'sizeof(int3) params.m_hashNumBuckets 2'.

This allocation happens in VoxelUtilHashSDF.h (while it is filled in findZeroCrossingVoxelsKernel(...) in CUDATexUpdate.cu).

Otherwise, it could crash with an illegal memory access exception when processing larger scenes.