|
Assignment 1 – Sampling |
|
|
For
this assignment I sampled a function over x and y and used the results as the
brightness for the corresponding points in the image. The high frequency function used is: L(x,
y) = ½ ( 1 + sin( (x^2 + y^2) / 100 ) ).
The size of the picture I used was 512 X 384 pixels. |
|
|
Each
of the images is a thumb nail using only a fourth of the real image. I didn’t shrink the images to prevent more
aliasing from occurring. To see the
full image, click on the corresponding picture. |
|
|
For
the first Image I used one sample in the center to show the same aliasing
affect seen in the notes. So the lower
left corner uses x=0, y=0 and so on for the other pixels, incrementing one in
x to the right and one in y upwards. |
|
|
The
next two are done using a box filter.
The first one is done using 1 sample, so it’s really just one random
sample taken over the entire pixel.
The second image was done using 16 samples, so the image was divided
up into 16 regions and one sample was taken randomly in each region of the
pixel. |
|
|
|
|
|
The
next two pictures were done using a box filter, but this time with 128 and
512 samples. You’ll notice there isn’t
much difference between the two, so this is the best that this filtering
algorithm could do for aliasing on this function. |
|
|
|
|
|
For
these next images I used a tent filter, which takes samples from -1 to 1 with
more samples taken towards zero. The
image on the left was done with just random sampling and the image on the
right was done with stratified sampling. |
|
|
|
|
|
These
last images were created by using a cubic spline filter. The cubic spline takes samples from pixels
surrounding the current pixel just like the tent filter. The cubic filter takes samples from a
larger area and also takes samples in a distribution pattern like what is
visually displayed by a cubic basis function. |
|
|
|
|