An approximation for the Mumford-Shah functional