Last active
May 3, 2026 12:55
-
-
Save monogenea/51737211c8e9b6189c0d3eb2997af26e to your computer and use it in GitHub Desktop.
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
| # Convert to RGB so we can draw edges in red | |
| overlay = cv2.cvtColor(image, cv2.COLOR_GRAY2RGB) | |
| overlay[edges > 0] = [220, 40, 40] # red edges | |
| fig, ax = plt.subplots(figsize=(6, 6)) | |
| ax.imshow(overlay) | |
| ax.set_title('Canny edges overlaid (σ=1.4, T=50/150)') | |
| ax.axis('off') | |
| plt.tight_layout() | |
| plt.show() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment