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 
Switch to threaded view of this topic Create a new topic Submit Reply
IDL routine to fill in gaps in line? / Searching IDL routine libraries? [message #74411] Tue, 18 January 2011 08:24 Go to next message
Robin Wilson is currently offline  Robin Wilson
Messages: 40
Registered: August 2010
Member
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
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 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
Re: IDL routine to fill in gaps in line? / Searching IDL routine libraries? [message #74509 is a reply to message #74411] Tue, 18 January 2011 10:37 Go to previous message
pgrigis is currently offline  pgrigis
Messages: 436
Registered: September 2007
Senior Member
On Jan 18, 11:24 am, 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:
>
> . . * . . .
> . . * . . .
> . . * * * .
> . . . . * .
> . . . . * .
> . . . . * .

This is an ill-posed problem, as there is more then one
way in which you can connect the points. You should first think
on a more detailed prescription on how you want this to happen.
For instance, this would also be a possible solution:

. . * . . .
. . * . . .
. . * . . .
. . * * * .
. . . . * .
. . . . * .


Ciao,
Paolo


>
> 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
  Switch to threaded view of this topic Create a new topic Submit Reply
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: Wed Oct 08 15:27:35 PDT 2025

Total time taken to generate the page: 0.00562 seconds