scaling the pixel values between -1 to 1