code -
frame=cv2.imread('ball2.jpg',0)
frame_blur=cv2.GaussianBlur(frame,(7,7),0)
sobelx=cv2.Sobel(frame_blur,cv2.CV_64F,1,0,dst=None,ksize=5)
sobely=cv2.Sobel(frame_blur,cv2.CV_64F,0,1,dst=None,ksize=5)
lap=cv2.Laplacian(frame_blur,cv2.CV_64F)
cv2.imshow('sobelx',sobelx)
cv2.imshow('sobely',sobely)
cv2.imshow('laplecian',lap)
why does cv2.solber returns a black and white image instead of grayscale and what is the threshold the cv2.solber function uses after finding the gradient in the image.
same thing happens with the cv2.laplecian function ^^^
one more question why do we normalise the image after applying solber kernel . i understand that sometimes we get a negative value after applying the solder kernel but doesn't opencv converts the negative no. to positive automatically for eg: -1 to 255 , -2 to 244
@Cris Luengo
probably has identified your issue. Or you could normalize the output to bias and scale to 0 to 255 and convert to uint8. – fmw42