An adaptive MRF model for boundary-preserving segmentation of multispectral images