시작하기무료로 시작하기

원근

이 연습 문제에서는 Harris 코너 검출기를 사용해 건물 이미지의 코너를 검출해 보겠습니다. threshold_rel 매개변수는 피크의 최소 강도를 지정합니다.

아래쪽에서 본 건물
이미지는 building_image로 미리 로드되어 있습니다.

show_image()show_image_with_corners() 함수는 이미 불러와 두었습니다. 또한 이미지를 그레이스케일로 변환하기 위한 color 모듈도 준비되어 있습니다.

이 연습은 강의의 일부입니다

Python으로 배우는 이미지 처리

강의 보기

연습 안내

  • feature 모듈에서 corner_harris() 함수를 가져오세요.
  • building_image를 그레이스케일로 변환하세요.
  • 가능한 코너에 대한 응답을 담은 측정 이미지를 얻기 위해 Harris 검출기를 적용하세요.
  • 코너의 피크를 찾으세요.

실습형 인터랙티브 연습

이 예제를 이 샘플 코드를 완성하여 풀어보세요.

# Import the corner detector related functions and module
from skimage.____ import ____, corner_peaks

# Convert image from RGB-3 to grayscale
building_image_gray = ____

# Apply the detector  to measure the possible corners
measure_image = ____

# Find the peaks of the corners using the Harris detector
coords = ____(____, min_distance=20, threshold_rel=0.02)

# Show original and resulting image with corners detected
show_image(building_image, "Original")
show_image_with_corners(building_image, coords)
코드 편집 및 실행