SlideShare a Scribd company logo
1 of 32
Download to read offline
Robert Collins
CSE486, Penn State




                            Lecture 17:
                     Mosaicing and Stabilization
Robert Collins
CSE486, Penn State
                        Recall: Planar Projection
                                                      Pixel coords
                     Internal                     u
                     params

 Perspective                               v
 projection
                            y
                                          Homography
                                x




                                                      Point on plane
                         Rotation + Translation
Robert Collins
CSE486, Penn State
                         Recall: Projective (un)Warping




                                       H

  from Hartley & Zisserman

                     Source Image          Destination image
Robert Collins

                     Recall : Planar Projection
CSE486, Penn State




                           H1        H2




                                H
Robert Collins
CSE486, Penn State
                       Applications: Stabilization

         Given a sequence of video frames, warp them
         into a common image coordinate system.



                 k-2      k-1    frame k      k+1   k+2

                                destination
                                  frame

         This “stabilizes” the video to appear as if the
         camera is not moving.
Robert Collins
CSE486, Penn State
                     Stabilization Example




                                             VIVID project
Robert Collins
CSE486, Penn State
                       Stabilization by Chaining
       What if the reference image does not overlap with all the
       source images? As long as there are pairwise overlaps, we
       can chain (compose) pairwise homographies.
                       H40 = H10 * H21 * H32 * H43

                     H10         H21         H32         H43

             frame k       k+1         k+2         k+3     k+4

            destination

                 Not recommended for long sequences, as
                 alignment errors accumulate over time.
Robert Collins
CSE486, Penn State
                           Applications: Mosaicing
               Source 1       Destination image    Source 2

                               H1                 H2


from Hartley & Zisserman




                                    Mosaic
Robert Collins
CSE486, Penn State
                     Note on Planar Mosaicing


                Assumes scene is roughly planar.

                What if scene isn’t planar? Alignment
                 will not be good if significant 3D relief

                        “Ghosting”
Robert Collins
CSE486, Penn State
                            Ghosting Example

                     Source image       Reference image
                                    H
Robert Collins
CSE486, Penn State
                     Ghosting Example (cont)
                             Mosaic
Robert Collins

                 Mosaics from Rotating Cameras
CSE486, Penn State




                However, there is a mitigating factor
                in regards to ghosting…

                Images taken from a rotating camera
                are related by a 2D homography…


                     regardless of scene structure!
Robert Collins

               Rotating Camera (top-down view)
CSE486, Penn State
Robert Collins

               Rotating Camera (top-down view)
CSE486, Penn State
Robert Collins

               Rotating Camera (top-down view)
CSE486, Penn State
Robert Collins

               Rotating Camera (top-down view)
CSE486, Penn State



               Rays in camera coord system are invariant!
Robert Collins

               Rotating Camera (top-down view)
CSE486, Penn State



               Rays in camera coord system are invariant!
Robert Collins

               Rotating Camera (top-down view)
CSE486, Penn State



               Rays in camera coord system are invariant!
Robert Collins
CSE486, Penn State
                     Special Case : Rotating Camera
                        Internal
                        params     Projection   Relative R,T




                       Relative Rotation
                       of camera                Translation is 0
                                                This is important!
Robert Collins
CSE486, Penn State
                     Special Case : Rotating Camera
                        Internal
                        params     Projection   Relative R,T
Robert Collins
CSE486, Penn State    Relations among Images
                     Taken by Rotating Camera

     Image 1

                                       Same ray!

     Image 2


                                        -1
Robert Collins
CSE486, Penn State
                            Mosaicing Example
                     Original Images (from a pan/tilt camera)




                            Panoramic (Mosaic) View
Robert Collins
CSE486, Penn State
                     One more detail: Blending!
Robert Collins
CSE486, Penn State
                        Approaches to Blending
         How to combine colors in area of overlap?
           1) Straight averaging P = (P1 + P2) / 2

           2) Feathering P = (w1*P1 + w2*P2 ) / (w1+w2)
                     With wi being distance from image border

           3)   Equalize intensity statistics (gain, offset)
Robert Collins
CSE486, Penn State
                     Before and After Blending
Robert Collins
CSE486, Penn State
                     360 Degree Panoramas?


         Problem: Can’t just choose a reference image
         to map all other images to.

         Solution: Use cylindrical or spherical mosaic
         surface rather than a plane.
