compare two splines
5 views (last 30 days)
Show older comments
Hi! What are your ideas to compare two splines ? I need to compare a lot of splines (functions) from the position of "look alike". But this "look alike" should include streching, shifting, inverting, etc. It should be "look alike" decision like from human comparison. I've already tried neural networks(didn't work), and corrcoef with streching, shifting full search. Some other ideas?
0 Comments
Answers (1)
Geoff
on 16 Apr 2012
Is the stretching uniform? If so you could handle all that (including rotation) as follows:
Sample your splines with a set number of subdivisions that is useful to explain your dataset without being ridiculous.
Compute the gradient of each, and normalise that.
This reduces the problem to comparison of gradients. For the inverted case, you can invert the gradient.
If non-uniform stretching is in play, or you want similarity where turning points are in slightly different parts of the curve, you could find the second derivative to get the turning points and segment your curves based on those points. You could do all manner of things here.
One way would be to measure the distance between turning points and whether the turning points are positive or negative, and what shape the gradient curve has between those points. Just ideas to try.
If your splines are closed, then you also have to select a feature point as a 'start' (and 'end'). How you achieve this will depend on assumptions or conditions in your dataset.
Hope that helps. Also, I just did a quick google on 'shape representation' and pulled up this paper (one of the first few results):
0 Comments
See Also
Categories
Find more on Spline Postprocessing in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!