Created
October 20, 2022 15:35
-
-
Save victormurcia/0242cf2f81701de77ff61c1deccc40c5 to your computer and use it in GitHub Desktop.
detecting edges with canny
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #cv2.Canny(image, minVal, maxVal) | |
| img_gray = cv2.cvtColor(rgb_img, cv2.COLOR_RGB2GRAY) | |
| thresholds = [(5,150), (100,150), (200,225)] | |
| fig,axs = plt.subplots(1,4, figsize=(30,15)) | |
| i = 0 | |
| axs[i].imshow(rgb_img) | |
| for (minVal, maxVal) in thresholds: | |
| edge_img = cv2.Canny(img_gray, minVal, maxVal, apertureSize = 3, L2gradient = False) | |
| axs[i+1].imshow(edge_img) | |
| i += 1 | |
| plt.show() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment