Skip to content

Latest commit

 

History

History

README.md

Homework 1: Aliasing and Resampling

The purpose of this homework assignment is to understand Sampling and Filtering of signals spatially and temporally. The homework is divided into two parts covering Sampling and Aliasing in 1. Spatial and 2. Temporal domains.

Refer to the homework specs. for exact details of the assignment.

Part 1. Spatial Resampling and Aliasing

Here two images are generated and displayed side by side. The first image is the original generated image of size 512x512 and the second one is a resampled version of the image scaled by a factor of s. The task is to observe the scaled image with and without anti-aliasing.

The program takes in the following parameters:

n - Number of lines to draw on the otherwise white image.
    (The lines are arraged like spokes in a wheel with each line seperated by 360/n degrees)
s - Scaling factor (between 0 and 1).
a - A boolean value (0 or 1) indicating whether to perform anti-aliasing.

The results for the experiments described in the homework specs. can be found here:

Demo run for parameters (n=64 [lines], s=0.5 [scale factor], a=0 [no anti-aliasing])

demo without anti-aliasing

Demo run for parameters (n=64 [lines], s=0.5 [scale factor], a=1 [anti-aliasing])

demo with anti-aliasing

Part 2. Temporal Aliasing

Here two videos are rendered and displayed side by side. The first video is the original generated video of size 512x512 and the second one is a sampled version of the video sampled at a rate of fps. The task is to observe the scaled video and find out a relation between the observed speed of rotation, actual speed of rotation and the sampling rate (fps).

This experiment demonstrates the wagon wheel effect.

The program takes in the following parameters:

n   - Number of lines to draw on the otherwise white image.
      (The lines are arraged like spokes in a wheel with each line seperated by 360/n degrees)
s   - Speed of rotation (rotations per second) of original video.
fps - Frames per second (sampling rate) to render the second video.

The results for the experiments described in the homework specs. can be found here:

Demo run for parameters (n=64 [lines], s=10.0 [speed of rotation], fps=25.0 [sampling rate])

Demo run for parameters (n=64 [lines], s=10.0 [speed of rotation], fps=16.0 [sampling rate])

Demo run for parameters (n=64 [lines], s=10.0 [speed of rotation], fps=10.0 [sampling rate])

Demo run for parameters (n=64 [lines], s=10.0 [speed of rotation], fps=8.0 [sampling rate])

Demo run for parameters (n=64 [lines], s=10.0 [speed of rotation], fps=6.0 [sampling rate])

Additional references

Part 3. Temporal Anti-Aliasing with Spatial Anti-Aliasing

Here in addition to the temporal aliasing as introduced in part 2, spatial aliasing is also introduce. An effort to apply anti-aliasing for both is made in this part.

The program takes in the following parameters:

n   - Number of lines to draw on the otherwise white image.
      (The lines are arraged like spokes in a wheel with each line seperated by 360/n degrees) 
s   - Speed of rotation (rotations per second) of original video.
fps - Frames per second (sampling rate) to render the second video.
a   - A boolean value (0 or 1) indicating whether to perform anti-aliasing.
sf  - Scaling factor (between 0 and 1).

Demo run for parameters (n=64 , s=4.0, fps=7.0, a=1, s=1.0)

Demo run for parameters (n=64 , s=4.0, fps=7.0, a=1, s=2.0)