I have a b&w image i want to classify; the trouble is that mere spectral classification yields a lot of error, I saw this in wikigrass

In case of panchromatic maps or limited amount of channels, it is often recommended to generate synthetic channels through texture analysis (r.texture)

And there's nothing more about it in that page; How can I use the outcome from r.texture in a classification, together with the segments of i.segment or i.smap?

  • Just use it as an additional channel, together with R,G,B or the like. I.e., create an imagery group with i.group which contains also the texture and segments maps, then run the classification on it.
    – markusN
    Aug 30, 2017 at 2:24
  • Which function should I use for classifying with the polygons from i.segment? I want to use an object based classification
    – Elio Diaz
    Aug 30, 2017 at 15:23

1 Answer 1


After researching a lot, I've found/developed this GEOBIA workflow for GRASS GIS in combination with R machine learning:

in GRASS: calculate the texture with r.texture; make the objects with i.segment and vectorize this output with r.to.vect, then extract the raster's graylevel and texture features with v.rast.stats then choose some training objects and write a shapefile and a csv with v.out.ogr

in R, with RWeka: divide your csv or dbf in training and test sets, apply J48() and then predict(), bind the predicted vector to a column in your data.frame and save the dbf, then you'll have a fitted column

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.