Find inner hull/ alpha shape?

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

Find inner hull/ alpha shape?

pranny


Above image shows a plane. I would want to find the points which represent the inner spacing. Something like the fourth image at http://cgm.cs.mcgill.ca/~godfried/teaching/projects97/belair/alpha.html .
I was attempting Concavehull with an alpha of 0.1 but it does not makes sense. Attached is the hull with alpha = 0.1. On increasing alpha, the points become even sparse. What would be a good way to get inner points?
Reply | Threaded
Open this post in threaded view
|

Re: Find inner hull/ alpha shape?

nenadpol
Hi,

Why alfa =  0.1 ? Any particular reason?

cheers
Nenad
Reply | Threaded
Open this post in threaded view
|

Re: Find inner hull/ alpha shape?

pranny
No specific reason. I tried with a bunch of values like 0.1, 0.2, 0.001, 1.0, 2.0 and so on. I found that larger and smaller values yield very strange results which do not fit my criteria.
Reply | Threaded
Open this post in threaded view
|

Re: Find inner hull/ alpha shape?

nenadpol
Hi,

Can you attach your pcd file?
Reply | Threaded
Open this post in threaded view
|

Re: Find inner hull/ alpha shape?

pranny
Here is my attached PCD file

floor_plane.pcd
Reply | Threaded
Open this post in threaded view
|

Re: Find inner hull/ alpha shape?

nenadpol
Hi,
I have used 0.1, 0.2 ......1.0 and it looks ok to me

In the picture below red is 0.4 and green 0.6 Looks fine.



cheers
Nenad
Reply | Threaded
Open this post in threaded view
|

Re: Find inner hull/ alpha shape?

pranny
This is wow. How did you manage to do it? My implementation is at https://gist.github.com/pranny/38e23fb68bd352505f06 and I did not got it :(
Reply | Threaded
Open this post in threaded view
|

Re: Find inner hull/ alpha shape?

nenadpol
Hi,

You are using pcl::SACSegmentation before ConcaveHull and by doing so you are losing a lot of points and as result, losing lot of details. It is not wrong to do that but you'll get different result.

I use ConcaveHull with original cloud and if I want to get flat result then I compute plane and project my result points onto plane.

Both codes are ok but they give different results, depends what you want.

cheers
Nenad


Reply | Threaded
Open this post in threaded view
|

Re: Find inner hull/ alpha shape?

pranny
Indeed, that was causing a lot of points to drop. As the point cloud itself is plane so I don't need to find a plane again and project it. Can directly find hull for this.

Thanks a lot :)