Fit Clinder and check verticality

Feel free to ask any question here
Post Reply
atingasep
Posts: 1
Joined: Wed Mar 17, 2021 4:48 am

Fit Clinder and check verticality

Post by atingasep »

Hi Daniel,

I have a point cloud of a tower and would like to fit a cylinder to it and then check its verticality/ lean, does this have to be segmented and fit a plane and then cloud distance or is there a way to do this easier?

cheers,
Sam
daniel
Site Admin
Posts: 7713
Joined: Wed Oct 13, 2010 7:34 am
Location: Grenoble, France
Contact:

Re: Fit Clinder and check verticality

Post by daniel »

So, there's a kind of roundabout way to do this (not sure it's simpler!).

You can use the 'Ransac Shape Detection' plugin to detect a cylinder (check only the 'cylinder' as detected primitive, and generally it's a good idea to set a relatively high number for 'min support points per primitive', so that the algorithm doesn't find too many cylinders).

If it's successful, you can select the best matching cylinder entity (not the cloud subset, but really the primitive which is just below it in the DB tree). At the bottom of the properties list, click on the 'Export' tab of the 'Transformation history' section, and click on 'Clipboard'.

Last, create a default plane entity with 'Edit > Plane > Create' or with 'File > Primitive factory'. Select this plane and then click on the created plane and use 'Edit > Apply transformation', then click on the 'clipboard' button on the top-right part to paste the transformation matrix copied from the cylinder). You should then see in the plane properties its Dip and Dip direction values. The Dip is directly how horizontal the plane is.
Daniel, CloudCompare admin
Post Reply