Mathematical Foundations of Image Processing and Analysis