Page 1 of 1

BoundingBox algorithm in CC

Posted: Mon May 22, 2017 12:25 pm
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

Re: BoundingBox algorithm in CC

Posted: Mon May 22, 2017 5:23 pm
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?

Re: BoundingBox algorithm in CC

Posted: Mon May 29, 2017 12:13 pm
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 :)

Re: BoundingBox algorithm in CC

Posted: Mon May 29, 2017 7:35 pm
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).

Re: BoundingBox algorithm in CC

Posted: Thu Jun 01, 2017 9:03 pm
by dan801212
Ok, I thought it might be some other algorithm :p
Anyway, thank you very much for the clarification.

Re: BoundingBox algorithm in CC

Posted: Mon Feb 20, 2023 4:51 am
by rohitjd
What is the unit of the X,Y,Z dimensions mentioned in the properties section?

Re: BoundingBox algorithm in CC

Posted: Mon Feb 20, 2023 7:08 am
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.