Dip Morphological
Upcoming SlideShare
Loading in...5
×
 

Dip Morphological

on

  • 5,589 views

 

Statistics

Views

Total Views
5,589
Views on SlideShare
5,582
Embed Views
7

Actions

Likes
2
Downloads
273
Comments
0

1 Embed 7

http://www.slideshare.net 7

Accessibility

Upload Details

Uploaded via as Microsoft PowerPoint

Usage Rights

© All Rights Reserved

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
    Processing…
Post Comment
Edit your comment

Dip Morphological Dip Morphological Presentation Transcript

  • Image adjustment J = IMADJUST(I) maps the values in intensity image I to new values in J such that 1% of data is saturated at low and high intensities of I. This increases the contrast of the output image J. I = pout.tif J = imadjust(I); K = imadjust(I,[0.3 0.7],[])
  • Image adjustment J = imadjust(I,[LOW_IN; HIGH_IN],[LOW_OUT; HIGH_OUT]) You can use an empty matrix ([ ]) for [LOW_IN; HIGH_IN] or for [LOW_OUT; HIGH_OUT] to specify the default of [0 1]. J = imadjust(I,[LOW_IN; HIGH_IN],[LOW_OUT; HIGH_OUT],GAMMA)
  • Image adjustment RGB2 = IMADJUST(RGB1,...) performs the adjustment on each image plane (red, green, and blue) of the RGB image RGB1. As with the colormap adjustment, you can apply unique mappings to each plane. RGB1 = imread('football.jpg'); RGB2 = imadjust(RGB1,[.2 .3 0; .6 .7 1],[ ])
  • Morphological operations Morphology is a technique of image processing based on shapes. The value of each pixel in the output image is based on a comparison of the corresponding pixel in the input image with its neighbors. By choosing the size and shape of the neighborhood, a morphological operation can be applied that is sensitive to specific shapes in the input image. Image Processing Toolbox morphological functions in Matlab can be used to perform common image processing tasks, such as contrast enhancement, noise removal, thinning, skeletonization, filling, and segmentation.
  • Neighborhood (pixel connectivity) 4-connected Pixels are connected if their edges touch. This means that a pair of adjoining pixels are part of the same object only if they are both on and are connected along the horizontal or vertical direction. 8-connected Pixels are connected if their edges or corners touch. This means that if two adjoining pixels are on, they are part of the same object, regardless of whether they are connected along the horizontal, vertical, or diagonal direction.
  • Neighborhood (pixel connectivity) Strel Examples -------- se1 = strel('square',11) % 11-by-11 square se2 = strel('line',10,45) % line, length 10, angle 45 degrees se3 = strel('disk',15) % disk, radius 15 se4 = strel('ball',15,5) % ball, radius 15, height 5
  • Image dilation
    • Dilation is an operation that “grows” or “thickens” objects in a binary image.
    • The specific manner and extent of this thickening is controlled by a shape referred to as a structuring element .
    • Matlab “imdilate” function accepts two primary arguments:
    • The input image to be processed (grayscale, binary).
    • A structuring element object, returned by the strel function, or a binary matrix defining the neighborhood of a structuring element.
    • A = imread(‘……’); se =strel(‘line’,3,45); B = imdilate(A,se);
  • 13 13 13 13 255 13 13 13 13 13 13 13 255 0 255 13 13 13 13 13 255 255 255 255 255 13 13 13 255 0 0 0 0 0 255 13 255 0 0 0 0 0 0 0 255 Image dilation 13 13 13 255 255 255 13 13 13 13 13 255 255 255 255 255 13 13 13 255 255 255 255 255 255 255 13 255 255 255 0 0 0 255 255 255 255 255 0 0 0 0 0 255 255 A =imread(A.tif) Se=strel(‘line’,3,0) B = imdiltate(A,se)
  • Image dilation strel('disk',5)
  • Image erosion Erosion “shrinks” or “thins” objects in a binary image. As in dilation, the manner and extent of shrinking is controlled by a structuring element. Matlab “imerode” function accepts two primary arguments: The input image to be processed (grayscale, binary) A structuring element object, returned by the strel function, or a binary matrix defining the neighborhood of a structuring element. A = imread(‘……’); se =strel(‘line’,3,45); B = imerode(A,se);
  • Image erosion A =imread(‘A.tif’) se=strel(‘line’,3,0) 13 13 13 13 255 13 13 13 13 13 13 13 255 0 255 13 13 13 13 13 255 255 255 255 255 13 13 13 255 0 0 0 0 0 255 13 255 0 0 0 0 0 0 0 255 13 13 13 13 13 13 13 13 13 13 13 13 0 0 0 13 13 13 13 13 13 255 255 255 13 13 13 13 0 0 0 0 0 0 0 13 0 0 0 0 0 0 0 0 0 B = imdiltate(A,se)
  • Image erosion strel('disk',5)
  • Dilation and erosion based functions Image opening (imopen) Morphological opening is used to remove small objects from an image while preserving the shape and size of larger objects in the image. An opening is an erosion followed by a dilation, using the same structuring element for both operations.
  • Dilation and erosion based functions Image opening
  • Dilation and erosion based functions Image close (imdilate) Dilates an image and then erodes the dilated image using the same structuring element for both operations. Imopen imclose Circles.png
  • Morphological functions Morphological opening operation by calling imopen with the input image, I, and a disk-shaped structuring element with a radius of 15. The structuring element was created by the strel function. The morphological opening has the effect of removing objects that cannot completely contain a disk of radius 15. I = imread(‘ rice.tif ’); background = imopen(I,strel('disk',15)); imshow(background)
  • Morphological functions I2 = imsubtract(I,background); Now subtract the background image, background, from the original image, I, to create a more uniform background.
  • Morphological functions imadjust command to increase the contrast in the image. The imadjust function takes an input image and can also take two vectors: [low high] and [bottom top]. The output image is created by mapping the value low in the input image to the value bottom in the output image, mapping the value high in the input image to the value top in the output image, and linearly scaling the values in between. Adjust the Image Contrast I3 = imadjust(I2, stretchlim(I2), [0 1]);
  • Morphological functions imadjust with stretchlim(I2) as the second argument. The stretchlim function automatically computes the right [low high] values to make imadjust increase (stretch) the contrast of the image.
  • Binary image level = graythresh(I3); bw = im2bw(I3,level); Apply Thresholding to the Image graythresh to automatically compute an appropriate threshold to use to convert the intensity image to binary. You then called im2bw to perform for thresholding, using the threshold, level, returned by graythresh.