Display pcd file header

698 Views Asked by At

I have 2 sets pf pcd file, the data in them is similar in terms of number of points but still there is a huge difference between load time of the pcd file (8x more). Following lines show the same.

suraj@suraj:~/PCL_Project/Data$ pcl_viewer PCD/000000.pcd 
The viewer window provides interactive commands; for help, press 'h' or 'H' from within the window.
> Loading PCD/000000.pcd [PCLVisualizer::setUseVbos] Has no effect when OpenGL version is ≥ 2
[done, 143 ms : 115385 points]
Available dimensions: x y z intensity

suraj@suraj:~/PCL_Project/Data$ pcl_viewer 0001/data1.pcd 
The viewer window provides interactive commands; for help, press 'h' or 'H' from within the window.
> Loading 0001/data1.pcd [PCLVisualizer::setUseVbos] Has no effect when OpenGL version is ≥ 2
[done, 1210 ms : 121016 points]
Available dimensions: x y z intensity

I want to see the header of these files, how to print the header information of a pcd file?

1

There are 1 best solutions below

0
On

Of all the articles I searched which gave info of PCD file header and data, none of them said how to display the contents. After trying multiple editors(gedit, visual studio editor, etc) I was able to display the contents of the file using Notepad++. The only difference between the header of both files is the DATA tag which tells the data type in which the actual point cloud data is saved. The file which is read faster has data type as binary and the slower one has data type as ASCII.

I converted the ASCII file to Binary and then read it again, the speed is now increased as shown below.

suraj@suraj:~/PCL_Project/Data$ pcl_viewer 000000.pcd 
The viewer window provides interactive commands; for help, press 'h' or 'H' from within the window.
> Loading 000000.pcd [PCLVisualizer::setUseVbos] Has no effect when OpenGL version is ≥ 2
[done, 160 ms : 115385 points]
Available dimensions: x y z intensity

suraj@suraj:~/PCL_Project/Data$ pcl_viewer data1.pcd 
The viewer window provides interactive commands; for help, press 'h' or 'H' from within the window.
> Loading data1.pcd [PCLVisualizer::setUseVbos] Has no effect when OpenGL version is ≥ 2
[done, 147 ms : 121016 points]
Available dimensions: x y z