Вы находитесь на странице: 1из 12

# LAB REPORT 01

Task # 1: Plot the following signals in both continuous and discrete domain by using sub-plot command, also
modify the plot using plot tool in matlab figure.

CODE:

clc
clear all
close all
x=0:0.01:20;
x=exp(x./10);
y=x.^0.3;
q=x+y;
subplot(211)
plot (q)
subplot (212)
stem (q)

## b) 𝑓( ) =(sin(2 𝜋 ) + 2 for = [0 2𝜋] with step size = 0 .1 𝜋

CODE:

clc
clear all
close all
t=0.1*pi;
theeta=[0:t:2*pi];
f1=sin(2*pi*theeta);
subplot (211)
plot(f1)
subplot (212)
stem (f1

c) 𝑓(𝑥) = 𝑎0 + (𝑎𝑛 cos 𝑛𝜋𝑥 𝐿 + 𝑏𝑛 sin 𝑛𝜋𝑥 𝐿 ) with step size = 0.2 and 𝑎𝑛 = 4, 𝑏𝑛 = 2, 𝑛 = 0.2, 𝐿 = 10, 𝑎𝑛𝑑 𝑥 = [0
10].

CODE:
clc
clear all
close all
a0=0.01;
an=4;
bn=2;
n=0.2;
L=10;
x=[0:10];
c=a0+[an*cos((n*pi*x)/L)+bn*sin((n*pi*x)/L)];
subplot(211)
plot(c)
subplot (212)
stem (c)

Create a zero matrix “A” with dimension 5 X 3, substitute value 5 at all diagonal position of the same
matrix, by accessing matrix index positions.

CODE:
clc
clear all
close all
a=zeros(5,3)
entry=5
a([1 7 13])=5
a) Calculate R = (A X B), show the dimension and data type of each matrix in the workspace.
CODE:
Clc
Clear all
Close all
A=[3 4 5;8 7 6;9 10 6];
display(A);
B=[6 9 3;6 1 4;2 0 8];
display(B);
R=(A.*B);

b) Calculate R = A+B
CODE:
clc
clear all
close all
A=[3 4 5;8 7 6;9 10 6];
display(A);
B=[6 9 3;6 1 4;2 0 8];
display(B);
R=(A.*B);
display(R);
R1=(A+B);
display(R1);
(d)Calculate R = A-B
CODE:
clc
clear all
close all
A=[3 4 5;8 7 6;9 10 6];
display(A);
B=[6 9 3;6 1 4;2 0 8];
display(B);
R=(A.*B);
display(R);
R1=(A+B);
display(R1);
R2=A-B;
display(R2);
d) Substitute value 1000 at 3rd row and 2nd column position of matrix A.
CODE:
clc
clear all
close all
A=[3 4 5;8 7 6;9 1000 6];
display(A);

Create a “sin(2 𝜋𝑓𝑡)” wave in continuous domain with any smallest step size of your choice, use frequency “ f ”
= 2 Hz, using different sampling rate to show the effect of aliasing. Plot all signals through subplot in the figure.
CODE:
clc
clear all
close all
f=2;
t1=0:0.01:10;
x=sin(2*pi*f*t1);
subplot(211)
plot (x)
subplot(212)

stem (x)

Read any .png, jpeg, or .tiff formatted image from your directory and display the same image in gray scale, also
show the pixel histogram of the image.

CODE:

Clc
clear all
close all
imshow(i);
CODE:

clc
clear all
close all
imshow(i);
b=rgb2gray(i);
imshow(b);
Read an image from your directory and resize the same image into half of the original size. Also display the result.
CODE:
clc
clear all
close all
imshow(i);
b=i(1:140,1:170);
imshow(b);

Read and image from your directory, convert the image into gray-scale, then modify the pixel values in such a that
the left half portion of the image get black. Also display the result.
CODE:
clc
clear all
close all
imshow(i);
b=rgb2gray(i);
b(1:140,1:170)=0;
imshow(b);

Attach the snap-shot to prove that you have installed the latex on your PC.

a) What is the image local texture features, List about 10 different texture features available for image texture
description.
Texture is a feature which is used to partition images into regions of interest and to classify those regions.
It provides information in the spatial arrangement of colors or intensities in an image.
It is characterized by the spatial distribution of intensity levels in a neighborhood.
An image texture is a set of metrics calculated in image processing designed to quantify the perceived texture of
an image. Image texture basically gives us information about the spatial arrangement of color or intensities in an
image or selected region of an image. Image textures can be artificially created or found in natural scenes
captured in an image. Image textures are one way that can be used to help in segmentation or classification of images.
For more accurate segmentation the most useful features are spatial frequency and an average grey level. To analyze
an image texture in computer graphics.
There are two ways to approach the issue:
 Structured Approach
 Statistical Approach.
b) Confusion matrix is used for feature classification, write in your own words, and also show me some
examples of confusion matrix used in the image processing research papers.

The formulation of a generalized area-based confusion matrix for exploring the accuracy of area estimates is
presented. The generalized confusion matrix is appropriate for both traditional classification algorithms and sub-pixel
area estimation models. An error matrix, derived from the generalized confusion matrix, allows the accuracy of maps
generated using area estimation models to be assessed quantitatively and compared to the accuracies obtained from
traditional classification techniques. The application of this approach is demonstrated for an area estimation model
applied to Landsat data of an urban area of the United Kingdom.

EXAMPLES:
 A generalized confusion matrix, for assessing area estimates from remotely sensed data.
 Incorporating the uncertainty of linguistic-scale reference data to assess accuracy of land-cover maps using
fuzzy intervals
 Forest classification by principal component analyses of TM data.