1 / 41

Dr. J. Shanbehzadeh Shanbehzadeh@gmail M.HosseinKord

Machine Vision. Lecture 07 – Pyramids. Dr. J. Shanbehzadeh Shanbehzadeh@gmail.com M.HosseinKord. Science and Research Branch of Islamic Azad University. 1/49 slides. Table of Contents. 7-1-1) Reduce 7-1-2) Expand. 7-4) Interpolation. 7-3-1) Image compression

lavi
Download Presentation

Dr. J. Shanbehzadeh Shanbehzadeh@gmail M.HosseinKord

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Machine Vision Lecture 07 – Pyramids Dr. J. Shanbehzadeh Shanbehzadeh@gmail.com M.HosseinKord Science and Research Branch of Islamic Azad University 1/49 slides

  2. Table of Contents 7-1-1) Reduce 7-1-2) Expand 7-4) Interpolation 7-3-1) Image compression 7-3-2) Image composting

  3. 7-1)Gaussian Pyramids Lowest Resolution 7-1) Gaussian Pyramids 7-1-1) Reduce 7-1-2) Expand 7-1-3) Convolution Mask 7-2) Laplacian Pyramids 7-3) Applications of Laplacian pyramids 7-3-1) Image compression 7-3-2) Image composting 7-4) interpolation 7-5) Optical flow using Pyramids . . . Original Img Highest Resolution

  4. 7-1-1) Reduce 7-1) Gaussian Pyramids 7-1-1) Reduce 7-1-2) Expand 7-1-3) Convolution Mask 7-2) Laplacian Pyramids 7-3) Applications of Laplacian pyramids 7-3-1) Image compression 7-3-2) Image composting 7-4) interpolation 7-5) Optical flow using Pyramids Level l Level l-1

  5. 7-1-1) Reduce- Convolution 7-1) Gaussian Pyramids 7-1-1) Reduce 7-1-2) Expand 7-1-3) Convolution Mask 7-2) Laplacian Pyramids 7-3) Applications of Laplacian pyramids 7-3-1) Image compression 7-3-2) Image composting 7-4) interpolation 7-5) Optical flow using Pyramids

  6. 7-1-1) Reduce (1D):Example Convolution Mask: [w(-2), w(-1), w(0), w(1), w(2)] 7-1) Gaussian Pyramids 7-1-1) Reduce 7-1-2) Expand 7-1-3) Convolution Mask 7-2) Laplacian Pyramids 7-3) Applications of Laplacian pyramids 7-3-1) Image compression 7-3-2) Image composting 7-4) interpolation 7-5) Optical flow using Pyramids i = 2

  7. Convolution Mask: [w(-2), w(-1), w(0), w(1), w(2)] [ c , b , a , b , c ] 7-1-1) Reduce (1D) 7-1) Gaussian Pyramids 7-1-1) Reduce 7-1-2) Expand 7-1-3) Convolution Mask 7-2) Laplacian Pyramids 7-3) Applications of Laplacian pyramids 7-3-1) Image compression 7-3-2) Image composting 7-4) interpolation 7-5) Optical flow using Pyramids gl = REDUCE (gl-1)

  8. 7-1-2) Expand 7-1) Gaussian Pyramids 7-1-1) Reduce 7-1-2) Expand 7-1-3) Convolution Mask 7-2) Laplacian Pyramids 7-3) Applications of Laplacian pyramids 7-3-1) Image compression 7-3-2) Image composting 7-4) interpolation 7-5) Optical flow using Pyramids n=1 n=2 Notice:

  9. 7-1-2) Expand(1D) [w(-2), w(-1), w(0), w(1), w(2)] [ c , b , a , b , c ] 7-1) Gaussian Pyramids 7-1-1) Reduce 7-1-2) Expand 7-1-3) Convolution Mask 7-2) Laplacian Pyramids 7-3) Applications of Laplacian pyramids 7-3-1) Image compression 7-3-2) Image composting 7-4) interpolation 7-5) Optical flow using Pyramids i = 4 Involved weights  [c , a , c]

  10. 7-1-2) Expand(1D) [w(-2), w(-1), w(0), w(1), w(2)] [ c , b , a , b , c ] 7-1) Gaussian Pyramids 7-1-1) Reduce 7-1-2) Expand 7-1-3) Convolution Mask 7-2) Laplacian Pyramids 7-3) Applications of Laplacian pyramids 7-3-1) Image compression 7-3-2) Image composting 7-4) interpolation 7-5) Optical flow using Pyramids i = 3 Involved weights  [b , b]

  11. Expand 7-1) Gaussian Pyramids 7-1-1) Reduce 7-1-2) Expand 7-1-3) Convolution Mask 7-2) Laplacian Pyramids 7-3) Applications of Laplacian pyramids 7-3-1) Image compression 7-3-2) Image composting 7-4) interpolation 7-5) Optical flow using Pyramids

  12. Convolution Mask 7-1) Gaussian Pyramids 7-1-1) Reduce 7-1-2) Expand 7-1-3) Convolution Mask 7-2) Laplacian Pyramids 7-3) Applications of Laplacian pyramids 7-3-1) Image compression 7-3-2) Image composting 7-4) interpolation 7-5) Optical flow using Pyramids • Separable • •Symmetric

  13. Convolution Mask 7-1) Gaussian Pyramids 7-1-1) Reduce 7-1-2) Expand 7-1-3) Convolution Mask 7-2) Laplacian Pyramids 7-3) Applications of Laplacian pyramids 7-3-1) Image compression 7-3-2) Image composting 7-4) interpolation 7-5) Optical flow using Pyramids • The sum of mask should be 1. •All nodes at a given level must contribute the same total weight to the nodes at the next higher level.

  14. Convolution Mask 7-1) Gaussian Pyramids 7-1-1) Reduce 7-1-2) Expand 7-1-3) Convolution Mask 7-2) Laplacian Pyramids 7-3) Applications of Laplacian pyramids 7-3-1) Image compression 7-3-2) Image composting 7-4) interpolation 7-5) Optical flow using Pyramids c a b c b a + 2b + 2c = 1 a + 2c = 2b b= ¼

  15. Convolution Mask 7-1) Gaussian Pyramids 7-1-1) Reduce 7-1-2) Expand 7-1-3) Convolution Mask 7-2) Laplacian Pyramids 7-3) Applications of Laplacian pyramids 7-3-1) Image compression 7-3-2) Image composting 7-4) interpolation 7-5) Optical flow using Pyramids a= 0.4 GAUSSIAN a= 0.5 TRINGULAR

  16. Gaussian Mask 7-1) Gaussian Pyramids 7-1-1) Reduce 7-1-2) Expand 7-1-3) Convolution Mask 7-2) Laplacian Pyramids 7-3) Applications of Laplacian pyramids 7-3-1) Image compression 7-3-2) Image composting 7-4) interpolation 7-5) Optical flow using Pyramids

  17. Gaussian Pyramid 7-1) Gaussian Pyramids 7-1-1) Reduce 7-1-2) Expand 7-1-3) Convolution Mask 7-2) Laplacian Pyramids 7-3) Applications of Laplacian pyramids 7-3-1) Image compression 7-3-2) Image composting 7-4) interpolation 7-5) Optical flow using Pyramids

  18. Gaussian Pyramid 7-1) Gaussian Pyramids 7-1-1) Reduce 7-1-2) Expand 7-1-3) Convolution Mask 7-2) Laplacian Pyramids 7-3) Applications of Laplacian pyramids 7-3-1) Image compression 7-3-2) Image composting 7-4) interpolation 7-5) Optical flow using Pyramids

  19. Laplacian Pyramids

  20. Laplacian Pyramids 7-1) Gaussian Pyramids 7-1-1) Reduce 7-1-2) Expand 7-1-3) Convolution Mask 7-2) Laplacian Pyramids 7-3) Applications of Laplacian pyramids 7-3-1) Image compression 7-3-2) Image composting 7-4) interpolation 7-5) Optical flow using Pyramids • Similar to edge detected images. • Most pixels are zero. • Can be used for image compression. L1 = g1 – EXPAND[g2] L2 = g2 – EXPAND[g3] L3 = g3 – EXPAND[g4] • L4= g4

  21. Laplacian Pyramids L1 = g1 – EXPAND[g2] L2 = g2 – EXPAND[g3] L3 = g3 – EXPAND[g4] • L4= g4 Lower in size and resolution 7-1) Gaussian Pyramids 7-1-1) Reduce 7-1-2) Expand 7-1-3) Convolution Mask 7-2) Laplacian Pyramids 7-3) Applications of Laplacian pyramids 7-3-1) Image compression 7-3-2) Image composting 7-4) interpolation 7-5) Optical flow using Pyramids Gaussian Pyramid Laplacian Pyramid

  22. Applications of Laplacian pyramids

  23. Image compression •Compute Gaussian pyramid •Compute Laplacian pyramid •Code Laplacian pyramid 7-1) Gaussian Pyramids 7-1-1) Reduce 7-1-2) Expand 7-1-3) Convolution Mask 7-2) Laplacian Pyramids 7-3) Applications of Laplacian pyramids 7-3-1) Image compression 7-3-2) Image composting 7-4) interpolation 7-5) Optical flow using Pyramids

  24. Image compression 7-1) Gaussian Pyramids 7-1-1) Reduce 7-1-2) Expand 7-1-3) Convolution Mask 7-2) Laplacian Pyramids 7-3) Applications of Laplacian pyramids 7-3-1) Image compression 7-3-2) Image composting 7-4) interpolation 7-5) Optical flow using Pyramids • Decode Laplacian pyramid. • Compute Gaussian pyramid from Laplacian pyramid. • g1 is reconstructed image.

  25. Image Compression (Entropy) 7-1) Gaussian Pyramids 7-1-1) Reduce 7-1-2) Expand 7-1-3) Convolution Mask 7-2) Laplacian Pyramids 7-3) Applications of Laplacian pyramids 7-3-1) Image compression 7-3-2) Image composting 7-4) interpolation 7-5) Optical flow using Pyramids 7.6 4.4 0.77 5.0 1.9 5.6 3.3 6.2 4.2

  26. Image Compression 7-1) Gaussian Pyramids 7-1-1) Reduce 7-1-2) Expand 7-1-3) Convolution Mask 7-2) Laplacian Pyramids 7-3) Applications of Laplacian pyramids 7-3-1) Image compression 7-3-2) Image composting 7-4) interpolation 7-5) Optical flow using Pyramids 1.58 0.73

  27. Combining Apple & Orange 7-1) Gaussian Pyramids 7-1-1) Reduce 7-1-2) Expand 7-1-3) Convolution Mask 7-2) Laplacian Pyramids 7-3) Applications of Laplacian pyramids 7-3-1) Image compression 7-3-2) Image composting 7-4) interpolation 7-5) Optical flow using Pyramids

  28. Algorithm • • Generate Laplacian pyramid Lo of orange image. • • Generate Laplacian pyramid La of apple • image. • • Generate Laplacian pyramid Lc by • – copying left half of nodes at each level from apple • and • – right half of nodes from orange pyramids. • • Reconstruct combined image from Lc. 7-1) Gaussian Pyramids 7-1-1) Reduce 7-1-2) Expand 7-1-3) Convolution Mask 7-2) Laplacian Pyramids 7-3) Applications of Laplacian pyramids 7-3-1) Image compression 7-3-2) Image composting 7-4) interpolation 7-5) Optical flow using Pyramids

  29. Interpolation

  30. Interpolation 7-1) Gaussian Pyramids 7-1-1) Reduce 7-1-2) Expand 7-1-3) Convolution Mask 7-2) Laplacian Pyramids 7-3) Applications of Laplacian pyramids 7-3-1) Image compression 7-3-2) Image composting 7-4) interpolation 7-5) Optical flow using Pyramids

  31. 1‐D Interpolation 7-1) Gaussian Pyramids 7-1-1) Reduce 7-1-2) Expand 7-1-3) Convolution Mask 7-2) Laplacian Pyramids 7-3) Applications of Laplacian pyramids 7-3-1) Image compression 7-3-2) Image composting 7-4) interpolation 7-5) Optical flow using Pyramids 1=< x =<2

  32. 2‐D Interpolation 7-1) Gaussian Pyramids 7-1-1) Reduce 7-1-2) Expand 7-1-3) Convolution Mask 7-2) Laplacian Pyramids 7-3) Applications of Laplacian pyramids 7-3-1) Image compression 7-3-2) Image composting 7-4) interpolation 7-5) Optical flow using Pyramids Bilinear

  33. Bi‐linear Interpolation 7-1) Gaussian Pyramids 7-1-1) Reduce 7-1-2) Expand 7-1-3) Convolution Mask 7-2) Laplacian Pyramids 7-3) Applications of Laplacian pyramids 7-3-1) Image compression 7-3-2) Image composting 7-4) interpolation 7-5) Optical flow using Pyramids

  34. Optical flow using Laplacian Pyramid

  35. Why Lucas Kanade with Pyramids? • Horn-Schunck and Lucas-Kanade optical method works only for small motion. • If object moves faster, the brightness changes rapidly, 2x2 or 3x3 masks fail to estimate spatiotemporal derivatives. • Pyramids can be used to compute large optical flow vectors. 7-1) Gaussian Pyramids 7-1-1) Reduce 7-1-2) Expand 7-1-3) Convolution Mask 7-2) Laplacian Pyramids 7-3) Applications of Laplacian pyramids 7-3-1) Image compression 7-3-2) Image composting 7-4) interpolation 7-5) Optical flow using Pyramids

  36. Lucas Kanade with Pyramids Lucas Kanade Lucas Kanade 7-1) Gaussian Pyramids 7-1-1) Reduce 7-1-2) Expand 7-1-3) Convolution Mask 7-2) Laplacian Pyramids 7-3) Applications of Laplacian pyramids 7-3-1) Image compression 7-3-2) Image composting 7-4) interpolation 7-5) Optical flow using Pyramids Interpolation LK for highest level of Laplacian pyramid  ui , vi Do the interpolation  u*i-1 , v*i-1 Multiply by 2  u*i-1 , v*i-1 Calculate ft according to displacement of u*i-1 , v*i-1 LK for level l-1 of Laplacian pyramid  u’i-1 , v’i-1 Accurate value of Optical flow is  ui-1 = u*i-1 + u’i-1 vi-1 = v*i-1 + v’i-1

  37. Laplacian Pyramid 7-1) Gaussian Pyramids 7-1-1) Reduce 7-1-2) Expand 7-1-3) Convolution Mask 7-2) Laplacian Pyramids 7-3) Applications of Laplacian pyramids 7-3-1) Image compression 7-3-2) Image composting 7-4) interpolation 7-5) Optical flow using Pyramids

  38. Laplacian Pyramid 7-1) Gaussian Pyramids 7-1-1) Reduce 7-1-2) Expand 7-1-3) Convolution Mask 7-2) Laplacian Pyramids 7-3) Applications of Laplacian pyramids 7-3-1) Image compression 7-3-2) Image composting 7-4) interpolation 7-5) Optical flow using Pyramids

  39. Laplacian Pyramid 7-1) Gaussian Pyramids 7-1-1) Reduce 7-1-2) Expand 7-1-3) Convolution Mask 7-2) Laplacian Pyramids 7-3) Applications of Laplacian pyramids 7-3-1) Image compression 7-3-2) Image composting 7-4) interpolation 7-5) Optical flow using Pyramids

  40. Laplacian Pyramid 7-1) Gaussian Pyramids 7-1-1) Reduce 7-1-2) Expand 7-1-3) Convolution Mask 7-2) Laplacian Pyramids 7-3) Applications of Laplacian pyramids 7-3-1) Image compression 7-3-2) Image composting 7-4) interpolation 7-5) Optical flow using Pyramids

  41. Laplacian Pyramid 7-1) Gaussian Pyramids 7-1-1) Reduce 7-1-2) Expand 7-1-3) Convolution Mask 7-2) Laplacian Pyramids 7-3) Applications of Laplacian pyramids 7-3-1) Image compression 7-3-2) Image composting 7-4) interpolation 7-5) Optical flow using Pyramids

More Related