MATLAB VIDEO AND IMAGE PROCESSING BLOCKSET 3 Podręcznik Użytkownika Strona 141

  • Pobierz
  • Dodaj do moich podręczników
  • Drukuj
  • Strona
    / 252
  • Spis treści
  • BOOKMARKI
  • Oceniono. / 5. Na podstawie oceny klientów
Przeglądanie stron 140
CountingObjectsinanImage
CountingObjectsinanImage
In this ex ample, you im port an intensity imag e of a wheel from the MATLAB
workspace and convert it to binary. Then, using the Opening and Label blocks,
you count the number of spokes in the wheel. You can use similar techniques
to count objects in other intensity imag es. However, you might need to use
additional morphological operators and different structuring elements:
1 Define an intensity image in the MATLAB workspace. To read in an
intensity image from a PNG file, at the M ATLAB command prom pt, type
I= imread('testpat 1.pn g');
I
is a 256-by-256 matrix of 8-bit unsigned integers.
2 To view the image this matrix represents, at the MATLAB command
prompt, type
imshow(I)
6-3
Przeglądanie stron 140
1 2 ... 136 137 138 139 140 141 142 143 144 145 146 ... 251 252

Komentarze do niniejszej Instrukcji

Brak uwag