u g Nx1 lexicographical vectors from Project 1A for the following problems.

advertisement
EE640 STOCHASTIC SYSTEMS
SPRING 2009
COMPUTER PROJECT 1B
PART B: ANALYSIS (updated 4-28-09)
Use the ui and gi Nx1 lexicographical vectors from Project 1A for the following problems.
1. (a) Generate independent identically distributed test vectors. The target vectors are:
t I 1  g1  3
tI 2  g2  3
(B-1a)
t I 3  g3  3
and the clutter vectors are:
cI 1  g 4 1
cI 2  g 5 1
(B-1b)
cI 3  g 6 1
(b) Generate correlated test vectors. Three vectors will represent target class data and
three vectors will represent clutter class data. The 3 target vectors are:
t1  4 g1  2 g 2  g 3  34
t 2  g1  4 g 2  2 g 3  26
(B-2a)
t 3  2 g1  g 2  4 g 3  38
and the clutter vectors are:
c1  4 g 4  2 g 5  g 6  6
c2  g 4  4 g 5  2 g 6  12
(B-2b)
c3  2 g 4  g 5  4 g 6  17
2.
Histogram: Design a program, or use the MATLAB function hist.m, that will estimate
the histogram of random image intensity values. Have the program use specified M bin
intervals. Run the program and plot for:
5/31/2016
EE640 PROJECT 1B
1
u1 , g1
histogram
s1 , s 2 , s 3 , s 4 , s 5 histogram
t I1 , c I1
histogram
t I2 , c I2
histogram
t I3 , c I3
histogram
PlotB - 1
PlotB - 2
PlotB - 3
PlotB - 4
PlotB - 5
PlotB  6
3.
s int ensity
histogram
Covariance estimate: Estimate covariance matrices (3x3)
Kt from t1,t2,t3
Kc from c1,c2,c3
KtI from tI1,tI2,tI3
KcI from cI1,cI2,cI3
such that:
K(m,n) 
1
( xm -  m )T ( xn -  n )
N  1
(B-3)
where m is an Nx1 vector with all elements equal to the mean value of the vector xm and K(m,n)
is the mth, nth element of the matrix K.
4.
Estimate mean vectors (3x1) from
t I1 ,t I2 ,t I3
(B-4)
such that
  t ,1 


 t   t ,2 
  t ,3 
(B-5)
where
 t ,i 
1 N
 t I ,i  m 
N m 1
(B-6)
likewise for clutter, use
c I1 , c I2 , c I3
(B-7)
to generate
  c,1 


 c   c,2 
  c,3 
5/31/2016
(B-8)
EE640 PROJECT 1B
2
5. Use one of the target images and corresponding control noise image from Project 1.A.2. Find
the histogram of the deterministic image intensity and also find the histogram of the associated
control noise intensity. Are these histograms different? Why?
6. Determine the peak element locations, the centroid element locations of the histograms of
b binary and s int ensity . The centroid is determined by “simulating” a pdf. For example, let x[n] be
a sequence and you want to approximate E{x[n]}. Let h(x) be the histogram of x[n]. First, form a
pseudo pdf as
f x x  
h x 
(B-9)
M
 hm
m 1
where m is the bin number of a total M bins in the histogram. The value of h(x) returns the bin
value that contains the value of x. Let another sequence xc[m] for m=1,2,…M be the center
locations of each bin in fx(x). Then the centroid is then
M
 x   xc m f x xc m
(B-10)
m1
Determine the time averages of b binary and s int ensity and compare with the centroid averages.
They should be close.
Optional Method: A conceptually easier technique for implementing the centroid is the
following: The approach will first get the fractional value of the estimated bin number. Then that
value is linearly mapped to the x dimension. Given your bin numbers for the histograms h[m] are
equally spaced and vary from 1 to M. We can map bin values to signal values with xmin=a*1+b
and xmax=a*M+b. So a=(xmax-xmin)/(M-1) and b=xmin-a. The values xmax and xmin are the center
values associated with the end bins. So we find the centroid
f m m  
hm
(B-11)
M
 hn
n 1
The centroid is a fractional value
M
 m   mf m m 
(B-12)
m 1
and the mean of x is then x=m*a+b.
5/31/2016
EE640 PROJECT 1B
3
Download