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

Home » Public Forums » archive » about label regions
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: about label regions [message #30600 is a reply to message #30523] Mon, 06 May 2002 22:53 Go to previous messageGo to previous message
Xiaoying Jin is currently offline  Xiaoying Jin
Messages: 20
Registered: May 2002
Junior Member
Thanks for your suggestion.

That's what I want to do. I previously thought of this kind of method (label
region after edge detection), but using the normal edge detection we can not
localize the edge to one pixel wide. I think your suggestion is very
helpful. I will try that.

Besides, what is the funciton "Distance"?

Regards,

Xiaoying Jin

"Ted Cary" <tedcary@yahoo.com> wrote in message
news:3CD71905.25D5A98D@yahoo.com...
Thanks for your suggestion.
> If the gray levels of the regions are fairly uniform, do some type of edge
> detection. Mask anything that is not an edge, then you will have a mask
of
> only region interiors. This mask is a bi-level image that you can analyze
with
> one call to LABEL_REGION.
>
> For edge detection of regions of uniform gray level, you might try a
grayscale
> analog of a gradient morph to find the margins. Try something like this
for
> your image:
>
> rad = 1 ; Radius of structuring element. Change for fatter margins.
> disk = Shift(Distance(2*rad+1), rad, rad) LE rad ; Create a disk
structuring
> element.
> imageDilated = Dilate(image, disk, /GRAY) ; Dilate the image with the
disk.
>
> wh = Where(image NE imageDilated) ; Find subscripts of margins.
>
> marginMask = image ; Just create another image of same size as original.
> marginMask[*] = 255 ; Pretend everything is in the interior.
> marginMask[wh] = 0 ; Set margins to 0.
>
> If you TVSCL the marginMask, you should see all regions of white with
black
> borders. This is a bi-level image that can be used with LABEL_REGION.
>
> The disadvantage of this technique is that "brighter" region margins will
> intrude by one pixel into dimmer regions because of the dilation, but at
least
> it illustrates the method. Keep in mind that this assumes your regions
are
> each monotone, as stated in the original post.
>
> Good luck,
>
> TC
>
>
>
>
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Mac OS X
Next Topic: suppressing carriage return in PRINT

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

Current Time: Wed Oct 08 18:44:07 PDT 2025

Total time taken to generate the page: 0.00438 seconds