Bootstrap

图像处理作业 第8次

图像处理作业 第8次

7.11

说明尺度函数 ϕ ( x ) = 1 , 0.25 ≤ x < 0.75 \phi(x)=1 ,0.25 \le x\lt 0.75 ϕ(x)=1,0.25x<0.75并未满足多分辨率分析的第二个要求.
ϕ 1 , 0 ( x ) = 2 ϕ ( 2 x ) = 1 \phi_{1,0}(x)=\sqrt 2 \phi(2x)=1 ϕ1,0(x)=2 ϕ(2x)=1 当且仅当满足 0.125 ≤ x < 0.375 0.125 \le x\lt 0.375 0.125x<0.375
ϕ 1 , 1 ( x ) = 2 ϕ ( 2 x − 1 ) = 1 \phi_{1,1}(x)=\sqrt 2 \phi(2x-1) = 1 ϕ1,1(x)=2 ϕ(2x1)=1 当且仅当满足 0.675 ≤ x < 0.875 0.675 \le x \lt 0.875 0.675x<0.875
可以看出,在 0.375 ≤ x < 0.675 0.375 \le x \lt 0.675 0.375x<0.675的位置,显然 ϕ ( x ) \phi(x) ϕ(x)不能由 ϕ 1 , 0 ( x ) , ϕ 1 , 1 ( x ) \phi_{1,0}(x),\phi_{1,1}(x) ϕ1,0(x),ϕ1,1(x)二者进行线性组合得到.
因此该尺度函数并未满足多分辨率分析的第二个要求.

7.2

A)
j 0 = 1 j_0=1 j0=1重新计算函数 f ( n ) = { 1 , 4 , − 3 , 0 } f(n)=\{1,4,-3,0\} f(n)={1,4,3,0}在区间 [ 0 , 3 ] [0,3] [0,3]中的一维DWT.
ϕ ( n ) = { 1 , 1 , 1 , 1 } \phi(n)=\{1,1,1,1\} ϕ(n)={1,1,1,1}
ϕ 1 , 0 ( n ) = 2 ϕ ( 2 n − 0 ) = 2 { 1 , 1 , 0 , 0 } \phi_{1,0}(n)=\sqrt 2 \phi(2n-0)=\sqrt2\{1,1,0,0\} ϕ1,0(n)=2 ϕ(2n0)=2 {1,1,0,0}
ϕ 1 , 1 ( n ) = 2 ϕ ( 2 n − 1 ) = 2 { 0 , 0 , 1 , 1 } \phi_{1,1}(n)=\sqrt 2 \phi(2n-1)=\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 /2
W ψ ( 1 , 1 ) = 1 / 2 ∑ x f ( x ) ψ 1 , 1 ( x ) = 1 / 2 ( 1 ∗ 0 + 4 ∗ 0 − 3 ∗ 1 + 0 ∗ − 1 ) = − 3 2 / 2 W_{\psi}(1,1)=1/2 \sum_x f(x)\psi_{1,1}(x)=1/2(1*0+4*0-3*1+0*-1)=-3\sqrt2/2 Wψ(1,1)=1/2xf(x)ψ1,1(x)=1/2(10+4031+01)=32 /2

B)
使用(A)的结果根据变换值 f ( 1 ) f(1) f(1)

f ( n ) = 1 / 2 ( W ϕ ( 1 , 0 ) ϕ 1 , 0 ( n ) + W ϕ ( 1 , 1 ) ϕ 1 , 1 ( n ) + W ψ ( 1 , 0 ) ψ 1 , 1 ( n ) + W ψ ( 1 , 0 ) ψ 1 , 1 ( n ) ) f(n)=1/2( W_{\phi}(1,0)\phi_{1,0}(n)+W_{\phi}(1,1)\phi_{1,1}(n)+W_{\psi}(1,0)\psi_{1,1}(n)+W_{\psi}(1,0)\psi_{1,1}(n)) f(n)=1/2(Wϕ(1,0)ϕ1,0(n)+Wϕ(1,1)ϕ1,1(n)+Wψ(1,0)ψ1,1(n)+Wψ(1,0)ψ1,1(n))

