Optimization Methods in Image Processing