CS6620 Assignment4

From Dangerski

Revision as of 21:11, 1 April 2008 by WikiSysop (Talk | contribs)
(diff) ←Older revision | Current revision (diff) | Newer revision→ (diff)
Jump to: navigation, search

[edit] Assignment 4

Add Jittered and Uniform Sampling. Add Tent and Box Filters. Add a filer of your choice.


The below images are a sampling of this function { cos(500 \pi (x^2 + y^2)) + 1} \over 2


  • Base image with no sampling

Image:p4nosampling.png


  • 9 Samples Per Pixel, Box filter(suport 1) Uniform on the left and Jittered on the right

Uniform Sampling Jittered Sampling

  • 9 Samples Per Pixel,Triangle filter( support 2 ) Uniform on the left and Jittered on the right

Image:U9sppTriangle.png Image:J9sppTriangle.png

  • 9 Samples per Pixel, Lanczos filter ( support 4 ) Uniform on the left and Jittered on the right

Image:U9sppLanczos.png Image:J9sppLanczos.png



[edit] First scene with sampling

I chose to use the image from the first assignment because it has a lot of jagged edges so the filtering will make a big difference.

  • Original image

Image:scnorig.png

  • 9 Samples Per Pixel, Box Filter. Uniform on the left and Jittered on the right

Image:scnU9sppSBox.png Image:scnJ9sppSBox.png

  • 9 Samples Per Pixel, Triangle Filter. Uniform on the left and Jittered on the right

Image:scnU9sppSTriangle.png Image:scnJ9sppSTriangle.png

  • 9 Samples Per Pixel, Box Lanczos. Uniform on the left and Jittered on the right

Image:scnU9sppLanczos.png Image:scnJ9sppLanczos.png

  • Design Choices

I chose to implement the Lanczos windowed sinc filter with a window size of 2 ( support of 4 ). I implemented it from reading the wikipedia page. It is kinda slow because it has such a wide support and I don't reuse samples. I chose it because it is supposed to have nice properties as explained in this exerpt from wikipedia. "Lanczos filtering gives very high quality results compared to more commonly used but faster techniques such as linear or cubic interpolation because it more closely approximates the optimal resampling filter, the sinc function." However I don't think it did much better than the Triangle filter.

For jittering I take the uniform samples and jitter them to stay within their region of the pixel. Similar to the way I spread out the samples within the pixel except that it is random.


[edit] Extra Credit

  • Image rendered at 1024 then down sampled to 512X512, 9spp, Jittered, SBox, Right 2D FFT of image.

Image:scn11024dwn5129sppSBox.png Image:scn11024dwn5129sppSBoxFFT.png

  • Image rendered at 1024 then down sampled to 512X512, 9spp, Jittered, STriangle, Right 2D FFT of image.

Image:scn11024dwn5129sppSTriangle.png Image:scn11024dwn5129sppSTriangleFFT.png

  • Image rendered at 1024 then down sampled to 512X512, 9spp, Jittered, Lanczos, Right 2D FFT of image.

Image:scn11024dwn5129sppLanczos.png Image:scn11024dwn5129sppLanczosFFT.png

Media:project4.zip

Personal tools