<<

Topics

• Review of Signal Expansions Bioengineering 280A • Principles of Biomedical Imaging • Superposition • Fall Quarter 2008 X-Rays Lecture 2

TT Liu, BE280A, UCSD Fall 2008 TT Liu, BE280A, UCSD Fall 2008

Kronecker Delta Kronecker Delta Function # 1 for m = 0,n = 0 "[m,n] = $ #1 for n = 0 % 0 otherwise "[n] = $ 0 otherwise % δ[m,n] δ[m-2,n] δ[n] !

! n 0 δ[n-2] δ[m,n-2] δ[m-2,n-2]

n 0

TT Liu, BE280A, UCSD Fall 2008 TT Liu, BE280A, UCSD Fall 2008

1 Discrete Signal Expansion 2D Signal $ g[n] = %g[k]"[n # k] k=#$ $ $ a 0 0 b g[m,n] = % % g[k,l]"[m # k,n # l] + k=#$ l=#$ a b δ[n] 0 0 0 0 + g[n] n = 0 ! -δ[n-1] c d 0 0 0 0 + n c 0 0 d n 0 1.5δ[n-2] n 0

TT Liu, BE280A, UCSD Fall 2008 TT Liu, BE280A, UCSD Fall 2008 n

Image Decomposition 1 0 0 1 c +d c d 0 0 0 0 + Notation : = "(x) - 1D Dirac Delta Function a b 0 0 0 0 a +b "(x,y) or 2"(x,y) - 2D Dirac Delta Function 1 0 0 1 "(x,y,z) or 3"(x,y,z) - 3D Dirac Delta Function (r ) - N Dimensional Dirac Delta Function "

g[m,n] = a"[m,n]+ b"[m,n #1]+ c"[m #1,n]+ d"[m #1,n #1] 1 1 ! = $$g[k,l]"[m # k,n # l] k= 0 l= 0

TT Liu, BE280A, UCSD Fall 2008 TT Liu, BE280A, UCSD Fall 2008

!

2 Rectangle Function 1D Dirac Delta Function % "(x) = 0 when x # 0 and & "(x)dx =1 1 $% $0 x >1/2 Can interpret the integral as a limit of the integral of an ordinary function "(x) = % that is shrinking in width and growing in height, while maintaining a &1 x #1/2 x constant area. For example, we can use a shrinking rectangle function % % -1/2 1/2 such that "(x)dx =lim ' $1)(x /')dx. &$% ' (0 &$% Also called rect(x) y ! 1/2 !

"(x,y) = "(x)"(y) τ→0 x -1/2 1/2 1

-1/2 x -1/2 1/2 ! TT Liu, BE280A, UCSD Fall 2008 TT Liu, BE280A, UCSD Fall 2008

2D Dirac Delta Function Generalized Functions

% % Dirac delta functions are not ordinary functions that are defined by their "(x,y) = 0 when x 2 + y 2 # 0 and "(x,y)dxdy =1 &$% &$% value at each point. Instead, they are generalized functions that are defined where we can consider the limit of the integral of an ordinary 2D function by what they do underneath an integral. that is shrinking in width but increasing in height while maintaining constant area. % % % % "(x,y)dxdy =lim ' $2)(x /',y /')dxdy. The most important property of the Dirac delta is the sifting property &$% &$% ' (0 &$% &$% $ Useful fact : "(x,y) = "(x)"(y) "(x # x )g(x)dx = g(x ) where g(x) is a smooth function. This sifting %#$ 0 0 property can be understood by considering the limiting case

$ #1 lim & ((x /&)g(x)dx = g(x0 ) ! & '0 %#$

g(x)

! Area = (height)(width)= (g(x0)/ τ) τ = g(x0) τ→0 x0 TT Liu, BE280A, UCSD Fall 2008 TT Liu, BE280A, UCSD Fall 2008

3 Representation of 1D Function Representation of 2D Function

Similarly, we can write a 2D function as & & g(x,y) = g(",#)$(x %",y %#)d"d#. From the sifting property, we can write a 1D function as '%& '%& % g(x) = g(")#(x $")d". To gain intuition, consider the approximation To gain intuition, consider the approximation &$% & & 1 + x % n)x . 1 + y % m)y. % 1 * x $ n(x - g(x,y) ( 1 1 g(n)x,m)y) *- 0 *- 0) x)y. g(x) ' 0 g(n(x) ), /( x. m=%& n=%& )x , )x / )y )y n=$% (x + (x . , /

! g(x) !

TT Liu, BE280A, UCSD Fall 2008 TT Liu, BE280A, UCSD Fall 2008

Impulse Response

Intuition: the is the response of a system to an input of infinitesimal width and unit area.

Original Image Blurred Image

Since any input can be thought of as the weighted sum of impulses, a linear system is characterized by its impulse response(s). Bushberg et al 2001

TT Liu, BE280A, UCSD Fall 2008 TT Liu, BE280A, UCSD Fall 2008

4 Impulse Response Full Width Half Maximum (FWHM) is a measure of resolution. The impulse response characterizes the response of a system over all space to a Dirac delta impulse function at a certain location.

h(x2;") = L[#(x1 $")] 1D Impulse Response

h(x2,y2;",%) = L[#(x1 $",y1 $%)] 2D Impulse Response

