3 ms·
Could you elaborate on the signal processing and the filter function?
by madez 9y ago
Could you elaborate on the signal processing and the filter function?
- tapatio 9y agoThis video will give you a quick overview of aliasing and an anti-aliasing filter: https://www.youtube.com/watch?v=v7qjeUFxVwQ https://www.youtube.com/watch?v=v7qjeUFxVwQ
- tapatio 9y agoIf you have more time, this is more thorough: https://www.youtube.com/watch?v=yWqrx08UeUs https://www.youtube.com/watch?v=yWqrx08UeUs
- dahart 9y agoSure, yeah. So the second of the three images I posted above, I generated using 25 samples of the function per pixel. To get the pixel color, I averaged the 25 samples. What's interesting about averaging is that you can never get rid of some kinds of aliasing no matter how many samples you use (the ghost waves you can see along the axes, near the outside of the image). It can be surprising to use 10,000 samples per pixel and still have ghost waves. The reason is that averaging is almost the same thing as using a "box filter" meaning you can think of it as a response function for each pixel where the shape of the response function is constant over the pixel (or sample), and 0 outside the pixel - so shaped like a box. The third image uses a Gauss response function - as in the standard normal distribution (e ^ -x^2). This function spreads each sample around into neighboring pixels, and the result is that the image is just slightly blurrier, but you can get rid of all ghosting. There are better response functions (or kernels) that are less blurry than Gauss, but I happen to personally like Gauss when generating very high quality and very large poster prints. The other people here gave links to Nyquist theory:(https://en.wikipedia.org/wiki/Nyquist%E2%80%93Shannon_sampling_theorem https://en.wikipedia.org/wiki/Nyquist%E2%80%93Shannon_sampli...) Knowing the theory is generally good, but I also enjoy resources that talk about image processing specifically, it's closer to home and more concrete, there are more visual examples. Google "image resampling" https://en.wikipedia.org/wiki/Kernel_(image_processing) https://en.wikipedia.org/wiki/Kernel_(image_processing) Image magick has some examples in their docs: http://www.imagemagick.org/Usage/resize/ http://www.imagemagick.org/Usage/resize/ This one's mathy, but has lots of diagrams and examples: http://eeweb.poly.edu/~yao/EL5123/lecture8_sampling.pdf http://eeweb.poly.edu/~yao/EL5123/lecture8_sampling.pdf