Fusion of multispectral and panchromatic images as an optimization problem