Re: Erosion and dilation [message #28930] |
Wed, 23 January 2002 02:55 |
Martin Downing
Messages: 136 Registered: September 1998
|
Senior Member |
|
|
"Akhila" <idlfreak@yahoo.com> wrote in message
news:b1ad7b05.0201222154.179148@posting.google.com...
> HI,
> I have a image in this link given below. This image is a segmented
> and thresholded binary image. I want to perform morphological
> operations so that i can get the arteries and veins only.
>
> http://www.geocities.com/idlfreak/image.jpg
>
> this is what i tried:
> st_el = 1
> B=REPLICATE(1,st_el,st_el)
> image2=ERODE(DILATE(image1,B),B)
> WINDOW,2,XSIZE=imSize[1],YSIZE=imSize[2]
> TVSCL,CONGRID(image2,imSize[1],imSize[2])
>
> when i enter a value of 1 for the structuring elements. the image is
> completely black and for a value of 2 its completely white. I have no
> idea why that happens. I'm not able to enter a value that's floating
> also.
>
> Can anybody help me with this please.
>
> thank you in advance....
>
> Cheers,
> Akhila.
Hi Akhila,
To do something useful with erode/dilate you need a structuring element
greater than one pixel!!! I would recommend you having a wee look at a text
on morphology to get you started. I cant reproduce your results,
but either way "st_el = 2" will work with a value of 1b
Also I hope you are not working on a JPEG saved true color version of your
"binary" image. If you need to save it use an non lossy format (tiff/png)
and convert it to a byte image - not true color!
Good luck
Martin
|
|
|