코너 수 줄이기
이번 연습 문제에서는 코너 피크 사이의 최소 거리를 더 크게 설정하면 어떤 일이 일어나는지 살펴보겠습니다. 이는 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.")