Description Usage Arguments Details Examples
This function undertakes unsupervised vegetation classification using affinity propagation and k-means clustering. The function will automatically request the user to (1) identify an exterior folder containing the pre-processed imagery, and (2) the folder which will contain the function's outputs. The function will report messages indicating progress through 6 steps:
Step 1
: raster stacking starting
Step 2
: raster shrinking starting
Step 3
: image segmentation starting
Step 4
: affinity propagation starting (clustering based on physical proximity)
Step 5
: k-means clustering starting (clustering based on shared attributes)
Step 6
: polygon writing
These messages are important because it will enable the user understand if a failure of the function occurs because the raster has not be shrunk sufficiently.
1 | unsupervised(type, super, clusters, shrink)
|
type:
One of 7 analysis types:
"visible"
: the 3-channel visible spectrum (blue, green, red).
"false_colour_nir"
: a 3-channel red-shifted spectrum (green, red, near infra-red) useful for vegetation discrimination.
"ndvi"
: Normalized Difference Vegetation Index. The most common index used in agriculture. It characterises the density of vegetation and allows farmers to assess germination, growth, the presence of weeds or diseases, as well as to predict the productivity of the fields.
"gdvi"
: Green Normalized Difference Vegetation Index. It is similar to NDVI except that instead of the red spectrum it measures the green spectrum in the range from 0.54 to 0.57 microns. Compared to the NDVI index, it is more sensitive to chlorophyll concentration. It is commonly used in assessing depressed and aged vegetation.
"lci"
: Leaf Chlorophyll Index. It is used to assess chlorophyll content in areas of complete leaf coverage.
"ndre"
: Normalized Difference Red Edge Index. This index is sensitive to chlorophyll content in leaves against soil background effects. This index can only be formulated when the red edge band is available
"osavi"
: Optimized Soil-Adjusted Vegetation Index. This index maps variability in canopy density. It is not sensitive to soil brightness (when different soil types are present.
super:
The approximate number of segments (superpixels) the visible image will be divided into. A default of 200 is recommended. However a range of 80 – 300 may be sensible. High values will increase processing time.
clusters:
The number of land use clusters (vegetation types) you are wanting to discriminate. If the number of specified clusters exceeds the number of clusters returned by the affinity propagation algorithm, the maximum number of clusters allowable by the affinity propagation algorithm will be used.
shrink:
A number representing how pixels in each direction (horizontally and vertically) should be aggregated together. A shrink of 10 will result in a raster image 100 x smaller than the original. The default is set to 10. Failure to shrink may result in the computer crashing as it may lack the RAM necessary for the calculations associated with very large rasters.
Two automatically named shape files will be returned: one containing the clustered polygons, and the other containing the polygons of the superpixels (image segments).
An automatically named elbow plot will be produced as a .png file. While there is no set rule for determining the number of clusters, many people look for an inflection point (the elbow, or knee) in this graph as a guide to determining the correct number of clusters (the maximum number of clusters visualised in the plot is 15). A .jpg of the spectral selection (type
) will also be produced (this is required for an intermediate step in the image processing).
1 2 3 4 5 | unsupervised(type = "ndre",
clusters = 6,
super = 200,
shrink = 10)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.