[GRASS-dev] i.segment: Invalid region id -1
markus.metz.giswork at gmail.com
Tue Dec 3 12:18:36 PST 2013
Nikos Alexandris wrote:
> Nikos Alexandris wrote:
>> > >> I've tested this with at least three different similar cases. All work
>> > >> fine without the seed map! All fail with a seed map supplied. I guess,
>> > >> the only real difference is time for the processes to complete, right?
>> > > OK, I've just discovered that I mixed 8-bit (the Pan images) for the
>> > > seed map and 16-bit (the Multi-Spectral images). So, seed -> 8-bit,
>> > > group to be segmented -> 16-bit. Does this play a role?
> Markus Metz:
>> > No, the seed map must be integer (not more than 32 bit int), that's
>> > the only limitation. The data to be segmented can be anything, integer
>> > and/or floating point.
>> Good to know.
> I guess this is because the segments are only "counted" then.
Not exactly. You grow stuff from seeds, in this case segments. A seeds
map defines initial segments (objects) which are then grown if
possible. Internally, a seeds map is processed just as in r.clump: all
contiguous cells with the same id will belong to the same initial
>> > 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.
>> 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.
The seeds map does the opposite. You probably want to do pansharpening first.
Anyway, it does not explain why the invalid region id -1 has been
encountered, which should not happen.
More information about the grass-dev