<div dir="ltr">Thank you Markus!<div><br></div><div>I meant that I was literally seeing in the map display how the smallest segments corresponded exactly with single (10 by 10) pixels of the input data. I realize now, the module was using the pixel/cell units as determined by the region settings. I overlooked this when starting the project. Now I am better aware of how fundamental and how easy it is to adjust/ reset the region settings. I changed the resolution to 10 and got better results. According to r.stats the smallest segments have the minsize of 10 I used this time!</div><div><br></div><div>Thanks a lot for your clear remarks and suggestions!</div><div><br></div><div>Best,<br></div><div>Jamille</div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Wed, Jun 19, 2019 at 6:07 PM Markus Metz <<a href="mailto:markus.metz.giswork@gmail.com">markus.metz.giswork@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr">Hi Jamille,<br><br>On Tue, Jun 18, 2019 at 10:40 PM Jamille Haarloo <<a href="mailto:j.r.haarloo@gmail.com" target="_blank">j.r.haarloo@gmail.com</a>> wrote:<br>><br>> Thank you Markus,<br>><br>> I used this data: <a href="https://drive.google.com/file/d/1xrLJY5aZLKE-ja51wKRX_CKKcUtIiy16/view?usp=sharing" target="_blank">https://drive.google.com/file/d/1xrLJY5aZLKE-ja51wKRX_CKKcUtIiy16/view?usp=sharing</a> (excluding band 6. I used band 1-5 as group)<br>><br>> The parameters:<br>> i.segment.hierarchical group=S2bands_VV@LUPS thresholds=0.1, 0.2 output=hier_segmS2 minsizes=20 memory=4000 iterations=30<br>><br>> i.segment --overwrite group="S2bands_VV" output="SegmS2_02_20" band_suffix="Modified" threshold=0.2 radius=1.5 method="region_growing" similarity="euclidean" minsize=20 memory=4000 iterations=50 goodness= "goodn_of_fit_SegmS2_02_20"<br>><br>> g.region -p <br>> projection: 1 (UTM)<br>> zone: 21<br>> datum: wgs84<br>> ellipsoid: wgs84<br>> north: 620222.920747<br>> south: 617573.079721<br>> west: 782605.544297<br>> east: 785903.817009<br>> nsres: 0.49997<br>> ewres: 0.49996555<br>> rows: 5300<br>> cols: 6597<br>> cells: 34964100<br><div><br></div><div>the region settings don't make sense because the resolution if the input data is 10 meter, not 0.49997 or 0.49996555. That means one original cell is converted to appr. 400 cells in the current region. If you really want to work with a resolution of appr. 0.5, you need to find a reasonable way to resample the 10 meter input data to 0.5 meter. I don't know a method to resample these input data to 0.5 meter resolution that is really enhancing the spatial detail not just multiplying existing spatial detail (more content, same amount of info).</div><div><br></div><div>With these region settings, I get a minimum size of 120 cells for resultant segments according to "r.stats -c", with both i.segment.hierarchical and i.segment as used by you. Where do you see segments of just one pixel?</div><div><br></div><div>Markus M<br></div><div>></div>><br>> On Tue, Jun 18, 2019 at 5:04 PM Markus Metz <<a href="mailto:markus.metz.giswork@gmail.com" target="_blank">markus.metz.giswork@gmail.com</a>> wrote:<br>>><br>>><br>>><br>>> On Tue, Jun 18, 2019 at 3:31 PM Jamille Haarloo <<a href="mailto:j.r.haarloo@gmail.com" target="_blank">j.r.haarloo@gmail.com</a>> wrote:<br>>> ><br>>> > Dear Grass members,<br>>> ><br>>> > 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.<br>>> > There were no errors nor warnings, and I couldn't find the i.segment script to review it.<br>>><br>>> It is here:<br>>> <a href="https://github.com/OSGeo/grass/tree/releasebranch_7_6/imagery/i.segment" target="_blank">https://github.com/OSGeo/grass/tree/releasebranch_7_6/imagery/i.segment</a><br>>><br>>> > I also tried with a minsize of one (1). The result looks similar with even less segments created - a total of 8160.<br>>> > I tried with Grass Gis 7.6.0 and 7.6.1(download of yesterday).<br>>><br>>> I tested in the North Carolina sample dataset with<br>>> g.region -p rast=lsat7_2002_10<br>>><br>>> using default minsize 1<br>>> i.segment group=lsat7_2002_10,lsat7_2002_20,lsat7_2002_30,lsat7_2002_40 thresh=0.05 out=lsat7_2002_min1<br>>> --> i.segment complete. Number of segments created: 29399<br>>><br>>> <a href="http://r.info" target="_blank">r.info</a> -r lsat7_2002_min1<br>>> min=1<br>>> max=29399 <-- as expected<br>>><br>>> using minsize=20<br>>> i.segment group=lsat7_2002_10,lsat7_2002_20,lsat7_2002_30,lsat7_2002_40 thresh=0.05 out=lsat7_2002_min20 minsize=20<br>>> --> i.segment complete. Number of segments created: 2114<br>>><br>>> <a href="http://r.info" target="_blank">r.info</a> -r lsat7_2002_min20<br>>> min=1<br>>> max=2114 <-- as expected<br>>><br>>> r.stats -c lsat7_2002_min20 | sort -k 2n | head<br>>> 1025 20<br>>> 1081 20<br>>> 109 20<br>>> 1117 20<br>>> 1220 20<br>>> 1305 20<br>>><br>>> The given minimum segment size is in this test respected.<br>>><br>>> Can you provide test data, region settings and parameters for i.segment to reproduce?<br>>><br>>> Markus M<br>>><br></div>
</blockquote></div>