Fall2024 Assignment1
Fall2024 Assignment1
Q.1 Suppose a camera has 450 lines per frame, 520 pixels per line, and 25 Hz frame rate.
The color sub sampling scheme is 4:2:0, and the pixel aspect ratio is 16:9. The camera
uses interlaced scanning, and each sample of Y, Cr, Cb is quantized with 8 bits.
What is the bitrate produced by the camera?
Suppose we want to store the video signal on a hard disk, and, to save space, re-
quantize each chrominance (Cr, Cb) signals with only 6 bits per sample. What is
the minimum size of the hard disk required to store 10 minutes of video
Q.2 The following sequence of real numbers has been obtained sampling an audio
signal: 1.8, 2.2, 2.2, 3.2, 3.3, 3.3, 2.5, 2.8, 2.8, 2.8, 1.5, 1.0, 1.2, 1.2, 1.8, 2.2, 2.2, 2.2, 1.9,
2.3, 1.2, 0.2, -1.2, -1.2, -1.7, -1.1, -2.2, -1.5, -1.5, -0.7, 0.1, 0.9 Quantize this sequence by
dividing the interval [-4, 4] into 32 uniformly distributed levels (place the level 0 at -3.75,
the level 1 at -3.5, and so on. This should simplify your calculations).
Write down the quantized sequence.
How many bits in total do you need to transmit it?
Q.3 Temporal aliasing can be observed when you attempt to record a rotating wheel with
a video camera. In this problem, you will analyze such effects. Assume there is a car
moving at 36 km/hr and you record the car using a film, which traditionally record at 24
frames per second. The tires have a diameter of 0.4244 meters. Each tire has a white
mark to gauge the speed of rotation. Assume that the tire rotates without skidding.
If you are watching this projected movie in a theatre, what do you perceive the
rate of tire rotation to be in rotations/sec?
If you use your camcorder to record the movie in the theater and your camcorder
is recording at one third film rate (ie 8 fps), at what rate (rotations/sec) does the
tire rotate in your video recording
If you use an NTSC camera with 30 fps, what is the maximum speed that the car
can go at so that you see no aliasing in the recording.
Programming Part (150 points)
This assignment will help you gain a practical understanding of Resampling and Filtering
and how it affects visual media types like images and videos.
Firstly, you will have to write a program to display images in the RGB format. We have
also provided a Microsoft Visual C++ project and java to display images. This source has
been provided as a reference for students who may not know how to read and display
images. You are free to use this as a start, or write your own in any language of your
choice (no matlab please!), as long as your program can be easily evaluated on our UCS
computer systems.
You will take a 4:3 aspect ratio image as input, which will have a high-resolution image
(4000x3000) or a low-resolution image (400x300). Your program will generate an output
image which will be one of the following standard output formats
O1: 1920x1080
O2: 1280x720
O3: 640x480
In each case, depending on your input size, you will need to either down sample or up
sample the image. Furthermore, these two methods to choose your sample value.
In the down sample case, use
1. Specific sampling where you choose one specific pixel
2. Average (or Gaussian) smoothing where you choose the average of a set
of samples. This option will reduce aliasing effects
In the up-sample case, use
1. Nearest neighbor to choose your up sampled pixel
2. Bilinear/Cubic interpolation
To invoke your program, we will compile it and run it at the command line as
The expectation here is that your program will read the image of size 4000x3000 and
down sample it to 1280x720 and use specific/random sampling to decide each pixel value
in the output.
YourProgram.exe C:/myDir/myImage.rgb 400 300 2 O1
The expectation here is that your program will read the image of size 400x300 and
up sample it to 1920x1080 and use a bilinear/cubic interpolation scheme to decide pixel
values
Evaluation:
We will run tests to evaluate your resampled outputs for 80 points. Marks will be
deducted for incorrect outputs. The discussion analysis has 70 points (30+10+30). We
expect thorough analysis including clear explanations & experimentation with example
outputs. The total evaluation score will be 150.