[gdal-dev] Heuristics to classify raster data ?

Florent JITIAUX fjitiaux at gmail.com
Wed Mar 12 04:59:49 PDT 2014


Hi all,

I think the fastest and simplest way to class maps and aerial/satellite is
to count number of colors. Generally maps of OSM have a maximum of 20 or
may e 30 colors. I don't think OSM will use all 256 colors in their maps.

About k-means, some people use it to filter aerial/satellite with too much
clouds (or snow). When the cluster of white and bright colors is too
"large" (in histograms) then the raster is considered having too much
clouds.
Because maps must be the most readable, colors are visually separated. It
may be possible by compute each cluster of each band or compare each border
or center of clusters.

Another solution may be to get the quantity or the coverage of some colors.
Generally maps have one or few background colors. If one or two colors are
very dominant than others, the raster may be considered as a map. I think
the minimum is two if a part of the map have some water.

Florent
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/gdal-dev/attachments/20140312/75ed8342/attachment.html>


More information about the gdal-dev mailing list