PROJECT 3

 

Submitted by – LAVANYA SITA TEKUMALLA

                        00320994

 

SUBSAMPLING

 

 

Normally during  Subsampling, we  fix the signal by prefiltering:

This Technique Reduces the signal’s bandwidth by low pass filtering before sampling.

In other words, the  detail which is lost (higher frequencies) is made less conspicuous by blurring (removing high frequencies) the image before subsampling. After the the image can be subsampled . (For instance  if we want to downsample the image to half its size, we can read every alternate pixel)

 

A few low pass filters have been explored for this purpose.

 

The ideal low pass filter is a Box filter with a sharp cutoff. But we find that filters that have a sharp cutoff cause ringing. The Gaussian (a smoother version- box convolved infinite times) which is used frequently for blurring has very fuzzy boundries. The butterworth filter can be made to behave like a box or like a Gaussian by changing its parameters.

 

In this project I have tried the seperable form of the butter worth filter and the box filter  and the radially symmetric form of the tent (or the cone ) filter.

 

 

 

 

The original image

 

 

DOWNSAMPLING BY ONE LEVEL

 

Unfiltered:

We can see the aliasing in this image.

 

Filters Tried:

 

  1. Seperable Butterworth

 

Parameters: D0=30  order=3

 

Filtered image subsampled                          Butterworth filter

 

 

 

 

Parameters  D0: 30  order:7

(As the order increases it moves towards a box as we can see in the picture)

In the filter below we can actually see the ringing due to hard cutoff.

 

 

 


Parameters: D0=70 Order=4  

 

Real Part of Fourier Transform and the Imaginary part

 

 

Power-Spectrum: (Plotted Lograthemically)

 

Downsampling by two levels- (subsampling the subsampled image)

 

D0=70       D0=100

 

 

We notice that as we downsample more we need a filter with a lower cutoff.

 

 

Seperable ButterWorth – D0=50 and order =4  on another image.

 

Original Image

 

Seperable ButterWorth – D0=50 and order =4  on another image.-

Down Sized to 1/16 of its size and 1/64 its area (In each pair the first represents the unfiltered version and the second represents the filtered version)

 

     

2.     Tent Filter (Radially Symmetric)

 

Parameter Cone Width- 0.3

 

 

 

Parameter  Cone Width 0.5

 

 


Parameter: Cone Width  0.8 (best)

 

 


Box Filter :

 

 

Box Width 0.3

 

Box Width 0.8

 


Box Width 0.65 (best)

 

 

Foldback error:

 

This is the extent of signal that has been truncated due to the application of the filter (during subsampling). This can be calculated from the difference in area covered by the power spectrum  of the signal and the the area covered by the filter.

 

For example take the Gaussian in the figure below, which is being filtered by a low  pass filter. The area between the two curves after the cut off of the box filter indicates the fold back.

So in the above case it can be obtained by integrating the Gaussian from 99 to infinity.

 

Compl.jpg

This is the fold back error obtained for compl.jpg

The fold back error is the area that is left out after being filtered by the lowpass filter.  (Using numerical integration with the aid of an excel work sheet) it is estimated to be 0.86141

 

In spectrum Energy Loss:

 

This can be obtained by subtracting the area between the ideal filter and the filter under interest till the cutoff of the filter (region of interest) (This can be done on paper or by numerical integration).

 

Box filter:  The box filter does not have any in_spectrum energy loss.

 

Seperable Butterworth:  Visualizing the Inspectrum Energy Loss for the butterworth filter applied above:

 

 

In the figure below, the difference between the ideal filter and the butterworth with D0=70 and order 4 has been plotted. (As we see, there is some energy loss at the edges ). The pixel intensity value in the figure below is a measure of the difference between the idea filter and the current filter.

 

(for Butterworth- order 4 – D0=70)

In spectrum Loss for a cone filter:

 

Sinc: sin(5*pie*u)/5*pie*u

 

 

Sinc square(5 * pie * x)- There is more inxpectrum energy loss here

 


Truncation error:

 

It is the extent of filter that is being truncated as the filter is being applied to the finite extent of the fourier transform. 

BUTTERWORTH: This is the butterworth . (order 4- D0=50)

 

Suppose this is applied on an image with extent upto 64, A part of the filter is truncated. So this area can be calculated by numerical integration.

And in this case it is  1.543125  Units by adding up the values (numerical integration) at all the points beyond 64. (This was done using an excel spreadsheet)

 

 

 

 

The tent filterdoes not have infinite extent and it does not suffer from this problem

 

 

UPSAMPLING:

 

Techniques tried:

 

Sinc Interpolation in the Spacial Domain- Box Filter in the Fourier Domain:

By a factor of 2 and By a factor of 4 respectively

 

 

 

 

 

 

By a factor of  16

 

 

Nearest Neighbour Interpolation

 

This is done by using the box convolution kernel (of width one) in the spatial domain. In the fourier domain, it is implemented using a sinc function.

Since the sinc function has infinite extent this implementing this is effectively applying another box over the result of multiplying with a sinc. So this again causes artifacts.

 

The sinc function has been tried for upsampling –with various levels

 

 

Upsampling by a factor of 2 and 4 respectively

 

 

By a factor of 16

Linear Interpolation:

Nearest Neighbour Interpolation

 

This is done by using the tent convolution kernel in the spatial domain. In the fourier domain, it is implemented using a sinc- square function.

Again the sinc-square  function has infinite extent this implementing this is effectively applying another box over the result of multiplying with a sinc. So this again causes artifacts.

 

The sinc-square function has been tried for upsampling –with various levels

 

 

Upsampling by a factor of 2 and 4 and 64 respectively

 

<[endif]>