(2 intermediate revisions by one other user not shown)
Line 39: Line 39:
 
c. Notice that
 
c. Notice that
  
<math>h[m,n]=
+
<math>\mathbf{h}[m,n]=
 
\begin{pmatrix}
 
\begin{pmatrix}
 
-\frac{1}{8} & \frac{1}{2} & -\frac{1}{8} \\
 
-\frac{1}{8} & \frac{1}{2} & -\frac{1}{8} \\
Line 56: Line 56:
 
</math>
 
</math>
  
Therefore h[m,n] can be separated as outer product of two column vector given by
+
Therefore \mathbf{h}[m,n] can be separated as outer product of two column vector given by
 +
 
 +
<math>\mathbf{h}[m,n]=\mathbf{h}_1[m]\mathbf{h}_2[n]^T</math>
 +
 
 +
where
 +
<math>
 +
\mathbf{h}_1[m]=
 +
\begin{pmatrix}
 +
\frac{1}{2} \\
 +
1 \\
 +
\frac{1}{2}
 +
\end{pmatrix}
 +
</math>
 +
and
 +
<math>
 +
\mathbf{h}_2[n]=
 +
\begin{pmatrix}
 +
-\frac{1}{4} \\
 +
1 \\
 +
-\frac{1}{4}
 +
\end{pmatrix}
 +
</math>
 +
 
 +
Then compute the CTFT of <math>h_1,h_2</math> we get
 +
 
 +
<math>H_1(u)=\frac{1}{2}e^{-ju(-1)}+e^{-ju(0)}+\frac{1}{2}e^{-ju(1)}</math>
 +
 
 +
<math>H_2(v)=-\frac{1}{4}e^{-jv(-1)}+e^{-jv(0)}-\frac{1}{4}e^{-jv(1)}</math>
 +
 
 +
According to the Separability property of CSFT, we get
 +
 
 +
<math>H(u,v)=H_1(u)H_2(v)=(1-\frac{1}{2}cosu)(1+cosv)</math>
 +
 
 +
 
  
h[m,n]=h_1[m]h_2[n]
 
 
----
 
----
 
Back to [[ECE438_Week14_Quiz|Lab Week 14 Quiz Pool]]
 
Back to [[ECE438_Week14_Quiz|Lab Week 14 Quiz Pool]]

Latest revision as of 07:16, 30 November 2010



Solution to Q3 of Week 14 Quiz Pool


a. According to the table, we have

$ \begin{align} h[m,n]=&-\frac{1}{8}\delta [m+1,n-1]+\frac{1}{2}\delta [m,n-1]-\frac{1}{8}\delta [m-1,n-1] \\ &-\frac{1}{4}\delta [m+1,n]+\delta [m,n]-\frac{1}{4}\delta [m,n-1] \\ &-\frac{1}{8}\delta [m+1,n+1]+\frac{1}{2}\delta [m,n+1]-\frac{1}{8}\delta [m-1,n+1] \end{align} $

Replace $ \delta [m,n] $ with general input signal $ x[m,n] $ we get the difference equation of the filter.

$ \begin{align} y[m,n]=&-\frac{1}{8}x[m+1,n-1]+\frac{1}{2}x[m,n-1]-\frac{1}{8}x[m-1,n-1] \\ &-\frac{1}{4}x[m+1,n]+x[m,n]-\frac{1}{4}x[m,n-1] \\ &-\frac{1}{8}x[m+1,n+1]+\frac{1}{2}x[m,n+1]-\frac{1}{8}x[m-1,n+1] \end{align} $

b. Place the center of filter (i.e. where m=0,n=0) upon the pixel of image. Multiply h[m,n] with x[m,n] of the correspondent position and sum the value. We can get

$ \begin{align} y[0,0]=&0*h[-1,1]+0*h[0,1]+0*h[1,1]+ \\ &0*h[-1,0]+1*h[0,0]+0*h[1,0] \\ &1*h[-1,-1]+1*h[0,-1]+1*h[1,-1] \\ =&1-\frac{1}{8}+\frac{1}{2}-\frac{1}{8} \\ =&\frac{5}{4} \end{align} $

c. Notice that

$ \mathbf{h}[m,n]= \begin{pmatrix} -\frac{1}{8} & \frac{1}{2} & -\frac{1}{8} \\ -\frac{1}{4} & 1 & -\frac{1}{4} \\ -\frac{1}{8} & \frac{1}{2} & -\frac{1}{8} \end{pmatrix} = \begin{pmatrix} \frac{1}{2} \\ 1 \\ \frac{1}{2} \end{pmatrix} \begin{pmatrix} -\frac{1}{4} & 1 & -\frac{1}{4} \end{pmatrix} $

Therefore \mathbf{h}[m,n] can be separated as outer product of two column vector given by

$ \mathbf{h}[m,n]=\mathbf{h}_1[m]\mathbf{h}_2[n]^T $

where $ \mathbf{h}_1[m]= \begin{pmatrix} \frac{1}{2} \\ 1 \\ \frac{1}{2} \end{pmatrix} $ and $ \mathbf{h}_2[n]= \begin{pmatrix} -\frac{1}{4} \\ 1 \\ -\frac{1}{4} \end{pmatrix} $

Then compute the CTFT of $ h_1,h_2 $ we get

$ H_1(u)=\frac{1}{2}e^{-ju(-1)}+e^{-ju(0)}+\frac{1}{2}e^{-ju(1)} $

$ H_2(v)=-\frac{1}{4}e^{-jv(-1)}+e^{-jv(0)}-\frac{1}{4}e^{-jv(1)} $

According to the Separability property of CSFT, we get

$ H(u,v)=H_1(u)H_2(v)=(1-\frac{1}{2}cosu)(1+cosv) $



Back to Lab Week 14 Quiz Pool

Back to ECE 438 Fall 2010 Lab Wiki Page

Back to ECE 438 Fall 2010

Alumni Liaison

has a message for current ECE438 students.

Sean Hu, ECE PhD 2009