Make gradient in canny.h consistent