Commit addd2f94 authored by Daniel Scheffler's avatar Daniel Scheffler
Browse files

Classification map is now unclassified only in case no match is found at all.

Signed-off-by: Daniel Scheffler's avatarDaniel Scheffler <>
parent f029234f
Pipeline #4121 failed with stage
in 2 minutes and 16 seconds
......@@ -419,6 +419,16 @@ class kNN_SAM_Classifier(SAM_Classifier):
return tilepos, cmap.astype(np.int16), angles_min_k
def label_unclassified_pixels(self, label_unclassified, threshold):
# type: (int, Union[str, int, float]) -> GeoArray
cmap_labelled0 = self._label_unclassified_pixels(
self.cmap[:, :, 0], label_unclassified, threshold, self.angles_deg[:, :, 0]
cmap = self.cmap
cmap[cmap_labelled0 == label_unclassified] = label_unclassified
return cmap
class FEDSA_Classifier(_ImageClassifier):
def __init__(self, train_spectra, CPUs=1):
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment