Reputation: 4941
I want to use a box filter but I think it's causing "Ringing Artifiacts" (could be something else). Is there a connection between them- I think I remember my teacher mentioning it but I'm not totally sure what I'm seeing is "Ringing Artifacts" but that's the term he used. Is there a connection between the two? Or am I just witnessing the result of something else?
Upvotes: 0
Views: 2190
Reputation: 3326
Ringing is an artifact that occurs when the kernel in the spatial domain has oscillations. Although the box filter has much oscillations in the Fourier domain, it is not the case in the spatial/temporal domain so you should be fine if you directly convolve in the spatial domain.
For instance, if you have a dirac and convolve it with your box filter, you'll strictly obtain a box, which is the expected result. Note that due to the infinite extent of the spectrum of the box kernel in the Fourier domain, this will not remove all the high frequencies (ie., you will still have high frequencies in your final signal, as illustrated with the box example).
However, if you filter with a box in the frequency domain, this corresponds to filtering with a sinc kernel in the spatial domain, which will produce ringing artifacts, but will perfectly remove high frequencies.
For this reason, people tend to make a compromise between keeping as little as possible high frequencies and not having oscillations. In any case, you cannot remove both at the same time (think of Heisenberg uncertainty principle : the product of the variance in the spatial domain with the variance in the frequency domain is bounded from below).
Such tradeoff can be one of the following (non-exhaustively) :
Upvotes: 2
Reputation: 19221
Ringing artifacts is a known expression.
Since there is a direct connection between filtering in the spatial domain and filtering in the frequency domain, you should start by considering how a box is represented in the later. That will cause the artifacts you see. So there is in fact a direct connection between the two (box filter and ringing artifacts).
Upvotes: 1