In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-03-28 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >
Share
Shulou(Shulou.com)06/03 Report--
Today, I will talk to you about the three visualization methods of point clouds in HDF5 format, which may not be well understood by many people. in order to make you understand better, the editor has summarized the following for you. I hope you can get something according to this article.
1 introduction to point cloud
Point cloud data is HDF5 format data from Stanford University. HDF5 format is a multi-object file format for storing and distributing scientific data. You can use HDFView to open files and view data.
one
Www = 'https://shapenet.cs.stanford.edu/media/modelnet40_ply_hdf5_2048.zip
Point cloud also has PLY format: PLY file format is a set of 3D mesh model data format developed by Stanford University. Many models in the field of graphics are based on this format. I use the point cloud object file of this format to reference and compare some objects.
Point cloud also has PCD format: a new 3D point cloud data file format, which was originally designed to solve some file extensions that do not support PCL for 3D point cloud processing. His file header has a fixed format and must be encoded in ASCII, including the title and declaration of some attributes of the point cloud data. The PCD file can be opened using PCL_Viewer in the PCL library to view a 3D image of the point cloud directly.
PCL_Viewer on MAC needs to be installed with the PCL library, and some of the problems configured at that time were recorded in the blog. Environmental problems of PCL on Mac
2Visualization method 2.1 Matplotlib method 1
two
three
four
five
six
seven
eight
nine
ten
eleven
twelve
Fig = plt.figure ()
Ax = fig.add_subplot (111, projection='3d')
# point_range = range (0, points.shape [0], skip) # skip points to prevent crash
Point_range = range (0, points.shape [0])
Ax.scatter (points [point _ range, 0], # x
Points[point _ range, 1], # y
Points[point _ range, 2], # z
C = points [point _ range, 2], # height data for color
Cmap='spectral'
Marker= "x")
Ax.axis ('scaled') # {equal, scaled}
Plt.show ()
The effect is as follows:
2.2 Visualization of PCD format conversion with PCL_Viewer
The data in HDF5 format is rewritten to PCD file format, mainly when the data is written to meet the specific format of the top part of the PCD file. PCL_viewer is a PCL tool for visualizing point cloud files, which requires line visualization using the vtk library in the PCL library.
For details, see the H5toPcd.py of the point cloud classification in my github project.
2.3 Three.js Web Page Visualization
First of all, build a scene, traverse all the points that add 3D point clouds to the scene, and assign color RGB values and materials to the points. in fact, the scene is a container of objects. Then set the camera, and the angle of the camera determines the image of the 3D point cloud object at a certain angle in the scene. The camera takes pictures of the rotating point cloud so that the visual point cloud object can be seen by rendering and displaying it on the page. Finally, set up the renderer. Use the render (scene, camera) function of the renderer to set the pixel and page element size of the renderer, and the renderer displays the graphics taken by the camera in the elements of the page so that the image can be seen on the page.
For details, please see the draw2.html displayed on the point cloud classification page of the github project.
After reading the above, do you have any further understanding of the three visualization methods of point clouds in HDF5 format? If you want to know more knowledge or related content, please follow the industry information channel, thank you for your support.
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 205
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.