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

Home » Public Forums » archive » Dilating at image boundaries
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
Dilating at image boundaries [message #46064] Thu, 03 November 2005 06:04
peter.albert@gmx.de is currently offline  peter.albert@gmx.de
Messages: 108
Registered: July 2005
Senior Member
Hi all,

I am trying to enlarge (satellite) pixels to be displayed using e.g. TV
by using DILATE. My problem is that at the image boundaries DILATE
seems to refuse to do its job :-)

I'll illustrate it with a simplified example.

Let's say I have a vector with elements either being zero or different
from zero. Now I'd like to "draw a border" around each pixel different
from zero. With DILATE, it looks like this:

IDL> v = [0,0,0,1,0,0,0]
IDL> s = replicate(1,3)
IDL> print, dilate(v, s, /gray, /constrained)
0 0 1 1 1 0 0

Everything fine so far, the center pixel is no bordered by two more
pixels with the same value.

Now, if I am going to the edge of the vector, it looks like this:

IDL> v = [0,1,0,0,0,0,0]
IDL> s = replicate(1,3)
IDL> print, dilate(v, s, /gray, /constrained)
1 1 1 0 0 0 0

Still o.k., the structuring element s just extends to the first element
of v.

But now, if s gets larger, it's again no problem in the center:

DL> v = [0,0,0,1,0,0,0]
IDL> s = replicate(1,5)
IDL> print, dilate(v, s, /gray, /constrained)
0 1 1 1 1 1 0

But alas, at the image border things don't work any more:

IDL> v = [0,1,0,0,0,0,0]
IDL> s = replicate(1,5)
IDL> print, dilate(v, s, /gray, /constrained)
0 0 0 0 0 0 0

So the problem seems to be the structuring element extending outside
the vector. Is this a bug or a feature? I don't know.

Best regards,

Peter
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: GDL installation for Ubuntu Linux
Next Topic: Windows IDL DLM with Cygwin

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

Current Time: Wed Oct 08 15:17:24 PDT 2025

Total time taken to generate the page: 0.00466 seconds