andyzeng / tsdf-fusion

Fuse multiple depth frames into a TSDF voxel volume.
http://andyzeng.github.io/
BSD 2-Clause "Simplified" License
734 stars 134 forks source link

Problem with tsdf2mesh.m #24

Closed hongtaowu67 closed 5 years ago

hongtaowu67 commented 5 years ago

Hi, I have generated the binary file and am trying to convert it to the ply file. But when I run the tsdf2mesh.m, an error shown below pops up:

Index in position 1 exceeds array bounds.

Error in tsdf2mesh (line 29) meshPoints(1,:) = voxelGridOrigin(1) + points(2,:)*voxelSize; % x y axes are swapped from isosurface

I check that the variable tsdf is not empty but the fv = isosurface(tsdf, 0) would give empty results for fv, thus empty points and faces.

I am wondering how to solve this problem. Thanks!