|
Re: Question on watershed segmentation [message #42230 is a reply to message #42229] |
Fri, 14 January 2005 12:07  |
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  |
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
|
|
|