comp.lang.idl-pvwave archive
Messages from Usenet group comp.lang.idl-pvwave, compiled by Paulo Penteado

Home » Public Forums » archive » IDL routine to fill in gaps in line? / Searching IDL routine libraries?
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Return to the default flat view Create a new topic Submit Reply
Re: IDL routine to fill in gaps in line? / Searching IDL routine libraries? [message #74507 is a reply to message #74411] Tue, 18 January 2011 12:05 Go to previous messageGo to previous message
rogass is currently offline  rogass
Messages: 200
Registered: April 2008
Senior Member
On 18 Jan., 17:24, Robin Wilson <ro...@rtwilson.com> wrote:
> Hi all,
>
> I've recently realised what a wealth of useful code is in the various
> IDL routine libraries available on the internet. However, what I haven't
> found is a very good way of searching them. For example, I would never
> have learnt about the very useful COLLAPSE routine by Marc Buie if he
> hadn't posted about it as a response to one of my questions here.
>
> So, my question is two-fold:
>
> 1. Does anyone know of a routine in any of the IDL user-written
> libraries that fills in gaps in a line on a binary image to make it a
> full and complete line. For example, take in the following input (where
> * is a nonzero element and . is a zero element):
>
> . . * . . .
> . . . . . .
> . . * . . .
> . . . . * .
> . . . . * .
> . . . . * .
>
> And fill in the gaps to make a complete line like:
>
> . . * . . .
> . . * . . .
> . . * * * .
> . . . . * .
> . . . . * .
> . . . . * .
>
> 2. I have a suspicion that the code I need to do the above is out there
> somewhere. Does anyone have any particularly useful tips for searching
> all of the IDL libraries on the internet to find routines you need?
>
> Cheers,
>
> Robin
>
> -------
> PhD Student
> University of Southampton, UK

Hi, for searching you might use this one: http://www.astro.washington.edu/docs/idl/htmlhelp/

As Paolo stated you have to define your problem more precisely.
However, it seems to me that you want to apply an algorithm which
searches on the one hand a tree and on the other hand an
interpolation. Maybe, you can try the following:

0. refine your problem
1. start at a random, boundary near data point
2. compute euclidic distances by 'distance_measure'
3. search for next data point and mark last one as visited
3.a) next data point distance greater than sqrt(2)->interpolate
missing data points of shortest path (incorporate all data points
which are close enough to some extend and not interpolated)
3.b) continue
4. 'Canny' and 'dilate' or 'erode' or 'thin' your data to remove
'spikes'


Cheers

CR
[Message index]
 
Read Message
Read Message
Read Message
Previous Topic: Re: changing matrix size using interpolation
Next Topic: Double Xaxis pb with ticks

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ] [ PDF ]

Current Time: Tue Apr 28 06:25:20 PDT 2026

Total time taken to generate the page: 2.65344 seconds