1. 1
1
Abstract— A group of assassins has attacked three diplomats
of our neighboring allies. Our central intelligence agency has
intercepted two images that could provide vital information to
stopping them. These images were filled with noise and were
rendered useless. However, a low pass FIR filter of length five
was created in order to decode the images. The two images were
cleaned up by the filter and were able to be read by our central
intelligence agency.
Index Terms— lowpass filter, filter, FIR, cascade, Magnitude
Spectrum
I. INTRODUCTION
Within the past ten days, three assassinations of high profile
government officials have occurred. Fortunately, our secret
service intercepted some images of suspicious activities.
Unfortunately, the group of assassins knew ahead of time
about our satellite. When the satellite took the pictures,
absolutely nothing is visible. The picture was encrypted by the
assassins to make it seem like noise ruined the satellite’s
images. Figures 1 and 2 are the intercepted, distorted images.
Figure 1: Intercepted Signal 1
Figure 2: Intercepted Signal 2
A filter is a special system designed to use remove or
modify some components from the input signal Filtering refers
to intentionally altering the frequency content. The main
component of the signal that will be altered is the frequency.
In order to remove noise, for example, the filter will remove
the frequencies that correspond to noise. Filtering is one of the
most important applications in signal processing mainly
because of it used to extract all the relevant information in a
signal.
There are five typical designs for filters: lowpass, highpass,
bandpass, bandstop, and notch. A lowpass filter removes high
frequency signals while keeping low frequencies, while
highpass filters do the opposite. Bandpass filters keeps an
interval of frequencies and removes those not in the interval,
while bandstop filters do the opposite. Notch filters simply
remove a certain frequency.
ECE 09.351.02 Digital Signal Processing
Midterm Project: Project Image Clean
Nicholas Steven Parisi
Electrical and Computer Engineering
Rowan University
Glassboro, NJ USA
parisi86@students.rowan.edu
2. 2
2
Figure 3: Cascade LowPass Filter
Cascaded filters are efficient ways to implement lowpass
filters. Cascade filters are very important to signal processing.
Dr. Nidhal Bouaynaya said in lecture that cascading filters
turns a pathetic filter into a pretty decent filter. Those are not
her exact words, but they stuck to me. Essentially, when a
signal is sent through a cascade lowpass filter, the signal is
sent through a lowpass filter. That result is sent through the
filter again. That process repeats for as long as you want.
II. METHODS/ EXPERIMENTAL PROCEDURE
In order to devise a strategy to decode the encrypted
pictures, the pictures first had to be loaded on MATLAB (load
intercepted1.mat).
Using the knowledge that was previously learned in class, a
lowpass FIR filter of length five was used.
The most important method in creating a low pass filter that
would successfully decode these images was deriving the
correct filter coefficients. The FIR filter used was of length
five and symmetric, meaning the first two indexes of the array
must equal the last two. The middle value that seperates the
array was the value that was altered the most. A high number
was picked at first (1). For the second choice in this series of
trial and errors, the middle value was drastically decreased to
0.2. The middle integer was decreased as the quality of the
image became clearer and clearer.
The process for filtering second image was a little bit
different. After the image was intercepted and loaded into
MATLAB, the middle value in the array was already set to
0.15. This was the successfulvalue used to filter the previous
image, so it was used to be starting point for this filter. Unlike
the previous image, there was noise in both the vertical and
horizontal direction. The otherpoints in the array proved to be
more critical in filtering compared to the previous image. The
same properties of altering the middle term applied to the
other terms.
To run plot the filtered image, imshow was used instead of
image. When image was used to display the recovered, the
image was unable to be read. The original distorted image was
an image of blue and yellow, as seen below in Figures 3 and 4.
As stated in the Introduction, the idea to cascade the
lowpass filters came from a DSP lecture. The signal is sent
through the filter five times. That was the appropriate amount
of times to filter the signal because the filter quality decreases
as the amount of cycles are created. Once everything is
filtered, the filter will start filtering the desired image because
there is nothing left to clean.
Figure 4: Original Distorted Picture Ran with Image
Figure 5: Filtered Image Using Image
III. RESULTS
A. Part 1
As previously stated in the methods section, a trial and error
method was used to derive the correct array of filter
coefficients. Below are the figures that were produced on the
way to finding the most filtered image.
Figure 6: Filter Coefficients = [1 2 3 2 1]
3. 3
3
Figure 7: Filter Coefficients = [.1 .3 1 .3 .1]
Figure 8: Filtered Image With a Middle Coefficient of .15
Figure 9: Middle Coefficient Equals .25
Figure 10: Best Result [.012 .07 .15 .07 .012]
Figure 11: Middle Coefficient Was Decreased Too Much (.10)
B. Part 2
Figure 12: First Attempt (.15)
4. 4
4
Figure 13: 0.15 With the Last Cycle not Transposed
Figure 14: Middle Coeff= .13
Figure 15: Middle Coeff= .13, Ends Decreased
Figure 16: Middle Coeff= .11
Figure 17: Best Filtered Image [.032 .07 .128 .07 .032]
Figure 18: Increased the End Values Too Much
IV. DISCUSSION/CONCLUSION
The first image to decode in order to ensure the safety of
foreign diplomats had to be loaded through a lowpass filter.
The image was determined to be an antidote to prevent gas
attacks. Many trials were conducted to find the best results,
which can be found in the Results section. The strategy used
to decode the image was to alter the middle term in the array.
The array had to have the order of smallest, smaller, and