如果训练数据是代表同质区域的多边形,则每个多边形中的每个像素都是一个训练点。您可以使用多边形进行训练,如下例所示:
函数:classify()
classify(classifier, outputName)
对图像进行分类。
Classifies an image.
Arguments:
图像(图像):
要分类的图像。波段是按名称从该图像中提取的,它必须包含分类器模式中命名的所有波段。
分类器(Classifier):
要使用的分类器。
输出名称(字符串,默认值:“分类”):
要添加的乐队的名称。如果分类器产生 1 个以上的输出,则忽略此名称
this:image (Image):
The image to classify. Bands are extracted from this image by name, and it must contain all the bands named in the classifier's schema.