added taking log of image