I have been reading about ways to do antialiasing and since its not processed in real time the antialising with signal processing seems to be ideal especial against artifacts.
However what I have read does not mention the step from turning a a bitmap image into a signal and back again,so I’m looking for an algorithm or code examples to demonstrate that.
The usual way things are handled are to apply your filter independently in both the x and y directions. That way, your overall filter is
g(x,y) = f(x) * f(y).In this kind of situation,
g(x,y)is called a separable filter, and the advantage is that, by applying the x- and y- filters separately, a straightforward filter convolution takes O(X Y F) time, where X and Y are the dimensions of the image, and F is the support width of the filterf(). An arbitrary nonseparable filter of the same size (which would have O(F^2) samples) generally requires O(X Y F^2) time…If you really want to apply an full sinc() (
== sin(x)/x) filter to your image, the unlimited support of the sinc() function will make straightforward convolution very slow. In that case, it would be faster to do a 2D FFT of your image, filter in the frequency domain, and transform it back.In practice, though, most people use windowing or other modification, to get a finite filter that can be practically applied in the spatial domain.