BoundingBox algorithm in CC

Any question about the main GUI application (frontend)
Post Reply
dan801212
Posts: 3
Joined: Mon May 22, 2017 12:02 pm

BoundingBox algorithm in CC

Post by dan801212 »

Hi,

Currently I am doing some application which needs to calculate the edge length and the volume of a bounding box of a point cloud.

However, I got two different results.
1. The box dimension shows in CloudCompare Property.

2. The results calculated with PCL in this post: http://codextechnicanum.blogspot.de/201 ... ox-of.html

I'm curious what makes this difference and what's the algorithm used in CloudCompare.

Any help will be appreciate. Thanks
daniel
Site Admin
Posts: 7711
Joined: Wed Oct 13, 2010 7:34 am
Location: Grenoble, France
Contact:

Re: BoundingBox algorithm in CC

Post by daniel »

Hi,

If you refer to the 'sand-box' algorithm titled "Bounding-box PCA fit", then it's a very simple algorithm based on Principal Component Analysis. And it doesn't work very well (this is why it stays in the 'sand-box' section). On some clouds it can give interesting results, but on others it will be very bad (because it simply looks for the dimensions along which the cloud is the most 'elongated'. This works particularly badly on clouds with a rectangle shape (as the most elongated dimension is the diagonal, and not the width as you would expect).

I don't see any difference with the algorithm described in the post... Have you tried both algorithms on the same dataset? If yes, how much do the two results differ?
Daniel, CloudCompare admin
dan801212
Posts: 3
Joined: Mon May 22, 2017 12:02 pm

Re: BoundingBox algorithm in CC

Post by dan801212 »

Hi Daniel,

Thanks for the reply. After checking the pca fit in sand-box, I realized it's the same thing.
However, I wonder then what's the result in "Properties"?
Their is a "Box dimensions" part. So it's not a bounding box, then what is it?
Could you tell me how does it come or where should I search in source code?

Thanks :)
daniel
Site Admin
Posts: 7711
Joined: Wed Oct 13, 2010 7:34 am
Location: Grenoble, France
Contact:

Re: BoundingBox algorithm in CC

Post by daniel »

The dimensions displayed in the 'Properties' dialog are indeed the bounding-box dimensions (by default along X, Y and Z, but if you have used the sand-box tool, then it's in a strange state and the dimensions are the box dimensions and they are not expressed along X, Y and Z anymore).
Daniel, CloudCompare admin
dan801212
Posts: 3
Joined: Mon May 22, 2017 12:02 pm

Re: BoundingBox algorithm in CC

Post by dan801212 »

Ok, I thought it might be some other algorithm :p
Anyway, thank you very much for the clarification.
rohitjd
Posts: 1
Joined: Fri Oct 16, 2020 11:07 am

Re: BoundingBox algorithm in CC

Post by rohitjd »

What is the unit of the X,Y,Z dimensions mentioned in the properties section?
daniel
Site Admin
Posts: 7711
Joined: Wed Oct 13, 2010 7:34 am
Location: Grenoble, France
Contact:

Re: BoundingBox algorithm in CC

Post by daniel »

The same as the coordinates of the cloud/entity you have loaded ;). CloudCompare doesn't know anything about units (as this information is almost never stored in files). So it loads the coordinates 'as is' and display all values in the same implicit units.
Daniel, CloudCompare admin
Post Reply