Lecture: Linear systems and convolution

Slides:



Advertisements
Similar presentations
Review of 1-D Fourier Theory:
Advertisements

Fourier Transform (Chapter 4)
Digital Image Processing
Reminder Fourier Basis: t  [0,1] nZnZ Fourier Series: Fourier Coefficient:
Image Enhancement in the Frequency Domain Part I Image Enhancement in the Frequency Domain Part I Dr. Samir H. Abdul-Jauwad Electrical Engineering Department.
Digital Image Processing, 2nd ed. www. imageprocessingbook.com © 2001 R. C. Gonzalez & R. E. Woods 1 Objective To provide background material in support.
Some Properties of the 2-D Fourier Transform Translation Distributivity and Scaling Rotation Periodicity and Conjugate Symmetry Separability Convolution.
Transforms: Basis to Basis Normal Basis Hadamard Basis Basis functions Method to find coefficients (“Transform”) Inverse Transform.
تعميم در يادگيري مبتني بر نمونه ها
Fourier Transform 2D Discrete Fourier Transform - 2D
Continuous Time Signals All signals in nature are in continuous time.
Digital Image Processing, 2nd ed. © 2002 R. C. Gonzalez & R. E. Woods Chapter 4 Image Enhancement in the Frequency Domain Chapter.
Linear Systems – why study them? Develop general analysis tools for all modalities Applicable beyond medical imaging Tools provide valuable insights for.
1 Binary storage & registers. CS 151 Binary Variables Recall that the two binary values have different names: –True/False –On/Off –Yes/No –1/0 We use.
Fourier Series Summary (From Salivahanan et al, 2002)
Image Processing © 2002 R. C. Gonzalez & R. E. Woods Lecture 4 Image Enhancement in the Frequency Domain Lecture 4 Image Enhancement.
1 Chapter 5 Image Transforms. 2 Image Processing for Pattern Recognition Feature Extraction Acquisition Preprocessing Classification Post Processing Scaling.
Fourier Series. Introduction Decompose a periodic input signal into primitive periodic components. A periodic sequence T2T3T t f(t)f(t)
lecture 4, Convolution and Fourier Convolution Convolution Fourier Convolution Outline  Review linear imaging model  Instrument response function.
Signals & systems Ch.3 Fourier Transform of Signals and LTI System 5/30/2016.
Digital Image Processing Chapter 4 Image Enhancement in the Frequency Domain Part I.
Zhongguo Liu_Biomedical Engineering_Shandong Univ. Chapter 8 The Discrete Fourier Transform Zhongguo Liu Biomedical Engineering School of Control.
Lecture 7: Sampling Review of 2D Fourier Theory We view f(x,y) as a linear combination of complex exponentials that represent plane waves. F(u,v) describes.
October 29, 2013Computer Vision Lecture 13: Fourier Transform II 1 The Fourier Transform In the previous lecture, we discussed the Hough transform. There.
1 Lecture 1: February 20, 2007 Topic: 1. Discrete-Time Signals and Systems.
7- 1 Chapter 7: Fourier Analysis Fourier analysis = Series + Transform ◎ Fourier Series -- A periodic (T) function f(x) can be written as the sum of sines.
Dr. Scott Umbaugh, SIUE Discrete Transforms.
Lecture 7 Transformations in frequency domain 1.Basic steps in frequency domain transformation 2.Fourier transformation theory in 1-D.
Fourier Transform.
11 Lecture 2 Signals and Systems (II) Principles of Communications Fall 2008 NCTU EE Tzu-Hsien Sang.
1 فصل دوم تبديلات. 2 فصل دوم سرفصل مطالب مقدمه ضرب بردارها دستگاه ‌ هاي مختصات دوران ‌ ها مختصات همگن دوران ‌ ها و انتقال ‌ ها تبديلات تركيبي همگن تبديل.
 Introduction to reciprocal space
