Difference between octree filtering methods?

Feel free to ask any question here
Post Reply
p01ntsurf3r
Posts: 8
Joined: Thu May 01, 2014 2:47 pm

Difference between octree filtering methods?

Post by p01ntsurf3r »

Pardon me for not exploring the forum better before asking this question. I just noticed that if i perform an octree filtering using a subsampling method it returns slightly different results than if i perform a resampling using octree filter. Whats the difference in the way these two methods behave?
daniel
Site Admin
Posts: 7405
Joined: Wed Oct 13, 2010 7:34 am
Location: Grenoble, France
Contact:

Re: Difference between octree filtering methods?

Post by daniel »

I believe that the point selected inside each cell is not the same for both methods. In one case you'll get the point which is the closest to the octree cell center. In another case you'll get the gravity center of the points falling inside the cell (this one should be for the 'resampling' method if I'm not mistaken). I'll have to double check this though as I don't have access to the code right now...
Daniel, CloudCompare admin
daniel
Site Admin
Posts: 7405
Joined: Wed Oct 13, 2010 7:34 am
Location: Grenoble, France
Contact:

Re: Difference between octree filtering methods?

Post by daniel »

I confirm that the 'Resample' method generates a new point corresponding to the gravity center (for each cell). And the 'Subsample' octree-based method keeps the point nearest to the cell center (i.e. it's actually a sub-sampling and not a re-sampling method: it doesn't create new points).
Daniel, CloudCompare admin
p01ntsurf3r
Posts: 8
Joined: Thu May 01, 2014 2:47 pm

Re: Difference between octree filtering methods?

Post by p01ntsurf3r »

Is there command line functionality for resampling? subsampling using cmd line has worked well for me, im just curious if there is a way to resample.
daniel
Site Admin
Posts: 7405
Joined: Wed Oct 13, 2010 7:34 am
Location: Grenoble, France
Contact:

Re: Difference between octree filtering methods?

Post by daniel »

Do you mean 'upsampling' (i.e. filling the holes with points?).

If yes the only method available to do this is part of the qPCL plugin (the MLS tool) and there's actually no way to access plugins through command line mode yet.
Daniel, CloudCompare admin
Ruodan
Posts: 2
Joined: Mon Aug 19, 2019 1:56 am

Re: Difference between octree filtering methods?

Post by Ruodan »

Hi Daniel, many thanks for your reply to this question. I actually applied both the resampling and subsampling octree method on a point cloud and verified whether the two new clouds created contain points in the original cloud. Surprisingly, both new clouds contain points belonging to the original cloud.
I am so confused because "the 'Resample' method generates a new point corresponding to the gravity center (for each cell). And the 'Subsample' octree-based method keeps the point nearest to the cell center" - Does this mean 'Resample' cloud should have many points not exist in the original one. However, this is not in my case...
daniel
Site Admin
Posts: 7405
Joined: Wed Oct 13, 2010 7:34 am
Location: Grenoble, France
Contact:

Re: Difference between octree filtering methods?

Post by daniel »

Are you referring to the 'Edit > Octree > Resample' method? Because it does compute the gravity center in each octree cell (so theoretically in the general case, the points can be different). But if the octree cells are actually so small that there's only one point in each cell, then you would get the same cloud as output. And of course, whenever a cell contains only one point (whatever its size), then you'll also get the same point in output.
Daniel, CloudCompare admin
Ruodan
Posts: 2
Joined: Mon Aug 19, 2019 1:56 am

Re: Difference between octree filtering methods?

Post by Ruodan »

Many thanks for your reply, Daniel!
Post Reply