[GRASS-user] Question to the input seed grid of i.segment
Moritz Lennert
mlennert at club.worldonline.be
Fri Feb 3 06:07:19 PST 2017
On 03/02/17 14:06, Rashad Kanavath wrote:
>
>
> On Wed, Jan 25, 2017 at 11:22 AM, Moritz Lennert
> <mlennert at club.worldonline.be <mailto:mlennert at club.worldonline.be>> wrote:
>
> On 24/01/17 20:40, Raphael Knevels wrote:
>
> Thanks for the quick response :-)
>
> The extent of my region is also the extent of my imagery-group.
> For i.segment I used as memory 10240 MB with a threshold of 0.25.
>
>
> That's a pretty large threshold which generally leads to
> under-segmentation. You might want to start with a value closer to 0.01.
>
>
> In SAGA I used at first Seed Generation (Band Width of 18, but I
> also
> varied this parameter) for producing the Seed Output. The Seed
> Output is
> a raster with floating point values. Moreover, the Seed Output
> contains
> single pixels distributed over the hole area. The "space"
> between those
> pixels is "no data". The segmentation is then computed by Seeded
> Region
> Growing with the seed grid as input.
>
> "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."
>
>
> Sorry, but this was actually wrong information from my part:
> i.segment also supports seed pixels. From the man page:
>
> "The seeds map can be used to provide either seed pixels (random or
> selected points from which to start the segmentation process) or
> seed segments. If the seeds are the results of a previous
> segmentation with lower threshold, hierarchical segmentation can be
> performed. The different approaches are automatically detected by
> the program: any pixels that have identical seed values and are
> contiguous will be assigned a unique segment ID. "
>
>
> However, the seed map has to have integer values. To get that from
> you SAGA output (floating-point) seed map, just run r.clump.
>
> -> alright. That means, I definitely must convert the no data
> values in the SAGA Seed Output to zero or any other integer number.
>
>
> No, I actually don't think this would help in any way as this would
> create one big region out of all the no data pixels...
>
> Meanwhile, I also tried the segmentation result of SAGA Seeded
> Region Growing as Seeds for GRASS - this works...
>
>
> And how long did this take ?
>
> " You could try using the brand new i.superpixels.slic add-on to
> create superpixels which you can then use as seeds."
> -> I could successfully install and open it ("g.extension
> i.superpixels.slic", GRASS 7.2.0).
> However, when I run the tool with default settings, GRASS gives
> a problem message and finishs the process.
>
>
> Ok, this sounds like bug #3247 [1] for which the author hasn't
> applied the fix, yet. Rashad, will you have the opportunity to apply
> just the fix for the actual bug (not necessarily the other proposals
> in the patch), soon, or should I do it ?
>
>
> I had pushed fix for compile error ( min and max ). Is it the same error?
No, it was the error explained in #3247. But the issue was fixed and
since then MarkusM has significantly build upon your work on
i.superpixels.slic. We now have a nicely functioning module. Thank you
for your great work on this !
Moritz
More information about the grass-user
mailing list