Presentation is loading. Please wait.

Presentation is loading. Please wait.

Lifting Scheme.

Similar presentations


Presentation on theme: "Lifting Scheme."— Presentation transcript:

1 Lifting Scheme

2 The Lifting Scheme - Topics
Reminder:approximations,details Haar wavelet transform Lifting scheme Update Higher order extensions בהרצאה זו נזכיר approximations,details לאחר מכן נדבר על Haar wavelet transform , Lifting scheme, Update, Higher order extensions

3 One Stage Filtering Approximations and details:
The low-frequency content is the most important part in many applications, and gives the signal its identity. This part is called “Approximations” The high-frequency gives the ‘flavor’, and is called “Details” תוכן התדירויות הנמוכות נותן לסיגנל את זהותו-חלק זה נקרא Approximations תוכן התדירויות הגבוהות נותן את הטעם-את הפרטים,הגבולות-נקרא Details

4 Approximations and Details:
Approximations:low-frequency components of the signal Details: high-frequency components Input Signal LPF HPF A כפי שנאמר בשקף הקודם, ה Approximations מרכיבי התדירויות הנמוכות של הסיגנל – לכן הוא High-scale-לוקחים חלון רחב כדי לקבלו(הפוך) וה Details מרכיבי התדירויות הגבוהות של הסיגנל – לכן הוא low-scale בתמונה:סיגנל הקלט עובר LPF וHPF נקבל Approximations ו Details שרטוט: מה-input אנו מעבירים LPF ,HPF ->קליק -> יוצא A =APPROXIMATION ב- LPF ו-d= Details מ- HPF D

5 Decimation A complete one stage block : A* D*
The former process produces twice the data To correct this, we Down sample (or: Decimate) the filter output by two. A complete one stage block : דצימציה:התהליך הקודם יצר פעמיים את המידע:N דגימות קלט יצרו N מקדמי approximations ו N מקדמי Detail. כדי לתקן זאת נעשה Downsample או דצימציה של הפילטר פי 2 ע"י פשוט השלכת כל מקדם שני. שלב שלם נראה כך:חלוקת סיגנל הקלט ל LPF ולHPF ואז דצימציה של כל אחד מהם כפי שהוגדר בשקף הקודם Input Signal LPF HPF A* D*

6 Example*: * Wavelet used: db2
זו דוגמא המתארת סיגנל קלט בעל 1000 דגימות העובר LPF ,HPF לאחר מכן דצימציה נקבל 500 מקדמי DETAILS ו-500 מקדמי APPROXIMATIONS * Wavelet used: db2

7 Multi-level Decomposition
Iterating the decomposition process, breaks the input signal into many lower-resolution components: Wavelet decomposition tree: Low pass filter high pass filter איטרציה של תהליך פירוק זה שוברת את סיגנל הקלט לרכיבים רבים בעלי רזולוציה נמוכה:זה נקרא Wavelet decomposition tree:

8 סיגנל בסיסי (סכום של סינוסים)
S זה הסיגנל עצמו, a5 הוא הapproximations מתאר בקירוב את הסיגנל וניתן לראות 5 סיגנלי דיטייל-תדירויות גבוהות ככל שעולים ברמה התדירות

9 ניתן לראות את הסיגנל והApproximation בכל הרמות וכן את ה-Detail בכל הרמות.

10 A Simple Example: The Haar Wavelet
Consider two neighboring samples a and b of a sequence. - a and b have some correlation. A simple linear transform: The Haar Wavelet:a,b 2 דגימות שכנות של סדרה. לa ו b יש קורלמיה מסוימת שנרצה לנצל.נציע טרנספורם לינארי פשוט שמחליף את a ו b בממוצע שלהם s ובהפרש ביניהם d .הרעיון שאם a ו b בקורלציה גבוהה הערך המוחלט הצפוי של ההפרש ביניהם d יהיה קטן ויכול להיות מיוצג ע"י פחות ביטים.במקרה בו a=b ההפרש פשוט 0 High correlation - small |d|, fewer bits representation. (i.e. a=b,d=0)

