1 / 10

Biomedical Laboratory – 4 th Year

Biomedical Laboratory – 4 th Year. Part : one Image Processing Using MATLAB. Lab. No.“4”. Correcting Nonuniform Illumination. Introduction. Application:.

treva
Download Presentation

Biomedical Laboratory – 4 th Year

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. Biomedical Laboratory – 4th Year • Part : one • Image Processing Using MATLAB Lab. No.“4” Correcting Nonuniform Illumination

  2. Introduction • Application: Using an image of rice grains, this example illustrates how you can enhance an image to correct for nonuniform illumination, then use the enhanced image to identify individual grains. Introduction • Procedural steps: Step 1: Read and Display the Image Step 2: Use Morphological Opening to Estimate the Background Step 3: Subtract Background Image from Original Image Step 4:Increase the Image Contrast Step 5:Threshold the Image

  3. Step 1: Read and Display The Image 1.1 Key Commands: I = imread('filename.fmt') :reads a grayscale or color image specified by filename and format fmt and stores it into array variable I. If the file is not in the current folder, or in a folder on the MATLAB path, specify the full pathname as: I = imread(‘D:\pictures\asd.jpg’) Read The Image figure :creates a new figure object using default property values, and automatically becomes the current figure until a new figure is either created or called. imshow(I) :displays the stored image of the variable array I. title('string') :adds the title specified by ‘string’ at the top and in the center of the current axes or figure.

  4. Step 1: Read and Display The Image 1.2 Step application: Read in the ‘rice.png' image and bring its data to workspace. • I = imread('rice.png'); figure, imshow(I) Read The Image

  5. Step 2: Estimate the Background 2.1 Preface: Notice that the background illumination is brighter in the center of the image than at the bottom. Use imopen to estimate the background illumination. Use Morphological Opening to Estimate the Background 2.2 Key Commands: IM2 = imopen(IM,SE) performs morphological opening on the grayscale or binary image IM with the structuring element SE. 2.3 Step application: background =imopen(I,strel('disk',15));

  6. Step 2: Estimate the Background Use Morphological Opening to Estimate the Background

  7. Step 3: Subtract Background from Original 3.1 Preface: Notice that the background illumination is brighter in the center of the image than at the bottom. Use imopen to estimate the background illumination. 3.2 Step application: I2 = I – background; figure, imshow(I2); Subtract Background Image from Original Image OR I2 = imsubtract(I,background); figure, imshow(I2);

  8. Step 4: Increase the Image Contrast 4.1 Step application: • I3 = imadjust(I2); • figure, imshow(I3); Increase the Image Contrast

  9. Step 5: Threshold the Image 5.1 Preface: Create a new binary image by thresholding the adjusted image. 5.2 Step application: level = graythresh(I3); bw = im2bw(I3,level); figure, imshow(bw); • Threshold the Image

  10. Questions and Discussion Questions and Discussion

More Related