Real-Time Minimization of the Piecewise Smooth Mumford-Shah Functional