Robert Collins
CSE486, Penn State
                     Panorama Input images




Sarnoff
Robert Collins
CSE486, Penn State
                     Spherical Panorama Result




Sarnoff
Robert Collins
CSE486, Penn State
                     Panorama Unwarped




Sarnoff
Robert Collins
CSE486, Penn State
                          Quicktime VR




      This example from www.panoguide.com/gallery/

  Also big list at http://www.multimedialibrary.com/diana/qtvr_sites.asp
Robert Collins
CSE486, Penn State
                     Quicktime VR
Robert Collins
CSE486, Penn State
                        Quicktime VR




        This example from www.ems.psu.edu/~fraser/qtvr/

More Related Content

Similar to CSE486 Lecture 17: Mosaicing and Stabilization

Lecture31
Lecture31Lecture31
Lecture31zukun
 
Lecture22
Lecture22Lecture22
Lecture22zukun
 
Lecture01
Lecture01Lecture01
Lecture01zukun
 
Lecture13
Lecture13Lecture13
Lecture13zukun
 
Lecture19
Lecture19Lecture19
Lecture19zukun
 
Lecture28
Lecture28Lecture28
Lecture28zukun
 
Lecture28
Lecture28Lecture28
Lecture28zukun
 
Lecture21
Lecture21Lecture21
Lecture21zukun
 
Lecture21
Lecture21Lecture21
Lecture21zukun
 
Lecture09
Lecture09Lecture09
Lecture09zukun
 

Similar to CSE486 Lecture 17: Mosaicing and Stabilization (10)

Lecture31
Lecture31Lecture31
Lecture31
 
Lecture22
Lecture22Lecture22
Lecture22
 
Lecture01
Lecture01Lecture01
Lecture01
 
Lecture13
Lecture13Lecture13
Lecture13
 
Lecture19
Lecture19Lecture19
Lecture19
 
Lecture28
Lecture28Lecture28
Lecture28
 
Lecture28
Lecture28Lecture28
Lecture28
 
Lecture21
Lecture21Lecture21
Lecture21
 
Lecture21
Lecture21Lecture21
Lecture21
 
Lecture09
Lecture09Lecture09
Lecture09
 

More from zukun

My lyn tutorial 2009
My lyn tutorial 2009My lyn tutorial 2009
My lyn tutorial 2009zukun
 
ETHZ CV2012: Tutorial openCV
ETHZ CV2012: Tutorial openCVETHZ CV2012: Tutorial openCV
ETHZ CV2012: Tutorial openCVzukun
 
ETHZ CV2012: Information
ETHZ CV2012: InformationETHZ CV2012: Information
ETHZ CV2012: Informationzukun
 
Siwei lyu: natural image statistics
Siwei lyu: natural image statisticsSiwei lyu: natural image statistics
Siwei lyu: natural image statisticszukun
 
Lecture9 camera calibration
Lecture9 camera calibrationLecture9 camera calibration
Lecture9 camera calibrationzukun
 
Brunelli 2008: template matching techniques in computer vision
Brunelli 2008: template matching techniques in computer visionBrunelli 2008: template matching techniques in computer vision
Brunelli 2008: template matching techniques in computer visionzukun
 
Modern features-part-4-evaluation
Modern features-part-4-evaluationModern features-part-4-evaluation
Modern features-part-4-evaluationzukun
 
Modern features-part-3-software
Modern features-part-3-softwareModern features-part-3-software
Modern features-part-3-softwarezukun
 
Modern features-part-2-descriptors
Modern features-part-2-descriptorsModern features-part-2-descriptors
Modern features-part-2-descriptorszukun
 
Modern features-part-1-detectors
Modern features-part-1-detectorsModern features-part-1-detectors
Modern features-part-1-detectorszukun
 
Modern features-part-0-intro
Modern features-part-0-introModern features-part-0-intro
Modern features-part-0-introzukun
 
Lecture 02 internet video search
Lecture 02 internet video searchLecture 02 internet video search
Lecture 02 internet video searchzukun
 
Lecture 01 internet video search
Lecture 01 internet video searchLecture 01 internet video search
Lecture 01 internet video searchzukun
 
Lecture 03 internet video search
Lecture 03 internet video searchLecture 03 internet video search
Lecture 03 internet video searchzukun
 
Icml2012 tutorial representation_learning
Icml2012 tutorial representation_learningIcml2012 tutorial representation_learning
Icml2012 tutorial representation_learningzukun
 