! y2 y1 h(x2,y2;",#) Impulse at ",#

x1 x2

TT Liu, BE280A, UCSD Fall 2008 Prince and Link 2005 TT Liu, BE280A, UCSD Fall 2008 ! !

Pinhole Magnification Example Linearity (Addition) - b η a R(I) I1(x,y) K1(x,y)

η

b R(I) a I2(x,y) K2(x,y) y1 y2

In this example, an impulse at (",#) will yield an impulse I (x,y)+ I (x,y) K1(x,y) +K2(x,y) 1 2 R(I) at (m",m#) where m = $b/a.

Thus, h(x2,y2;",#) = L[%(x1 $",y1 $#)] = %(x2 $ m",y2 $ m#).

TT Liu, BE280A, UCSD Fall 2008 TT Liu, BE280A, UCSD Fall 2008

!

5 Linearity (Scaling) Linearity

A system R is linear if for two inputs

I1(x,y) and I2(x,y) with outputs R(I) I1(x,y) K1(x,y)

R(I1(x,y))=K1(x,y) and R(I2(x,y))=K2(x,y)

the response to the weighted sum of inputs is the a I (x,y) R(I) a K (x,y) 1 1 1 1 weighted sum of outputs:

R(a1I1(x,y)+ a2I 2(x,y))=a1K1(x,y)+ a2K2(x,y)

TT Liu, BE280A, UCSD Fall 2008 TT Liu, BE280A, UCSD Fall 2008

Example Superposition Are these linear systems? g[m] = g[0]"[m]+ g[1]"[m #1]+ g[2]"[m # 2] g(x,y) + g(x,y)+10 g(x,y) X 10g(x,y) h[m',k] = L["[m # k]]

10 10 y[m'] = L[g[m]] ! = L[g[0]"[m]+ g[1]"[m #1]+ g[2]"[m # 2]] g(x,y) Move up Move right g(x-1,y-1) = L[g[0]"[m]] + L[g[1]"[m #1]] + L[g[2]"[m # 2]] By 1 By 1 ! = g[0]L "[m] + g[1]L "[m #1] + g[2]L "[m # 2] ! [ ] [ ] [ ] = g[0]h[m',0]+ g[1]h[m',1]+ g[2]h[m',2] ! 2 ! = "g[k]h[m',k] k= 0

TT Liu, BE280A, UCSD Fall 2008 TT Liu, BE280A, UCSD Fall 2008

!

6 Superposition Integral Pinhole Magnification Example

What is the response to an arbitrary function g(x1,y1)? % % Write g(x ,y ) = g(",#)$(x '",y '#)d"d#. $ $ 1 1 &-% &-% 1 1 I(x ,y ) = g(",#)h(x ,y ;",#)d"d# 2 2 %-$ %-$ 2 2 The response is given by $ $ = C g(",#)&(x ' m",y ' m#)d"d# %-$ %-$ 2 2 I(x2,y2 ) = L[g1(x1,y1)] % % = L g(",#)$(x '",y '#)d"d# &-% &-% 1 1 [ ] I(x2,y2) % % ! = g(",#)L $(x '",y '#) d"d# &-% &-% [ 1 1 ] % % = g(",#)h(x ,y ;",#)d"d# &-% &-% 2 2

g(x1,y1)

TT Liu, BE280A, UCSD Fall 2008 TT Liu, BE280A, UCSD Fall 2008 !

Space Invariance Pinhole Magnification Example - b η If a system is space invariant, the impulse response depends only a on the difference between the output coordinates and the position of

the impulse and is given by h(x2,y2;",#) = h(x2 $",y2 $#) η

a b !

h(x2,y2;",#) = C$(x2 % m",y2 % m#) . Is this system space invariant?

TT Liu, BE280A, UCSD Fall 2008 TT Liu, BE280A,! UCSD Fall 2008

7 Pinhole Magnification Example Convolution g[m] = g[0]"[m]+ g[1]"[m #1]+ g[2]"[m # 2] ____, the pinhole system ____ space invariant. h[m',k] = L["[m # k]] = h[m $ # k]

y[m'] = L[g[m]] = L[g[0]"[m]+ g[1]"[m #1]+ g[2]"[m # 2]] = L[g[0]"[m]] + L[g[1]"[m #1]] + L[g[2]"[m # 2]] = g[0]L["[m]] + g[1]L["[m #1]] + g[2]L["[m # 2]] = g[0]h[m'#0]+ g[1]h[m'#1]+ g[2]h[m'#2] 2 = %g[k]h[m'#k] k= 0

TT Liu, BE280A, UCSD Fall 2008 TT Liu, BE280A, UCSD Fall 2008

!

1D Convolution 2D Convolution

# For a space invariant linear system, the superposition I(x) = g(")h(x;")d" $-# integral becomes a convolution integral. # = g(")h(x %")d" $ $ $-# I(x ,y ) = g(",#)h(x ,y ;",#)d"d# 2 2 %-$ %-$ 2 2 = g(x)& h(x) $ $ = g(",#)h(x &",y &#)d"d# %-$ %-$ 2 2

= g(x2,y2 )**h(x2,y2) Useful fact: ! ' where ** denotes 2D convolution. This will sometimes be g(x)"#(x $ %) = ( g(&)#(x $ % $&)d& -' ! abbreviated as *, e.g. I(x2, y2)= g(x2, y2)*h(x2, y2). = g(x $ %)

TT Liu, BE280A, UCSD Fall 2008 TT Liu, BE280A, UCSD Fall 2008 !

8 Rectangle Function 1D Convolution Examples

1 $0 x >1/2 1 "(x) = % &1 x #1/2 * x = ? -1/2 1/2 x x -1/2 1/2 -3/4 1/4 Also called rect(x) y ! 1/2 1 1 "(x,y) = "(x)"(y) * x = ? -1/2 1/2 x x -1/2 1/2 -1/2 1/2 -1/2 ! TT Liu, BE280A, UCSD Fall 2008 TT Liu, BE280A, UCSD Fall 2008

2D Convolution Example 2D Convolution Example

g(x)= δ(x+1/2,y) + δ(x,y) h(x)=rect(x,y) y y

x x -1/2 1/2

I(x,y)=g(x)**h(x,y) x

TT Liu, BE280A, UCSD Fall 2008 TT Liu, BE280A, UCSD Fall 2008

9 Pinhole Magnification Example X-Ray Imaging

$ $ s(x) I(x ,y ) = s(",#)h(x ,y ;",#)d"d# 2 2 %-$ %-$ 2 2 $ $ = s(",#)&(x ' m",y ' m#)d"d# %-$ %-$ 2 2 z t(x) = "(x) after substituting " ( = m" and # ( = m#, we obtain d

1 $ $ = s(" ( /m,# ( /m)&(x '" (, y '# () d" (d # ( m2 %-$ %-$ 2 2 ! 1 = s(x2 /m,y2 /m)))&(x2,y2) m2 1 = s(x /m,y /m) 1 " x % m2 2 2 s$ ' m # m&

TT Liu, BE280A, UCSD Fall 2008 TT Liu, BE280A, UCSD Fall 2008 ! !

X-Ray Imaging X-Ray Imaging

s(x) For off-center pinhole object, the shifted source image can be written as # x " Mx & # x & # x & s% 0 ( = s% ( )*% " x ( $ m ' $ m' $ M 0 ' z t(x) = "(x # x ) # x & 0 = s(x /m)* t% ( d $ M ' x 0 x ! 0 For the general 2D case, we convolve the magnified object with the impulse response ! " x y % 1 " x y % I(x,y) = t$ , ' (( s$ , ' # M M & m2 # m m& 1 # x " Mx0 & d d " z Mx s% ( M(z) = ; m(z) = " 0 m $ m ' z z Note: we have ignored obliquity factors etc.

TT Liu, BE280A, UCSD Fall 2008 TT Liu, BE280A, UCSD Fall 2008

! ! !

10 X-Ray Imaging X-Ray Imaging m =1;M = 2 s(x) = rect(x /10)

1 " x % " x % z s$ ' ( t$ ' = rect(x /10)( rect(x /20) ! ! m # m& # M & d = ??? t(x) = rect(x /10)

! !

1 " x % " x % s$ ' ( t$ ' m # m& # M &

TT Liu, BE280A, UCSD Fall 2008 TT Liu, BE280A, UCSD Fall 2008

!

Summary

1. The response to a linear system can be characterized by a spatially varying impulse response and the application of the superposition integral. 2. A shift invariant linear system can be characterized by its impulse response and the application of a convolution integral.

TT Liu, BE280A, UCSD Fall 2008

11