forum.alglib.net
http://forum.alglib.net/

Help with interpolation
http://forum.alglib.net/viewtopic.php?f=2&t=784
Page 1 of 1

Author:  rhcpfan [ Thu Feb 28, 2013 9:48 pm ]
Post subject:  Help with interpolation

Hello!

I hope I'll not make a fool of myself, but I have a pretty annoying problem that I've been facing with for quite a long time, and I've recently discovered this pretty wonderful library and community.

I'm trying to do some image processing and the application I'm developing (or at least I'm trying to) has as input one image and some points defined by the user (captured from mouse clicks). The user chooses an image and defines some control points for a contour that represents one object in the image.

The problem is that I need somehow to interpolate those points, so the result is a smooth curve that goes through every control point... The bigger problem is that the contour might have concavities, etc.

Image

I've tried that with 2 spline1d curves (I have calculated the average between max(y) and min(y) where y is the array of Y values of the control points) but that doesn't solve my problem. It works for contours that have no concavities...

Image

My guess is that I need to interpolate the points in the order of clicking, but I have no idea how to do that...

I hope that somebody will try to help me...
Thank you in advance :)

Best wishes,
Andrei C.

Author:  Sergey.Bochkanov [ Mon Mar 04, 2013 7:56 am ]
Post subject:  Re: Help with interpolation

You can use parametric 2D splines provided by ALGLIB. They are intended for exactly this kind of problems.

Author:  rhcpfan [ Mon Mar 04, 2013 3:13 pm ]
Post subject:  Re: Help with interpolation

I tried to use them, but I don't know how... Can you give me some directions/sample code? I don't know where to start and how to build them...

Any help is appreciated!

Thank you very much for your kindness!

Page 1 of 1 All times are UTC
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group
http://www.phpbb.com/