1 “Figures and images used in these lecture notes by permission, copyright 1997 by Alan V. Oppenheim and Alan S. Willsky” Signals and Systems Spring 2003.
2D Fourier Transform.
Digital Image Processing, 2nd ed. www. imageprocessingbook.com © 2001 R. C. Gonzalez & R. E. Woods 1 Review: Linear Systems Some Definitions With reference.
Oh-Jin Kwon, EE dept., Sejong Univ., Seoul, Korea: 2.3 Fourier Transform: From Fourier Series to Fourier Transforms.
Ch # 11 Fourier Series, Integrals, and Transform 1.
Chapter 2. Signals and Linear Systems
ENEE 322: Continuous-Time Fourier Transform (Chapter 4)
Fourier Transform and Spectra
Math for CS Fourier Transforms
سیستمهای کنترل خطی پاییز 1389 بسم ا... الرحمن الرحيم دکتر حسين بلندي- دکتر سید مجید اسما عیل زاده.
Linear systems: University of Illinois at Chicago ECE 427, Dr. D. Erricolo University of Illinois at Chicago ECE 427, Dr. D. Erricolo Consider two complex.
Fourier Transform (Chapter 4) CS474/674 – Prof. Bebis.
Digital Image Processing Lecture 8: Fourier Transform Prof. Charlene Tsai.
Signals & systems Ch.3 Fourier Transform of Signals and LTI System
Digital Image Processing , 2008
Image Enhancement in the
Chapter 2. Signals and Linear Systems
Lecture 4: Imaging Theory (2/6) – One-dimensional Fourier transforms
Image Enhancement in the
Information Retrieval
Fourier Transform.
Chapter 2. Fourier Representation of Signals and Systems
UNIT II Analysis of Continuous Time signal
2D Fourier transform is separable
تبدیل فوریه (Fourier Transform)
نمايش اعداد در کامپيوتر چهار عمل اصلي
EE 638: Principles of Digital Color Imaging Systems
سيستمهاي اطلاعات مديريت
تحليل عملكرد يك سيستم تصويربرداري ديجيتال
مثال : فلوچارتي رسم كنيد كه دو عدد از ورودي دريافت كرده بزرگترين عدد
Lecture 3: Imaging Theory (1/6) – Linear systems and convolution
HKN ECE 210 Exam 3 Review Session
Chapter 8 The Discrete Fourier Transform
Chapter 8 The Discrete Fourier Transform
Linear Systems Review Objective
Lecture 4 Image Enhancement in Frequency Domain
پردازش تصاویر دیجیتالی
Presentation transcript:

Lecture: Linear systems and convolution

Linearity Conditions Let f1(x,y) and f2(x,y) describe two objects we want to image. f1(x,y) can be any object and represent any characteristic of the object. (e.g. color, intensity, temperature, texture, X-ray absorption, etc.) Assume each is imaged by some imaging device (system). Let f1(x,y) → g1(x,y) f2(x,y) → g2(x,y) Let’s scale each object and combine them to form a new object. a f1(x,y) + b f2(x,y) If the system is linear, output is a g1(x,y) + b g2(x,y) 2

Linearity Example: Is this a linear system? 3

Linearity Example: Is this a linear system? 9 → 3 16 → 4 9 + 16 = 25 → 5 3 + 4 ≠ 5 Not linear. 4

Example in medical imaging: Doubling the X-ray photons → doubles those transmitted Doubling the nuclear medicine → doubles the reception source energy MR: Maximum output voltage is 4 V. Now double the water: The A/D converter system is non-linear after 4 mV. (overranging) 5

Linearity allows decomposition of functions Linearity allows us to decompose our input into smaller, elementary objects. Output is the sum of the system’s response to these basic objects. 6

Elementary Function: The two-dimensional delta function δ(x,y) δ(x,y) has infinitesimal width and infinite amplitude. Key: Volume under function is 1. δ(x,y) 7

The delta function as a limit of another function Powerful to express δ(x,y) as the limit of a function Gaussian: lim a2 exp[- a2(x2+y2)] = δ(x,y) 2D Rect Function: lim a2 Π (ax) Π(ay) = δ(x,y) where Π(x) = 1 for |x| < ½ For this reason, δ(bx) = (1/|b|) δ(x) 8

Sifting property of the delta function The delta function at x1 = ε, y1= η has sifted out f (x1,y1) at that point. One can view f (x1,y1) as a collection of delta functions, each weighted by f (ε,η). 9

