To be able to apply the AP method on images with large spatial dimensions, we have introduced a preliminary step prior to the classification in order to reduce the size of the similarity matrix. It consists of automatically grouping data points that are highly similar so as to not affect the data to be classified by AP and replacing each homogeneous group formed by a single representative. The criterion of aggregation used is the Manhattan () distance [see Eq. (9)] between each pair of pixels. To reduce the calculation time, the image is divided into blocks of size pixels, and the search for most similar pixels is achieved in a parallel way on each block. This approach does not require the construction of the similarity matrix between all pixels of an image, contrary to the original AP. The procedure of reduction in each block is carried out in an iterative way. More precisely, the pixels which are spectrally identical are grouped during the first iteration. At this level, each subgroup of pixels formed is represented by a single pixel chosen randomly among them, since the spectral signatures are identical; then, from the second iteration, the pixel having the smallest distance from the center of gravity of its subclass is selected. Then at each iteration, matching is achieved for the set of pixels kept from the previous iteration by releasing the constraint made for the similarity criterion. For pixels to be classified, this step groups a pixel with a pixel , presenting a minimum distance with respect to the set of remaining pixels. Then, if going through the remaining data, there exists some pixel at a distance to pixel smaller than the distance to pixel , so that the link between and is broken ( remains alone), and is eventually grouped with .