Skip to content

Comment on Stable Fiddusion: Frequency-domain blue noise generator

Comments

When you generate blue noise by shaping in the frequency domain and transforming, the samples are gaussian distributed, not uniform, as the author mentions. I wonder if you can transform to a uniform distribution by sorting the samples, choosing 256 bins of equal size, then quantizing each pixel into those bins. That would be fast: O(n log n) in number or pixels.

Changing from gaussian to uniform is a distortion that presumably adds harmonics, but since they can only be higher frequencies than the original, the noise should still be blue.

but since they can only be higher frequencies than the original

That's incorrect, distortion products spread both upwards and downwards in frequency. The easiest example to analyze is x^2, which corresponds to the spectrum convoluted with itself. From there it's easy to expand into polynomials.

Anyway, what you're describing is pretty much a single step in a standard blue noise algo iteration.

You’re right. While a pure tone can only have higher harmonics when distorted, multiple tones can produce the difference frequency. And noise has every tone.

Even when distorting a pure tone, the harmonics will reflect back down once they go past the Nyquist frequency.

And what happensnif you apply a high pass filter to white noise? That would have been my naive approach.

I believe the author acknowledges that a bit later.

The resulting noise is gaussian, not uniform. […] This is why you need a specialized algorithm.

(The algorithm is afterwards described)

AboutSource Built by g1lg1l

Hackerly is an independent reader for Hacker News, built on the public HN API. Not affiliated with Y Combinator.