1 / 12

Morphological image processing

Morphological image processing. April 4, 2012. Example binary image B. Grayscale image f( x,y ). z = randn (100); z = conv2( z,ones (7),'same');. Z_BW=z>5; figure; imagesc (Z_BW). BW image filtered by convolution. figure; imagesc (conv2(double(Z_BW),ones(5),'same')).

beryl
Télécharger la présentation

Morphological image processing

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Morphological image processing April 4, 2012

  2. Example binary image B Grayscale image f(x,y) z =randn(100); z = conv2(z,ones(7),'same'); Z_BW=z>5; figure; imagesc(Z_BW)

  3. BW image filtered by convolution figure; imagesc(conv2(double(Z_BW),ones(5),'same')) Image is smoothed but no longer binary (black and white)

  4. >> strel ('disk', 5) >> strel ('square', 5) Neighborhood: 0 0 1 1 1 1 1 0 0 0 1 1 1 1 1 1 1 0 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 0 1 1 1 1 1 1 1 0 0 0 1 1 1 1 1 0 0 Neighborhood: 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 >> strel ('line', 5, 90) Neighborhood: 1 1 1 1 1 >> strel ('arbitrary', [0 0 1 0 0; 0 0 1 0 0; 1 1 1 1 1; 0 0 1 0 0; 0 0 1 0 0]) Neighborhood: 0 0 1 0 0 0 0 1 0 0 1 1 1 1 1 0 0 1 0 0 0 0 1 0 0 >> strel ('line', 5, 45) Neighborhood: 0 0 1 0 1 0 1 0 0

  5. Erosion B A Binary Image Structuring element Image eroded with structuring element

  6. Erosion B A Binary Image Structuring element Image eroded with structuring element

  7. imerode(Z_BW,strel('disk',1))

  8. Dilation B A Binary Image Structuring element Image dilated with structuring element

  9. imdilate(Z_BW,strel('disk',1)) Notice lone pixels take the shape of the structuring element

  10. ~imerode(Z_BW,strel('disk',1)) imdilate(~Z_BW,strel('disk',1))

  11. imopen(Z_BW,strel('disk',1))

  12. imclose(Z_BW,strel('disk',1))

More Related