How to generate speckle in a simulation?

And what are its statistical properties?

Elise Colin
5 min readJan 8, 2023

At the origin of speckle: “Random Phasor Sums”

Speckle is inherent in the formation of the radar image.

Joseph Goodman models the signal in the resolution cell as the sum of the independent contributions of the scatterers, i.e., complex, independent, identically distributed response elements whose real and imaginary parts are independent [Goodman, 1976].

The large number of elements N allows the central limit theorem to be applied and in this case, the speckle is said to be fully developed.

We recall the associated theoretical statistical distributions:

  • The complex signal Z of the SLC image follows a complex Gaussian distribution centered.
  • The real part and the imaginary part of the pixels Re(Z) and Im(Z) both follow a Gaussian distribution centered.
  • The modulus of the pixels, the amplitude A=|Z|, follows a Rayleigh distribution,
  • The intensity I=|Z|² of the pixels follows a decreasing exponential distribution, which is also a Gamma distribution of shape 1.

A complete demonstration of all these statistical properties (and many others!) deduced from Godman’s model can be found in the book https://perso.telecom-paristech.fr/tupin/JMN/DOCJMN/rapport_mellin.pdf

This knowledge can be used to generate a speckle by simulation. It is important to note that all these distribution functions are described with only one parameter. But beware, the definitions of distributions with respect to this parameter may differ in the literature!

The distribution formulas with the different conventions

Let:

Then, the real and imaginary parts of the signal Z follow centered Gaussian distribution of standard deviation sigma, and:

Amplitude

The amplitude A follows a Rayleigh distribution, which can be parameterized in the literature in two ways:

The sigma previously posed as the variance of the phasor amplitudes is the same as that of the parameter of the distribution defined according to the first definition. If we work with the second convention, then:

The statistical moments of order 1 and 2, and the standard deviation for the amplitude laws are :

Intensity

the intensity follows an exponential distribution, which is a special case of the Gamma distribution (Gamma distribution of shape 1):

With:

The statistical moments of order 1 and 2, and the standard deviation, for the intensity distributions are :

Application to Speckle generation

First possibility: from the real and imaginary parts

The first idea is to start from the simulation of the real and imaginary parts of the speckle, using normal distributions:

import os
import numpy as np

Nx=256
Ny=256

sigma=1

Re_A = sigma*np.random.normal(size=(Ny, Nx))
Im_A = sigma*np.random.normal(size=(Ny, Nx))
Z = Re_A + 1j * Im_A

import matplotlib.pylab as plt

plt.figure(figsize=(10,10))
plt.subplot(121)
plt.imshow(np.abs(Z),cmap='gray')

plt.subplot(122)
plt.imshow(np.abs(Z**2),cmap='gray')

The associated dynamics are more pleasant when we represent the amplitudes rather than the intensities. (see https://elisecolin.medium.com/how-to-display-a-radar-image-so-that-it-is-not-too-ugly-73d4222ff958)
To look more precisely at these dynamics:

plt.figure(figsize=(10,4))

plt.subplot(121)
plt.hist(np.ravel(np.abs(Z)), range = (0, 6), bins = 50, color = 'red')
plt.ylabel('values')
plt.xlabel('frequency')
plt.title('Amplitude distribution histogram')

plt.subplot(122)
plt.hist(np.ravel(np.abs(Z)**2), range = (0, 20), bins = 50, color = 'blue')
plt.ylabel('values')
plt.xlabel('frequency')
plt.title('Intensity distribution histogram')

We find a distribution of Rayleigh for the amplitude (left in red) and of Exponential for the intensity (right in blue)
We also check the formulas which concern the theoretical averages and standard deviations from the value of the variance of the real and imaginary parts:

print('mean A: ', np.mean(np.abs(Z)), '        mean I: ', np.mean(np.abs(Z)**2))
print('std A: ', np.std(np.abs(Z)), ' std I: ', np.std(np.abs(Z)**2))

print('mean real part (Z): ', np.mean(np.real(Z)), ' mean imaginary part (Z): ', np.mean(np.imag(Z)))
mean A:  1.2491191120016052         mean I:  1.9881933757283392
std A: 0.6541366980690357 std I: 1.9982030722383939
mean real part (Z): 0.0022085519384948205 mean imaginary part (Z): 0.002285605994618343

Second possibility: from a uniformly distributed phase

The second idea is to generate a number of phasors (here N=10) per pixel, with phases uniformly distributed between 0 and 2π and a constant amplitude.

N=20

a=np.sqrt(2)*sigma
Phi=np.random.rand(Nx,Ny,N)*2*np.pi
Z=1/np.sqrt(N)*np.sum(a*np.exp(1j*Phi),axis=2)

Once again, we find the distributions with the expected distribution parameters.
In this case, the convergence to the developed speckle model goes very fast with the number of phasors N : N=10 being enough.

[Goodman, 1976] J. W. Goodman, “Some fundamental properties of speckle*,” J. Opt. Soc. Am. 66, 1145–1150 (1976)

Bottom line:
● The statistics of the homogeneous areas of a SAR SLC image (complex) can be found from the Goodman speckle model: it is a sum of elements of uniformly distributed phase.
● They can therefore be generated using the sum of uniformly distributed phases, or using normal distributions for the real and imaginary parts;
● The amplitude follows a Rayleigh distribution, the intensity an exponential distribution (or Gamma of shape 1)

--

--

Elise Colin
Elise Colin

Written by Elise Colin

Researcher with broad experience in Signal and Image processing, focusing on big data and IA aspects for Earth observation images, and medical images.

No responses yet