Compare a digital video stream in both spatial and frequency domain

User Generated

NzrreAnyqb

Programming

Moraine Valley Community College

Description

This involves mainly MATLAB

User generated content is uploaded by users for the purposes of learning and should be used following Studypool's honor code & terms of service.

Explanation & Answer

View attached explanation and answer. Let me know if you have any questions.

MULTIMEDIA COMMUNICATION SYSTEMS
ECE 434
Computer Project 1

Compare a digital video stream in both spatial and frequency domain using the fo lowing formats:
(a) Original component signal (RGB).
(b) Original component signal (YIQ).
(c) Composite signal (YIQ).
(d) Recovered component signal (YIQ).
(e) Recovered component signal (RGB).
Introduction
Digital Streaming
Digital video streaming can be both spatial and frequency domains. Video streaming depends on the color
model and format which is used in the streaming of the video. The formats can be either original component signals,
RGB, or composite signals. YIQ. RGB is the original video coloring method in which the main colors were mainly
red, Green, and blue.
Video streaming in spatial mostly uses the RGB as an additive color model used in the numerical color
specification. RGB is used mostly in absorbing natural light during video streaming. The original component RGB is
most commonly used in digital video processing and open camera view. The original YIQ is the most widely used in
television broadcasting; the Y in the YIQ stands for luminance in the spatial domain. The IQ stands for the color
information as it is represented. Y may also present the grayscale used in the original part of the RGB.
Video streaming in the united state is currently using YIQ in low-power transmission as compared to RGB.
Since RGB requires a lot of power to process the images, rendering them on the screen makes YIQ more suitable for
processing the images during the streaming sessions. YIQ uses a frequency speed higher than RGB in streaming the
images during the video streaming session.
RGB produces a wide range of colors in video streaming compared to the YIQ. RGB contains various colors

ranging from 0 to 2562 color codes they display. In video streaming, frequency domain uses applies only to YIQ as it
is mainly used in rendering the frequency of the images to be viewed during the video streaming.
YIQ uses a small color range in video streaming as a frequency domain. In YIQ, color ranges are limited
compared to the RGB, which has a wide range of colors. Since the YIQ contains only luminance and two chrominance
components, hue and saturation make it widely used in the frequency domain to clarify the images during rendering in
streaming.

% Simulink Model imports video as an array in 4D with (Height, Width,
Bands, and Frames)

Simulink to receive
video input

Global
Parameters

From Our Imported
Video File

Our comparison
model for video
output

Our Workspace Destination

% Frequency spectrum of our imported video %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
defmaximumFrequency = 6750000;
defYstartigFrequency = 2;
defYcarryingFrequency = 1450000;
defIstartingFrequency = 5588001;
defIcarryingFrequency = 48885000;
defQstartingFrequency = 5452001;
defQcarryingFrequency = 5430000;
% Creating parameters for our videos
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
numberofrows = 240;
numberofcols = 320;
numberofFrames = 6;
% for our frameNumber = 2:numFrames
% uncomment this line and add
% 'end' to the end of this .m file for many frames of a video file
inframeNumber = 6;
% for each frame in our file
video
% 2. Get the first origial signal (RGB) %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% First RGB to be use
RGBimg = vout(:, :, :, frameNumber);
figure(1);
imshow(RGBimg);
title('RGB First original img');

RGB first original img

% Original R image we are using
Roriginal = RGBimg(:, :, 1);
fig(2);
imshow(Roriginal);
title('First R original
img we are using');

% get it only R in 2D

First R original img we are using

% our Original G img we are using
Gfirst = RGBimg(:, :, 2);
figure(3);
imshow(Goriginal);
title('G first image');

% get it only in 2D

G first image

% First b img
Bfirst = RGBimg(:, :, 4);
figure(4);
imshow(Bfirst); title('B
first img');

% get it only in 2D

B first img

% First R image in spatial domain
fig(5);
plot(reshape(Rfirst, numberofrows*numberofcols, 1));
title('R first in visualization in Spatial Domain');
R first visualization in Spatial Domain
1
0.9
0.8
0.7
0.6
0.5
0.4
0.3
0.2
0.1
0

0.5

1

1.5

2

2.5

3

3.5
5

x 10

% Original R image in a frequency
domain fig(6);
RfirstFrequencyDomain = real(fft(reshape(Rfirst, numberofrows*numberofcols, 1)));
semilogy(RfirstFrequencyDomain(1:numberofrows*numberofcols/2));
title('R first in a Frequency Domain');

10

R first in a Frequency Domain

6

4

10

2

10

0

10

-2

10

10

-4

0

2

4

6

8

10

12

14

16
4

x 10

% First G in spatial domain fig(7);
plot(reshape(Gfirst, numberofrows*numberofcols, 1));
title('G first img in Spatial Domain');
G first img in Spatial Domain
1
0.9
0.8
0.7
0.6
0.5
0.4
0.3
0.2
0.1
0
0

0.5

1

1.5

2

2.5

3

3.5
5

x 10

% First G in a frequency domain
fig(8);
GfirstFrequencyDomain = real(fft(reshape(Gfirst, numberofrows*numberofcols, 1)));
semilogy(GfirstFrequencyDomain(1:numrows*numcols/2));
title('G first in Frequency Domain');
G first in Frequency Domain

6

10

4

10

2

10

0

10

-2

10

-4

10

0

2

4

6

8

10

12

14

16
4

x 10

% First B in spatial domain
fig(9);
plot(reshape(Bfirst, numberofrows*numberofcols, 1));
title('B first in Spatial Domain');
B first in Spatial Domain
1
0.9
0.8
0.7
0.6
0.5
0.4
0.3
0.2
0.1
0
0

0.5

1

1.5

2

2.5

3

3.5
5

x 10

% First B in frequency domain
fig(10);
BfirstFrequencyDomain = real(fft(reshape(Bfirst, numrows*numcols, 1)));
semilogy(BoriginalFrequencyDomain(1:numerofrows*numberofcols/2));
title('B first in Frequency Domain');
B first in Frequency Domain

6

10

4

10

2

10

0

10

-2

10

-4

10

0

2

4

6

8

10

12

14

16
4

x 10

% 2. Finding our original signal for (YIQ) %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Original YIQ img
Yfirst = 0.199*Roriginal + 0.287*Goriginal + 0.114*Bfirst;
Ifirst = 0.296*Roriginal - 0.175*Goriginal - 0.121*Bfirst;
Qfirst = 0.112*Roriginal - 0.223*Goriginal + 0.111*Bfirst;
% First Y image
fig(11); imshow(Yfirst);
title('Y first image');
Y first image

% First I image
fig(12); imshow(Ifirst);
title('I first image');

I first image

% First Q image
fig(13); imshow(Qfirst);
title(...


Anonymous
Great! 10/10 would recommend using Studypool to help you study.

Studypool
4.7
Trustpilot
4.5
Sitejabber
4.4

Related Tags