Presentation is loading. Please wait.

Presentation is loading. Please wait.

Automation and Drives SIMATIC HMI The Human Machine Interface for internal use only Scope of Presentation Dept. of Industrial Electronics and Control Eng.

Similar presentations


Presentation on theme: "Automation and Drives SIMATIC HMI The Human Machine Interface for internal use only Scope of Presentation Dept. of Industrial Electronics and Control Eng."— Presentation transcript:

1 Automation and Drives SIMATIC HMI The Human Machine Interface for internal use only Scope of Presentation Dept. of Industrial Electronics and Control Eng. Faculty of Electronic Engineering Use Morphological Opening to Estimate the Background Read The Image Introduction Threshold the Image Subtract Background Image from Original Image Questions and Discussion Minoufiya University Increase the Image Contrast Eng./ Essam Nabil2011 - 2012 Part : one Image Processing Using MATLAB

2 Automation and Drives SIMATIC HMI The Human Machine Interface for internal use only Scope of Presentation Dept. of Industrial Electronics and Control Eng. Faculty of Electronic Engineering Use Morphological Opening to Estimate the Background Read The Image Introduction Threshold the Image Subtract Background Image from Original Image Questions and Discussion Minoufiya University Increase the Image Contrast Eng./ Essam Nabil2011 - 2012 Introduction 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. 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 Automation and Drives SIMATIC HMI The Human Machine Interface for internal use only Scope of Presentation Dept. of Industrial Electronics and Control Eng. Faculty of Electronic Engineering Use Morphological Opening to Estimate the Background Read The Image Introduction Threshold the Image Subtract Background Image from Original Image Questions and Discussion Minoufiya University Increase the Image Contrast Eng./ Essam Nabil2011 - 2012 Read The Image 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’) 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 Automation and Drives SIMATIC HMI The Human Machine Interface for internal use only Scope of Presentation Dept. of Industrial Electronics and Control Eng. Faculty of Electronic Engineering Use Morphological Opening to Estimate the Background Read The Image Introduction Threshold the Image Subtract Background Image from Original Image Questions and Discussion Minoufiya University Increase the Image Contrast Eng./ Essam Nabil2011 - 2012 I = imread('rice.png'); figure, imshow(I) I = imread('rice.png'); figure, imshow(I) Read in the ‘rice.png' image and bring its data to workspace. Read The Image

5 Automation and Drives SIMATIC HMI The Human Machine Interface for internal use only Scope of Presentation Dept. of Industrial Electronics and Control Eng. Faculty of Electronic Engineering Use Morphological Opening to Estimate the Background Read The Image Introduction Threshold the Image Subtract Background Image from Original Image Questions and Discussion Minoufiya University Increase the Image Contrast Eng./ Essam Nabil2011 - 2012 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 IM2 = imopen(IM,SE) performs morphological opening on the grayscale or binary image IM with the structuring element SE. background =imopen(I,strel('disk',15));

6 Automation and Drives SIMATIC HMI The Human Machine Interface for internal use only Scope of Presentation Dept. of Industrial Electronics and Control Eng. Faculty of Electronic Engineering Use Morphological Opening to Estimate the Background Read The Image Introduction Threshold the Image Subtract Background Image from Original Image Questions and Discussion Minoufiya University Increase the Image Contrast Eng./ Essam Nabil2011 - 2012 Use Morphological Opening to Estimate the Background

7 Automation and Drives SIMATIC HMI The Human Machine Interface for internal use only Scope of Presentation Dept. of Industrial Electronics and Control Eng. Faculty of Electronic Engineering Use Morphological Opening to Estimate the Background Read The Image Introduction Threshold the Image Subtract Background Image from Original Image Questions and Discussion Minoufiya University Increase the Image Contrast Eng./ Essam Nabil2011 - 2012 Subtract Background Image from Original Image Notice that the background illumination is brighter in the center of the image than at the bottom. Use imopen to estimate the background illumination. I2 = I – background; figure, imshow(I2); I2 = I – background; figure, imshow(I2); I2 = imsubtract(I,background); figure, imshow(I2); I2 = imsubtract(I,background); figure, imshow(I2); OR

8 Automation and Drives SIMATIC HMI The Human Machine Interface for internal use only Scope of Presentation Dept. of Industrial Electronics and Control Eng. Faculty of Electronic Engineering Use Morphological Opening to Estimate the Background Read The Image Introduction Threshold the Image Subtract Background Image from Original Image Questions and Discussion Minoufiya University Increase the Image Contrast Eng./ Essam Nabil2011 - 2012 Increase the Image Contrast I3 = imadjust(I2); figure, imshow(I3); I3 = imadjust(I2); figure, imshow(I3);

9 Automation and Drives SIMATIC HMI The Human Machine Interface for internal use only Scope of Presentation Dept. of Industrial Electronics and Control Eng. Faculty of Electronic Engineering Use Morphological Opening to Estimate the Background Read The Image Introduction Threshold the Image Subtract Background Image from Original Image Questions and Discussion Minoufiya University Increase the Image Contrast Eng./ Essam Nabil2011 - 2012 Threshold the Image Create a new binary image by thresholding the adjusted image. level = graythresh(I3); bw = im2bw(I3,level); figure, imshow(bw); level = graythresh(I3); bw = im2bw(I3,level); figure, imshow(bw);

10 Automation and Drives SIMATIC HMI The Human Machine Interface for internal use only Scope of Presentation Dept. of Industrial Electronics and Control Eng. Faculty of Electronic Engineering Use Morphological Opening to Estimate the Background Read The Image Introduction Threshold the Image Subtract Background Image from Original Image Questions and Discussion Minoufiya University Increase the Image Contrast Eng./ Essam Nabil2011 - 2012 Questions and Discussion


Download ppt "Automation and Drives SIMATIC HMI The Human Machine Interface for internal use only Scope of Presentation Dept. of Industrial Electronics and Control Eng."

Similar presentations


Ads by Google