Dear all,
I could not generate the histogram after apply a mask to a classification image
I tried to mask the classification image. It has been successfully, but the final raster has no statistics or histogram column. I’ve also tried tho generate the statistics separated, using the “6_populatestats.py” from RSGILB course introduction, but it also failed.
I’ve followed these steps:
# Creating a raster mask from a shapefile, using the extent of the classification image to be masked
inputvector = 'litoralnorte_diss_sul.shp' #thie study area
inputimage = 'ObjBaseClass2010_14.kea' #raster produced by OBIA classification
outmask = 'Litoral_study_area_mask.kea'
vectorutils.rasterise2Image(inputvector, inputimage, outmask,gdalFormat='KEA', burnVal=1)
# Apply mask to classification image
outputimage = 'ObjBaseClass2010_14_mask.kea'
rsgislib.imageutils.maskImage(inputimage, outmask, outputimage,'KEA',rsgislib.TYPE_16UINT, 0, 0)
# Subset masked image to remove unused areas
outputimage2 = 'ObjBaseClass2010_14_LN.kea'
imageutils.subset(outputimage, inputvector, outputimage2,'KEA', rsgislib.TYPE_16UINT)
imageutils.popImageStats(outputimage2, usenodataval=True,nodataval=0, calcpyramids=True)
Best wishes
Beatriz
--
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.
For more options, visit https://groups.google.com/d/optout.
On 11 May 2017, at 22:08, Beatriz Pierri Daunt <beat...@gmail.com> wrote:Dear Daniel,Thank you very much.It works, but it couldn't generate the class column.Can you help to edit the column, or to generate the class name column form the subset image?Best wishes
To unsubscribe from this group and stop receiving emails from it, send an email to rsgislib-support+unsubscribe@googlegroups.com.
To post to this group, send email to rsgislib-support@googlegroups.com.