Beruflich Dokumente
Kultur Dokumente
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
• 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.
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
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