pcl icon indicating copy to clipboard operation
pcl copied to clipboard

Generating Image from Unorganized PCD

Open dhirajsuvarna opened this issue 5 years ago • 9 comments
trafficstars

Hi,

I have seen an exe pcl_pcd2png.exe which works on organized point clouds.

I have unorganized point clouds. Is there any way to generate images from them?

dhirajsuvarna avatar Apr 03 '20 06:04 dhirajsuvarna

A workaround I'm using involves using the pcl::visualization class.

  1. Create a visualizer and add your cloud.
  2. Use resetCamera() or manaully set camera parameters to get the view you need.
  3. use saveScreenshot() to capture a png image.

This gives you a lot of freedom to mess around with the visualizer to get the exact output you need, since all of the options available in the visualizer is at your disposal.

haritha-j avatar Apr 04 '20 13:04 haritha-j

@haritha-j Thanks for the workaround. So this means that I cannot use the exe to achieve this, but need to write my own code.

Can you direct me to the getting started guide for pcl as I am new to this library?

dhirajsuvarna avatar Apr 04 '20 14:04 dhirajsuvarna

You can use http://pointclouds.org/documentation/tutorials/ for general instructions on getting PCL up and running. http://pointclouds.org/documentation/tutorials/pcl_visualizer.php This tutorial will help you get the visualizer running, and then you can refer to http://docs.pointclouds.org/1.10.1/classpcl_1_1visualization_1_1_p_c_l_visualizer.html regarding the methods you'll need to use.

haritha-j avatar Apr 04 '20 15:04 haritha-j

Yes, PCD2PNG tool is not suitable for your case. With unorganized point clouds you need to render them onto a virtual camera. Unfortunately, we do not have off-the-shelf classes in PCL that can do that for you.

taketwo avatar Apr 05 '20 14:04 taketwo

Marking this as stale due to 30 days of inactivity. It will be closed in 7 days if no further activity occurs.

stale[bot] avatar May 19 '20 05:05 stale[bot]

Any reason why this shouldn't be closed @taketwo? Should this be taken as a proposal to add ability to create png from unorganized pcd?

kunaltyagi avatar May 24 '20 07:05 kunaltyagi

Only useful if you want to start a list of things user request so we can rank them and implement later on (also useful for next GSoC editions). Opening/keeping an issue open might be more valuable once we decide to assign resources to it.

SergioRAgostinho avatar May 25 '20 08:05 SergioRAgostinho

I'm tagging things todo and good first issue for GSoC/GSoD

kunaltyagi avatar May 25 '20 08:05 kunaltyagi

What about cloud compare feature rasterization? Points can be projected on the user specified plane( x,y z) and resolution and converted to an image

Rajmohan-96 avatar Mar 10 '25 13:03 Rajmohan-96