we have a ZMap (aka depth-map) picture obtained from 3D triangulation with laser and camera. We know the depth value of each pixel and the resolution of camera (each pixel is associated to a 3d coordinate in mm). Our goal is to visualize the Zmap as a 2d Surface, so we thought of creating a point cloud, generate a mesh and display it with some 3D library We thought vtk could be the right choice, but we encountered some problem.
First we tried unorganized structure (vtkPolyData), generating meshes by 3dDalaunay triangulation. But the code is properly working when number of points is < 50k. Our 3D reconstruction is composed by 480k points and the computation time is really too much high.
Then we switched to organized (point with connections). IMHO this additional information should reduce computation time to create mesh, but we are not able to understand how to create a "vtkStructuredGrid" and to feed it with our Z values to get a 2D meshed surface.
Is it the proper way to do? Has anyone never tried this?
Thanks in advance
if your points are organized in 2D grid (while scanning) then you do not need complicated and slow triangulation algorithms
organize points into 2D table/grid
x,y
axises are parallel to table/grid u,v
indexes double pnt[maxU][maxV][3];
x,y
are directly aligned to grid then you need to store just the Z coordinate to spare some memory segmentate
int obj[maxU][maxV];
(u*maxV+v)
triangulate
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.