3 ms·
Quote the article: 1. Generate some White Noise. 2. Perform a Fourier transform on the White Noise. Are the two separate steps necessary? It should be pos
by praptak 5y ago
Quote the article:
1. Generate some White Noise.
2. Perform a Fourier transform on the White Noise.
Are the two separate steps necessary? It should be possible to directly generate the Fourier Transform of the white noise, rather than applying FFT to the waveform, right?
- nightcracker 5y agoAt least when using Gaussian white noise, the DFT of the noise is the same distribution with a smaller variance: https://dsp.stackexchange.com/questions/24170/what-are-the-statistics-of-the-discrete-fourier-transform-of-white-gaussian-nois https://dsp.stackexchange.com/questions/24170/what-are-the-s... I don't think the same neat result holds when you use uniform white noise, but I haven't done the math.
- eutectic 5y agoThe normal distribution is special in being closed under linear transformation.
- frumiousirc 5y ago3. apply filter 4. apply inverse FT It is equivalent to replace 1, 2 and 3 with a proper stochastic but direct sampling of the 1/f function to get the Fourier amplitudes and a uniform sampling for Fourier phase. This would save processing time by avoiding the calculation of one 2D FFT and the application of the filter (a 2D array multiplication).
- TheOtherHobbes 5y agoEven simpler: create your desired amplitude spectrum to match your desired filtered noise profile. This is trivial for any noise spectrum with a simple linear filter - it's just a linear function with the desired slope. It's only slightly less trivial for more complex spectra. Randomise the phases. (i)FFT. Done.
- frumiousirc 5y agoThe 1/f (or any) noise spectrum represents only the *mean* amplitude in frequency domain. In reality, the amplitude at each frequency itself has an associated distribution. Since frequency domain is complex the amplitude represents a radius in 2D space and if the underlying random walk is Gaussian then the amplitude is distributed according to Rayleigh. For generating artistic images, the artist may ignore this fact and generate only the random phases. Image to image, humans probably won't know the shortcut. But in fact, each image will have exactly the same amplitude spectra and that's not physical for real stochastic processes. Depending on the usage of the images, the shortcut could be fatal. Eg, if we train a neural net on these generated images we should not expect that NN to perform well on the real data which our generated images were meant to represent.
- munificent 5y agoYup! That's basically what Perlin noise does. Generate a bunch of sine waves at various frequencies ("octaves") and add them together.
- gnramires 5y agoRight (and that would be more efficient, I guess), but the Fourier transform of White Noise yields complex white noise with real and imaginary part such that their std deviation a and b obeys var_x = a^2 + b^2 (This follows from FFT being Unitary or Parveval's theorem), so each frequency component has sqrt(2)/2 times the (non-transformed) signal standard deviation. So simply generate two i.i.d. white noise fields with scaled variance (1/2). It's important to keep in mind when speaking of noise that we are referring to average values (or statistical values), e.g. although the power spectrum of white noise is on average flat, as we discussed it's really random (the expected amplitude spectrum in fact has average 0 anywhere, since it's also white noise!).