11 The Haar Wavelet Con’t No loss of any information
Reconstruction formula of a and b: לא איבדנו אף מידע כי בהינתן s ו d אנו יכולים תמיד לשחזר את a ו b .ציור.נוסחאות שחזור אלה יכולות להמצא ע"י הפיכת מטריצה 2x2 . אבחנה פשוטה זו היא המפתח מאחורי טרנספורם Haar Wavelet . The key behind Haar Wavelet Transform: these reconstruction formulas can be found by inverting a 2x2 matrix.

12 The Haar Wavelet Con’t Signal Sn of 2n sample values Sn,l:
Sn = {Sn,l | 0=< l <= 2n} Apply average (Sn-1) and difference (dn-1) transform onto each pair: a = S2l, b = S2l Sn-1,l = Sn,2l+Sn,2l - 2n-1 pairs (l=0…2n-1) dn-1,l = Sn,2l+1-Sn,2l Recover the original signal Sn from Sn-1 and dn-1 . ניקח סיגנל Sn של 2n ערכי דגימות Sn,l .נוסחה.n = רמת הסיגנל,l = מספר דגימה בתוך רמה מסוימת n . סיגנל הקלט ,בעל 2n דגימות ,מחולק ל2 סיגנלים: Sn-1 עם 2n-1 ממוצעים Sn-1 ו- dn-1 עם 2n-1 הפרשים dn-1,l . בהנתן הממוצעים Sn-1 וההפרשים dn-1 אפשר לשחזר את הסיגנל המקורי Sn. נבצע את טרנספורם הממוצע Sn-1 וטרנספורם ההפרש dn-1 על כל זוג a = S2l, b = S2l+1 יש 2n-1 זוגות כאלה. נציין את התוצאות ע"י Sn-1,l ו - dn-1,l

13 The Haar Wavelet Con’t Sn-1 as Approximations dn-1 as Details
Signal with local coherence - approximations closely resembles the original signal - detail is very small (efficient representation) ניתן להסתכל על הממוצעים Sn-1 כעל Approximations ועל ההפרשים dn-1 כעל Details. אם לסיגנל המקורי יש עקביות לוקלית,כלומר אם הדגימות הן ערכים של פונקציה חלקה approximations מדמים בקירוב את הסיגנל המקורי וה detail קטו מאוד ולכן יכול להיות מיוצג ביעילות

14 The Haar Wavelet Con’t Applying the same transform (averages and differences) to Sn-1 itself. Split Sn-1 to (yet) coarser signal Sn-2 and another difference signal dn-2,each of them contain 2n-2 samples. We can repeat this transform n times till S0 contains only one sample S0,0. This is the Haar transform אנו יכולים ליישם אותו טרנספורם לסיגנל Sn-1 עצמו . ע"י ממוצעים והפרשים,אנו יכולים לחלק אותו ל(עדיין) סיגנל גס 2Sn- ולסיגנל הפרש נוסף dn-2 כשכל אחד מהם מכיל 2n-2 דגימות . אנו יכולים לעשות זאת n פעמים לפני שנגמרות לנו הדגימות . זהו טרנספורם האר.

15 The Haar transform Sn Sn-1 dn-1 Sn-2 dn-2 S1 d1
Structure of the wavelet transform: recursively split into averages and differences Sn-1 dn-1 Sn-2 dn-2 S1 d1 מבנה wavelet transform :באופן רקרסיבי נחלק לממוצעים והפרשים. S0 d0

16 TREE MODE ניתן לראות את עץ פירוק הטרנספורם

17 The Haar transform Con’t
We end up with: - n detail signals dj (0<=j<=n-1), each with 2j coefficients - one signal s0 containing only one sample s0,0 - the average of all the samples of the original signal. נסיים עם:n סיגנלי detail dj עם 0<=j<=n-1 כל אחד עם 2j מקדמים .וסיגנל אחד s0 המכיל רק דגימה אחת s0,0 שהיא הממוצע של כל הדגימות של הסיגנל המקורי.

