[GRASS-user] Question to the input seed grid of i.segment

Moritz Lennert mlennert at club.worldonline.be
Tue Jan 24 10:10:45 PST 2017



Le 24 janvier 2017 18:42:22 GMT+01:00, Raphael Knevels <raphael.knevels at uni-jena.de> a écrit :
>Dear GRASS-community,
>
> 
>
>I have to perform a multi-scale, object-oriented analysis on an image
>with
>about 93'535'000 pixels^^ 
>
> 
>
>I'm doing the process on a server, so I need for one simple
>segmentation
>process approximately 700-800 minutes depending on the threshold. 

This does seem rather long. Is your computational region set to the extent and resolution of your raster ?

Also try setting the memory parameter of I.segment to a higher value (depending on your server's resources).

Which thresholds have you tried ?

>The
>same
>process in SAGA takes around 60 minutes with the use of seed points (as
>grid
>pixels). 

Which segmentation algorithm do you use in SAGA ?

>But in SAGA there is no possibility for hierarchical
>segmentation.
>Therefore, I would like to use the seed points of SAGA as Input for
>GRASS
>7.2.0 to speed up i.segment.
>
> 
>
>However, I am not capable to transform the seeds of SAGA to a
>meaningful
>i.segment input. How has to look an optimal input seeds grid for GRASS?
>
> 
>
>- I've already found out is that it must be an integer grid with
>positive
>seed numbers. The float-grid output of SAGA seed contains single pixels
>surrounded by no-data values. When I transform the SAGA seed to an
>integer
>grid and into GRASS (by (r)gdal), I have to give no data values a
>positive
>number. Negative values in the seed-grid-input lead to an error in
>i.segment.

Seeds in i.segment have to be polygons not points. These polygons are represented by identical positive integer values (= IDs) in adjacent pixels, and they have to cover the entire region. When used as seeds for a segmentation, these polygons are the further merged.

I don't really understand what your seed points represent, but unless they have a semantic meaning related to the objects you are trying to identify, I'm not sure they are really relevant.

You could try using the brand new i.superpixels.slic add-on to create superpixels which you can then use as seeds.

Moritz



More information about the grass-user mailing list