f ( 1 ) = 2 / 2 ( 5 2 / 2 ∗ 1 − 3 2 / 2 ∗ 0 − 3 2 / 2 ∗ ( − 1 ) − 3 2 / 2 ∗ 0 ) = 4 f(1)=\sqrt 2/2(5\sqrt2/2*1 -3\sqrt2/2*0 -3\sqrt2/2*(-1) -3\sqrt2/2*0)=4 f(1)=2 /2(52 /2132 /2032 /2(1)32 /20)=4

7.3

现在假设我们有一个长度为8的信号f=[1 3 5 7 4 3 2 1], 利用哈尔小波进行两层的快速小波变换分解,计算各层的滤波器输出,然后再进行完美重建,请利用与书中例子相同的框图进行计算。

W ϕ ( 2 , n ) = f ( n ) = { 1 , 3 , 5 , 7 , 4 , 3 , 2 , 1 } W_{\phi}(2,n) =f(n)=\{1,3,5,7,4,3,2,1\} Wϕ(2,n)=f(n)={1,3,5,7,4,3,2,1}
ϕ ( n ) = { 1 / 2 , 1 / 2 } \phi(n)=\{1/\sqrt2,1/\sqrt2\} ϕ(n)={1/2 ,1/2 }
ψ ( n ) = { 1 / 2 , − 1 / 2 } \psi(n)=\{1/\sqrt2,-1/\sqrt2\} ψ(n)={1/2 ,1/2 }

W ψ ( 1 , n ) = { 1 , 3 , 5 , 7 , 4 , 3 , 2 , 1 } ∗ { − 1 / 2 , 1 / 2 } ∣ d o w n 2 = 1 / 2 { − 1 , − 2 , − 2 , − 2 , 3 , 1 , 1 , 1 , 0 } ∣ d o w n 2 = 1 / 2 { − 2 , − 2 , 1 , 1 } W_{\psi}(1,n)=\{1,3,5,7,4,3,2,1\}*\{-1/\sqrt2,1/\sqrt2\}|_{down2}=1/\sqrt2\{-1,-2,-2,-2,3,1,1,1,0\}|_{down2}=1/\sqrt2\{-2,-2,1,1\} Wψ(1,n)={1,3,5,7,4,3,2,1}{1/2 ,1/2 }down2=1/2 {1,2,2,2,3,1,1,1,0}down2=1/2 {2,2,1,1}

W ϕ ( 1 , n ) = { 1 , 3 , 5 , 7 , 4 , 3 , 2 , 1 } ∗ { 1 / 2 , 1 / 2 } ∣ d o w n 2 = 1 / 2 { 1 , 4 , 8 , 12 , 11 , 7 , 5 , 3 , 0 } ∣ d o w n 2 = 1 / 2 { 4 , 12 , 7 , 3 } W_{\phi}(1,n)=\{1,3,5,7,4,3,2,1\}*\{1/\sqrt2,1/\sqrt2\}|_{down2}=1/\sqrt2\{1,4,8,12,11,7,5,3,0\}|_{down2}=1/\sqrt2\{4,12,7,3\} Wϕ(1,n)={1,3,5,7,4,3,2,1}{1/2 ,1/2 }down2=1/2 {1,4,8,12,11,7,5,3,0}down2=1/2 {4,12,7,3}

W ψ ( 0 , n ) = 1 / 2 { 4 , 12 , 7 , 3 } ∗ { − 1 / 2 , 1 / 2 } ∣ d o w n 2 = { − 4 , 2 } W_{\psi}(0,n)=1/\sqrt2\{4,12,7,3\}*\{-1/\sqrt2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