Soft To Hard Classification¶
———————————————————————————————————————-
Date : February 2019
Copyright : © 2019 - 2020 by Ann Crabbé (KU Leuven)
Email : acrabbe.foss@gmail.com
This file is part of the MESMA plugin and python package.
This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public
License as published by the Free Software Foundation, either version 3 of the License, or any later version.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied
warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License (COPYING.txt). If not see www.gnu.org/licenses.
———————————————————————————————————————-
-
class
mesma.core.hard_classification.
HardClassification
[source]¶ Bases:
object
Do a simple hard classification on an existing MESMA fraction image.
-
static
execute
(mesma_fraction_image: numpy.array, shade_band: int = -1) → numpy.array[source]¶ Execute the hard classification. The return value single band image indicating the dominant class.
Parameters: - mesma_fraction_image – Fraction image of the output of the MESMA algorithm.
- shade_band – Band number with the shade fraction (set to None in case no shade band given).
Returns: Hard classified image with values reflecting the dominant band.
-
static