1. A method in a computing device for spatial clustering of pixels of a multispectral image, the method comprising: determining a maximum similarity score for each pixel by computing a similarity score between that pixel and each of its neighboring pixels, the similarity score based on pixel values; and setting the maximum similarity score for that pixel to the maximum of the computed similarity scores for that pixel; and clustering the pixels into clusters by, when a filtering criterion is passed for a pixel, combining into the same cluster that pixel and the neighboring pixel with the maximum similarity score; and setting the pixel values of the pixels in the cluster to an average of the original pixel values of the pixels that are in the cluster; and repeating iterations of the determining and the clustering until a termination criterion is satisfied.