read-images and normalize function