18 Inverse Haar transform
Start from S0 and dj for 0<=j<n and obtain Sn again. * note that the total number of coefficients after transform is 1 for S0 plus 2j for each dj. (the exact number of samples of the original signal) n-1 1+∑ 2j = 2n j=0 Inverse Haar transform:אנו מתחילים מ S0 ו- dj 0<=j<n ומשיגים את Sn שוב. נשים לב שהמספר הכולל של מקדמים אחרי הטרנספורם הוא 1 ל S0 פלוס 2j לכל j זה מסתכם ל 2n .וזה בדיוק מספר הדגימות של הסיגנל המקורי. (סכום סדרה הנדסית: 1*(2n -1)/(2-1)= 2n -1)

19 The Haar transform d0 d1 dn-2,l dn-1,l S0 S1 S2 … Sn-1,l Sn,l
Structure of the inverse wavelet transform: recursively merge averages and differences. מבנה inverse wavelet transform :באופן רקרסיבי מזג ממוצעים והפרשים.

20 The Haar transform Con’t
The Haar transform can be thought of as applying a NxN matrix (N = 2n) to the signal Sn. - The cost of computing the transform is O(N). (FFT cost is O(NlogN) and linear transformation of an N vector is O(N2)). כל טרנספורם האר יכול להחשב כיישום מט' NXN (N = 2n) לסיגנל Sn מחיר טרנספורם זה הוא O(N). בעוד שפורייה דורש O(NlogN) וטרנספורמציה לינארית של וקטור N דורשת O(N2). הסבר : ע"פ שקף 13ברמה הj-1 זה N ברמה הj-2 זה N/2 ןכך הלאה... סה"כ כשמחברים ייצא 2N סיבוכיות O(N)

21 Haar Transform in-place
We want to overwrite old values with new values. First step: compute the difference: d=b-a and store it in b location. Second step: We use a and d to compute the average: S=a+d/2 and store it in a location. a+ = b/2 ; b -= a Haar Transform in-place: בקטע זה נציג דרך הסתכלות חדשה על טרנספורם האר .החידוש נמצא בדרך בה אנו מחשבים את ההפרש והממוצע של 2 מספרים a ו- b .נניח שאנו רוצים לחשב את כל הטרנספורם במקום,כלומר ,בלי שימוש במקום זיכרון נוסף ע"י כתיבה מחדש של המיקומים שמחזיקים את a ו- b עם הערכים של s ו-d בהתאמה.נציע יישום ב2 צעדים: תחילה נחשב את ההפרש d=b-a ונאחסנו במיקום של b.עכשיו איבדנו את הערך של b.נשתמש בa ובהפרש החדש המחושב כדי למצוא את הממוצע כ: S=a+d/2 זה נותן אותה תוצאה כי: a+d/2=a+(b-a)/2=(a+b)/2 . ונאחסנו במיקום של a .היתרון בחלוקה ל2 צעדים היא שאנו יכולים לכתוב מחדש b עם d ו-a עם s ללא דרישות זכרון נוסף יישום כמו בc- : a- = b/2 ; b += a שאחריו a מכיל את הממוצע ו-b את ההפרש

22 Haar Transform in-place Con’t
Inverse: run code backwards! a- = b/2 ; b+ = a This particular scheme is a simple instance of the lifting scheme אנו יכולים מיד למצוא את האינברס:פשוט נריץ הקוד הנ"ל אחורה (כלומר נשנה את הסדר ונהפוך את הסימנים) זהו מופע פשוט של סכמת הליפטינג.

23 The Lifting Scheme Consider a signal Sn with 2n samples .
Goal: transform the signal into: - a coarser signal Sn-1 - a detail signal dn-1 3 steps: - Split - Predict - Update The Lifting Scheme: בקטע זה נתאר את סכמת הליפטינג בפירוט. סיגנל Sj עם 2j דגימות שאנו רוצים לעשות להם טרנספורם לסיגנל גס Sj-1 ולסיגנל details dj-1 מקרה טיפוסי של טרנספורם ה-wavelet נבנה דרך 3 שלבי lifting :update, Predict, split - -