Advances in discrete energy minimisation for computer vision
Advances in discrete energy minimisation for computer visionAdvances in discrete energy minimisation for computer vision
Advances in discrete energy minimisation for computer visionzukun
 
Gephi tutorial: quick start
Gephi tutorial: quick startGephi tutorial: quick start
Gephi tutorial: quick startzukun
 
EM algorithm and its application in probabilistic latent semantic analysis
EM algorithm and its application in probabilistic latent semantic analysisEM algorithm and its application in probabilistic latent semantic analysis
EM algorithm and its application in probabilistic latent semantic analysiszukun
 
Object recognition with pictorial structures
Object recognition with pictorial structuresObject recognition with pictorial structures
Object recognition with pictorial structureszukun
 
Iccv2011 learning spatiotemporal graphs of human activities
Iccv2011 learning spatiotemporal graphs of human activities Iccv2011 learning spatiotemporal graphs of human activities
Iccv2011 learning spatiotemporal graphs of human activities zukun
 

More from zukun (20)

My lyn tutorial 2009
My lyn tutorial 2009My lyn tutorial 2009
My lyn tutorial 2009
 
ETHZ CV2012: Tutorial openCV
ETHZ CV2012: Tutorial openCVETHZ CV2012: Tutorial openCV
ETHZ CV2012: Tutorial openCV
 
ETHZ CV2012: Information
ETHZ CV2012: InformationETHZ CV2012: Information
ETHZ CV2012: Information
 
Siwei lyu: natural image statistics
Siwei lyu: natural image statisticsSiwei lyu: natural image statistics
Siwei lyu: natural image statistics
 
Lecture9 camera calibration
Lecture9 camera calibrationLecture9 camera calibration
Lecture9 camera calibration
 
Brunelli 2008: template matching techniques in computer vision
Brunelli 2008: template matching techniques in computer visionBrunelli 2008: template matching techniques in computer vision
Brunelli 2008: template matching techniques in computer vision
 
Modern features-part-4-evaluation
Modern features-part-4-evaluationModern features-part-4-evaluation
Modern features-part-4-evaluation
 
Modern features-part-3-software
Modern features-part-3-softwareModern features-part-3-software
Modern features-part-3-software
 
Modern features-part-2-descriptors
Modern features-part-2-descriptorsModern features-part-2-descriptors
Modern features-part-2-descriptors
 
Modern features-part-1-detectors
Modern features-part-1-detectorsModern features-part-1-detectors
Modern features-part-1-detectors
 
Modern features-part-0-intro
Modern features-part-0-introModern features-part-0-intro
Modern features-part-0-intro
 
Lecture 02 internet video search
Lecture 02 internet video searchLecture 02 internet video search
Lecture 02 internet video search
 
Lecture 01 internet video search
Lecture 01 internet video searchLecture 01 internet video search
Lecture 01 internet video search
 
Lecture 03 internet video search
Lecture 03 internet video searchLecture 03 internet video search
Lecture 03 internet video search
 
Icml2012 tutorial representation_learning
Icml2012 tutorial representation_learningIcml2012 tutorial representation_learning
Icml2012 tutorial representation_learning
 
Advances in discrete energy minimisation for computer vision
Advances in discrete energy minimisation for computer visionAdvances in discrete energy minimisation for computer vision
Advances in discrete energy minimisation for computer vision
 
Gephi tutorial: quick start
Gephi tutorial: quick startGephi tutorial: quick start
Gephi tutorial: quick start
 
EM algorithm and its application in probabilistic latent semantic analysis
EM algorithm and its application in probabilistic latent semantic analysisEM algorithm and its application in probabilistic latent semantic analysis
EM algorithm and its application in probabilistic latent semantic analysis
 
Object recognition with pictorial structures
Object recognition with pictorial structuresObject recognition with pictorial structures
Object recognition with pictorial structures
 
Iccv2011 learning spatiotemporal graphs of human activities
Iccv2011 learning spatiotemporal graphs of human activities Iccv2011 learning spatiotemporal graphs of human activities
Iccv2011 learning spatiotemporal graphs of human activities
 

