Connections between Retinex, neural models and variational methods