EE640 STOCHASTIC SYSTEMS SPRING 2008

advertisement
EE640 STOCHASTIC SYSTEMS
SPRING 2008
COMPUTER PROJECT 1A
PART A: SYNTHESIS(4-8-08)
A.1 GENERATING GAUSSIAN NOISE FROM UNIFORM NOISE
Let Nx=My=128:
1.
Uniform pseudo-random numbers. Generate 6 random images, each with a different
seed. The images are all My x Nx where each element is uniformly distributed between 0 and
1. Each element is independent from the others. Let N = My x Nx. Mathematically refer to
the images as N x 1 vectors in lexicographical form as:
(A-1)
u1 ,u 2 ,u 3 ,u 4 ,u 5 ,u6
2.
Prove the parametric transformation equations for converting from a uniform distribution
to a gaussian distribution are correct.
g i [2n + 1] = − 2 ln u i [2n + 1] cos 2π u i [2n + 2]
(A-2)
g i [2n + 2] = − 2 ln u i [2n + 1] sin 2π u i [2n + 2]
(A-3)
where n=0,1,2, …., (N/2 -1).
3.
4.
Generate six My x Nx gaussian random images from the associated images in part A.1.1.
Use the transformation developed in A.1.2. Generate them with a 0 mean and unity variance
and store as you did in A.1.1. Refer to them in lexicographical form as
g1 , g 2 , g 3 , g 4 , g 5 , g 6
(A-5)
Linear combinations of r.v.s. Generate five My x Nx images such that
s1 = u1 +u 2
s 4 = u1 +u 2 +u 3 +u 4 +u 5
s 2 = u1 +u 2 +u 3
s 5 = u1 +u 2 +...u6
(A-6)
s 3 = u1 +u 2 +u 3 +u 4
Display your results in a way that is suitable for visualizing them.
In the next project 1B, you will analyze your synthetic data.
4/8/2008
EE640 PROJECT 1
1
A.2 GENERATING CONTROL NOISE FROM DETERMINISTIC DATA
There are 23 target and clutter images which are saved in target.zip and clutter.zip, respectively.
The size of each image is 128 x 128 pixels. Choose one target and one clutter image from the
two classes. Fig. 1 shows an example of 5 target training and Fig. 2 shows 5 examples of clutter
images.
Figure 1: Five samples of the 23 target images.
Figure 2: Five samples of the 23 clutter images.
1. Find the PSD envelope of your target and clutter images by taking the 2-D Discrete Fourier
Transform, then select the magnitude of the resulting spectra and refer to it has Ht for the
target and Hc for the clutter image. We want to generate noise with an equivalent PSD.
2. Generate two independent My x Nx uniform noise images, At and Ac, with element ranges
between 0 and 2π. Combine these with Ht and Hc such that the magnitude of each element is
the same as Ht and Hc but the phase angle of the complex elements is determined by the two
random images At and Ac, respectively. Inverse the result back to space domain and display
the noise images.
3. Generate two independent My x Nx Gaussian noise images, gt and gc with element values
having zero mean and unit variance. 2-D DFT these images to get Gt and Gc spectra.
Elementwise multiply these spectra by Ht and Hc, respectively. Then inverse DFT the result
back to the space domain and display results.
4. Are the noise images pairs, in task 2 and 3, statistically equivalent? Show why or why not,
mathematically.
4/8/2008
EE640 PROJECT 1
2
A.3 DIGITAL STOCHASTIC SIGNAL IMAGES
Generate two image vectors, a pseudo-random binary (i.e., bipolar) sequence and pseudorandom intensity sequence suth that:
(A-7)
⎧ 1 for u 1 [ n] ≥ 0.5
b binary [ n] = ⎨
⎩−1 for u1 [ n] < 0.5
1.
and
(
)
s int ensity [ n] = g 1 [ n]
2
(A-8)
where n=1,2,...N.
Display these images so it is easy to visualize the difference in the noise types.
4/8/2008
EE640 PROJECT 1
3
Download