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

Home » Public Forums » archive » Re: Question on watershed segmentation
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
Re: Question on watershed segmentation [message #42229] Fri, 14 January 2005 12:50
David Fanning is currently offline  David Fanning
Messages: 11724
Registered: August 2001
Senior Member
Ben Tupper writes:

> See the HISTOGRAM online help for how to use the rev vector.

Or, read the Histogram Tutorial after you throw up
your hands with the on-line help:

http://www.dfanning.com/tips/histogram_tutorial.html

Cheers,

David

P.S. Let's just say it is a good idea to read that tutorial
a couple of times a year anyway, whether you need to or not!

--
David Fanning, Ph.D.
Fanning Software Consulting, Inc.
Coyote's Guide to IDL Programming: http://www.dfanning.com/
Re: Question on watershed segmentation [message #42230 is a reply to message #42229] Fri, 14 January 2005 12:07 Go to previous message
btt is currently offline  btt
Messages: 345
Registered: December 2000
Senior Member
Karsten Rodenacker wrote:
> On 14 Jan 2005 10:38:53 -0800, Pravesh <praveshsubramanian@yahoo.com>
> wrote:
>
>> has anybody used watershed from the idl lib?
>>
>> When we use watershed, the returned array consists of integers that
>> number the regions that belong together.
>> 0's indicate the boundary of these regions.
>> so, if from a watershed-segmented image, i want to extract data for a
>> particular segment only, how do i do it?
>> the fact that a logical segment in an image can contain a number of
>> segment obtained from watershed should be taken into consideration.
>
>
> That is just the drawback and the advantage of the watershed
> transformation. It is upon you to merge the parts which are distinct
> under watershed following your logics and necessity.
>
>> if the image can be divided into 6 logical segments, how do i get the
>> data(say, no. of pixels) for segment number 3 that consists of say, 500
>> small segments (watersheds!) obtained from watershed function.
>>
> One way to reduce the so called oversegmentation can be the
> preprocessing of the data e.g. by smoothing (gaussian, nlg, opening,
> closing etc) another is to try to merge the segments by certain criteria.
>

Hi,

Even after preprocessing the image, you'll want an effificant means of getting
at the pixels that belong to a region. To get at the pixels that are labeled
with a particular number, try using the HISTOGRAM function with the
REVERSE_INDICES keyword.

segImage = WATERSHED(image)

h = HISTOGRAM(segImage, reverse = rev)

See the HISTOGRAM online help for how to use the rev vector.

Ben
Re: Question on watershed segmentation [message #42233 is a reply to message #42230] Fri, 14 January 2005 10:49 Go to previous message
Karsten Rodenacker is currently offline  Karsten Rodenacker
Messages: 98
Registered: July 1997
Member
On 14 Jan 2005 10:38:53 -0800, Pravesh <praveshsubramanian@yahoo.com>
wrote:

> has anybody used watershed from the idl lib?
>
> When we use watershed, the returned array consists of integers that
> number the regions that belong together.
> 0's indicate the boundary of these regions.
> so, if from a watershed-segmented image, i want to extract data for a
> particular segment only, how do i do it?
> the fact that a logical segment in an image can contain a number of
> segment obtained from watershed should be taken into consideration.

That is just the drawback and the advantage of the watershed
transformation. It is upon you to merge the parts which are distinct under
watershed following your logics and necessity.

> if the image can be divided into 6 logical segments, how do i get the
> data(say, no. of pixels) for segment number 3 that consists of say, 500
> small segments (watersheds!) obtained from watershed function.
>
One way to reduce the so called oversegmentation can be the preprocessing
of the data e.g. by smoothing (gaussian, nlg, opening, closing etc)
another is to try to merge the segments by certain criteria.

Surprising is that I just yesterday asked David Fanning for possible graph
implementations to design merging operations of watershed results. And
today somebody else asked for graph algorithms too. Nice how things come
together.

Regards
Karsten

--
Karsten Rodenacker
------------------------------------------------------------ -------- :-)
GSF - Forschungszentrum Institute of Biomathematics and Biometry
D-85758 Oberschleissheim Postfach 11 29
Karsten.Rodenacker@gsf.de | http://ibb.gsf.de/ | DEL _ for reply
http://ibb.gsf.de/homepage/karsten.rodenacker/
Tel: +49 89 31873401 | FAX: ..3369
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: Re: resizing axis in a GUI
Next Topic: Elevation Shading in Object Graphics

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

Current Time: Thu Oct 09 21:14:24 PDT 2025

Total time taken to generate the page: 1.67716 seconds