[GRASS-dev] i.segment: Invalid region id -1

Nikos Alexandris nik at nikosalexandris.net
Tue Dec 3 22:21:03 PST 2013


Markus M:
> > >> > But it does not make sense to use a pan band as seeds when segmenting
> > >> > the other bands. Seeds are typically the result of a previous run of
> > >> > i.segment or the result of a previous classification of the same
> > >> > data.

Nikos A:
> > >> Then I have inserted a small mistake in my tests/workflow. Wanted to
> > >> drive "finer objects" (from Pan) in bigger ones (based on MS).
> > >> Will adjust.

MM:
> > The seeds map does the opposite. You probably want to do pansharpening
> > first.

NA:
> Ha-Yey :D  I did (in some cases).

Just for completeness, ehm... I was too fast. So, I did use sharpenned images 
only in 2 trials, however, as I can actually see in the history.  The exact 
same process in two different Mapsets (same Location), QuickBird2 data:

--%<--
i.segment msx_hpf out=segments_msx_hpf_seeded_t0.02 threshold=0.02 minsize=4 
seed=segments_pan_t0.01 memory=3000 iterations=1000
-->%--


It worked in one case (repeated to be sure) and it failed in another!  In the 
failing case, before the ERROR message, there are multiple WARNINGS issued:

..
WARNING: Region consists of only one cell, nothing to update
..


The other 2 (out of 3) failures were simply using (wrongly) the Pan seeds to 
segment the MSes.  The region was set to 0.6m ns/we resolution (working in a 
UTM projection).

[ Minsize set to 4 so as to be close in objects that can be tree crowns... Not 
sure how much sense this makes, but it didn't hurt also as I can see in the 
final classification results.  I also repeated this at least once (as I can 
remember) with the resolution set to 2.4 and minsize adjusted to 1 then. ]


Now, I have re-ran the "failed" one and I get this strange:

..
0..5..10..15..20..25..30..35..40..ERROR: Invalid region id -1489
..

I went after looking all of the details of the involved maps.  The only 
"strange" thing I can see (which I caused) is that the region is 0.6, the seed 
(segments_pan_t0.01) is also 0.6 while the group of Pan-Sharpened images are 
(each) of 0.60017817 (ns) x 0.60016801 (we) resolution.  Is this my mistake?  
The resolution(s) should be identical, right?

Thanks for shedding light, sorry for crunching time away, N


More information about the grass-dev mailing list