Presentation Dialog box of the application
Syntax

Presentation and options

This application performs a supervised classification of an image (monoband or multiband) using the kNN method. kNN is the acronym for k (which refers to a preset number of pixels from the pixels used to define the desired classes on the categorical map to be obtained) and NN (nearest neighbors). The method assumes that it is plausible that the pixels that are close to each other in the statistical space belong to the same informational class.

For each pixel of the image to be classified, the Euclidean distance (on the statistical space of representation of the independent variables) is calculated to each pixel of the training areas. The k nearest training areas pixels are chosen and the predominant class of this group of pixels is the class that is assigned to the pixel to be classified. To calculate the dominant class, two options are allowed: the first by mode and the second applying a weight according to the inverse of the distance (that is to say, in the mode calculation the nearest values in the statistical space weigh more). Input files must be in IMG raster format and data type can be any of those supported by MiraMon. More information can be consulted at MiraMon raster formats description.

In contrast to other classifiers, in which the number of samples used to define classes is not relevant in the allocation phase, the more samples exist, the significantly slower kNN classification is.

By default, this application loads all images in memory, which allows performing processes in a more agile way. However, in computers with a few resources regarding the size of images, this strategy could be unviable. Due to this, the option "Do not upload images in memory" allows indicating the program that in the processes it keeps in memory only those data needed in each moment, nor that implies a slowdown of the running. The application commutes automatically to this mode if it does not have enough available memory, so usually, there is no need to activate it specifically.

This application is parallelized, both in versions of 32 and 64 bits, so it is possible that it distributes the work between the available processor cores in the computer where it runs. For example, in a computer that has two processors of 20 cores each, the time needed to obtain the results can be divided almost into 40 by using all available cores, which can be done with the corresponding parameter stated by "MAX"; when the number of cores to use is MAX, the applicacion uses all the cores. Nevertheless, sometimes the choice of not compromising the whole capacity of the computer calculations can be preferred, stating SUB_MAX (which will leave a free processor for other performed tasks) or by choosing a concrete inferior numerical value, in all cases through the option "Number of processor cores to be used". Asking for more cores than the actually available is also possible, creating other virtual ones, but this does not speed the procedure, but on the contrary. The Windows Task Manager allows knowing the total number of cores of the computer, and it also can be known by running the application in MAX mode, because it will state on-screen how many cores is using.


Dialog box of the application

ClaskNN dialog box


Syntax

Syntax:

Parameters:

Modifiers: