ShepherdSegmentation utility in RSGISLib gives error with gdalformat='GTiff' but runs with 'KEA'

30 views
Skip to first unread message

Alpesh

unread,
May 26, 2019, 8:00:26 AM5/26/19
to RSGISLib Support
Sir,

rsgislib.segmentation.segutils.runShepherdSegmentation(inputImg, outputClumps, outputMeanImg=None, tmpath='.', gdalformat='KEA', noStats=False, noStretch=False, noDelete=False, numClusters=60, minPxls=100, distThres=100, bands=None, sampling=100, kmMaxIter=200, processInMem=False, saveProcessStats=False, imgStretchStats='', kMeansCentres='', imgStatsJSONFile='')

runs with     gdalformat='KEA'   and it is written that  default = KEA

But if it is changed to gdalformat='GTiff'   It gives bellow error:  
Segmentation fault (core dumped)

Can I change default KEA to GTiff ?  How ? or ShepherdSegmentation utility supports only KEA ?


FIrst the script runs :  

Subsampling the image to read into memory
Performing clustering
Starting Iterative processing...
---
Exporting cluster centres to output file
Apply KMeans to image.
New image width = 1160 height = 980 bands = 1
Started .0..10..20..30..40..50..60..70..80..90. Complete.
Eliminate Single Pixels.
Eliminating Individual Pixels
-----
Finshed Elimination. 131660 small clumps eliminated
Relabel clumps.
Opening clumps file: ./segtmp/23997_BAND432_subset_clumps_elim.tif
Processing using Disk
Created copy
Performing relabel
----
Applying Look up table.
Started .0..10..20..30..40..50..60..70..80..90. Complete.
Calculate image statistics and build pyramids.
Get Image Min and Max.
Started .0..10..20..30..40..50..60..70..80..90. Complete.
Get Image Histogram.
Started .0..10..20..30..40..50..60..70..80..90. Complete.
Adding Histogram and Colour Table to image file
Segmentation fault (core dumped)


Daniel Clewley

unread,
May 26, 2019, 8:14:09 AM5/26/19
to Alpesh, RSGISLib Support
Hi,

The segmentation makes use of raster attribute table features so you need to use the KEA format. It might also work with ERDAS Imagine format (HFA). You can convert to a GeoTiff after using gdal_translate.

Thanks,

Dan

--
You received this message because you are subscribed to the Google Groups "RSGISLib Support" group.
To unsubscribe from this group and stop receiving emails from it, send an email to rsgislib-suppo...@googlegroups.com.
To post to this group, send email to rsgislib...@googlegroups.com.
Visit this group at https://groups.google.com/group/rsgislib-support.
To view this discussion on the web, visit https://groups.google.com/d/msgid/rsgislib-support/4f153bdc-e3d5-4029-b22c-2a707c687ded%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply all
Reply to author
Forward
0 new messages