24 The Lifting Scheme - Split
divide the input data into: - even indexed samples Sn. - odd indexed samples Sn+1. Lazy wavelet transform Split:שלב זה מחלק הסיגנל ל2 סטים לא זהים של דגימות. במקרה שלנו קבוצה אחת מכילה את הדגימות באינדקסים הזוגיים והקבוצה האחרת מכילה את הדגימות באינדקסים האי זוגיים.כל קבוצה מכילה חצי מסה"כ הדגימות שהיו בסיגנל המקורי. החלוקה לזוגי ואי זוגי נקראת Lazy wavelet transform .

25 The Lifting Scheme - Predict
predict the odd elements from the even elements-output detail. Sn-1 Predict: תת הקבוצות הזוגיות והאי זוגיות נפרדות.אם לסיגנל יש מבנה עם קורלציה לוקלית ,תת הקב' הזוגיות והאי זוגיות יהיו בהתאמה גבוהה.במילים אחרות בהנתן אחת מ2 הקב',צריך להיות אפשרי לחזות את האחרת עם דיוק סביר.אנו תמיד משתמשים בסט זוגי לחזות את האי זוגי.שלב הפרדיקט פולט details detail

26 Example – Predict using Haar
The even sample is the prediction for the odd sample. The detail dn-1 is the difference between the odd sample and its predictor: odd sample left neighbouring even sample - predictor dn-1= Sn,2l+1- Sn,2l במקרה של האר החיזוי פשוט במיוחד.דגימה אי זוגית Sj,2l+1 תשתמש בשכנו השמאלי דגימה זוגית Sj,2l כחזאי שלו. ה detail dj-1 יהיה ההפרש בין הדגימות האי זוגיות וחיזויין: dj-1= Sj,2l+1- Sj,2l אם הסיגנל המקורי הוא קבוע אז כל ה- detail יהיו בדיוק 0. detail Predict - Note: perfect if function is constant, detail coefficients zero

27 General Case - Predict dn-1=oddn - P(evenn)
Detail = difference between odd element and predict function calculated from the even elements dn-1=oddn - P(evenn) שלב ה Predict Detail =ההפרש בין האיבר באינדקס האי זוגי ופונקצית החיזוי שלו המחושבת מהאיבר באינדקס הזוגי : dn-1=oddn-1 - P(evenn-1) . P() היא פונק' החיזוי. נעיר שאם ה-predict טוב אז dj ניתן לייצוג ע"י מעט ביטים

28 The Lifting Scheme - Update
follows the predict phase. The approximations Sn-1 (the signal for next step) should maintain the average of the original signal Sn. smoother input for the next step of the wavelet transform. Sn-1 = evenj,i + U( dn-1) Update: מתבצע לאחר שלב ה- predict. ה- approximations , Sn-1 צריך לשמור על ממוצע הסיגנל המקורי Sn. U היא פונקצית update

