[GRASS-user] Is Watershed image segmentation program in GRASS GIS?

Moritz Lennert mlennert at club.worldonline.be
Wed Nov 11 07:34:41 PST 2015


On 11/11/15 07:47, Uttam Kumar wrote:
>
>
> Hi All,
>
> Is watershed image segmentation program or a similar module available in
> GRASS GIS?
>
> I understand that we have r.watershed, i.segment and r.grow in GRASS
> GIS. But I do not know which one best suits my problem.
>
> The problem is:
>
> I have two layers of raster data -
> 1.) a gradient image (obtained by applying a 3 x 3 sobel filter on a
> water index using r.mapcalc), and
> 2.) a seed image of 2 classes labelled as "1" and "2" and remaining
> pixels as "0".
>
> I want to use the seed image and the gradient image (which shows
> direction of change in intensity) information to perform segmentation
> using the watershed algorithm and label all "0" pixels as either 1 or 2.
>
> r.watershed does not use watershed segmentation algorithm. i.segment is
> something close but I am not sure.
>
> Please suggest.
>
> Any comment is appreciated.

Currently GRASS GIS only proposes a region-growing segmentation 
algorithm in i.segment.

However, even though it is not really made for this, and I'm not sure of 
the exact algorithm used in r.watershed, this module can be used for 
image segmentation. One caveat are the edges which r.watershed treats in 
a particular manner, but I'm sure a work-around is possible.

Moritz


More information about the grass-user mailing list