Improved coloring of the depth avi output by using histogram
Minor changes
Moved histogram normalization, it is called only for the depth to avi option