Antisthenes
Forum Enthusiast
Suppose that we place a digital camera on a copy stand and take a picture of a chessboard.Isn't that going to ring like crazy?This, conceptually, is easy to achieve by calculating a Fourier transform of the 3000px picture, and multiplying the result (in the frequency domain) with a brick-wall filter.
The camera's lens projects on the sensor surface a reduced, sharp image of the chessboard.
The pixels on the sensor capture the chessboard's square, dark and bright patterns, and the camera records the picture in an image file.
Suppose that we take the chessboard's picture first with a camera that has a full-frame 24-megapixel sensor, and then with another full-frame camera that has a 12-megapixel sensor, using the same lens.
Comparing the 24-MP and 12-MP pictures, we might notice a slight loss in sharpness in the delineation of the black and white squares of the chessboard.
What we certainly won't notice, however, is any kind of "ringing" occurring in the vicinity of the chessboard's black / white transitions, even on the picture taken with the lower-resolution camera.
In fact, even if we used a camera that had an extremely low-resolution sensor with only a few hundred pixels, I think it's obvious that there wouldn't be any ringing in the picture. The only effect that a lower-resolution sensor would bring is that the chessboard's picture would be fuzzier, less detailed.
The Nyquist-Shannon sampling theorem tells us that any monochromatic sensor that had a resolution higher than 8 pixels by 8 pixels should be able to record well enough a 8x8 chessboard's dark and light patterns: the imaging sensor simply samples the spatial data that's projected onto it, and is, in principle, able to record without aliasing all the spatial frequencies lower than its Nyquist limit.
The downsampling method I've described in my previous post, which combines a sinc convolution followed by a Dirac comb multiplication, is actually a good simulation of the sampling by an arbitrary sensor of the spatial data projected onto it.
The only restriction of the downsampling method I described is that it can (obviously) only simulate a sensor whose resolution is lower than the resolution of the original picture that we're downsampling.
The sinc function is a continuous function, and the sinc convolution process therefore recreates a continuous signal. This reconstruction is a faithful reproduction of the analog, continuous spatial frequency modulation pattern that's projected on a sensor.
Another key characterstic of this continuous, analog-like reconstruction is that it's bandwidth-limited by the brick-wall filter.
The sinc convolution process is therefore implementing a perfect low-pass filtering, which a causal, physically implementable birefringent optical low-pass filter (OLPF) sitting in front of a sensor can never achieve.
This virtual, reconstructed continuous signal is thus perfectly low-pass filtered, and then sampled by the multiplication with a Dirac comb, thereby reproducing the sampling process of the spatial frequencies projected by the lens on the sensor's OLPF and discrete pixel array stack.
The quality of this analog reconstruction is a consequence of the sampling theorem, and, similarly to the fact that a camera's sensor won't generate ringing when photographing a chessboard, a sampling by a Dirac comb of the analog-like reconstruction won't generate any ringing.
To show the absence of ringing, I've written a small demonstration routine in the C programming language. This convolution demo, which I've named "convsinc" and uploaded to Pastebin , downsamples a 1-D input vector of floating-point numbers (sorry, I was too lazy to implement downsampling of 2-D data) and then simply outputs the downsampled 1-D array as a list of floating-point numbers.
Downsampling with that routine a numerical input vector containing a step function — e.g. [1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2] — will yield e.g. as output a smaller numerical vector like [1,1,1,1,2,2,2,2]. The use of double precision floating-point input and output data ensures that ringing or even tiny overshoots and undershoots e.g. in downsampled step functions would be obvious if they occurred.
Brick-wall filtering / sinc convolution is very computation-intensive, and I think that for most continuous-tone, photographic material, the quality improvement it delivers is very marginal.I think there's good reason why we're not using brick wall AA filters. If you disagree, can you help me out there?
Thus, fast and efficient methods like bilinear or low-pass filtering with small convolution kernels is, IMHO, more than good enough for most uses.
Last edited:



