[GRASS-user] Grass 7.6 i.segment minsize working?

Markus Metz markus.metz.giswork at gmail.com
Tue Jun 18 13:03:58 PDT 2019


On Tue, Jun 18, 2019 at 3:31 PM Jamille Haarloo <j.r.haarloo at gmail.com>
wrote:
>
> Dear Grass members,
>
> I have been testing i.segment and i.segment.hierarchical on a small
region with Sentinel bands. However, the results consistently include
segments of just one pixel even-though minimal segment sizes of 10 and 20
were indicated. The final run with minsize 20 created 8247 segments.
> There were no errors nor warnings, and I couldn't find the i.segment
script to review it.

It is here:
https://github.com/OSGeo/grass/tree/releasebranch_7_6/imagery/i.segment

> I also tried with a minsize of one (1). The result looks similar with
even less segments created - a total of  8160.
> I tried with Grass Gis 7.6.0 and 7.6.1(download of yesterday).

I tested in the North Carolina sample dataset with
g.region -p rast=lsat7_2002_10

using default minsize 1
i.segment group=lsat7_2002_10,lsat7_2002_20,lsat7_2002_30,lsat7_2002_40
thresh=0.05 out=lsat7_2002_min1
--> i.segment complete. Number of segments created: 29399

r.info -r lsat7_2002_min1
min=1
max=29399    <-- as expected

using minsize=20
i.segment group=lsat7_2002_10,lsat7_2002_20,lsat7_2002_30,lsat7_2002_40
thresh=0.05 out=lsat7_2002_min20 minsize=20
--> i.segment complete. Number of segments created: 2114

r.info -r lsat7_2002_min20
min=1
max=2114    <-- as expected

r.stats -c lsat7_2002_min20 | sort -k 2n | head
1025 20
1081 20
109 20
1117 20
1220 20
1305 20

The given minimum segment size is in this test respected.

Can you provide test data, region settings and parameters for i.segment to
reproduce?

Markus M
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/grass-user/attachments/20190618/660c47bc/attachment.html>


More information about the grass-user mailing list