CSE486 Lecture 17: Mosaicing and Stabilization

  • 1. Robert Collins CSE486, Penn State Lecture 17: Mosaicing and Stabilization
  • 2. Robert Collins CSE486, Penn State Recall: Planar Projection Pixel coords Internal u params Perspective v projection y Homography x Point on plane Rotation + Translation
  • 3. Robert Collins CSE486, Penn State Recall: Projective (un)Warping H from Hartley & Zisserman Source Image Destination image
  • 4. Robert Collins Recall : Planar Projection CSE486, Penn State H1 H2 H
  • 5. Robert Collins CSE486, Penn State Applications: Stabilization Given a sequence of video frames, warp them into a common image coordinate system. k-2 k-1 frame k k+1 k+2 destination frame This “stabilizes” the video to appear as if the camera is not moving.
  • 6. Robert Collins CSE486, Penn State Stabilization Example VIVID project
  • 7. Robert Collins CSE486, Penn State Stabilization by Chaining What if the reference image does not overlap with all the source images? As long as there are pairwise overlaps, we can chain (compose) pairwise homographies. H40 = H10 * H21 * H32 * H43 H10 H21 H32 H43 frame k k+1 k+2 k+3 k+4 destination Not recommended for long sequences, as alignment errors accumulate over time.
  • 8. Robert Collins CSE486, Penn State Applications: Mosaicing Source 1 Destination image Source 2 H1 H2 from Hartley & Zisserman Mosaic
  • 9. Robert Collins CSE486, Penn State Note on Planar Mosaicing Assumes scene is roughly planar. What if scene isn’t planar? Alignment will not be good if significant 3D relief “Ghosting”
  • 10. Robert Collins CSE486, Penn State Ghosting Example Source image Reference image H
  • 11. Robert Collins CSE486, Penn State Ghosting Example (cont) Mosaic
  • 12. Robert Collins Mosaics from Rotating Cameras CSE486, Penn State However, there is a mitigating factor in regards to ghosting… Images taken from a rotating camera are related by a 2D homography… regardless of scene structure!
  • 13. Robert Collins Rotating Camera (top-down view) CSE486, Penn State
  • 14. Robert Collins Rotating Camera (top-down view) CSE486, Penn State
  • 15. Robert Collins Rotating Camera (top-down view) CSE486, Penn State
  • 16. Robert Collins Rotating Camera (top-down view) CSE486, Penn State Rays in camera coord system are invariant!
  • 17. Robert Collins Rotating Camera (top-down view) CSE486, Penn State Rays in camera coord system are invariant!
  • 18. Robert Collins Rotating Camera (top-down view) CSE486, Penn State Rays in camera coord system are invariant!
  • 19. Robert Collins CSE486, Penn State Special Case : Rotating Camera Internal params Projection Relative R,T Relative Rotation of camera Translation is 0 This is important!
  • 20. Robert Collins CSE486, Penn State Special Case : Rotating Camera Internal params Projection Relative R,T
  • 21. Robert Collins CSE486, Penn State Relations among Images Taken by Rotating Camera Image 1 Same ray! Image 2 -1
  • 22. Robert Collins CSE486, Penn State Mosaicing Example Original Images (from a pan/tilt camera) Panoramic (Mosaic) View
  • 23. Robert Collins CSE486, Penn State One more detail: Blending!
  • 24. Robert Collins CSE486, Penn State Approaches to Blending How to combine colors in area of overlap? 1) Straight averaging P = (P1 + P2) / 2 2) Feathering P = (w1*P1 + w2*P2 ) / (w1+w2) With wi being distance from image border 3) Equalize intensity statistics (gain, offset)
  • 25. Robert Collins CSE486, Penn State Before and After Blending
  • 26. Robert Collins CSE486, Penn State 360 Degree Panoramas? Problem: Can’t just choose a reference image to map all other images to. Solution: Use cylindrical or spherical mosaic surface rather than a plane.
  • 27. Robert Collins CSE486, Penn State Panorama Input images Sarnoff
  • 28. Robert Collins CSE486, Penn State Spherical Panorama Result Sarnoff
  • 29. Robert Collins CSE486, Penn State Panorama Unwarped Sarnoff
  • 30. Robert Collins CSE486, Penn State Quicktime VR This example from www.panoguide.com/gallery/ Also big list at http://www.multimedialibrary.com/diana/qtvr_sites.asp
  • 31. Robert Collins CSE486, Penn State Quicktime VR
  • 32. Robert Collins CSE486, Penn State Quicktime VR This example from www.ems.psu.edu/~fraser/qtvr/