Imaging Analyzed with System Operators From previous page: Let system operator (imaging modality) be , so that Why the new coordinate system (x2,y2)? 10

Imaging Analyzed with System Operators Then,  Generally  System operating on entire blurred object input object f1 (x1,y1) By linearity, we can consider the output as a sum of the outputs from all the weighted elementary delta functions. 11

System response to a two-dimensional delta function Substituting this into yields the Superposition Integral 12

Example in medical imaging: Consider a nuclear study of a liver with a tumor point source at x1 = ε, y1= η Radiation is detected at the detector plane. To obtain a general result, we need to know all combinations h(x2, y2; ε, η ) By “general result”, we mean that we could calculate the image I(x2, y2) for any source input S(x1, y1) 13

Time invariance f(t - to) → g(t - to) A system is time invariant if its output depends only on relative time of the input, not absolute time. To test if this quality exists for a system, delay the input by t0. If the output shifts by the same amount, the system is time invariant i.e. f(t) → g(t) f(t - to) → g(t - to) input delay output delay Is f(t) → f(at) → g(t) (an audio compressor) time invariant? 14

 f(at – to) - shifted version of output Time invariance A system is time invariant if its output depends only on relative time of the input, not absolute time. To test if this quality exists for a system, delay the input by t0. If the output shifts by the same amount, the system is time invariant i.e. f(t) → g(t) f(t - to) → g(t - to) input delay output delay Is f(t) → f(at) → g(t) (an audio compressor) time invariant? f(t - to) → f(at) → f(a(t – to)) - output of audio compressor  f(at – to) - shifted version of output (this would be a time invariant system.) So f(t) → f(at) = g(t) is not time invariant. 15

Space or shift invariance A system is space (or shift) invariant if its output depends only on relative position of the input, not absolute position. If you shift input → The response shifts, but in the plane, the shape of the response stays the same. If the system is shift invariant, h(x2, y2; ε, η ) = h(x2-ε , y2-η ) and the superposition integral becomes the 2D convolution function: Notation: g = f**h (** sometimes implies two-dimensional convolution, as opposed to g = f*h for one dimension. Often we will use * with 2D and 3D functions and imply 2D or 3D convolution.) 16

One-dimensional convolution example: g(x) = Π(x)*Π(x/2) Recall: Π(x) = 1 for |x| < ½ Π(x/2) = 1 for |x|/2 < ½ or |x| < 1 Flip one object and drag across the other. flip  delay  17

One-dimensional convolution example, continued: Case 1: no overlap of Π(x-x’) and Π(x’/2) Case 2: partial overlap of Π(x-x’) and Π(x’/2) Images: L3 rect conv1 L3 rect conv2 18

One-dimensional convolution example, continued(2): Case 3: complete overlap Case 4: partial overlap Case 5: no overlap 19

One-dimensional convolution example, continued(3): Result of convolution: 20

Two-dimensional convolution  sliding of flipped object 21

2D Convolution of a square with a rectangle. 22

2D Convolution of letter E - 3D plots 23

2D Convolution of letter E - Grayscale images 24

Review of Fourier Transforms

تبدیل فوریه (Fourier Transform) پس ازعبور نور از يك منشور ‍(Prism) يا diffraction grating، نور به اجزا مختلف با فركانس هاي خاص خود (مونوكروماتيك) تجزيه مي شود. اين امر مشابه تبديل فوريه (FT) است. مي توان يــك سيگنال يك بعدي را بصورت مجموعه اي از امواج سينوسي (با فركانس و دامنه متفاوت) نشان داد. هرچه فركانس هاي بيشتري را محاسبه نماييم تخمين فوريه يك سيگنال دقيق تر مي شود و اطلاعات بيشتري درباره شكل اوليه آن بدست مي آيد.

تبدیل فوریه (Fourier Transform) FT مبتني بر اين واقعيت است كه سيگنال دوره اي (Periodic) شامل بي نهايت سيگنال هاي سينوسي وزن دار با فــركانس هاي متفاوت است. اين فركانس ها عبارتند از فركانس پايه (frequency Fundamental ) و مضارب درست اين فركانس پايه. در تبديل فوريه، توابع پايه‌اي هم جهت(orthonormal basis function)، امواج سينوسي با فركانس‌هاي متفاوت هسنند كه در فضاي بي‌نهايت تعريف شده‌اند

