Академический Документы
Профессиональный Документы
Культура Документы
LIST OF EXPERIMENTS
PART-1( SIGNALS )
1) Generation of discrete time signals
2) To verify the Linear Convolution
a) Using MATLAB
b) Using Code Composer Studio (CCS)
3) To verify the Circular Convolution for discrete signals
a) Using MATLAB
b) Using Code Composer Studio (CCS)
4) To Find the addition of Sinusoidal Signals
5) To verify Discrete Fourier Transform(DFT) and Inverse Discrete Fourier Transform(IDFT)
a) Using MATLAB
b) Using Code Composer Studio (CCS)
6) Transfer Function Stability Analysis: using pole-zero plot, bode plot, Nyquist plot, z-plane
plot.
PART-2 ( FILTERS )
7) Frequency Response of IIR low pass Butterworth Filter
8) Frequency Response of IIR high pass Butterworth Filter
9) Frequency Response of IIR low pass Chebyshev Filter
10) Frequency Response of IIR high pass Chebyshev Filter
11) Frequency Response of FIR low pass Filter using Rectangle Window
12) Frequency Response of FIR low pass Filter using Triangle Window
Experiment No.-1
Theory:
1. Discrete time views values of variables as occurring at distinct, separate "points in time", or
equivalently as being unchanged throughout each non-zero region of time ("time period")—
that is, time is viewed as a discrete variable.
2. A discrete signal or discrete-time signal is a time series consisting of a sequence of
quantities.
3. Discrete-time signals may have several origins, but can usually be classified into one of two
groups
a. By acquiring values of an analog signal at constant or variable rate. This process is
called sampling
b. By observing an inherently discrete-time process, such as the weekly peak value of
a particular economic indicator.
Program:
xlabel('TIME');
ylabel('AMPLITUDE');
t=0:0.1:10;a=1;
y=a*t.^2;
subplot(4,2,6);
stem(t,y);
title('parabola signal');
xlabel('TIME');
ylabel('AMPLITUDE');
subplot(4,2,8);
plot(t,x);
title('square wave');
xlabel('TIME');
ylabel('AMPLITUDE');
Model Graph:
Procedure:
RESULT:
Experiment No.-2
LINEAR CONVOLUTION
Aim: To write a MATLAB Program for Linear convolution using MATLAB.
Theory:
1. Linear convolution is the basic operation to calculate the output for any linear time
invariant system given its input and its impulse response.
2. Convolution is used to find out the output of an LTI system.If the response of the system
to the impulse signal is known(h(t)h(t) or h(n)h(n)),then the response to any other input
to the system can be found out by convolving the input signal with impulse response.
3. Most often it is considered because it is a mathematical consequence of the discrete
Fourier transform
4. One of the most efficient ways to implement convolution is by doing multiplication in
the frequency.
Program:
x=[1 2 3 4];
n1=length(x);
subplot(3,1,1);
stem(x);
title('First sequence');
h=[5 6 7 8];
n2=length(h);
subplot(3,1,2);
stem(h);
title(‘Second sequence');
y=conv(x,h);
disp(y);
n=1:1:n1+n2-1;
subplot(3,1,3);
stem(n,y);
title('LINEAR CONVOLUTION:')
Model Graph:
x=[1 2 3 4];
n=length(x);
subplot(3,1,1);stem(x);
h=[5 6 7 8];
k=length(h);
subplot(3,1,2);stem(h);
x=[x,zeros(1,n)];
h=[h,zeros(1,k)];
y=zeros(1,k+n-1);
for i=1:k+n-1
y(i)=0;
for j=1:k+n-1
if(j<i+1)
y(i)=y(i)+x(j)*h(i-j+1);
end
end
end
disp(y)
subplot(3,1,3);stem(y);
title('LINEAR CONVOLUTION:')
Model Graph:
PROCEDURE:
RESULT:
Hence the MATLAB program for Linear convolution using MATLAB functions
is verified under different conditions.
Experiment No.-3
CIRCULAR CONVOLUTION
Aim: To write a MATLAB Program for Circular Convolution using MATLAB.
Theory:
1. The circular convolution, also known as cyclic convolution, of two aperiodic functions
(i.e. Schwartz functions) occurs when one of them is convolved in the normal way with
a periodic summation of the other function
2. The circular convolution is defined on time-limited sequences of length NN.
3. The circular convolution is periodic with period NN.
4. In the circular convolution, the shifted sequence wraps around the summation window,
when it would leave the region.
5. In the finite discrete domain, the convolution theorem holds for the circular convolution,
not for the linear convolution. Linear convolution can be obtained by appropriate zero-
padding of the sequences.
Program:
h=[5 6 7 8];
n2=length(h);
subplot(2,2,2);
stem(h);
title('Second sequence');
n=max(n1,n2);
y=cconv(x,h,n);
subplot(2,2,3);
stem(y,'r');
title('circular convolution');
z=cconv(x,h);
subplot(2,2,4);
stem(z);
title('linear convolution');
Model Graph:
b=[5 6 7 8];
k=length(b);
subplot(3,1,2);stem(b);
N=max(n,k);
y=zeros(1,N);
for n=0:N-1
y(n+1)=0;
for i=0:N-1
j=mod(n-i,N);
y(n+1)=y(n+1)+a(i+1)*b(j+1);
end
end
subplot(3,1,3);stem(y);
disp(y);
Model Graph:
Procedure:
RESULT:
Experiment No.-4
Program:
(A)
clc;
clear all;
close all;
x=(-6*pi):0.01:(6*pi);
y=sin(x);
y1=sin(x)+(1/3)*sin(3*x)+(1/5)*sin(5*x);
y2=sin(x)+(1/3)*sin(3*x)+(1/5)*sin(5*x)+(1/7)*sin(7*x)+(1/9)*sin(9*x);
y3=sin(x)+(1/3)*sin(3*x)+(1/5)*sin(5*x)+(1/7)*sin(7*x)+(1/9)*sin(9*x)+(1/11)*sin(11*x)+(1/1
3)*sin(13*x);
subplot(2,2,1);plot(x,y);title('sine wave');
subplot(2,2,2);plot(x,y1);title('3 sine wave');
subplot(2,2,3);plot(x,y2);title('5 sine wave');
subplot(2,2,4);plot(x,y3);title('7 sine wave');
Model Graph:
(B)
x=(-6*pi):0.01:(6*pi);
y=sin(x);
y1=sin(x)+(1/3)*sin(3*x);
y2=sin(x)+(1/3)*sin(3*x)+(1/5)*sin(5*x);
y3=sin(x)+(1/3)*sin(3*x)+(1/5)*sin(5*x)+(1/7)*sin(7*x);
y4=sin(x)+(1/3)*sin(3*x)+(1/5)*sin(5*x)+(1/7)*sin(7*x)+(1/9)*sin(9*x);
y5=sin(x)+(1/3)*sin(3*x)+(1/5)*sin(5*x)+(1/7)*sin(7*x)+(1/9)*sin(9*x)+(1/11)*sin(11*x);
y6=sin(x)+(1/3)*sin(3*x)+(1/5)*sin(5*x)+(1/7)*sin(7*x)+(1/9)*sin(9*x)+(1/11)*sin(11*x)+(1/1
3)*sin(13*x);
y7=sin(x)+(1/3)*sin(3*x)+(1/5)*sin(5*x)+(1/7)*sin(7*x)+(1/9)*sin(9*x)+(1/11)*sin(11*x)+(1/1
3)*sin(13*x)+(1/15)*sin(15*x);
subplot(4,2,1);plot(x,y);title('sinewave');
subplot(4,2,2);plot(x,y1);title('2 TERMS');
subplot(4,2,3);plot(x,y2);title('3 TERMS');
subplot(4,2,4);plot(x,y3);title('4 sinewave');
subplot(4,2,5);plot(x,y4);title('5 sinewave');
subplot(4,2,6);plot(x,y5);title('6 sinewave');
subplot(4,2,7);plot(x,y6);title('7 sinewave');
subplot(4,2,8);plot(x,y7);title(' 8sinewave');
z=fft(y);z=fftshift(z);
z1=fft(y1);z1=fftshift(z1);
z2=fft(y2);z2=fftshift(z2);
z3=fft(y3);z3=fftshift(z3);
z4=fft(y4);z4=fftshift(z4);
z5=fft(y5);z5=fftshift(z5);
z6=fft(y6);z6=fftshift(z6);
z7=fft(y7);z7=fftshift(z7);
fre=linspace(-1,1,length(z));
figure,axis([0 0.1 0 10]);
(C)
x=(-6*pi):0.01:(6*pi);
y=cos(x);
y1=(1/2)*cos(2*x)+(1/4)*cos(4*x);
y2=(1/2)*cos(2*x)+(1/4)*cos(4*x)+(1/6)*cos(6*x);
y3=(1/2)*cos(2*x)+(1/4)*cos(4*x)+(1/6)*cos(6*x)+(1/8)*cos(8*x);
y4=(1/2)*cos(2*x)+(1/4)*cos(4*x)+(1/6)*cos(6*x)+(1/8)*cos(8*x)+(1/10)*cos(10*x);
y5=(1/2)*cos(2*x)+(1/4)*cos(4*x)+(1/6)*cos(6*x)+(1/8)*cos(8*x)+(1/10)*cos(10*x)+(1/12)*c
os(12*x);
y6=(1/2)*cos(2*x)+(1/4)*cos(4*x)+(1/6)*cos(6*x)+(1/8)*cos(8*x)+(1/10)*cos(10*x)+(1/12)*c
os(12*x)+(1/14)*cos(14*x);
y7=(1/2)*cos(2*x)+(1/4)*cos(4*x)+(1/6)*cos(6*x)+(1/8)*cos(8*x)+(1/10)*cos(10*x)+(1/12)*c
os(12*x)+(1/14)*cos(14*x)+(1/16)*cos(16*x);
subplot(4,2,1);plot(x,y);title('cosewave');
subplot(4,2,2);plot(x,y1);title('2 TERMS');
subplot(4,2,3);plot(x,y2);title('3 TERMS');
subplot(4,2,4);plot(x,y3);title('4 cosewave');
subplot(4,2,5);plot(x,y4);title('5 cosewave');
subplot(4,2,6);plot(x,y5);title('6 cosewave');
subplot(4,2,7);plot(x,y6);title('7 cosewave');
subplot(4,2,8);plot(x,y7);title(' 8cosewave');
z=fft(y);z=fftshift(z);
z1=fft(y1);z1=fftshift(z1);
z2=fft(y2);z2=fftshift(z2);
z3=fft(y3);z3=fftshift(z3);
z4=fft(y4);z4=fftshift(z4);
z5=fft(y5);z5=fftshift(z5);
z6=fft(y6);z6=fftshift(z6);
z7=fft(y7);z7=fftshift(z7);
fre=linspace(-1,1,length(z));
figure,axis([0 0.1 0 10]);
Procedure:
RESULT:
Experiment No.-5
Program:
clc;
clear all;
close all;
y=fft(x,N);
disp(‘THE DFT SEQUENCE IS:’);
disp(y);
m=abs(y);
an=angle(y);
subplot(3,1,2);
stem(real(y));
title('Real part of fft sequence');
subplot(3,1,3);
stem(imag(y));
title('Imaginary part of fft sequence');
z=ifft(y,N)
disp(‘THE IDFT SEQUENCE IS:’);
disp(z);
m1=abs(z);
an1=angle(z);
figure,
subplot(3,1,1);stem(y);
title('input sequence');
subplot(3,1,2);
stem(real(z));
subplot(3,1,3);
stem(imag(z));
title('Imaginary part of ifft sequence');
Output:
12.0000 + 0.0000i 1.0000 - 2.4142i 0.0000 + 0.0000i 1.0000 - 0.4142i 0.0000 + 0.0000i
1.0000 + 0.4142i 0.0000 + 0.0000i 1.0000 + 2.4142i
2 2 2 2 1 1 1 1
Model Graph:
Procedure:
RESULT:
Hence the MATLAB program for DFT & IDFT using MATLAB functions is
verified under different conditions.
Experiment No.-6
Program:
num=[0 2 4];
den=[2 3 1];
r=tf(num,den);
subplot(2,2,1);bode(r);
subplot(2,2,2);nyquist(r);
subplot(2,2,3);rlocus(r);
Model Graph:
Procedure:
RESULT:
Hence the MATLAB program for Transfer function stability analysis using
POLE-ZERO PLOT, BODE PLOT, NYQUIST PLOT and Z-PLANE PLOT using
MATLAB functions is verified under different conditions.
Experiment No.-7
Theory:
1. The Butterworth filter is a type of signal processing filter designed to have a frequency
response as flat as possible in the passband. It is also referred to as a maximally flat
magnitude filter.
2. It was first described in 1930 by the British engineer and physicist Stephen Butterworth in
his paper entitled "On the Theory of Filter Amplifiers"
3. The frequency response of the Butterworth filter is maximally flat (i.e. has no ripples) in the
passband and rolls off towards zero in the stopband
4. A first-order filter's response rolls off at −6 dB per octave (−20 dB per decade) (all first-
order lowpass filters have the same normalized frequency response). A second-order filter
decreases at −12 dB per octave, a third-order at −18 dB and so on.
5. Butterworth filters have a monotonically changing magnitude function with ω, unlike other
filter types that have non-monotonic ripple in the passband and/or the stopband.
Program:
clc;
clear all;
close all;
wp=(2*fp)/F;
ws=(2*fs)/F;
[N,wn]=buttord(wp,ws,rp,rs);
disp('the order of filter is:');disp(N);
disp('the cutoff frequency of filter is:');disp(wn);
[b,a]=butter(N,wn);
w=0:0.01:pi;
[h,w1]=freqz(b,a,w);
k=20*log(abs(h));
subplot(2,1,1);plot(w/pi*F/2,k);grid on;title('magnitude
plot');xlabel('frequency');ylabel('amplitude');
g=angle(h);
subplot(2,1,2);plot(w/pi*F/2,g);grid on;title('phase plot');xlabel('frequency');ylabel('angle');
Output:
INPUTS: F=10000
fp=400
fs=1000
rp=4
rs=30
OUTPUTS: N=4
Wn=0.0867
Model Graph:
Procedure:
RESULT: Hence the MATLAB program for frequency response of IIR Butterworth LPF
using MATLAB functions is verified under different conditions.
24 Dept. of ECE,VIGNAN’S INSTITUTE OF INFORMATION TECHNOLOGY
DIGITAL SIGNAL PROCESSING LABORATORY 2019-20
Experiment No.-8
Theory:
1. The Butterworth filter is a type of signal processing filter designed to have a frequency
response as flat as possible in the passband. It is also referred to as a maximally flat
magnitude filter.
2. It was first described in 1930 by the British engineer and physicist Stephen Butterworth in
his paper entitled "On the Theory of Filter Amplifiers"
3. The frequency response of the Butterworth filter is maximally flat (i.e. has no ripples) in the
passband and rolls off towards zero in the stopband
4. A first-order filter's response rolls off at −6 dB per octave (−20 dB per decade) (all first-
order lowpass filters have the same normalized frequency response). A second-order filter
decreases at −12 dB per octave, a third-order at −18 dB and so on.
5. Butterworth filters have a monotonically changing magnitude function with ω, unlike other
filter types that have non-monotonic ripple in the passband and/or the stopband.
Program:
clc;clear all;close all;
wp=(2*fp)/F;
ws=(2*fs)/F;
[N,wn]=buttord(wp,ws,rp,rs);
disp('the order of filter is:');disp(N);
disp('the cutoff frequency of filter is:');disp(wn);
[b,a]=butter(N,wn,'high');
w=0:0.01:pi;
[h,w1]=freqz(b,a,w);
k=20*log(abs(h));
subplot(2,1,1);plot(w/pi*F/2,k);grid on;title('magnitude
plot');xlabel('frequency');ylabel('amplitude');
g=angle(h);
25 Dept. of ECE,VIGNAN’S INSTITUTE OF INFORMATION TECHNOLOGY
DIGITAL SIGNAL PROCESSING LABORATORY 2019-20
Output:
INPUTS: F=10000
fp=1000
fs=400
rp=4
rs=30
OUTPUTS: N=4
Wn=0.1853
Model Graph:
Procedure:
RESULT: Hence the MATLAB program for frequency response of IIR Butterworth HPF
using MATLAB functions is verified under different conditions.
Experiment No.-9
Theory:
1. Chebyshev filters are analog or digital filters having a steeper roll-off and
more passband ripple (type I) or stopband ripple (type II) than Butterworth filters.
2. Chebyshev filters have the property that they minimize the error between the idealized and
the actual filter characteristic over the range of the filter but with ripples in the passband
3. The type I Chebyshev filters are called usually as just "Chebyshev filters", the type II ones
are usually called "inverse Chebyshev filters".
4. Because of the passband ripple inherent in Chebyshev filters, the ones that have a smoother
response in the passband but a more irregular response in the stopband are preferred for
some applications
Program:
wp=(2*fp)/F;
ws=(2*fs)/F;
[N,wn]=cheb1ord(wp,ws,rp,rs);
[b,a]=cheby1(N,rp,wn);
w=0:0.01:pi;
[h,w1]=freqz(b,a,w);
k=20*log(abs(h));
subplot(2,1,1);plot(w/pi*F/2,k);grid on;
g=angle(h);
subplot(2,1,2);plot(w/pi*F/2,g);grid on;title('phase plot');xlabel('frequency');ylabel('angle');
Output:
INPUTS: F=10000
fp=400
fs=1000
rp=4
rs=30
OUTPUTS: N=3
Wn=0.080
Model Graph:
wp=(2*fp)/F;
ws=(2*fs)/F;
[N,wn]=cheb2ord(wp,ws,rp,rs);
[b,a]=cheby2(N,rs,wn);
w=0:0.01:pi;
[h,w1]=freqz(b,a,w);
k=20*log(abs(h));
subplot(2,1,1);plot(w/pi*F/2,k);grid on;
title('magnitude plot'); xlabel('frequency'); ylabel('amplitude');
g=angle(h);
subplot(2,1,2);plot(w/pi*F/2,g);grid on;title('phase plot');xlabel('frequency');ylabel('angle');
Output:
INPUTS: F=10000
fp=400
fs=1000
rp=4
rs=30
OUTPUTS: N=3
Wn=0.02
Model Graph:
Procedure:
RESULT:
Hence the MATLAB program for frequency response of IIR CHEBYSHEV LPF using
MATLAB functions is verified under different conditions.
Experiment No.-10
1. Chebyshev filters are analog or digital filters having a steeper roll-off and
more passband ripple (type I) or stopband ripple (type II) than Butterworth filters.
2. Chebyshev filters have the property that they minimize the error between the idealized and
the actual filter characteristic over the range of the filter but with ripples in the passband
3. The type I Chebyshev filters are called usually as just "Chebyshev filters", the type II ones
are usually called "inverse Chebyshev filters".
4. Because of the passband ripple inherent in Chebyshev filters, the ones that have a smoother
response in the passband but a more irregular response in the stopband are preferred for
some applications
Program:
clc;
clear all;
close all;
wp=(2*fp)/F;
ws=(2*fs)/F;
[N,wn]=cheb1ord(wp,ws,rp,rs);
[b,a]=cheby1(N,rp,wn, ‘high’);
w=0:0.01:pi;
[h,w1]=freqz(b,a,w);
k=20*log(abs(h));
subplot(2,1,1);plot(w/pi*F/2,k);grid on;
title('magnitude plot'); xlabel('frequency'); ylabel('amplitude');
g=angle(h);
subplot(2,1,2);plot(w/pi*F/2,g);grid on;title('phase plot');xlabel('frequency');ylabel('angle');
Output:
INPUTS: F=10000
fp=400
fs=1000
rp=4
rs=30
OUTPUTS: N=3
Wn=0.2
Model Graph:
clc;
clear all;
close all;
wp=(2*fp)/F;
ws=(2*fs)/F;
[N,wn]=cheb2ord(wp,ws,rp,rs);
[b,a]=cheby2(N,rs,wn, ‘high’);
w=0:0.01:pi;
[h,w1]=freqz(b,a,w);
k=20*log(abs(h));
subplot(2,1,1);plot(w/pi*F/2,k);grid on;
title('magnitude plot'); xlabel('frequency'); ylabel('amplitude');
g=angle(h);
subplot(2,1,2);plot(w/pi*F/2,g);grid on;title('phase plot');xlabel('frequency');ylabel('angle');
Output:
INPUTS: F=10000
fp=400
fs=1000
rp=4
rs=30
OUTPUTS: N=3
Wn=0.08
Model Graph:
Procedure:
RESULT:
Hence the MATLAB program for frequency response of IIR CHEBYSHEV HPF using
MATLAB functions is verified under different conditions.
Experiment No.-11
1. In signal processing, a finite impulse response (FIR) filter is a filter whose impulse
response (or response to any finite length input) is of finite duration, because it settles to zero
in finite time. This is in contrast to infinite impulse response (IIR) filters, which may have
internal feedback and may continue to respond indefinitely
2. The impulse response (that is, the output in response to a Kronecker delta input) of an Nth-
order discrete-time FIR filter lasts exactly N + 1 samples (from first nonzero element through
last nonzero element) before it then settles to zero.
3. An FIR filter has a number of useful properties which sometimes make it preferable to
an infinite impulse response (IIR) filter. FIR filters:
a. Require no feedback.
b. Are inherently stable,
c. Can easily be designed to be linear phase by making the coefficient sequence
symmetric. This property is sometimes desired for phase-sensitive applications, for
example data communications, seismology, crossover filters, and mastering.
4. The main disadvantage of FIR filters is that considerably more computation power in a
general purpose processor is required compared to an IIR filter with similar sharpness
or selectivity, especially when low frequency (relative to the sample rate) cutoffs are needed.
However, many digital signal processors provide specialized hardware features to make FIR
filters approximately as efficient as IIR for many applications
Program:
Fs=1000;
Fr=Fs/2;
N=40;
Fc=400/Fr;
b=fir1(N-1,Fc,'low',rectwin(N));
[h,F]=freqz(b,1,512,Fs);
y=20*log(abs(h));
subplot(2,2,1);plot(F,y);grid on;
title('RECTANGULAR WINDOW');
xlabel('Normalized frequency'),ylabel('amplitude');
Model Graph:
Procedure:
RESULT:
Hence the MATLAB program for Program for frequency response of FIR LPF using
Rectangular Window using MATLAB functions is verified under different conditions.
Experiment No.-12
1. In signal processing, a finite impulse response (FIR) filter is a filter whose impulse
response (or response to any finite length input) is of finite duration, because it settles to zero
in finite time. This is in contrast to infinite impulse response (IIR) filters, which may have
internal feedback and may continue to respond indefinitely
2. The impulse response (that is, the output in response to a Kronecker delta input) of an Nth-
order discrete-time FIR filter lasts exactly N + 1 samples (from first nonzero element through
last nonzero element) before it then settles to zero.
3. An FIR filter has a number of useful properties which sometimes make it preferable to
an infinite impulse response (IIR) filter. FIR filters:
a. Require no feedback.
b. Are inherently stable,
c. Can easily be designed to be linear phase by making the coefficient sequence
symmetric. This property is sometimes desired for phase-sensitive applications, for
example data communications, seismology, crossover filters, and mastering.
4. The main disadvantage of FIR filters is that considerably more computation power in a
general purpose processor is required compared to an IIR filter with similar sharpness
or selectivity, especially when low frequency (relative to the sample rate) cutoffs are needed.
However, many digital signal processors provide specialized hardware features to make FIR
filters approximately as efficient as IIR for many applications
Program:
Fs=1000;
Fr=Fs/2;
N=40;
Fc=400/Fr;
b=fir1(N-1,Fc,'low',traing(N));
[h,F]=freqz(b,1,512,Fs);
y=20*log(abs(h));
subplot(2,2,1);plot(F,y);grid on;
title('RECTANGULAR WINDOW');
xlabel('Normalized frequency'),ylabel('amplitude');
Model Graph:
Procedure:
RESULT:
Hence the MATLAB program for Program for frequency response of FIR LPF using
Triangular Window using MATLAB functions is verified under different conditions.
PART-3
(IMAGE PROCESSING)
Experiment No.-13
a=imread('tigerpub.jpg');
imshow(a),title('original image')
Procedure:
Model graph:
RESULT:
Hence the false contouring of a digital image is verified under different conditions.
Experiment No.-14
Histogram Equalisation
Aim: To write a MATLAB Program to justify histogram equalisation of an image.
Histogram plots the number of occurrences of gray levels in image against gray-level
values
It provides a convenient summary of intensities in an image.
Histogram equalization modifies the histogram of an image so as to improve the visual
quality of an image.
It attempts to spread out the gray levels in an image so that they are evenly distributed
across their range.
This reassigns the brightness values of pixels based on Image histogram and provides
more visually pleasing results across a wide range of images.
Program:
clc
clear all
close all
a=imread('babyincradle.png');
%perform histogram equalization
b=histeq(a);
subplot(2,2,1),imshow(a),title('original image'),
subplot(2,2,2),imshow(b),title('After histogram equalization'),
subplot(2,2,3),imhist(a),title('original histogram')
subplot(2,2,4),imhist(b),title('After histogram equalization')
Model Graph:
Procedure:
RESULT:
Experiment No.-15
Program:
clc;
clear all;
close all;
a=imread('deer1.jpg');
% a=rgb2gray(a);
b=edge(a,'roberts');
c=edge(a,'sobel');
d=edge(a,'prewitt');
e=edge(a,'log');
f=edge(a,'canny');
Model Graph:
Procedure:
RESULT:
Hence the computation of an image is done by using different edge detection techniques.