Edges
In this exercise you will identify the shapes in a grapefruit image by detecting the edges, using the Canny algorithm.
grapefruit.The color module has already been preloaded for you.
แบบฝึกหัดนี้เป็นส่วนหนึ่งของหลักสูตร
Image Processing in Python
คำแนะนำการฝึกหัด
- Import the canny edge detector from the feature module.
- Convert the image to grayscale, using the method from the color module used in previous chapters.
- Apply the canny edge detector to the
grapefruitimage.
แบบฝึกหัดเชิงโต้ตอบแบบลงมือทำ
ลองทำแบบฝึกหัดนี้โดยเติมโค้ดตัวอย่างนี้ให้สมบูรณ์
# Import the canny edge detector
from skimage.____ import ____
# Convert image to grayscale
grapefruit = ____(____)
# Apply canny edge detector
canny_edges = ____
# Show resulting image
show_image(canny_edges, "Edges with Canny")