เริ่มต้นใช้งานเริ่มต้นใช้งานได้ฟรี

Less edgy

Let's now try to spot just the outer shape of the grapefruits, the circles. You can do this by applying a more intense Gaussian filter to first make the image smoother. This can be achieved by specifying a bigger sigma in the canny function.

In this exercise, you'll experiment with sigma values of the canny() function.

Grapefruits
Image preloaded as grapefruit.

The show_image has already been preloaded.

แบบฝึกหัดนี้เป็นส่วนหนึ่งของหลักสูตร

Image Processing in Python

ดูคอร์ส

แบบฝึกหัดเชิงโต้ตอบแบบลงมือทำ

ลองทำแบบฝึกหัดนี้โดยเติมโค้ดตัวอย่างนี้ให้สมบูรณ์

# Apply canny edge detector with a sigma of 1.8
canny_edges = canny(grapefruit, sigma=____)
แก้ไขและรันโค้ด