Skip to main content
. 2018 Feb 16;18(2):605. doi: 10.3390/s18020605
Algorithm 1 Detection and segmentation of invasive grasses using high-resolution RGB images.
Required: orthorectified image set I. Representative samples set G. Sample masks set H
Training
1: for i1,n do n= total images in G (labelled data)
2:     Load Gi and Hi images
3:     Convert colour space of Gi into HSV
4:     Insert each colour channel into a feature array D
5:     Use 2D filters on Gi and insert their outputs into D
6:     From Gi and Hi, filter only the pixels with assigned labelling on D
7: end for
8: Split D into training data DT and testing data DE
9: Create a XGBoost classifier X and fit it using DT
10: Use K-fold cross validation with DE ▹ number of folds = 10
11: Perform grid search to tune X parameters
Prediction
12: for i1,m do m= total images in I
13:     Load Ii image
14:     Convert colour space of Ii into HSV
15:     Scan every pixel and predict the object using X
16:     Oi Convert the data into a 2D image
17:     Export Oi into TIF format
18: end for
19: return Oi