|
|
|
|
|
by nwhitehead
2126 days ago
|
|
This is awesome! This reminds me of MinBLEP audio synthesis of discontinuous functions (https://www.cs.cmu.edu/~eli/papers/icmc01-hardsync.pdf). Instead of doing things at high sampling rate and explicitly filtering, generate the band-limited version directly. In the article, talking about smoothstep approximation of sinc: "I'd argue the smoothstep version looks better" Why would this be? I would have thought the theoretically correct sinc version would look nicer. |
|
sinc is perfect if you are looking only at frequency response. But in images, you also want to preserve locality, that is, processing of one part of the image should not affect the rest of the image. For example, sharpening an edge should only affect the edge in question, not its surroundings. It comes in contradiction with the idea of preserving frequency response. Frequencies are about sine waves, and sine waves are wide, infinitely wide in fact.
BTW, that's also the reason why in quantum mechanics you can't know both position and momentum (a frequency) precisely.
So we need to compromise, and like in scaling algorithms, you have 3 qualities: sharpness (the result of a good frequency response), locality and aliasing. You can't have all 3, so you need to pick the most pleasant combination.
The extreme cases are:
- Point sampling: excellent locality and sharpness, terrible aliasing
- Linear filtering: excellent locality and no aliasing, very blurry
- sinc filtering: excellent sharpness and no aliasing, terrible locality (ringing artefacts)
Using smoothstep is a good compromise, it has a bit of aliasing because it is a step function and it has a bit of smearing because it is smooth but none of the effects as so bad as to be unpleasant.
Side note: for audio, frequency response is more important than locality, that's why sinc window functions are so popular.