Voxelgrid without the weighted centroid

classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

Voxelgrid without the weighted centroid

Bill Cheatham
Hi all,

I have been greatly enjoying using PCL over the last few months; it is a very impressive piece of kit :).

I have come across something I would like to do, but am not sure how. I would like to run a voxelgrid filter, but instead of each returned point being the average of all points in that voxel, I would like it to be the true, original centroid of that voxel. (Colours I would like to be averaged as before).

Is there a feature that makes this possible? Otherwise I will head into the source files myself!

Thanks,
Bill


_______________________________________________
[hidden email] / http://pointclouds.org
http://pointclouds.org/mailman/listinfo/pcl-users
Reply | Threaded
Open this post in threaded view
|

Re: Voxelgrid without the weighted centroid

Radu B. Rusu
Administrator
Bill,

We don't have that functionality in yet as far as I know. We could try to come up with a new type of VoxelGrid filter
that does that exactly, if more people want it.

Cheers,
Radu.
--
http://pointclouds.org

On 12/01/2011 02:25 AM, Bill Cheatham wrote:

> Hi all,
>
> I have been greatly enjoying using PCL over the last few months; it is a very impressive piece of kit :).
>
> I have come across something I would like to do, but am not sure how. I would like to run a voxelgrid filter, but
> instead of each returned point being the average of all points in that voxel, I would like it to be the true, original
> centroid of that voxel. (Colours I would like to be averaged as before).
>
> Is there a feature that makes this possible? Otherwise I will head into the source files myself!
>
> Thanks,
> Bill
>
>
>
> _______________________________________________
> [hidden email] / http://pointclouds.org
> http://pointclouds.org/mailman/listinfo/pcl-users
_______________________________________________
[hidden email] / http://pointclouds.org
http://pointclouds.org/mailman/listinfo/pcl-users
Reply | Threaded
Open this post in threaded view
|

Re: Voxelgrid without the weighted centroid

raphael favier
This post was updated on .
Hello,

in that context, can you explain what is the difference between  pcl::VoxelGrid (module filters) and pcl::UniformSampling (module keypoints)?

Both have the same description:

from http://docs.pointclouds.org/1.3.1/classpcl_1_1_voxel_grid.html#_details
The VoxelGrid class creates a *3D voxel grid* (think about a voxel grid as a set of tiny 3D boxes in space) over the input point cloud data. Then, in each *voxel* (i.e., 3D box), all the points present will be approximated (i.e., *downsampled*) with their centroid. This approach is a bit slower than approximating them with the center of the voxel, but it represents the underlying surface more accurately.

from http://docs.pointclouds.org/1.3.1/classpcl_1_1_uniform_sampling.html#_details
The UniformSampling class creates a *3D voxel grid* (think about a voxel grid as a set of tiny 3D boxes in space) over the input point cloud data. Then, in each *voxel* (i.e., 3D box), all the points present will be approximated (i.e., *downsampled*) with their centroid. This approach is a bit slower than approximating them with the center of the voxel, but it represents the underlying surface more accurately.


At first, i had only read the UnifromSampling class description, so I had assumed that the voxelgrid filter was simply using the center of the voxel. Now I am a bit lost in what does what, or are they the same? :S

Raph
Reply | Threaded
Open this post in threaded view
|

Re: Voxelgrid without the weighted centroid

Radu B. Rusu
Administrator
One is part of the filtering library (VoxelGrid) and returns a new PointCloud, the other is part of the keypoints
library (UniformSampling) and returns well formatted point indices that can be used with the features library.

Cheers,
Radu.
--
http://pointclouds.org

On 12/06/2011 07:49 AM, raphael favier wrote:

> Hello,
>
> in that context, can you explain what is the difference between
> pcl::VoxelGrid (module filters) and pcl::UniformSampling (module keypoints)?
>
> Both have the same description:
>
> from
> http://docs.pointclouds.org/1.3.1/classpcl_1_1_voxel_grid.html#_details
> http://docs.pointclouds.org/1.3.1/classpcl_1_1_voxel_grid.html#_details 
> /The VoxelGrid class creates a *3D voxel grid* (think about a voxel grid as
> a set of tiny 3D boxes in space) over the input point cloud data. Then, in
> each *voxel* (i.e., 3D box), all the points present will be approximated
> (i.e., *downsampled*) with their centroid. This approach is a bit slower
> than approximating them with the center of the voxel, but it represents the
> underlying surface more accurately./
>
> from
> http://docs.pointclouds.org/1.3.1/classpcl_1_1_uniform_sampling.html#_details
> http://docs.pointclouds.org/1.3.1/classpcl_1_1_uniform_sampling.html#_details 
> /The UniformSampling class creates a *3D voxel grid* (think about a voxel
> grid as a set of tiny 3D boxes in space) over the input point cloud data.
> Then, in each *voxel* (i.e., 3D box), all the points present will be
> approximated (i.e., *downsampled*) with their centroid. This approach is a
> bit slower than approximating them with the center of the voxel, but it
> represents the underlying surface more accurately./
>
>
> At first, i had only read the UnifromSampling class description, so I had
> assumed that the voxelgrid filter was simply only using the center of the
> voxel. Now I am a bit lost in what does what, or are they the same? :S
>
> Raph
>
> --
> View this message in context: http://www.pcl-users.org/Voxelgrid-without-the-weighted-centroid-tp3551390p3564683.html
> Sent from the Point Cloud Library (PCL) Users mailing list archive at Nabble.com.
> _______________________________________________
> [hidden email] / http://pointclouds.org
> http://pointclouds.org/mailman/listinfo/pcl-users
_______________________________________________
[hidden email] / http://pointclouds.org
http://pointclouds.org/mailman/listinfo/pcl-users
Reply | Threaded
Open this post in threaded view
|

Re: Voxelgrid without the weighted centroid

raphael favier
I see,

thanks!

Raph