開始使用免費開始

更少的角點

在這個練習中,你將測試把角點峰值之間的最小距離設為較大的數字時會發生什麼事。記得可以在 corner_peaks() 函式中使用 min_distance 參數來設定;threshold_rel 參數則用來指定峰值的最小強度。

從建築物底部視角拍攝
影像已預先載入為 building_image

show_image()show_image_with_corners() 等函式與所需套件都已為你預先載入。先前用來尋找角點的程式碼也都準備好了。以 corner_harris() 取得的 Harris 量測回應影像已預先載入為 measure_image

本練習屬於課程

Python 影像處理

檢視課程

動手互動練習

試著完成這個範例程式碼,體驗一下這個練習。

# Find the peaks with a min distance of 10 pixels
coords_w_min_10 = ____(measure_image, min_distance=____, threshold_rel=0.02)
print("With a min_distance set to 10, we detect a total", len(coords_w_min_10), "corners in the image.")
編輯並執行程式碼