









Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
Prepare for your exams
Study with the several resources on Docsity
Earn points to download
Earn points by helping other students or get them with a premium plan
This solution manual is for problems related Digital Image processing course. This was recommended by Prof. Anwar Malik at Bengal Engineering and Science University. It includes: Laplacian, Coordinate, Angle, Rotation, Partial, Derivative, Expression, Operator
Typology: Exercises
1 / 15
This page cannot be seen from the preview
Don't miss anything!










for the unrotated coordinates, and as
∇^2 f = ∂^2 f ∂ x ′^2
∂^2 f ∂ y ′^2
for rotated coordinates. It is given that
x = x ′^ cos θ − y ′^ sin θ and y = x ′^ sin θ + y ′^ cos θ
where θ is the angle of rotation. We want to show that the right sides of the first
two equations are equal. We start with
∂ f ∂ x ′^
∂ f ∂ x
∂ x ∂ x ′^
∂ f ∂ y
∂ y ∂ x ′ = ∂ f ∂ x
cos θ + ∂ f ∂ y
sin θ.
Taking the partial derivative of this expression again with respect to x ′^ yields
∂^2 f ∂ x ′^2
∂^2 f ∂ x 2 cos 2 θ +
∂ x
∂ f ∂ y
sin θ cos θ +
∂ y
∂ f ∂ x
cos θ sin θ + ∂^2 f ∂ y 2 sin 2 θ.
Next, we compute
∂ f ∂ y ′^
∂ f ∂ x
∂ x ∂ y ′^
∂ f ∂ y
∂ y ∂ y ′ = − ∂ f ∂ x
sin θ + ∂ f ∂ y
cos θ.
Taking the derivative of this expression again with respect to y ′^ gives
∂^2 f ∂ y ′^2
∂^2 f ∂ x 2
sin 2 θ −
∂ x
∂ f ∂ y
cos θ sin θ −
∂ y
∂ f ∂ x
sin θ cos θ + ∂^2 f ∂ y 2
cos 2 θ.
Adding the two expressions for the second derivatives yields
∂^2 f ∂ x ′^2
∂^2 f ∂ y ′^2
∂^2 f ∂ x 2
∂^2 f ∂ y 2
which proves that the Laplacian operator is independent of rotation.
The Laplacian mask with a −4 in the center performs an operation proportional to differentiation in the horizontal and vertical directions. Consider for a mo- ment a 3 × 3 “Laplacian” mask with a −2 in the center and 1s above and below the center. All other elements are 0. This mask will perform differentiation in only one direction, and will ignore intensity transitions in the orthogonal direc- tion. An image processed with such a mask will exhibit sharpening in only one direction. A Laplacian mask with a -4 in the center and 1s in the vertical and horizontal directions will obviously produce an image with sharpening in both directions and in general will appear sharper than with the previous mask. Sim- ilarly, and mask with a −8 in the center and 1s in the horizontal, vertical, and diagonal directions will detect the same intensity changes as the mask with the −4 in the center but, in addition, it will also be able to detect changes along the diagonals, thus generally producing sharper-looking results.
Consider the following equation: f (x , y ) − ∇^2 f (x , y ) = f (x , y ) −
f (x + 1, y ) + f (x − 1, y ) + f (x , y + 1 ) +f (x , y − 1 ) − 4 f (x , y ) = 6 f (x , y ) −
f (x + 1, y ) + f (x − 1, y ) + f (x , y + 1 ) +f (x , y − 1 ) + f (x , y )
= 5 1.2f (x , y )− 1 5
f (x + 1, y ) + f (x − 1, y ) + f (x , y + 1 ) +f (x , y − 1 ) + f (x , y ) = 5 1.2f (x , y ) − f (x , y )
where f (x , y ) denotes the average of f (x , y ) in a predefined neighborhood cen- tered at (x , y ) and including the center pixel and its four immediate neighbors. Treating the constants in the last line of the above equation as proportionality factors, we may write f (x , y ) − ∇^2 f (x , y ) f (x , y ) − f (x , y ). The right side of this equation is recognized within the just-mentioned propor- tionality factors to be of the same form as the definition of unsharp masking given in Eqs. (3.6-8) and (3.6-9). Thus, it has been demonstrated that subtract- ing the Laplacian from an image is proportional to unsharp masking.
(a) To prove infinite periodicity in both directions with period 1 / ΔT , we have to show that ˜F
μ + k [ 1 / ΔT ]
= F˜ ( μ ) for k = 0, ±1, ±2,.... From Eq. (4.3-5),
F˜ μ + k [ 1 / ΔT ]^ = 1 T
n =−∞
μ +
k T
n T
n =−∞
μ +
k − n T
m =−∞
μ − m T
μ
where the third line follows from the fact that k and n are integers and the limits of summation are symmetric about the origin. The last step follows from Eq. (4.3-5).
(b) Again, we need to show that ˜F
μ + k / ΔT
= F˜ ( μ ) for k = 0, ±1, ±2,.... From Eq. (4.4-2),
23
F˜ μ + k / ΔT ^ =
n =−∞
f (^) n e −j^2 π ( μ +k^ / ΔT^ )n^ ΔT
n =−∞
f (^) n e −j^2 πμ n^ ΔT^ e −j^2 π k n
n =−∞
f (^) n e −j^2 πμ n^ ΔT
= F˜
μ
where the third line follows from the fact that e −j^2 π k n^ = 1 because both k and n are integers (see Euler’s formula), and the last line follows from Eq. (4.4-2).
From the definition of the 1-D Fourier transform in Eq. (4.2-16),
μ
−∞
f (t ) e −j^2 πμ t^ d t
−∞
sin ( 2 π nt ) e −j^2 πμ t^ d t
−j 2
−∞
e j^2 π n t^ − e −j^2 π n t^ e −j^2 πμ t^ d t
−j 2
−∞
e j^2 π n t^ e −j^2 πμ t^ d t − −j 2
−∞
e −j^2 π n t^ e −j^2 πμ t^ d t.
From the translation property in Table 4.3 we know that f (t )e j^2 πμ^0 t^ ⇔ F
μ − μ 0
and we know from the statement of the problem that the Fourier transform of a constant
f (t ) = 1 is an impulse. Thus, ( 1 ) e j^2 πμ^0 t^ ⇔ δ
μ − μ 0
Thus, we see that the leftmost integral in the the last line above is the Fourier transform of ( 1 ) e j^2 π n t^ , which is δ
μ − n
, and similarly, the second integral is the transform of ( 1 ) e −j^2 π n t^ , or δ
μ + n
. Combining all results yields
F
μ
j 2
δ
μ + n
− δ
μ − n
as desired.
Starting from Eq. (4.2-20),
−∞
f ( τ )g (t − τ )d τ.
The Fourier transform of this expression is
−∞
−∞
f ( τ )g (t − τ )d τ
⎦ (^) e −j^2 πμ t^ d t
−∞
f ( τ )
−∞
g (t − τ )e −j^2 πμ t^ d t
⎦ (^) d τ.
The term inside the inner brackets is the Fourier transform of g (t − τ ). But, we know from the translation property (Table 4.3) that
ℑ
g (t − τ ) = G ( μ )e −j^2 πμτ
so
ℑ
−∞
f ( τ ) G ( μ )e −j^2 πμτ^ d τ
= G ( μ )
−∞
f ( τ )e −j^2 πμτ d τ
= G ( μ )F ( μ ).
This proves that multiplication in the frequency domain is equal to convolution in the spatial domain. The proof that multiplication in the spatial domain is equal to convolution in the spatial domain is done in a similar way.
(b) We solve this problem as above, by direct substitution and using orthogonal- ity. Substituting Eq. (4.4-7) into (4.4-6) yields
F (u ) =
x = 0
r = 0
F (u )e −j^2 π r x^ / M
⎦ (^) e −j^2 π u x^ / M
r = 0
F (r )
x = 0
e −j^2 π r x^ / M^ e −j^2 π u x^ / M
= F (u )
where the last step follows from the orthogonality condition given in the prob- lem statement. Substituting Eq. (4.4-6) into (4.6-7) and using the same basic procedure yields a similar identity for f (x ).
With reference to the statement of the convolution theorem given in Eqs. (4.2-
and that
From Eq. (4.4-10) and the definition of the DFT in Eq. (4.4-6),
x = 0
m = 0
f (m )h(x − m )
⎦ (^) e −j^2 π u x^ / M
m = 0
f (m )
x = 0
h(x − m )e −j^2 π u x^ / M
m = 0
f (m )H (u )e −j^2 π u m^ / M
= H (u )
m = 0
f (m )e −j^2 π u m^ / M
= H (u )F (u ).
The other half of the discrete convolution theorem is proved in a similar manner.
With reference to Eq. (4.2-20),
−∞
−∞
f ( α , β )h(t − α , z − β )d α d β.
From Eq. (4.5-7), Recall that in this chapter we use (t , z ) and ( μ , ν ) for continuous variables, and (x , y ) and (u , v ) for discrete variables.
F ( μ , ν ) = ℑ
f (t , z ) =
−∞
−∞
f (t , z )e −j^2 π ( μ t^ + ν^ z^ )d t d z.
The following are proofs of some of the properties in Table 4.1. Proofs of the other properties are given in Chapter 4. Recall that when we refer to a function as imaginary, its real part is zero. We use the term complex to denote a function whose real and imaginary parts are not zero. We prove only the forward part the Fourier transform pairs. Similar techniques are used to prove the inverse part.
(a) Property 2: If f (x , y ) is imaginary, f (x , y ) ⇔ F ∗(−u , −v ) = −F (u , v ). Proof: Because f (x , y ) is imaginary, we can express it as j g (x , y ), where g (x , y ) is a real function. Then the proof is as follows:
F ∗(−u − v ) =
x = 0
y = 0
j g (x , y )e j^2 π (u x^ / M^ +v y^ / N^ )
∗
x = 0
y = 0
−j g (x , y )e −j^2 π (u x^ / M^ +v y^ / N^ )
x = 0
y = 0
j g (x , y ) e −j^2 π (u x^ / M^ +v y^ / N^ )
x = 0
y = 0
f (x , y )e −j^2 π (u x^ / M^ +v y^ / N^ )
= −F (u , v ).
(b) Property 4: If f (x , y ) is imaginary, then R(u , v ) is odd and I (u , v ) is even. Proof: F is complex, so it can be expressed as
F (u , v ) = real [F (u , v )] + j imag [F (u , v )] = R(u , v ) + j I (u , v ).
Then, −F (u , v ) = −R(u , v ) − j I (u , v ) and F ∗(−u , −v ) = R(−u , −v ) − j I (−u , −v ). But, because f (x , y ) is imaginary, F ∗(−u , −v ) = −F (u , v ) (see Property 2). It then follows from the previous two equations that R(u , v ) = −R(−u , −v ) (i.e., R is odd) and I (u , v ) = I (−u , −v ) (I is even).
(d) Property 7: When f (x , y ) is complex, f ∗(x , y ) ⇔ F ∗(−u , −v ). Proof:
f ∗(x , y ) =
x = 0
y = 0
f ∗(x , y )e −j^2 π (u x^ / M^ +v y^ / N^ )
x = 0
y = 0
f (x , y )e j^2 π (u x^ / M^ +v y^ / N^ )
∗
= F ∗(−u , −v ). (g) Property 11: If f (x , y ) is imaginary and odd, then F (u , v ) is real and odd, and conversely. Proof: If f (x , y ) is imaginary, we know that the real part of F (u , v ) is odd and its imaginary part is even. If we can show that the imaginary part is zero, then we will have the proof for this property. As above,
F (u , v ) =
x = 0
y = 0
[j odd]
(even)(even) − 2 j (even)(odd) − (odd)(odd)
x = 0
y = 0
[j odd][even − j odd][even − j odd]
= j
x = 0
y = 0
[(odd)(even)] + 2
x = 0
y = 0
[(even)(even)]
−j
x = 0
y = 0
[(odd)(even)]
= real where the last step follows from Eq. (4.6-13).
Recall that the reason for padding is to establish a “buffer” between the periods that are implicit in the DFT. Imagine the image on the left being duplicated in- finitely many times to cover the x y -plane. The result would be a checkerboard, with each square being in the checkerboard being the image (and the black ex- tensions). Now imagine doing the same thing to the image on the right. The results would be identical. Thus, either form of padding accomplishes the same separation between images, as desired.
Unless all borders on of an image are black, padding the image with 0s intro- duces significant discontinuities (edges) at one or more borders of the image.
but M∑ − 1
x = 0
h(x − m )e −j^2 π u x^ / M^ = ℑ[h(x − m )] = H (u )e −j^2 π m u^ / M
where the last step follows from Eq. (4.6-4). Substituting this result into the previous equation yields
m = 0
f (m )e −j^2 π m u^ / M^ H (u )
= F (u )H (u ).
The other part of the convolution theorem is done in a similar manner.
(c) Correlation is done in the same way, but because of the difference in sign in the argument of h the result will be a conjugate:
x = 0
y = 0
x = 0
y = 0
m = 0
n = 0
f (m , n)h(x + m , y + n)
×e −j^2 π (u x^ / M^ +v y^ / N^ )
=
m = 0
n = 0
f (m , n)
x = 0
y = 0
h(x + m , y + n)
×e −j^2 π (u x^ / M^ +v y^ / N^ )
=
m = 0
n = 0
f (m , n)e j^2 π (u m^ / M^ +v n^ / N^ )H (u , v )
= F ∗(u , v )H (u , v ).
(d) We begin with one variable:
d f (z ) d z
−∞
d f (z ) d z e −j^2 πν^ z^ d z
Integration by parts has the following general form, ∫ s d w = s w −
w d s.
Let s = e −j^2 πν^ z^ and w = f (z ). Then, d w / d z = d f (z ) / d z or
d w = d f (z ) d z d z and d s = (−j 2 πν )e −j^2 πν^ z^ d z
so it follows that
ℑ
d f (z ) d z
−∞
d f (z ) d z
e −j^2 πν^ z^ d z
= f (z ) e −j^2 πν^ z^ ∞ ∞ −
−∞
f (z )(−j 2 πν )e −j^2 πν^ z^ d z
= (j 2 πν )
−∞
f (z )e −j^2 πν^ z^ d z
= (j 2 πν )F ( ν )
because f (±∞) = 0 by assumption (see Table 4.3). Consider next the second derivative. Define g (z ) = d f (z ) / d z. Then
d g (z ) d z
= (j 2 πν )G ( ν )
where G ( ν ) is the Fourier transform of g (z ). But g (z ) = d f (z ) / d z , so G ( ν ) = (j 2 πν )F ( ν ), and
ℑ
d 2 f (z ) d z 2
= (j 2 πν )^2 F ( ν ).
Continuing in this manner would result in the expression
d n^ f (z ) d z n
= (j 2 πν )n^ F ( ν ).
If we now go to 2-D and take the derivative of only one variable, we would get the same result as in the preceding expression, but we have to use partial derivatives to indicate the variable to which differentiation applies and, instead of F ( μ ), we would have F ( μ , ν ). Thus,
∂ n^ f (t , z ) ∂ z n
= (j 2 πν )n^ F ( μ , ν ).
Define g (t , z ) = ∂ n^ f (t , z ) /∂ t n^ , then
∂ m^ g (t , z ) ∂ t m
= (j 2 πμ )m^ G ( μ , ν ).
But G( μ , ν ) is the transform of g (t , z ) = ∂ n^ f (t , z ) /∂ t n^ , which we know is equal to (j 2 πμ )n^ F ( μ , ν ). Therefore, we have established that
∂ t
m ∂ ∂ z
n f (t , z )
= (j 2 πμ )m^ (j 2 πν )n^ F ( μ , ν ).