A Non Local Variational Formulation for the Improvement of Tone Mapped Images