# Investigation of aliasing effects

 Page 1 / 1
This lab investigates the effect of aliasing. This development of these labs was supported by the National ScienceFoundation under Grant No. DUE-0511635. Any opinions, conclusions or recommendations expressed in this material are those of the authors and donot necessarily reflect the views of the National Science Foundation.

## Introduction

Aliasing literally means "by a different name" and is used to explain the effect of under-sampling a continuous signal, which causes frequencies to show up as different frequencies. This aliased signal is the signal at a different frequency. This is usually seen as higher frequencies being aliased to lower frequencies. For a 1d signal in time, the aliased frequency components sound lower in pitch. In 2d space, such as images, this can be observed as parallel lines in pinstripe shirts aliasing into large wavy lines. For 2d signals that vary in time, an example of aliasing would be viewing propellers on a plane that seem to be turning slow when they are actually moving at very high speeds.

The Nyquist sampling rate is twice the highest frequency of the signal. This is the minimum rate needed to prevent aliasing.

## Signals and aliasing

In Figure 1 a 500Hz cosine signal is shown in red, and an under-sampled version of the signal in blue.

To see the effects of aliasing on a 1kHz cosine signal create an over-sampled, under-sampled, and critically-sampled version of the signal.

• Plot a cosine at 1kHz showing at least twenty periods. Use a step size (sampling period) of 1/10kHz. This will be our over-sampled signal. Try playing this signal with soundsc . How many samples are needed to make the sound last 2 seconds if the step size is 1/10kHz?
• Plot the critically-sampled version by applying what you know about Nyquist. Make sure the plot contains at least twenty periods and that you sample at a non-zero point. Listen to this signal with soundsc , does it sound the same?
• Plot the under-sampled version. Make sure the plot contains at least twenty periods. Listen to this signal with soundsc , how does it sound now?
• Plot all three signals stacked on top of each other using subplot. Note that the plot command uses straight line interpolation, so your plots will not look smooth like Figure 1 (which actually uses a much finer sampling period an knowledge of the aliased frequency to generate the smooth undersampled result).

## Temporal aliasing

Have you ever seen an old western movie and noticed that the wagon wheels appear to turn backwards even though the coach is moving forward? This phenomenon is sometimes referred to as the wagon-wheel effect, but is really an effect of temporal aliasing. You can see the same effect easily on anything with a spoked wheel, such as wheels on a stage coach and airplane propellers.

Wagon-wheels, stage coaches, horses, and airplane propellers?? What's this have to do with signal processing? Actually, quite a lot, not the wagon-wheels directly, but how the images of the wagon-wheels are captured. The video you watch from a movie or tv show is actually sampled in time (hence temporal). Typically a movie is captured at 24 frames per second (FPS).

Now it's your turn to be the cinematographer. For this problem you will take an image of a wagon-wheel and "capture" a MATLAB movie at different frame rates of the wheel rotating. After the movie is made, you will be able to play it back, and if everything worked, be able to see the wheel spin.

A movie of a rotating wheel is a signal in time, and at each instant in time, instead of just one point (like a normal x(t) signal), you have a whole image defined. Thus, if you have an image of an arrow rotating, Figure 2, where the image rotates ten times per second, then the period is 1/10 second, because every 1/10 second the image (signal) is at the same value again. Thus image(t+n/10) = image(t) for all integers n.

If an image rotates at 10 Hz (10 rotations per second), then what is the Nyquist sampling rate so that you can reconstruct the temporal signal? Recall that the signal will be critically sampled when using a sampling rate that is twice the highest frequency in the signal (20 Hz, in this case). Anything above that will be over-sampled, and fewer samples/second will be under-sampled.

Check your understanding: standard film is captured at 24 frames per second. What's the highest frequency of motion that can be reconstructed without aliasing?

Create three movies to show the wheel being over-sampled (appears to be rotating clockwise), under-sampled (appears to be rotating counter-clockwise), and critically-sampled (appears stationary). In each case rotate the wheel at the same rate and only change the frame rate in the movie2avi command (keep the FPS under 30).

Write a Matlab function named wheel.m to create a movie showing the spokes image (download it here ) rotate clockwise at a constant speed. The function should take parameters to change the frame rate and the speed of the rotation. Save the movies as wheel-oversample.avi , wheel-undersample.avi , and wheel-critsample.avi . Label the plot with the frame rate used for each of the movies and the degrees per frame. Here some tips below to help you get started.

