- Create a matrix with random complex numbers (random real and random
imaginary parts)
- perform some filtering
- normalize to mean luminance and contrast
So, basically, I skip the step of transforming into the frequency
domain, as noise is created directly in the freq. domain.
There are a few things about that which I do not perfectly get:
1. What is the frequency-domain-equivalent distribution of complex
numbers to *Gaussian* noise in the spatial domain? Is there any at
all?
2. Or vice versa: If I create random complex numbers drawn from a
*Gaussian* distribution in the frequency domain, what kind of
luminance distribution will result in the spatial domain?
3. Second option: If I create random complex numbers drawn from a
*uniform* distribution in the frequency domain, what kind of luminance
distribution will result in the spatial domain?
4. What constraints (max, min values) do I have to put upon the real
and imaginary components, if any?
5. Anything stupid else I missed?
Thanks in advance!
Matthias
Matthias,
I am just thinking outloud, so please ignore ideas that are
irrelevant.
Do you have a way to visualize the fourier transformed (real and
complex) images? Synthesizing a white-noise carrying 2D image, then
fourier transforming it, then visualizing it would already give you
some insight. You might have to shift the image components to have a
meaningful visualization of at least the real component. You know,
just as suppressing central portions from the fourier 2D image will
suppress corresponding frequency information from the spatial
counterpart, the 'whiteness' should be distributed randomly too on the
frequency domain image.
Interesting thought though. I found a slighty related paper here:
http://ieeexplore.ieee.org/Xplore/login.jsp?url=/iel5/7067/19060/00881298.pdf
Please keep us posted.
Pixel.To.Life.
done:
WN_s -> GN_f
WN_f -> GN_s
GN_s -> GN_f
GN_f -> GN_s
(WN: white noise, GN: gaussian noise, s: spatial domain,
f: frequency domain)
To produce random numbers in the frequency domain should be a fast
way to get gaussian noise in the spatial domain(?).
But he could also produce gaussian noise direct in the spatial
domain, for example:
phi:=2*pi*random;
r:=sigma*sqrt(-2*log10(random));
result:= r*sin(phi);
Ok, it doesnt seems to be faster.
Jens
Oh, really that straightforward?
Great, but can you specify what aspect of the complex numbers you are
talking about? Real & imaginary parts or rather magnitude and phase.
>From what range do I have to pick values in the frequency domain to
get Gaussian noise in the spatial domain (does it matter)?
And do you have any links or references?
> (WN: white noise, GN: gaussian noise, s: spatial domain,
> f: frequency domain)
>
> To produce random numbers in the frequency domain should be a fast
> way to get gaussian noise in the spatial domain(?).
Jep, if you need to perform frequency domain filtering on the Gaussian
noise, it accelerates the process :-)
Thanks.
Why? Since you fail to mention "white," I will tell you anyway that
Gaussian white noise poorly models real image noise.
"I'm searching for a more efficient way"
Then just don't use Matlab. Duh!
"1. What is the frequency-domain-equivalent distribution of complex
numbers to *Gaussian* noise in the spatial domain? Is there any at
all?
2. Or vice versa: If I create random complex numbers drawn from a
*Gaussian* distribution in the frequency domain, what kind of luminance
distribution will result in the spatial domain?"
A linear transformation of Gaussian noise is Gaussian noise. An
orthogonal transformation of white noise (not necessarily Gaussian) is
white. An orthonormal transformation of zero mean noise (not necessarily
white or Gaussian) preserves variance.
"3. Second option: If I create random complex numbers drawn from a
*uniform* distribution in the frequency domain, what kind of luminance
distribution will result in the spatial domain?"
Assuming independently and identically distributed (i.i.d.) uniformly
distributed noise, the spatial domain noise will be white, almost
Gaussian, but possibly not even close to i.i.d.. Many statistical
operations depend on the i.i.d. condition. Gaussian plus white implies
independently distributed and independently distributed (plus some minor
conditions) implies white, but for non-Gaussian distributions, white does
not imply independently distributed.
"4. What constraints (max, min values) do I have to put upon the real and
imaginary components, if any?"
As I implied before, if your DFT is orthonormal, the variance of your
output will be the same as the variance of the input.
"5. Anything stupid else I missed?"
Why are you doing this?
I agree with the statement that Gaussian is not the best way to model
pure white noise, it is one way, and it is convenient.
I'm sorry, but I never said that.
Real & imaginary parts
> From what range do I have to pick values in the frequency domain to
> get Gaussian noise in the spatial domain (does it matter)?
(Random-0.5)*3.4626 (just do it for all real&imag values) should bring
a standard deviation of 1, some more or less. I got this number by try.
Dont know how Matlab handles it, but the values should also be
downscaled by the size of the FT.
> And do you have any links or references?
No sorry, ive done the conversion in my program and looked at the
deviation in the histogramm.
Jens
I am sorry if I misunderstood your comments. In that case, I state it
myself:
Gaussian white noise is just a good approximation of many real-world
situations and allows one to model them so they are easy to deal with
mathematically.
It is just one way of modeling white noise with a Gaussian amplitude
distribution. Using a Gaussian model does not say anything about the
spectral density of a signal; which means there could be other
distributions too that allow modeling a white noise signal e.g.
Poisson, Cauchy.
An addition:
White noise images in the frequency domain becomes gaussian noise
images in the spatial domain, but they are still "special" images
in the frequency domain. A backtransformation still has a white
noise and not a gaussian noise, like "normal" images.
If you do a more or less local processing in the spatial domain,
this should has no effect.
Jens
You should do this analytically. The variance is the definite integral of
x^2 from -1/2 to +1/2 = 1/12. The proper coefficient is sqrt(12) =
3.46410162.
Very nice and concise analysis.
Thank you, some things are too easy to do it the straight way ;-)
Jens
Not image noise. Image noise is almost always strongly correlated over a
space of several pixels. The Gaussian assumption isn't as bad because
linear transformations such as demosaicing make the noise more Gaussian
via the central limit theorem.
"and allows one to model them so they are easy to deal with
mathematically."
Except for the "and" part, yes.
"It is just one way of modeling white noise with a Gaussian amplitude
distribution. Using a Gaussian model does not say anything about the
spectral density of a signal; which means there could be other
distributions too that allow modeling a white noise signal"
Yes, but, when operations only involve correlation or spectral density,
there is no reason to model with another distribution because the
multivariate Gaussian distribution is completely determined by its first
two moments, mean and covariance.
Non-Gaussian distributions can be white and still contain information in
higher moments. In fact, it is possible to send messages in Non-Gaussian
white noise but not in Gaussian white noise.
e.g. "Poisson, Cauchy."
There is no such thing as "white Cauchy noise" because all of the moments
of the Cauchy distribution are infinite or undefined (take your pick). The
Cauchy distribution doesn't even have a mean. Also, the central limit
theorem doesn't apply to Cauchy random variables.
Oh yeah? Take a peek at this article:
http://nanolab.usc.edu/PDF%5CNanoLett3-1683.pdf
May be not in image processing practice, but either of those three
distributions can be used to model white noise. Just because you think
the realization is difficult, does not nullify the existence of a
concept.
In rest of the post, you just re-inforced my points with facts:
Gaussian is the choice when it comes to actual implementation: well
defined finite moments, convenience of central limit theorem.
Specifically in simple image processing applications where most people
find it easy to deal with on paper and with computer. Nothing new or
intellectually stimulating.
____
Pixel.To.Life.
Anonymous: Arrogance hinders learning and growth.
http://nanolab.usc.edu/PDF%5CNanoLett3-1683.pdf "
Yeah. The usage of "white Cauchy noise" in that paper is simply wrong. Had
I refereed that paper, I would have insisted that "white" be changed to
"i.i.d.".