29 Example – Update Haar Sets Sn-1 to be the average of the even/odd
pair (e.g., the even element si and its odd successor, si+1): Sn-1 = even j,i + odd j, i 2 Haar transform update step: מחליף את ה- approximatins Sn-1 עם הממוצע של הזוג זוגי/אי זוגי.(לדוגמה: האלמנט הזוגי si והעוקב האי זוגי שלו si+1

30 Haar transform update step:
recover the original value (from predict step) : dn-1= oddj,i - evenj,i => oddj,i = evenj,i + dn-1 Substituting this into the average (prev), we get : Sn-1 = even j,i + even j,i + dn-1 2 Sn-1 = even j,I + dn-1 = even + U(dn-1) כאשר הערך dn-1 הוחלף ע"י ההפרש בין האי זוגי והזוגי העוקב שלו בצעד ה predict. שחזור הערך המקורי של האיבר האי זוגי oddj,I .נכניס זאת לחישוב הממוצע ונקבל: באופן כללי יצוג הסיגנל הבא בפורמט כזה(בשקף הקודם).פונקציה U בהאר היא ½. בהאר עשינו ממוצע ב-even וה-odd אך נציג כפונקציה של ה-detail.

31 The Lifting Scheme The averages (even elements) become the input for the next recursive step of the forward transform. Sn-1 Sn-2 הממוצעים(האלמנטים הזוגיים) נהיים הקלט לצעד הרקורסיבי הבא של הטרנספורם. 2 צעדים בטרנספורם Sn dn-2 dn-1

32 שמאל:כאן רואים את הסיגנל והapproximations בכל רמת פירוק
ימין:ניתן לראות את הסיגנל המקורי וכן את הdetails בכל רמות הפירוק

33 The Lifting Scheme In place computation:
- (oddj-1,evenj-1): = Split(Sj) - oddj-1- = P(evenj-1) - evenj-1+ = U(oddj-1) כל זה יכול להיות מחושב במקום:המיקומים הזוגיים יכולים להיכתב מחדש עם הממוצעים והאי זוגיים עם details

34 Inverse Lifting Scheme
ברור כי נוכל לבחור פעולות מורכבות יותר ל-P ו-U וכך לייצר התמרות wavelet שונות. חשוב להבהיר כי לכל בחירה שרירותית של P ו U יש התמרה הפוכה פשוטה שניתנת לרישום כ:

35 Inverse Lifting Scheme-3 steps Undo Update
dn,S0 given recover even samples by subtructing the update info: Sn-1 = evenj,i + U( dn-1) evenj,i = Sn-1 -U(dn-1) Haar: Sn,2l = Sn-1,l - dn-1,l/2 Inverse Lifting Scheme-3 steps:undo update : בהנתן dn S0 ניתן לשחזר את הדגימות האי זוגיות ע"י חיסור המידע המעודכן. evenj,i = Sn-1 -U(dn-1) במקרה של האר:Sn,2l = Sn-1,l - dn-1,l/2

36 Inverse Lifting Scheme - Undo Predict
evenn-1,dn-1 given recover odd samples by adding prediction info: dn-1 =oddn-1 - P(evenn-1) oddn-1= dn-1 + (evenn-1) Haar: Sn,2l+1=dn-1,l+Sn,2l Undo predict: בהנתן evenn-1 ו-dn-1 אנו יכולים לשחזר הדגימות האי זוגיות ע"י הוספת המידע החזוי oddn-1= dn-1 + (evenn-1) במקרה של האר Sn,2l+1=dn-1,l+Sn,2l

37 Inverse Lifting Scheme- Merge
zipper odd and even samples recover original signal-inverse Lazy wavelet: Sn=Merge(evenn-1,oddn-1) Inverse in place Evenj-1 - = U(oddj-1) Oddj-1 + = P(evenj-1) Sj := Merge(oddj-1,evenj-1) Inverse transform: reversing the order of the operations and flipping the signs Merge:: עכשיו שיש לנו הדגימות הזוגיות והאי זוגיות פשוט צריך לאחדן ולשחזר את הסיגנל המקורי.זה אינברס של Lazy wavelet transform.בהנחה שהזוגיים מכילים הממוצע והאי זוגיים מכילים את ההפרש היישום של האינברס טרנספורם:... טרנספורם האינברס לכן תמיד נמצא ע"י הפיכת הסדר של הפעולות והפיכת הסימנים. In place: כל החישובים יכולים להתבצע במקום-חסכון זכרון חשוב

38 Inverse Lifting Scheme
Even values - Undo Update Undo Predict Merge אחת מהתכונות של סכמת הליפטינג הוא שהאינברס שלו הוא מראה של הטרנספורם קדימה שלב האחת מהתכונות של סכמת הליפטינג הוא שהאינברס שלו מראה של הטרנספורם קדימה שלב הmerge מחליף את שלב ה split. + Odd values

39 The Lifting Scheme-Example
Sn = X = [ ] n=8 , n=3 Split: Xe=[ ] Xo=[ ] Pred: averaging neighboures (edges:simple subtruction of one neighbour-can fix by zero padding or wrap around or reflection) Pred{Xe} = [ ] dn-1 = d2 = Xo- Pred{Xe} = [ ] דוגמא:ניקח את הסדרה הבאה ונפעיל עליה את טרנספורם הליפטינג.ההפרדה לזוגיים ואי זוגיים תיתן : Sn-1 ו- Xo .לאחר החיזוי נקבל dn-1 .

40 The Lifting Scheme-Example
Update: Sn-1= even j,I + dn-1,l 2 Xe=[ ] dn-1 = [ ] S2 = even+d2/2 = [ ] We repeat recursively: Split: S2 is splitted simillarly: Xe=[4 8] Xo=[1.5 6] Pred{Xe} = [4 6] dn-2 = d1 = Xo- Pred{Xe} = [-2.5 0] S1 = even+d1/2 = [2.75 8] Xe=[8] Xo=[2.75] Pred{Xe} = [8] dn-3 = d0 = Xo- Pred{Xe} = [-5.25] S0 = even+d0/2 = [5.375] שלב Update כדי לשמור על הממוצע נעדכן את הסיגנל לרמה הבאה Sn-1 להיות זוגי פלוס פונקצית העדכון שבמקרה זה של האר היא- 2/ dn נזור באופן רקורסיבי על התהליך: נפרק את Sn-1 באופן דומה ונקבל:...

41 The Lifting Scheme-Example
The pyramid will be: d2 = [ ] d1 = [-2.5 0] d0 = [-5.25] S0 = [5.375] Good result(most of elements are 0). לכן פירמידת המוצא תהיה: וזוהי תוצאה טובה יותר כי מרבית האיברים הם אפסים.למעשה,גם את בעיית הקצה השמאלי בוקטורי שגיאת החיזוי ניתן לפתור ע"י שימוש ב2 שכנים וביצוע אקסטרפולציה

42 The Lifting Scheme- Inverse Example
We will recover the original signal from the pyramid: The pyramid : d2 = [ ] , d1 = [-2.5 0], d0 = [-5.25] , S0 = [5.375] Inverse transform: Xe =S0 – d0/2 = [8] Pred{Xe} = [8] Xo=d0+Pred{Xe} = [2.75] S1 = [2.75 8]

43 The Lifting Scheme- Inverse Example
Xe=S1 – d1/2 = [4 8] Pred{Xe} = 4 6 Xo=d1+ Pred{Xe} = [1.5 6] S2 = [ ] Xe=S2– d2/2 = [ ] Pred{Xe} = Xo=d0+ Pred{Xe} = [ ] S3 = [ ] Perfect reconstruction!

44 The Lifting Scheme Suppose Predict and Update are linear.
description of their operation as matrices P and U: Xonew=Xo-PXe Xenew =Xe+UXonew=Xe+UXo-UPXe or: Xonew I P Xo Xenew U I-UP Xe בדוגמא הקודמת לא תוארה סכימת הליפטינג המלאה.לצורך השלמתה נבצע עדכון לערך האיברים הזוגיים הרעיון בבסיס צעד נוסף זה הוא להיטיב את צורת האות Xe כך שיהיה חלק יותר וככזה בעל פוטנציאל לדחיסות טוב יותר לצעד הבא.זהו המקור לשם lifting כי פעולה זו היא שהופכת את המערכת להתמרת wavelet . אם נניח כי פעולות predict ו update הן לינאריות,נוכל לתאר את פעולתן כמטריצות P ו-U המכפילות וקטורים.נקבל ... או ברישום נוח יותר:...

45 The Lifting Scheme - Example 2
Assume: P=I and U=0.5I Xonew I -p Xo I I Xo Xenew U I-UP Xe I 0.5I Xe Odd elements Even elements differences average of neighbouring pairs נחבר P=I ו-U=0.5I ונקבל:... פירוש הדבר שמוצא האי זוגיים יהיה הפרשים של צמדים סמוכים,ומוצא הזוגיים יהיה ממוצעם.

46 An example: linear wavelet transform
Haar - simple and fast wavelet transform Limitations - not smooth enough: blocky Erasing Haar Coefficients: Fourier analysis not always applicable האר:טרנספורם wavelet פשוט ומהיר מגבלות:לא מספיק חלק:בלוקיזציה פורייה:לא תמיד ישים

47 The Lifting Scheme Lifting Build more powerful versions An example
linear wavelet transform ליפטינג:בניית גרסאות טובות יותר דוגמא: לינאר wavelet transform

48 linear wavelet transform – Prediction
Linear Prediction - Use even on either side - Predictor for odd sample Sn,2l+1: average of neighboring samples:on left Sn,2l, on right Sn,2l+2 לדגימות האי זוגיות Sn,2l+1 ניתן לחזאי להיות הממוצע של הדגימות השכנות משמאל Sn,2l והדגימות השכנות מימין Sn,2l+2 .(זוהי פונקצייה פיסוויז לינאר)

49 linear wavelet transform - Prediction
אם הסיגנל המקורי היה פולינום מדרגה 1 כל הפרטים הם 0 .מקדמי הדיטייל מודדים לאיזה extent הסיגנל המקורי אינו לינארי .הערך המצופה של גודלם קטן, במושגי תוכן תדירות מקדמי הדיטייל לוכדים תדירויות גבוהות הקיימות בסיגנל המקורי. הדיטייל במקומות האי זוגיים שונה מאפס . זו דוגמא של חיזוי לינארי :מקדמי ה detail מוגדרים כהפרש בין החיזוי והערך האמיתי במקומות האי זוגיים-אנו עלולים לחשוב על זה ככשלון של הסיגנל להיות פולינום מדרגה ראשונה

50 linear wavelet transform
Even values are subsampled אנו מוודאים תחילה שהממוצע של הסיגנל נשמר או ש-מתקיים שקף הבא->

51 linear wavelet transform - Update
Sets Sn-1 to be the average of even and odd elements 2n elements => 2n-1 even elements/averages Example: 2n=8 Update: מתבצע לאחר שלב ה- predict. ה- approximations , Sn-1 צריך לשמור על ממוצע הסיגנל המקורי Sn. מחליף את ה- approximatins Sn-1 עם הממוצע של הזוג זוגי/אי זוגי.(לדוגמה: האלמנט הזוגי si והעוקב האי זוגי שלו si+1 אם כאן יש 2n אלמנטים יהיו 2n-1 אלמנטים זוגיים או ממוצעים אחרוג לרגע מהנושא ואסביר עקרון פשוט שצריך להתקיים כתנאי לשמירת הממוצע שעליו תתבסס בהמשך חישוב פונקציית ה- Update דוגמה :2n=8

52 linear wavelet transform - Update Ex.
Example: 2n=8 - Sj-1 ברמה הבאה

53 linear wavelet transform - Update Ex.
sum of the sj-1 elements is equal to the sum of the sj elements, divided by two: סכום של אלמנטים Sj-1 (רמה הבאה) שווה לסכום של האלמנטים (רמה נוכחית) Sj חלקי 2.

54 linear wavelet transform - Update
Signal average is not preserved Update Sn-1,l using previously compute detail signals dn-1,l. Using Neighboring wavelet coefficients: Sn-1,l=Sn,2l+A(dn-1,l-1+dn-1,l) ראינו שממוצע הסיגנל לא נשמר לכן אנו מעדכנים את Sn-1 בשימוש בסיגנל ה detail הקודם המחושב dn-1,l.שוב אנו משתמשים במקדמי הגל השכנים ומציעים Update מהצורה:Sn-1,l=Sn,2l+A(dn-1,l-1+dn-1,l) A=1/4 כדי לשמור על הממוצע ע"י חזרה שוב ושוב על סכמה זו אנו מקבלים טרנספורם wavelet שלם.

55 computing A Update Sn-1,l = Sn,2l+A(dn-1,l-1+dn-1,l)
A=1/4 to maintain the average Inverse-easy to compute: Sn,2l = Sn-1,l - 1/4(dn-1,l-1+dn-1,l) to recover even Sn,2l+1=dn,l+1/2(Sn,2l+Sn,2l+2) to recover odd samples האינברס קל לחישוב בהנתן Sj,2l=Sj-1,l-1/4(dj-1,l-1+dj-1,l) לשחזור הזוגיים ו: Sj,2l+1=dj,l+1/2(Sj,2l+Sj,2l+2) לשחזור הדגימות האי זוגיות. computing A

56 linear wavelet transform
כפי שראינו לפני כמה שקפים ניתן לראות בשקף זה את כל הצעדים:לאחר הPredict – ה-Detail שנשאר לנו ->למעלה .ואחרי עדכון הסיגנל לרמה הבאה נקבל:ציור למטה. Original signal

57 linear wavelet transform
זהו linear wavelet transform מלא: בתחילה ה-Split ל- even ו- odd אח"כ ה- Predict של ה-Odd מה-even וחיסור ה-odd מחיזויים שייתן לנו detail קטן מהאלמנטים האי זוגיים עצמם. לאחר מכן נפעיל פונקצית Update על Details ונוסיף זאת לאלמנטים הזוגיים.בסוף יוצא Detail dn-1 וסיגנל Sn-1 שיהיה סיגנל הקלט מוחלק לרמה הבאה

58 linear wavelet transform
Extend - build higher polynomial order predictors - Use more (D) neighbors on left and right הרחבה:נבנה חזאים פולינומים מסדר גבוה יותר נשתמש ביותר שכנים משמאל ומימין

59 - Cubic polynom interpolating 4 values
Example: - Cubic polynom interpolating 4 values - Bilinear Interpolation: the assigned value is an intermediate value between the 4 nearest pixels : aweighted sum of the 4 nearest pixels - Each weight is proportional to the distance from each existing pixel. effective weights: -1/16 9/16 9/16 -1/16 דוגמה: Cubic polynom אינטרפולציה של 4 ערכים Bilinear Interpolation: הערך החזוי הוא אינטרפולציה של 4 פיקסלים קרובים ביותר:סכום משוקלל של 4 פיקסלים קרובים ביותר-כל משקל פרופורציונלי למרחק מכל פיקסל קיים. משקלים אפקטיביים: -1/16 9/16 9/16 -1/16

60 Higher Order Prediction
Linear :חיזוי לינארי ע"פ ממוצע שני ערכי דגימות נחזה הערך ביניהן. Cubic : חיזוי ע"פ אינטרפולציה משוקללת של 4 ערכים,יותר מדויק=>חיזוי טוב יותר

61 Lifting Scheme - Predict
Haar The even sample is the prediction for the odd sample. dn-1= Sn,2l+1- Sn,2l Linear average of neighboring samples:on dn-1= Sn,2l+1-1/2(S2n+S2n+2) בשלב ה-predict אפשר לבחור פונקציות חיזוי שונות אם ניקח פונקצית חיזוי פשוטה שאומרת שנחזה ה – details Bilinear intermediate value between the 4 nearest pixels

62 Summary Lifting Scheme - construction of transforms - Haar example
- rewriting Haar in place Three steps - split - Predict - Update לסיכום,דיברנו בהרצאה זו על Lifting Scheme :בניית טרנספורמים,HAAR , Haar in place. 3 צעדי הטרנספורם:split, Predict, Update

63 Summary Predict - detail coefficient is failure of prediction Update
- smooth coefficient to preserve average - B spline C2-ensure smoothness Higher order extensions - increase order of prediction and update דיברנו על שלב ה predict ועל כשלון הpredict הלינארי בפונקציית הפיסוויז לינאר וכן על שלב ה Update בו אנו מחליקים הסיגנל על מנת לשמור על ממוצעו. B spline גזיר פעמיים ברציפות. בפיסייז לינאר רציף אבל נגזרת אינה רציפה. כמה שנדרוש גזירות ברציפות-יותר טוב

64 The End

65 linear wavelet transform - Update (why A=1/4)
חישוב A כאן j+1 זה הרמה הבאה.מי שירצה אשמח להסביר אחרי ההרצאה-זהו בסה"כ פיתוח מתמטי. =1/2∑Sj[n]


Download ppt "Lifting Scheme."

Similar presentations


Ads by Google