Fix grayscale input for Canny.