Click here to Skip to main content
15,886,519 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I have a cluttered point cloud with its coordinate (x,y,z).My problem is how to find a specific shape in the data,eg sphere,cylinder.Can you give me some advice ,thnx
Posted
Comments
The_Inventor 14-Sep-13 21:23pm    
Well will you need to look for specific shapes, or a variety? For each shape you need to define the functional equation in code form, in a 'unit' standard size, so it can be scaled later. Then having done that, you can write a comparison routine that compares what is in the cloud, to your shapes at the size required.
vision0524 14-Sep-13 22:07pm    
thanks for your answer.I have another problem which confuses me so long time.My data consist lot of background information,not only the object that I want.How can I found which region is my interest area? Can you give me some advice?thnx
The_Inventor 15-Sep-13 5:19am    
Can't help you there, after all it is your interest area.
vision0524 15-Sep-13 6:21am    
thank you all the same!

1 solution

There is no general solution for this, but if you have a point cloud of just one shape you can try to find the parameters for a specific kind of shape and then test if it fits your cloud or not.

Unfortunately even this is a very difficult problem, mathematically: first you have to write down a parametric expression describing the surface type. Then you need to turn that descrioption into an optimization problem that minimizes the distance of the cloud points to the surface by varying the parameters of the surface formula. In theory this problem can be solved if you have a sufficient number of points (at least as many as you have degrees of freedom), but in praxis it is extremely difficult to escape the various numerical traps, such as avoiding local minima, or ensuring that your optimization actually converges.

For Spheres it is managable, as any three points define a circle that you know must lie on the surface. Furthermore, the line vertical to the center of that circle must pass through the center of the sphere. So, all you need is enough points to find two non-parallel circles, then cut the vertical lines through their centers, to find the center of the sphere. From there, it's easy to check if all cloud points actually lie on a sphere around that center: just check their distance!

For other quadrics it's a lot trickier, but I suspect that for cylinders, or maybe even cones, you may be able to come up with a similar constructive algorithm as described above for spheres.

A few years ago I sought for algortihms of this kind, but all I came up with were two scientifical papers dealing with the matter. Let's just say the algorithms they used would be something for a post doctarate to copy and implement: even though I am a mathematician (and expereinced programmer) myself, I didn't feel like trying myself on the problem.

If your points contain clutter as well, then all bets are off: if you don't know which points to test, then you cannot verify or correct the position and parameters of your surface. In this case, you need to somehow separate the data first. Obviously you can only do that if you have an idea which of your points belong to what object. This very much depends on your knowledge of the scene and the method that is used to obtain the point cloud.

The only more general advice I can offer is to partition your scene into many small cubic subareas and only look at points within such an area to determine if they could fit one of your simple surface types. Obviously they need to be big enough to contain a suffiecient number of points (you'll probably need a 15-20 at least to make a reliable fitting), but small enough that at least some of them do not contain "foreign" points (from other objects or the background scene). Once you found a match, you can check neighboouring cubes for more points that fit the same surface. And when you're done, you can remove all points from the cloud that fit your surface, then continue to analyze the rest.
 
Share this answer
 
Comments
vision0524 7-Oct-13 22:56pm    
thank you so much for your advice.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900