I*am trying to run an object-based classification using R. The Landsat images were segmented using Monteverdi (Orfeo Toolbox) and training samples (segments) were selected.
My problem is that the results (confusion matrix) are represented based on the total number of pixels per class instead of number of segments as training object.
My model (using caret package) doesn’t allocate the whole segments per class, rather it allocate number of pixels within a segments.
Although I segmented the images using Large-Scale Mean-Shift (LSMS) segmentation approach (Orfeo toolbox), the Landsat image are not considered an object in the classification. For that reason my results are basically an pixel based classification instead of object-based.
I would like to know how to allocate the whole segment as a class in R using the Landsat images as input image?
The following steps were applied:
RF.Control = trainControl(method="cv",number=10, repeats =30, allowParallel=TRUE) RF.Grid
My problem is that the results (confusion matrix) are represented based on the total number of pixels per class instead of number of segments as training object.
My model (using caret package) doesn’t allocate the whole segments per class, rather it allocate number of pixels within a segments.
Although I segmented the images using Large-Scale Mean-Shift (LSMS) segmentation approach (Orfeo toolbox), the Landsat image are not considered an object in the classification. For that reason my results are basically an pixel based classification instead of object-based.
I would like to know how to allocate the whole segment as a class in R using the Landsat images as input image?
The following steps were applied:
- whole preprocessing were applied in GRASS Gis.
- The images were segmented (Orfeo Toolbox)
- Training samples (segments) were selected
- Read the shapefile in R with training samples (selected segments)and read the landsat images.
- Model using the caret package
RF.Control = trainControl(method="cv",number=10, repeats =30, allowParallel=TRUE) RF.Grid