Using pixel intensity as a self- regulating threshold for deterministic image sampling in Milano Retinex : the T-Rex algorithm