I am trying to understand the scale
argument in cv2.Sobel. With scale
set to 1/8, I get the output as follows along x-axis:
But with scale = 10 or scale = 100, the output is very similar.
Both of the above images are the first order gradients along x-axis with the scale of 1/8 and 100 respectively.
import cv2
filename = "./images/cube.jpg"
img = cv2.imread(filename,0)
sx = cv2.Sobel(img, cv2.CV_64F, 1,0, ksize=3, scale= 1/8)
cv2.imshow("sx", sx)
if cv2.waitKey(0) & 0xff == 27:
cv2.destroyAllWindows()
What does the argument scale
do? How is it useful?