تبدیل فوریه (Fourier Transform) هر يك از ضرايب حاصل در تبديل فوريه توسط ضرب نقطه‌اي(inner product) تابع ورودي و يكي از توابع پايه‌اي(basis function) بدست مي‌آيد. اين ضرايب، در واقع، درجه شباهت بين تابع ورودي و تابع پايه‌اي مورد نظر را نشان مي‌دهد. اگر دو تابع پايه‌اي بر هم عمود (orthogonal) باشند، حاصل‌ضرب نقطه‌اي آنها صفر و لذا نشان مي‌دهد كه آن‌دو با هم شبيه نيستند. بنابراين اگر سيگنال يا تصوير ورودي از اجزايي تشكيل شده باشد كه يك يا چند تابع پايه‌اي داشته باشد، سپس آن يك يا چند ضريب بزرگ و ديگر ضرايب كوچك هستند.

Inverse Fouriers Transform در تبديل معكوس، سيگنال يا تصوير اوليه توسط مجموع توابع پايه‌اي (در فركانس‌هاي مختلف) كه تحت تاثير وزن ضرايب تبديل قرار گرفته‌اند، بازسازي مي‌شود. بنابراين اگر يك سيگنال يا تصوير از اجزائي شبيه به تعداد معدودي از توابع پايه‌اي تشكيل شده باشد، بسياري از عبارات موجود در اين جمع (ضرايب تبديل) حذف شده و فقط تعدادي از اين ضرايب تبديل، تقويت اجزايي از تصوير را كه شبيه به توابع مربوطه پايه‌اي است انجام داده و تصوير را مي‌سازند.

Advantage وقتي تبديل فوريه يك سيگنال يا تصوير بدست مي آيد، اعمال متعدد رياضي برروي آنها قابل انجام است. در فضاي فركانسي انجام اين عمليات رياضي از انجام آنها در فضاي مكاني به مراتب ساده تر است. بعنوان مثال عمل Convolution به يك ضرب ساده تبديل مــي شود و روش هاي پردازشي ديگر نيز مانند Correlation، differentiation، integration و Interpolation به سهولت انجام مي شوند.

1-D Fourier Theory Fourier Transform: Inverse Fourier Transform: You may have seen the Fourier transform and its inverse written as: Why use the top version instead? No scaling factor (1/2); easier to remember. Easier to think in Hz than in radians/s

Review of 1-D Fourier Theory, continued Let’s generalize so we can consider functions of variables other than time. Fourier Transform: Inverse Fourier Transform:

Review of 1-D Fourier theory, continued (2)  Orthogonal basis functions f(x) can be viewed as as a linear combination of the complex exponential basis functions. F(u) gives us the magnitude and phase of each of the exponentials that comprise f(x). In fact, the Fourier integral works by sifting out the portion of f(x) that is comprised of the the function exp(+i 2π uo x).

Some Fourier Transform Pairs and Definitions -1/2 1/2 -1 1

MX (Real) MY (Imaginary)

MX (Real) MY (Imaginary)

Some Fourier Transform Pairs and Definitions, continued

1-D Fourier transform properties If f(x) ↔ F(u) and h(x) ↔ H(u) , Linearity: af(x) + bh(x) ↔ aF(u) + bH(u) Scaling: f(ax) ↔ Shift: f(x-a) ↔

1-D Fourier transform properties, continued. Say g(x) ↔ G(u). Then, Derivative Theorem: (Emphasizes higher frequencies – high pass filter) Integral Theorem: (Emphasizes lower frequencies – low pass filter)

Even and odd functions and Fourier transforms Any function g(x) can be uniquely decomposed into an even and odd function. e(x) = ½( g(x) + g(-x) ) o(x) = ½( g(x) – g(-x) ) For example, e1 · e2 = even o1 · o2 = even e1 · o1 = odd e1 + e2 = even o1 + o2 = odd

