Perspektiva
V tomto cvičení detekovaješ rohy budovy pomocí Harrisova detektoru rohů. Parametr threshold_rel určuje minimální intenzitu vrcholů.
building_image.Funkce show_image() a show_image_with_corners() jsou již předem načteny. Stejně tak modul color pro převod obrázků na stupně šedi.
Toto cvičení je součástí kurzu
Image Processing in Python
Pokyny k cvičení
- Importuj funkci
corner_harris()z modulu feature. - Převeď
building_imagena stupně šedi. - Aplikuj Harrisův detektor, abys získal/a obrázek s mírou odezvy pro možné rohy.
- Najdi vrcholy rohů.
Interaktivní cvičení na vyzkoušení si v praxi
Vyzkoušejte si toto cvičení dokončením tohoto ukázkového kódu.
# 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)