[GRASS-dev] [GRASS GIS] #3210: r.texture: bug when non continuous series of values
GRASS GIS
trac at osgeo.org
Tue Nov 15 04:34:03 PST 2016
#3210: r.texture: bug when non continuous series of values
-------------------------+-------------------------
Reporter: mlennert | Owner: grass-dev@…
Type: defect | Status: new
Priority: normal | Milestone: 7.2.0
Component: Raster | Version: svn-trunk
Keywords: r.texture | CPU: Unspecified
Platform: Unspecified |
-------------------------+-------------------------
This is ok:
{{{
r.in.ascii in=- out=test_matrix <<EOF
north: 3
south: 0
east: 3
west: 0
rows: 3
cols: 3
1 1 1
3 0 2
0 0 3
EOF
r.texture -s test_matrix out=text method=idm
r.stats -1n text_IDM_90
0.46666667
}}}
But this isn't:
{{{
r.in.ascii --o in=- out=test_matrix <<EOF
north: 3
south: 0
east: 3
west: 0
rows: 3
cols: 3
1 1 1
3 0 0
0 0 3
EOF
r.texture -s test_matrix out=text method=idm --o
r.stats -1n text_IDM_90
0.48333332
}}}
The result should be 0.4.
Testing shows that this always seems to happen when the series of values
is discontinuous, as in the second case where we have 0, 1, 3, but no 2.
I really have no time right now to look into this, but if someone with
some knowledge of that module could, this would be great, especially if we
could fix this before 7.2...
And, yes, the above is a nice start for implementing tests...
I can provide a spreadsheet where a colleague of mine has done the IDM
calculations by hand for a series of matrices (comparing GRASS (almost all
correct, yeah !) with PCI Geomatica (really weird results) and eCognition
by-object texture variables (fairly similar to GRASS 3x3 texture means by
object when the objects are above a certain size)).
--
Ticket URL: <https://trac.osgeo.org/grass/ticket/3210>
GRASS GIS <https://grass.osgeo.org>
More information about the grass-dev
mailing list