简体   繁体   中英

How to store/write the surface normals of a point cloud in a PCL data file?

I'm using PCL and I'm able to visualize the direction of the normals in real-time using PCL Visualizer.

When I store the point cloud I'm getting stored only the points but not the direction of the normals.

How could I store the direction of the normals in a PCD file, in order to visualize them using pcl_viewer?

You have to store the point cloud with the right point type.

I'm guessing that you are sotring the cloud as pcl::PointXYZ , but what you should to is to store the cloud with a point type that support normal information, ie pcl::PointNormal ; or just store the normal information alone: pcl::Normal .

Check this link for information about what Point Types are supported on PCL: http://pointclouds.org/documentation/tutorials/adding_custom_ptype.php#id3

And chek the section 'Normals and other information' of this link for information on how to visualize the normals: http://pointclouds.org/documentation/tutorials/pcl_visualizer.php

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.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM