1. Limited time only! Sign up for a free 30min personal tutor trial with Chegg Tutors
    Dismiss Notice
Dismiss Notice
Join Physics Forums Today!
The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

Ransac for spline fitting

  1. Oct 9, 2012 #1
    I am wondering if there is any way to create a model that can be used in a RANSAC method where a spline could be determined from a noisy 3d point cloud.

    What i have is a volume containing a set of points in each xy-plane, having say 400 of these in the z direction and a spline shape emerges visually while simply looking at the plotted data in 3d space. I already have a line fitting RANSAC scheme where the error is determined by a simple distance measure but i can't get my head around how to determine a model for a spline.

    I am unsure if I am posting at the right thread so if I am at the wrong place please refer me to the right place :)
  2. jcsd
  3. Oct 10, 2012 #2

    Stephen Tashi

    User Avatar
    Science Advisor

    It's unclear what you mean by a "spline shape". The term "spline" usually refers to a curve or surface that is used to interpolate a smooth shape between known points or edges. Do you have known points or edges?
  4. Oct 10, 2012 #3


    User Avatar
    Science Advisor

    Hey tompish.

    This sounds like a good application of Integral Transforms using orthogonal functions.

    The idea is that you have these point data, and some kind of spline model and you want to project the point data to the spline model to get an approximation of your signal data that best represents this but in the context of a spline.

    If you want to do this, you'll have to take your spline and create an orthogonal basis which you will project your data to. You will need to use the Gram-Schmidt process to construct the orthogonal basis given your spline function.

    If you haven't done this kind of thing before, it's going to be a headache, and if someone hasn't already done it (and written up the code as well), then it's still going to be a headache.
  5. Oct 11, 2012 #4
    Thanks for the replies.

    It is lines i mean by saying "spline shape" visually emerges. I have two pictures of the same point cloud just rotated. Sorry that its hard to see but without any illumination its hard to illustrate depth.

    Thanks that says a lot, i have totally forgotten the linear algebra stuff that i learned a while ago. Ill give this a go but i am unsure of what criteria i should imply while testing the rest of the data against a spline model. Just by measuring distance to the spline might be insufficient. Also i think i should use some gradient measure that looks at the slope of the spline, since as it can be seen in the pictures the most prominent spline is not very tilted.

    Attached Files:

  6. Oct 11, 2012 #5


    User Avatar
    Science Advisor

    You could also try doing smoothing over the points using a polar co-ordinate basis to do the interpolating.

    So convert your data to polar co-ordinates and then do a smoothing in the way they do something like say a time series moving average or other similar technique.

    You can also search for smoothing techniques in general and apply them in polar space.
Share this great discussion with others via Reddit, Google+, Twitter, or Facebook