Algorithms for the enhancement of dynamic range and colour constancy of digital images & video