Doug Kerr
Well-known member
We here more and more these days about convolution (actually, most often, about deconvolution, which is of course its inverse). But just what is convolution, anyway?
I will describe it here in the context of electrical engineering (you know, surgeons cut).
An electrical "signal" can be described in both the time domain and the frequency domain. The time domain representation is just the familiar waveform "plot", as we would see on an oscilloscope. It tells us the instantaneous value (voltage) of the waveform at each instant of time.
The frequency domain representation is perhaps the amplitude spectral density (ASD) plot, as we would see on a spectrum analyzer. It essentially tells us the square root of how the power in the signal is distributed over different frequencies.
We can convert between the time domain representation of a signal to its frequency domain representation by using a mathematical operation called the Fourier transform, or convert between frequency and time domain representations using the inverse Fourier transform.
Now consider a filter, through which we will might pass our signal.
We may know the frequency domain representation of the filter, its frequency response, which is a plot of the ratio of the output voltage to the input voltage as a function of frequency. (There is also a phase angle aspect of this, but I'll ignore it to make the story clearer.)
We may also have the time domain representation of the filter. This is a plot of the waveform that will come out of the filter if we feed into it a curious thing (not actually physically realizable), a unit impulse (a voltage spike that has zero width but a finite amount of energy). We should be glad we never actually encounter one, as it would have infinite peak voltage! The waveform that comes out is called the impulse response of the filter, and it completely describes the filter's behavior, just as the frequency response does.
Not surprisingly, we can convert between the time domain and frequency domain representation of the filter's behavior representation by using the Fourier transform (in both directions, as before).
Now suppose we have some signal (described in the time domain, by its waveform) and a filter, whose response we have in the frequency domain. How can we determine what will come of the filter when we feed in our signal (we want the result as a waveform).
Well, here's one way:
• Convert the waveform (time domain) to the amplitude spectral density function (frequency domain) using the Fourier transform.
• Multiply the amplitude spectral density of the signal by the frequency response of the filter (meaning that, for each frequency in the range of interest, we multiply the value of the ASD by the value of the frequency response, and plot that as a point on the ASD of the output signal). We now have the ASD of the output signal.
• Convert the ASD of the output signal to its waveform using the inverse Fourier transform.
Or, we could do this:
• Convert the frequency response of the filter to its impulse response (using the inverse Fourier transform).
• Convolve the waveform of the signal by the impulse response of the filter. (I won't try and give an explanation here of what this involves.) The result will be the waveform of the output signal.
So, even though I haven't described what convolution involves, we can see that convolution is the way to combine the time-domain representations of an input signal and a filter to get the time domain representation of the output signal, just as multiplication is the way to combine the frequency domain representations of an input signal and a filter to get the frequency domain representation of the output signal.
Now suppose that we don't know the input waveform, but know the output waveform and the impulse response of the filter, and want to know the waveform of what must have been the input signal. Well, we take the output waveform and deconvolve it with the impulse response of the filter (essentially undoing the operation we discussed earlier).
Now, how does this relate to photographic imaging?
Well, most of our work here deals with space-domain representations (which correspond to the time domain representations for electrical signals). (We do deal with the frequency domain when discussing MTF.)
If we consider a defocused image, the defocusing takes what should be a point image and makes it into a circle of confusion. The mathematical description of that process is called the "spread function" - it defines how what should have been a point is "spread" into a circular figure.
This spread function is wholly analogous to the impulse response of a filter (time domain) in the electrical case. (It works two-dimensionally, in the geometric sense, something that has no equivalent in the electrical time domain.)
So, if we wanted to take the "result" of the defocus and determine what the original "waveform" of the "should be image" was, we could deconvolve the recorded ("blurred") image with the known (or presumed) spread function that describes the blurring process. The result should be the "unblurred" image - what we would have recorded but for the intervention of the misfocus.
Best regards,
Doug
I will describe it here in the context of electrical engineering (you know, surgeons cut).
An electrical "signal" can be described in both the time domain and the frequency domain. The time domain representation is just the familiar waveform "plot", as we would see on an oscilloscope. It tells us the instantaneous value (voltage) of the waveform at each instant of time.
The frequency domain representation is perhaps the amplitude spectral density (ASD) plot, as we would see on a spectrum analyzer. It essentially tells us the square root of how the power in the signal is distributed over different frequencies.
We can convert between the time domain representation of a signal to its frequency domain representation by using a mathematical operation called the Fourier transform, or convert between frequency and time domain representations using the inverse Fourier transform.
Now consider a filter, through which we will might pass our signal.
We may know the frequency domain representation of the filter, its frequency response, which is a plot of the ratio of the output voltage to the input voltage as a function of frequency. (There is also a phase angle aspect of this, but I'll ignore it to make the story clearer.)
We may also have the time domain representation of the filter. This is a plot of the waveform that will come out of the filter if we feed into it a curious thing (not actually physically realizable), a unit impulse (a voltage spike that has zero width but a finite amount of energy). We should be glad we never actually encounter one, as it would have infinite peak voltage! The waveform that comes out is called the impulse response of the filter, and it completely describes the filter's behavior, just as the frequency response does.
Not surprisingly, we can convert between the time domain and frequency domain representation of the filter's behavior representation by using the Fourier transform (in both directions, as before).
Now suppose we have some signal (described in the time domain, by its waveform) and a filter, whose response we have in the frequency domain. How can we determine what will come of the filter when we feed in our signal (we want the result as a waveform).
Well, here's one way:
• Convert the waveform (time domain) to the amplitude spectral density function (frequency domain) using the Fourier transform.
• Multiply the amplitude spectral density of the signal by the frequency response of the filter (meaning that, for each frequency in the range of interest, we multiply the value of the ASD by the value of the frequency response, and plot that as a point on the ASD of the output signal). We now have the ASD of the output signal.
• Convert the ASD of the output signal to its waveform using the inverse Fourier transform.
Or, we could do this:
• Convert the frequency response of the filter to its impulse response (using the inverse Fourier transform).
• Convolve the waveform of the signal by the impulse response of the filter. (I won't try and give an explanation here of what this involves.) The result will be the waveform of the output signal.
So, even though I haven't described what convolution involves, we can see that convolution is the way to combine the time-domain representations of an input signal and a filter to get the time domain representation of the output signal, just as multiplication is the way to combine the frequency domain representations of an input signal and a filter to get the frequency domain representation of the output signal.
Now suppose that we don't know the input waveform, but know the output waveform and the impulse response of the filter, and want to know the waveform of what must have been the input signal. Well, we take the output waveform and deconvolve it with the impulse response of the filter (essentially undoing the operation we discussed earlier).
Now, how does this relate to photographic imaging?
Well, most of our work here deals with space-domain representations (which correspond to the time domain representations for electrical signals). (We do deal with the frequency domain when discussing MTF.)
If we consider a defocused image, the defocusing takes what should be a point image and makes it into a circle of confusion. The mathematical description of that process is called the "spread function" - it defines how what should have been a point is "spread" into a circular figure.
This spread function is wholly analogous to the impulse response of a filter (time domain) in the electrical case. (It works two-dimensionally, in the geometric sense, something that has no equivalent in the electrical time domain.)
So, if we wanted to take the "result" of the defocus and determine what the original "waveform" of the "should be image" was, we could deconvolve the recorded ("blurred") image with the known (or presumed) spread function that describes the blurring process. The result should be the "unblurred" image - what we would have recorded but for the intervention of the misfocus.
Best regards,
Doug