Please enable JavaScript.
Coggle requires JavaScript to display documents.
Gradients and Edge Detection (Gradient (Sobel (sobelX = cv2.Sobel(image,…
Gradients and Edge Detection
Gradient
find points in an image where the birghtness of pixel intensities changes distinctly
Laplacian
lap = cv2.Laplacian(image, cv2.CV_64F)
:fire:
lap = np.utin8(np.absolute(lap))
:fire:
Use float to avoid miss edge, specifically the white-to-black transitions
Sobel
sobelX = cv2.Sobel(image, cv.CV_64F, 1, 0)
:fire:
sobelX = np.uint8(np.absolute(sobelX))
:fire:
sobelY = cv2.Sobel(image, cv.CV_64F, 0, 1)
:fire:
sobelY = np.uint8(np.absolute(sobelY))
:fire:
sobelCombined = cv2.bitwise_or(sobelX, sobelY)
:fire:
Canny Edge Detector
Multi-step process
Blurring the image to remove noise
Computing sobel gradient images
Suppressing Edges
Hysteresis Thresholding Stage
cv2.Canny(blurred, threshold1, threshold2)
:fire:
X > threshold2 => Edge
X < threshold1 => Not Edge
threshold1 < X < threshold2 => Edge or Not Edge