5. What Is
Image Processing?
Computer imaging can be separate into two primary
categories:
1. Computer Vision.
Sulaf Almagooshi, 2013
2. Image Processing.
5
6. Image Processing
topics
The major topics within the field of image processing
include:
1. Image restoration.
2. Image enhancement.
3. Image compression.
â¨â¨
Sulaf Almagooshi, 2013
6
10. Image Analysis Process
The image analysis process can be broken down into three
primary stages:
1.Preprocessing.
Sulaf Almagooshi, 2013
2.Data Reduction.
10
3. Features Analysis.
14. MATLAB Tour
- some tricks !
⢠To know if you already used a variable name
⢠Use â whichâ.
⢠To clear Command Window
⢠Use âclcâ
⢠To know your variables
⢠Use â whoâ
⢠To know your variable's info
⢠Use â whosâ
⢠To know your files
⢠Use â whatâ
Sulaf Almagooshi, 2013
14
15. MATLAB Tour
If you needed Help:
Type help in Command window
Sulaf Almagooshi, 2013
15
17. MATLAB Tour
M-files
⢠To store the code and execute later.
⢠The file name will become a function, when we call it it will execute
the file.
⢠To open a new m-file , In the Command window , type
edit
Sulaf Almagooshi, 2013
17
22. Image Processing :
Basic functions
Function
Description
Imread
to read an image into Matlab.
imshow
To show image in a figure.
Figure
To create an independent figure.
size(x)
To know the min and max for an object.
imwrite(image,
'filename.type')
To save the image.
rgb2gray
To convert a colored image to gray one.
Sulaf Almagooshi, 2013
22
23. Image Processing :
Basic functions
Function
Description
imhist(x)
Create a histogram.
BW = im2bw(x)
Convert to Binary image.
J = imnoise(a,'salt & pepper',d);
Add noise of type â salt and pepperâ.
IM2 = imcomplement(IM)
computes the complement of the image IM.
SE = strel('square', 5);
Create a structure.
IM2 = imdilate(a,SE);
To dilates an image.
IM2= imerode(a,SE);
To erode an image.
Sulaf Almagooshi, 2013
23
In computer vision application the processed images output for use by a computer. In image processing applications the output images are for human consumption.-----Historically, the field of image processing grew from electrical engineering as an extension of the signal processing branch, whereas are the computer science discipline was largely responsible for developments in computer vision.
Image processing is low level comparing with image analysis 1. Preprocessing: Is used to remove noise and eliminate irrelevant, visually unnecessary information. Noise is unwanted information that can result from the image acquisition process, other preprocessing steps might include: Gray âlevel or spatial quantization (reducing the number of bits per pixel or the image size). Finding regions of interest for further processing. 2. Data Reduction: Involves either reducing the data in the spatial domain or transforming it into another domain called the frequency domain, and then extraction features for the analysis process. 3. Features Analysis: The features extracted by the data reduction process are examine and evaluated for their use in the application.
Here start developing
Here start developing
imhist(I) displays a histogram for the image I above a grayscalecolorbar. The number of bins in the histogram is specified by the image type. If I is a grayscale image, imhist uses a default value of 256 bins. If I is a binary image, imhist uses two bins.BW = im2bw(I, level) converts the grayscale image I to a binary image. J = imnoise(I,'salt & pepper',d)adds salt and pepper noise to the image I, where d is the noise density. This affects approximately d*numel(I) pixels. The default for d is 0.05.IM2 = imcomplement(IM) computes the complement of the image IM. IM can be a binary, grayscale, or RGB image. IM2 has the same class and size as IM.In the complement of a binary image, zeros become ones and ones become zeros; black and white are reversed. In the complement of an intensity or RGB image, each pixel value is subtracted from the maximum pixel value supported by the class (or 1.0 for double-precision images) and the difference is used as the pixel value in the output image. In the output image, dark areas become lighter and light areas become darker.SE = strel('square', W) creates a square structuring element whose width is W pixels. W must be a nonnegative IM2 = imdilate(IM,SE) dilates the grayscale, binary, or packed binary image IM, returning the dilated image, IM2. The argument SE is a structuring element object, or array of structuring element objects, returned by the strel function.IM2 = imerode(IM,SE) erodes the grayscale, binary, or packed binary image IM, returning the eroded image IM2. The argument SE is a structuring element object or array of structuring element objects returned by the strel function.*** al function descriptions are from the Mathwork website ***
imtool opens a new Image Tool in an empty state. Use the File menu options Open or Import from Workspace to choose an image for display.
Lunch GUIDE tool: *Create a GUI * handle input and outputDeploy:mcc -mv filename.m -a topo.mat