12

What is meant by "spectral whitening" in DSP?

What effect does spectral whitening have when used in image processing? (visually or otherwise...)

Where might spectral whitening be useful in audio processing or analysis? What would a spectrally whitened audio signal sound like?

hotpaw2
  • 35,346
  • 9
  • 47
  • 90

3 Answers3

10

What is meant by "spectral whitening" in DSP?

Spectral whitening is usually an attempt to make the spectrum of the signal "more uniform". One reason this might be a good thing to do is that it can have the effect of making the autocorrelation of the signal "narrower" (and closer to a Kronecker delta, for discrete-time signals). This can help localize in time.

What effect does spectral whitening have when used in image processing? (visually or otherwise...)

It's generally not pretty. Most images are "low pass" (most of the information is in the low frequency part of the spectrum). One simplistic approach to whitening in images is to do a column-wise (or row-wise) difference (i.e. diff in matlab).

This will mean negative pixel values, which generally do not map to anything sensible with standard images.

This example shows how prewhitening can improve localization in image processing template matching. The picture from that link is:

Localizing patch in an image, with and without prewhitening.

Where might spectral whitening be useful in audio processing or analysis?

If you are trying to localize (in time) the onset of a sound, then it's possible that spectral whitening can improve this. It's also possible that it can reduce (disimprove) the SNR.

What would a spectrally whitened audio signal sound like?

For audio of speech or music, it will tend to bring in more higher frequencies.

Peter K.
  • 25,714
  • 9
  • 46
  • 91
  • How else would you 'pre-whiten' a data signal btw? – TheGrapeBeyond Sep 02 '13 at 19:17
  • That depends on what you mean by "data signal"? Do you mean a signal that consists of just 1's and 0's? – Peter K. Sep 02 '13 at 19:24
  • I mean, say I give you a data vector, say, 100 numbers, such that the PSD is not uniform. – TheGrapeBeyond Sep 02 '13 at 19:26
  • OK. One way is to estimate the PSD using an AR (autoregressive) spectral estimator (e.g. using the Yule-Walker equations), and the filter the signal using its inverse. But it really depends on the application as to what form of whitening makes sense. – Peter K. Sep 02 '13 at 19:30
  • Ahh, interesting thanks! One mis-understanding I have had on any pre-whitening, is that, doesn't is destroy any meaningful structure you originally had to begin with? (You filter by the inverse, and now you are left with a delta function). So what good is that?... – TheGrapeBeyond Sep 02 '13 at 19:34
  • Just because you filter with the inverse of the AR spectrum doesn't mean that all signal information is destroyed. Filtering just emphasizes some frequencies and de-emphasizes others. The underlying structure is still there, it's just been re-organized a little.

    If you decided to pre-whiten by just adding lots of white noise, then that would blow you out of the water. Just performing LTI operations on the signal shouldn't (unless the filter was a gain-zero filter for all frequencies. :-).

    – Peter K. Sep 02 '13 at 19:37
  • Ah ok, I think I am confusing this with the case of when I whiten via the eigen-vectors/values of a data's correlation matrix. (diagonalize the covariance matrix). In that case, the data I get back seems to have lost all its structure. It would seem whitening in the 'spectral' domain is not the same as diagonalizing the covariance matrix. – TheGrapeBeyond Sep 02 '13 at 19:50
  • is this link here an example of whitening: http://hosting.astro.cornell.edu/~cordes/A6523/Prewhitening.pdf ? – Trevor Boyd Smith Oct 01 '19 at 13:05
  • @TrevorBoydSmith Yes, it seems to be! – Peter K. Oct 01 '19 at 14:11
3

Spectral Whitening is the process of making the Magnitude spectrum Uniform.

For an image it makes the Magnitude Spectrum more continuous rather than having few frequencies jumping around here and there. Basically the word "Whitening" comes from White Process whose spectrum is just a constant at all frequencies. But if you do that to an image it'll make no sense. So in effect you'd want a rather jumpy and jittery Spectrum to look more smooth without overly inducing noise.

I'm not sure how it'll affect an image but I can give an example of where this is applied. Consider an LTI channel in a communication system(or an audio system which has a rather not so "white" frequency response to all frequencies. An audio system will not reciprocate all frequencies at the same magnitude and there comes equalization). At the end of the receiver(as the output of the speaker, or the RX of the communication system) what you receive is the distorted version of the Input signal. So what you'd want to theoretically do before sending the signal over the system is to modify the shape of the signal so that when the system distorts it, it makes it flat enough. This is called pre-emphasis or equalization typically. I guess I'm not sure where Spectral Whitening would be applied in Image Processing(as I haven't done it before) but it'll have equal usage and applications as I've explained here.

You might then think of the "Spectral Whitener" or an Equalizer (in the case of a Communication System) as just an inverse of the System that distorts it. If the frequency response of the system is $H(z)$, the whitener will be just $1/H(z)$. But care should be taken if you do this after your signal has been crippled with noise because you might enhance the noise levels at some places where its magnitude was previously very low.

Sudarsan
  • 411
  • 2
  • 9
  • What remains invariant when making the magnitude spectrum uniform? Even white noise has a uniform spectrum. – user13107 Sep 02 '13 at 02:12
0

white spectrum is a spectrum as that of white light: all wavelenghts (frequencies) have a constant average power. in general no signal and no image have that. if one needs a white spectrum just a method is needed for whitening the current signal/image. there is a lot of methods for prewhitening. one of the simplest is the linear prediction in time series. in image processing even simple high-pass filters whiten images.