Monday, 30 April 2012

Matlab Morphological operation Example code

Matlab Morphological operations is used in image pre-processing steps.In matlab following type of Morphological operations there.There are
  1. Bottom hat
  2. Bridges unconnected
  3. Morphological closing
  4. Morphological diagonal 
  5. Dilation
  6. Erosion
  7. Fills isolated interior
  8. H-connected pixels
  9. Morphological opening
  10. Removes interior pixels
  11. Shrinks
  12. Skeleton
  13. Thicken
  14. Thin
  15. Top hat
above's are morphological operation types.Basic syntax as follows

>>morph_output = bwmorph(input_binary_img,operation) ;

operations are 'bothat', 'bridge', 'clean', 'close', 'diag', 'dilate', 'erode', 'fill', 'hbreak', 'majority', 'open', 'remove', 'shrink', 'skel', 'spur', 'thicken', 'thin', 'tophat'.

example code and output as  below.Here we use Morphological Removes interior pixels method.

>>  BW = imread('circles.png');
>> imshow(BW);
>> BW2 = bwmorph(BW,'remove');
>> figure, imshow(BW2)



Related Search : Matlab Morphological operations Find on Image,Matlab Erosion Morphological operations, Matlab Dilation Morphological operations,Matlab Morphological closing operations,Matlab Thicken Morphological operations

Kindly Bookmark and Share it:

No comments:

Post a Comment

Related Posts Plugin for WordPress, Blogger...