Docsity

Chapter 12 Part 1-Digital Image Processing-Solution Manual, Exercises of Digital Image Processing

Toggle sidebar
bg1
112
CHAPTER 12. PROBLEM SOLUTIONS
Because the covariance matrices are not equal, it follows from Eq. (12.2-26) that
d1(x)=āˆ’1
2ln(0.25)āˆ’1
2)xT'20
02
(x0
=āˆ’1
2ln(0.25)āˆ’(x2
1+x2
2)
and
d2(x)=āˆ’1
2ln(4.00)āˆ’1
2)xT'0.5 0
00.5
(x0
=āˆ’1
2ln(4.00)āˆ’1
4(x2
1+x2
2)
where the term lnP(ωj)was not included because it is the same for both deci-
sion functions in this case. The equation of the Bayes decision boundary is
d(x)=d1(x)āˆ’d2(x)=1.39 āˆ’3
4(x2
1+x2
2)=0.
(b) Figure P12.8 shows a plot of the boundary.
Problem 12.10
From basic probability theory,
p(c)=
x
p(c/x)p(x).
For any pattern belonging to class ωj,p(c/x)=p(ωj/x). Therefore,
p(c)=
x
p(ωj/x)p(x).
Substituting into this equation the formula p(ωj/x)=p(x/ωj)p(ωj)/p(x)gives
p(c)=
x
p(x/ωj)p(ωj).
Because the argument of the summation is positive, p(c)is maximized by maxi-
mizing p(x/ωj)p(ωj)for each j.Thatis,ifforeachxwe compute p(x/ωj)p(ωj)
for j=1,2,...,W, and use the largest value each time as the basis for selecting
the class from which xcame, then p(c)will be maximized. Since p(e)=1āˆ’p(c),
the probability of error is minimized by this procedure.
pf3
pf4

Partial preview of the text

Download Chapter 12 Part 1-Digital Image Processing-Solution Manual and more Exercises Digital Image Processing in PDF only on Docsity!

112 CHAPTER 12. PROBLEM SOLUTIONS

Because the covariance matrices are not equal, it follows from Eq. (12.2-26) that

d 1 ( x ) = āˆ’

ln(0.25) āˆ’

x T

x

ln(0.25) āˆ’ (x 21 + x 22 )

and

d 2 ( x ) = āˆ’

ln(4.00) āˆ’

x T

x

ln(4.00) āˆ’

(x 21 + x 22 )

where the term lnP( ω j ) was not included because it is the same for both deci- sion functions in this case. The equation of the Bayes decision boundary is

d ( x ) = d 1 ( x ) āˆ’ d 2 ( x ) = 1.39 āˆ’

(x 12 + x 22 ) = 0.

(b) Figure P12.8 shows a plot of the boundary.

Problem 12.

From basic probability theory,

p (c ) =

x

p (c / x )p ( x ).

For any pattern belonging to class ω j , p (c / x ) = p ( ω j / x ). Therefore,

p (c ) =

x

p ( ω j / x )p ( x ).

Substituting into this equation the formula p ( ω j / x ) = p ( x /ω j )p ( ω j ) / p ( x ) gives

p (c ) =

x

p ( x /ω j )p ( ω j ).

Because the argument of the summation is positive, p (c ) is maximized by maxi- mizing p ( x /ω j )p ( ω j ) for each j. That is, if for each x we compute p ( x /ω j )p ( ω j ) for j = 1, 2, ..., W , and use the largest value each time as the basis for selecting the class from which x came, then p (c ) will be maximized. Since p (e ) = 1 āˆ’ p (c ), the probability of error is minimized by this procedure.

Problem 12.

We start by taking the partial derivative of J with respect to w :

āˆ‚ J āˆ‚ w

y sgn( w T^ y ) āˆ’ y

where, by definition, sgn( w T^ y ) = 1 if w T^ y > 0, and sgn( w T^ y ) = āˆ’1 otherwise. Substituting the partial derivative into the general expression given in the prob- lem statement gives

w (k + 1 ) = w (k ) + c 2

y ( k ) āˆ’ y ( k )sgn w ( k )T^ y ( k )

where y (k ) is the training pattern being considered at the k th iterative step. Sub- stituting the definition of the sgn function into this result yields

w (k + 1 ) = w (k ) + c

0 if w ( k )T^ y ( k ) y (k ) otherwise

where c > 0 and w ( 1 ) is arbitrary. This expression agrees with the formulation given in the problem statement.

Problem 12.

The single decision function that implements a minimum distance classifier for two classes is of the form

d (^) i j ( x ) = x T^ ( m i āˆ’ m j ) āˆ’

( m Ti m i āˆ’ m Tj m j ).

Thus, for a particular pattern vector x , when d (^) i j ( x ) > 0, x is assigned to class ω 1 and, when d (^) i j ( x ) < 0, x is assigned to class ω 2. Values of x for which d (^) i j ( x ) = 0 are on the boundary (hyperplane) separating the two classes. By letting w = ( m i āˆ’ m j ) and w (^) n + 1 = āˆ’ 12 ( m Ti m i āˆ’ m Tj m j ), we can express the above decision function in the form d ( x ) = w T^ x āˆ’ w (^) n + 1.

This is recognized as a linear decision function in n dimensions, which is imple- mented by a single layer neural network with coefficients

w (^) k = (m (^) i k āˆ’ m (^) j k ) k = 1, 2,... , n

and

Īø = w (^) n + 1 = āˆ’

( m Ti m i āˆ’ m Tj m j ).

Figure P12.

as we move further down the tree). We prove that k (^) a c ≄ min[k (^) ab , k (^) b c ] by con- tradiction. For k (^) a c ≤ min[k (^) ab , k (^) b c ] to hold, shape A has to separate from shape C before (1) shape A separates from shape B, and (2) before shape B separates from shape C , otherwise k (^) ab ≤ k (^) a c or k (^) b c ≤ k (^) a c , which automatically vio- lates the condition k (^) a c < min[k (^) ab , k (^) b c ]. But, if (1) has to hold, then Fig. P12. shows the only way that A can separate from C before separating from B. This, however, violates (2), which means that the condition k (^) a c < min[k (^) ab , k (^) b c ] is vi- olated (we can also see this in the figure by noting that k (^) a c = k (^) b c which, since k (^) b c < k (^) ab , violates the condition). We use a similar argument to show that if (2) holds then (1) is violated. Thus, we conclude that it is impossible for the condition k (^) a c < min[k (^) ab , k (^) b c ] to hold, thus proving that k (^) a c ≄ min[k (^) ab , k (^) b c ] or, equivalently, that D(A,C ) ≤ max[D(A, B ), D(B,C )].