segmenter.py
Go to the documentation of this file.
1 from terralib import raster, rp, core
2 
3 rst = raster.open(core.TERRALIB_DATA_DIR + '/geotiff/cbers_rgb342_crop2.tif')
4 
5 rp.SegmenterRegionGrowingMean(rst, range(rst.getNumberOfBands()), 'mean.tif', minSegmentSize=100, segmentsSimilarityThreshold=0.1)
6 rp.SegmenterRegionGrowingBaatz(rst, [0,1], 'baatz.tif', bandsWeights=[0.5, 0.5], segmentsSimilarityThreshold=0.5, colorWeight=0.9, compactnessWeight=0.5)