Sie sind auf Seite 1von 41

DIGITAL SIGNAL AND IMAGE

PROCESSING USING MATLAB

Compiled by
Prof.Ms.V.Ezhilya
MATLAB - INTRODUCTION
• It stands for MATrix LABoratory
• It is developed by The Mathworks Inc.
• It is an interactive, integrated, environment
• It is a high level programming language
• Many applications‐ specific toolboxes available
• Can be converted into C code via MATLAB compiler
for better efficiency
DEFINITIONS
• Signal
▫ Signal is a physical quantity that varies with time,
frequency or any other independent variable.
IMAGE
• A 2-D physical likeness or representation of a
person, animal, or thing, photographed, painted,
sculptured, or otherwise made visible.
SIGNAL PROCESSING

Signal processing is an enabling technology that


encompasses the fundamental theory,
applications, algortihms, and implementations
of processing or transferring information
contained in many different physical, symbolic,
or abstract formats broadly designated as
signals.
BASIC SIGNAL PROCESSING
DIGITAL SIGNAL PROCESSING
• Digital signal processing (DSP) is the numerical
manipulation of signals, usually with the
intention to measure, filter, produce or
compress continuous analog signals.

• APPLICATIONS:
▫ Speech Processing - audio
▫ RADAR
▫ SONAR
▫ Bio-medical etc.,
MATLAB NOTATIONS
• xlabel(‘time’); % label the x-axis with time
• ylabel(‘amplitude’); % label the y-axis with amplitude
• title(‘xxxxx’); % put a title on the plot
• input(‘’); % enter I/P value
• clear; % clears the workspace, all
variables are removed.
• clear all; % clears all variables and
functions from work space.
MATLAB NOTATIONS – Contd.
• clc; % clears command window,
command history is lost.
• plot(x,y) % plot continuous time signal.
• subplot % breaks fig. window.
• Stem % to plot discrete time sequence
• axis tight; % set tight scale on axes.
• zeros(m,n) % returns an m by n matrix of
zeros.
MATLAB NOTATIONS – Contd.
• x=0:.1:20; % create vector x
• b=[2;3;5]; % create vector b
• disp % display array
• length(x) % gives length of vector x.
• conv % perform convolution
• sin % give sine wave
• cos %give cosine wave
• fft & ifft %find dft& idft values
GENERATION OF SIGNALS
% To plot the Sine Function

clc;
clear all;
x=0:1:40;
y=10*sin(2*pi*x/15);
subplot(2,1,1);
plot(x,y); %CT
title('CT sine wave');
grid;
subplot(2,1,2);
stem(x,y); %DT
title('DT sine wave');
grid;
SINE WAVE : Continuous & Discrete
CALCULATION OF FFT
clc;
clear all;
close all;
xn=input('Enter the input sequence: ');
subplot(3,1,1);
stem(xn);
xlabel('Real axis->');
ylabel('Imaginary axis->');
title('INPUT SEQUENCE');
xk=fft(xn);
disp('The resultant is');
disp(xk);
subplot(3,1,3);
plot(xk,'o');
xlabel('Real axis->');
ylabel('Imaginary axis->');
title('OUTPUT SEQUENCE');
DIGITAL IMAGE PROCESSING
• Digital image processing is the use of computer
algorithms to perform image processing on digital images.

• STEPS:
 Image acquisition,
 Image enhancement,
 Image restoration,
 Color image processing,
 Wavelets and Multiresolution processing,
 Compression,
 Morphological processing,
 Segmentation, Representation with description
 Object recognition
DIP USING MATLAB
• A digital image is composed of a two or three
dimensional matrix of pixels.

• Individual pixels contain a number or numbers


representing what grayscale or color value is
assigned to it.
Low level image processing
• Image compression
• Noise reduction
• Edge extraction
• Contrast enhancement
• Segmentation
• Thresholding
• Morphology
• Image restoration
Low level image processing
• Image compression
• Noise reduction
• Edge extraction
• Contrast enhancement
• Segmentation
• Thresholding
• Morphology
• Image restoration
Low level image processing
• Image compression
• Noise reduction
• Edge extraction
• Contrast enhancement
• Segmentation
• Thresholding
• Morphology
• Image restoration
Low level image processing
• Image compression
• Noise reduction
• Edge extraction
• Contrast enhancement
• Segmentation
• Thresholding
• Morphology
• Image restoration
Low level image processing
• Image compression
• Noise reduction
• Edge extraction
• Contrast enhancement
• Segmentation
• Thresholding
• Morphology
• Image restoration
Low level image processing
• Image compression
• Noise reduction
• Edge extraction
• Contrast enhancement
• Segmentation
• Thresholding
• Morphology
• Image restoration
Low level image processing
• Image compression
• Noise reduction
• Edge extraction
• Contrast enhancement
• Segmentation
• Thresholding
• Morphology
• Image restoration

Dilation
Erosion
Low level image processing

• Image compression
• Noise reduction
• Edge extraction
• Contrast enhancement
• Segmentation
• Thresholding
• Morphology
• Image restoration
Just some fun visual perception games

Can you count the dots?


More …

Do you see squares?


High level image understanding
• To imitate human cognition according to the
information contained in the image.

• Data represent knowledge about the image


content, and are often in symbolic form.

• Data representation is specific to the high-level


goal.
High level image understanding
• What are the high-level components?
• What tasks can be achieved?

Landmarks
Traces (bifurcation/cros
(vessel sover)
centerlines)
BASIC IMAGE PROCESSING FUNCTIONS
• imread() - Loading an image
• imshow() - Displaying an image
• imwrite() - Saving an image
• rgb2gray() - RGB to Gray Scale conversion
• imhist() - Histogram
• imhisteq() - Histogram equalization
• imnoise() - Adding Noise
LOADING AN IMAGE
OUTPUT
SAVING AN IMAGE - imwrite
IMAGE PROPERTIES - HISTOGRAM

• A histogram is a graph drawn between the pixel


values ranging from 0 – 265 and the total
number of pixels in an image.

• In image processing it is used to show how many


values of pixels are present in an image.

• Histograms can be very useful in determining


which pixel values are important in an image.
HISTOGRAM
HISTOGRAM - OUTPUT
FILTERS
• A filter, or convolution kernel - an algorithm for
modifying a pixel value.

• This could entail blurring, deblurring, locating


certain features within an image, etc.,

• LPF: It blur high frequency areas of images.

• This can sometimes be useful when attempting


to remove unwanted noise from an image.
M- FILE FOR LPF DESIGN
OUTPUT
MORPHOLOGICAL PROCESSING

• Processing an image based on its shape


• Types:
▫ Erosion: Removing pixel values from an Image
▫ Dilation: Adding pixel values to an Image
M-File For Erosion and Dilation
OUTPUT for EROSION & DILATION
CONTACT
Ms. V.Ezhilya, M.E.,
Assistant Professor
VSA GI – Salem

Feedback & Suggestions are welcome


Ph: 7339000588
E-mail : ezhilyavenkat@gmail.com
Blog : ezhilyavenkat.blogspot.in

Das könnte Ihnen auch gefallen