made parallel versions of image_processing functions
bugfix in gradient computation