Začněte nyníZačněte zdarma

Perspektiva

V tomto cvičení detekovaješ rohy budovy pomocí Harrisova detektoru rohů. Parametr threshold_rel určuje minimální intenzitu vrcholů.

Building from a bottom perspective
Obrázek je předem načten jako 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

Zobrazit kurz

Pokyny k cvičení

  • Importuj funkci corner_harris() z modulu feature.
  • Převeď building_image na 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)
Upravit a spustit kód