Re: Image outline [message #30996] |
Wed, 29 May 2002 19:30  |
idlfreak
Messages: 47 Registered: October 2001
|
Member |
|
|
Dr.Fanning, I wasn't trying to get that. I think i wasn't clear as
well. the original image looks like this:
www.geocities.com/r_akhila/8bit.tif
I tried to get the outline of the vertebra there. i could manage some
6 vertebra. i'm trying to get only the outine and clear the other
stuff. The image i got looks like this
www.geocities.com/r_akhila/output.gif
I need something which looks pretty close to this output but it has
small polygons which i'm trying to clear and that's what i'm not able
to do.
www.geocities/r_akhila/expect.gif
Thanks in advance...
-Akhila.
David Fanning <david@dfanning.com> wrote in message news:<MPG.175ef3896afb48f989901@news.frii.com>...
> Akhila (idlfreak@yahoo.com) writes:
>
>> I have an image of a vertebra. The image is posted in the link below:
>>
>> www.geocities.com/r_akhila/final.tif
>>
>> I have been trying to get a good sigle pixel wide contour of the
>> vertebra from the image. I tried different methods like edge
>> detection, thresholding, erosion, dilation and thinning. I still did
>> not get a good one. Can anybody please suggest some techniques that
>> will be helpful to obtain a contour of the image. Please help me.
>
> I have a little routine named FIND_BOUNDARY that I wrote based
> on some code sent to me by Richard Adams and written by his
> graduate student Guy Blanchard. The idea is to find a one
> pixel wide boundary around a region of interest given by
> a set of indices.
>
> http://www.dfanning.com/misc/find_boundary.pro
>
> It happens to work particularly well with your image.
> I did this:
>
> image = Read_Tiff('final.tif')
> s = Size(image, /Dimensions)
> indices = Where(image GT 0)
> pts = Find_Boundary(indices, XSize=s[0], YSize=s[1])
> Window, XSize=s[0], YSize=s[1]
> PLOTS, pts, /Device
>
> Cheers,
>
> David
|
|
|