Changes including histogram calculation, morphological modifications and more