• You will need to use the following Matlab commands: imread , imshow , imrotate , getframe , and movie2avi .
Passing a negative angle in the imrotate command rotates clockwise, and a positive angle rotates counterclockwise.
Another useful command you can use to help formatting labels for the figure is sprintf . For more information use the help system in Matlab.
• Use myImageRotated = imrotate(myImage, theta, 'bilinear', 'crop') for the rotate command.
• One way to do this is rotate the image by a number of degrees for each frame. The angle can be split into two variables; degPerFrame will be our speed and theta will be the actual number of degrees to rotate for the rotate command. Remember to change degPerFrame to reflect the same speed when changing the frame rate. Now we can setup a for loop something like this, for i = 1:FPS*TIME% rotate the image % display the image% label the plot showing the FPS and speed of the wheelpause(0.01) % allows time for the plot to drawmyMovie(i) = getframe(gcf); % Capture the frame theta = theta + degPerFrame; % Calculate the angle for next frameend % save the avi file
• Can you use degPerFrame to relate to degrees per second? Given some frame rate, how many degrees pass each frame to make a rotation of ${360}^{\circ }$ take 1 second? At a given frame rate, can you calculate the number of frames are needed to last a given amount of time, say 3 seconds?.
• Once your for loop is done, you will need to save the movie as an avi to watch it. Use the movie2avi function to save the movie. Why can't we just watch the wheel as it is drawing in the for loop?

Now try the same problem with a different picture of your choice. Can you get it to appear to move backwards? Save the movie as myMovie.avi .

Show the TA the following files: wheel.m wheel-oversample.aviwheel-undersample.avi wheel-critsample.avimyMovie.avi

#### Questions & Answers

Is there any normative that regulates the use of silver nanoparticles?
what king of growth are you checking .?
Renato
What fields keep nano created devices from performing or assimulating ? Magnetic fields ? Are do they assimilate ?
why we need to study biomolecules, molecular biology in nanotechnology?
?
Kyle
yes I'm doing my masters in nanotechnology, we are being studying all these domains as well..
why?
what school?
Kyle
biomolecules are e building blocks of every organics and inorganic materials.
Joe
anyone know any internet site where one can find nanotechnology papers?
research.net
kanaga
sciencedirect big data base
Ernesto
Introduction about quantum dots in nanotechnology
what does nano mean?
nano basically means 10^(-9). nanometer is a unit to measure length.
Bharti
do you think it's worthwhile in the long term to study the effects and possibilities of nanotechnology on viral treatment?
absolutely yes
Daniel
how to know photocatalytic properties of tio2 nanoparticles...what to do now
it is a goid question and i want to know the answer as well
Maciej
characteristics of micro business
Abigail
for teaching engĺish at school how nano technology help us
Anassong
Do somebody tell me a best nano engineering book for beginners?
there is no specific books for beginners but there is book called principle of nanotechnology
NANO
what is fullerene does it is used to make bukky balls
are you nano engineer ?
s.
fullerene is a bucky ball aka Carbon 60 molecule. It was name by the architect Fuller. He design the geodesic dome. it resembles a soccer ball.
Tarell
what is the actual application of fullerenes nowadays?
Damian
That is a great question Damian. best way to answer that question is to Google it. there are hundreds of applications for buck minister fullerenes, from medical to aerospace. you can also find plenty of research papers that will give you great detail on the potential applications of fullerenes.
Tarell
what is the Synthesis, properties,and applications of carbon nano chemistry
Mostly, they use nano carbon for electronics and for materials to be strengthened.
Virgil
is Bucky paper clear?
CYNTHIA
carbon nanotubes has various application in fuel cells membrane, current research on cancer drug,and in electronics MEMS and NEMS etc
NANO
so some one know about replacing silicon atom with phosphorous in semiconductors device?
Yeah, it is a pain to say the least. You basically have to heat the substarte up to around 1000 degrees celcius then pass phosphene gas over top of it, which is explosive and toxic by the way, under very low pressure.
Harper
Do you know which machine is used to that process?
s.
how to fabricate graphene ink ?
for screen printed electrodes ?
SUYASH
What is lattice structure?
of graphene you mean?
Ebrahim
or in general
Ebrahim
in general
s.
Graphene has a hexagonal structure
tahir
On having this app for quite a bit time, Haven't realised there's a chat room in it.
Cied
what is biological synthesis of nanoparticles
how did you get the value of 2000N.What calculations are needed to arrive at it
Privacy Information Security Software Version 1.1a
Good
Got questions? Join the online conversation and get instant answers!