Numerical Optimization For Image And Video Restoration