0% found this document useful (0 votes)
5 views3 pages

Video and Image Processing Labs

This document contains code from multiple MATLAB labs focused on image and video processing. It loads and displays various image and video files, converts between color spaces, crops images, and adjusts image histograms. Each section notes whether the code produces an output figure or image display.

Uploaded by

hghg
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
5 views3 pages

Video and Image Processing Labs

This document contains code from multiple MATLAB labs focused on image and video processing. It loads and displays various image and video files, converts between color spaces, crops images, and adjusts image histograms. Each section notes whether the code produces an output figure or image display.

Uploaded by

hghg
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd

Name : Ephrem Demelash

ID: R/0427/08

Lab 3
I)
% Audio Read
load [Link];
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('[Link]');
imshow(a);

%display content of this file


F = fopen('lab3.m');
type lab3.m
Lab 4
II) % Crop circuit , specifying crop rectangle.
I = imread('[Link]');
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('[Link]');
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('[Link]');
imshow(a);
b=rgb2gray(a);
imshow(b);
imhist(b);
i=imread('[Link]');
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