You are on page 1of 3

Name : Ephrem Demelash

ID: R/0427/08

Lab 3
I)
% Audio Read
load chirp.mat;
sound(y, Fs);

Has a sound output;

II) % Video Read


v = VideoReader('xylophone.mp4');
implay('xylophone.mp4');
implay('traffic.mj2');
trafficVid = VideoReader('traffic.mj2');

III) %display an image


a=imread('street1.jpg');
imshow(a);

%display content of this file


F = fopen('lab3.m');
type lab3.m
Lab 4
II) % Crop circuit , specifying crop rectangle.
I = imread('circuit.tif');
I2 = imcrop(I, [75 68 130 112]);
subplot(1, 2, 1)
imshow(I)
title('First Image');
subplot(1, 2, 2)
imshow(I2)
title('Cropped Image');

This has an out of the first figure

II)
load trees
% Crop indexed image, specifying crop rectangle.
X2 = imcrop(X,map,[30 30 50 75]);
figure
% Display original image and cropped image.
subplot(1,2,1)
imshow(X,map)
title('Original Image')
subplot(1,2,2)
imshow(X2,map)
title('Cropped Image')
This one has an output of the second figure

Lab 6
I) i1 = imread('pears.png');
figure
imshow(i1);
This has an output of figure 1

II) %RGB to Gray/Intensity


i2 = rgb2gray(i1);
pause(2);
figure
imshow(i2);
title("Image in Gray")
This has an output of figure 1

III) %RGB to YCBCR


i2 = rgb2ycbcr(i1);
pause(2);
figure
imshow(i2);
title("Image in YCBCR");
This has an output of figure 1
Lab 7

a=imread('street1.jpg');
imshow(a);
b=rgb2gray(a);
imshow(b);
imhist(b);
i=imread('pout.tif');
j=imadjust(i);
figure,imshow(i),figure,imshow(j);
close all
subplot(1,2,1);
subplot(1,2,1), imshow(j);
subplot(1,2,1), imshow(j); subplot(1,2,2),imshow(imbinarize(j));

You might also like