forum.alglib.net

ALGLIB forum
It is currently Fri Sep 20, 2024 3:57 am

All times are UTC


Forum rules


1. This forum can be used for discussion of both ALGLIB-related and general numerical analysis questions
2. This forum is English-only - postings in other languages will be removed.



Post new topic Reply to topic  [ 3 posts ] 
Author Message
 Post subject: Help with interpolation
PostPosted: Thu Feb 28, 2013 9:48 pm 
Offline

Joined: Thu Feb 28, 2013 9:12 pm
Posts: 2
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.


Top
 Profile  
 
 Post subject: Re: Help with interpolation
PostPosted: Mon Mar 04, 2013 7:56 am 
Offline
Site Admin

Joined: Fri May 07, 2010 7:06 am
Posts: 922
You can use parametric 2D splines provided by ALGLIB. They are intended for exactly this kind of problems.


Top
 Profile  
 
 Post subject: Re: Help with interpolation
PostPosted: Mon Mar 04, 2013 3:13 pm 
Offline

Joined: Thu Feb 28, 2013 9:12 pm
Posts: 2
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!


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 3 posts ] 

All times are UTC


Who is online

Users browsing this forum: Bing [Bot] and 4 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group