Fourier transforms of even and odd functions Consider the Fourier transforms of even and odd functions. g(x) = e(x) + o(x) Sidebar: E(u) and O(u) can both be complex if e(x) and o(x) are complex. If g(x) is even, then G(u) is even. If g(x) is odd, then G(u) is odd.

Special Cases For a real-valued g(x) ( e(x) , o(x) are both real ), Real part is even in u Imaginary part is odd in u So, G(u) = G*(-u), which is the definition of ~~~~~~~~~~~~~~~~~~~~~~~~ Hermitian Symmetry: G(u) = G*(-u) (even in magnitude, odd in phase)

Example problem Find the Fourier transform of

Example problem: Answer. Find the Fourier transform of f(x) = Π(x /4) – Λ(x /2) + .5Λ(x) Using the Fourier transforms of Π and Λ and the linearity and scaling properties, F(u) = 4sinc(4u) - 2sinc2(2u) + .5sinc2(u)

Example problem: Alternative Answer. Find the Fourier transform of f(x) = Π(x /4) – 0.5((Π(x /3) * Π(x)) * –2 1 0 1 2 –1 -.5 0 .5 1 Using the Fourier transforms of Π and Λ and the linearity and scaling and convolution properties , F(u) = 4sinc(4u) – 1.5sinc(3u)sinc(u)

2D Fourier Transfrom

Original 256 x 256 F(u,v) space

256 x 256 Image ( Interpolated by Powerpoint)

Zero Padding x 2 ( 512 x 512 Recon, 256 x 256 F(u,v))

Zero Padding x 2 ( 512 x 512 Recon of 256 x 256 F(u,v))

Zero Padding x 4 ( 1024 x 1024 Recon, 256 x 256 F(u,v))

Zero Padding x 4 ( 1024 x 1024 Recon of 256 x 256 F(u,v))

Discrete Fourier Transform تـــبــديـــل فـــوريـــه در مــســا ئــل طبــيــعــي و عــادي بـه صـورت يك تخميـن تحليلي ريــاضـي (Analytic expression) بكار مي رود. بــه ايــن تخمين، تبديل فوريـــه گسسته ( Discrete Fourier Transform ) مي گويند. DFT، نسخه نمونه برداري شده FT (در گستره بي نهايت) است كه از طريق تكرار replication)) بخشي از آن در محدوده نمونه برداري شده بدست مي آيد. لذا اطلاعات در فضاي فركانسي بصورت مجموعه ء گسسته نقاط در نظر گرفته مي شود. Xj = jDx, j=0,1,2,….,N-1 Un = nDU, n=0,1,2,….,M-1

FT Conventions - 1D in Matlab 1D Fourier Transform >>l = z(33,:); >>L = fft(l); abs (L) l phase (L) 1 33 64 1 33 64 sample # sample # xmax fN/2 fN x [Matlab] u

1D FT - 2xfftshift Center Fourier Domain >>L2 = abs (L2) Center Fourier Domain >>L2 = fftshift(fft(l)); phase (L2) 1 33 64 sample # -fN/2 (N-1)/N*fN/2 u

fftshift in 2D Use fftshift for 2D functions >>smiley2 = fftshift(smiley);

2D Discrete Fourier Transform >>Z=fftshift(fft2(z)); >>whos >>figure >>imshow(real(Z)) >>imshow(real(Z),[]) >>colorbar >>figure >>imshow(imag(Z),[]) >>colorbar Real (Z) Imag (Z)

2D DFT - Zero Filling Interpolating Fourier space by zerofilling in image space >>z_zf = zeros(256); >>z_zf(97:160,97:160) = z; >>Z_ZF = fftshift(fft2(z_zf)); >>figure >>imshow(abs(Z_ZF),[]) >>colorbar >>figure >>imshow(angle(Z_ZF),[]) >>colorbar Magnitude (Z_ZF) Phase (Z_ZF)

2D DFT - Voxel Shifts Shift image: 5 voxels up and 2 voxels left >>z_s = zeros(256); >>z_s(92:155,95:158) = z; >>Z_S = fftshift(fft2(z_s)); >>figure >>imshow(abs(Z_S),[]) >>colorbar >>figure >>imshow(angle(Z_S),[]) >>colorbar Magnitude (Z_S) Phase (Z_S)