Advance Image Blending




                 Presenters:
      Muhammad Naeem Tayyab
        Muhammad Umer Kakli
Outline
Alpha Blending
Optimal Seam Calculation
 - Minimum Boundary Cut
 - Watersheds & Graph Cuts

Pyramid Blending
Questions/Suggestions
Alpha Blending
Each image is multiplied by a weighting function
 which decreases or increases monotonically in
 overlapped area; the resulting images are then
 summed to form the mosaic.
Results of Alpha Blending
Results of Alpha Blending
Results of Alpha Blending
Results of Alpha Blending
How to find an Optimal Cut?
Optimal seam finding methods try to place the
 seam where the intensity difference between the
 two images is as low as possible.
Similarity Measures
Following are the two similarity measures
for all values of i,j
      e(i,j)=255-abs(I1(i,j)-I2(i,j))
      e(i,j)=(I1(i,j)-I2(i,j))^2
      e(i,j)=abs(I1(i,j)-I2(i,j))/max(I1(i,j)-I2(i,j)))
Negative of the Difference
Davis Similarity Measure
Minimum Error Boundary Cut
The minimal cost path through the error surface is
 computed from the following equation



The minimum cut was the optimal seam between
 the two images.
Optimal Seam
Results
Results
Results
Results
Optimal Seam using Watersheds
Watersheds
- A labeled matrix identifying the watershed regions of the
  input matrix, which can have any dimension.

We Apply watershed on Negative of Difference
 image.
Optimal Seam is calculated using the same
 method discussed above.
Results (Watershed Region)
Optimal Seam
Results
Results
Results
Results
Pyramid Blending
                                             1


                                             0
                                             1


                                             0


                                             1


                                             0



          Left pyramid                        blend                  Right pyramid

http://graphics.cs.cmu.edu/courses/15-463/2010_spring/Lectures/blending.pdf
Pyramid Blending
    General Approach:
        1. Build Laplacian pyramids LA and LB from images A and B
        2. Build a Gaussian pyramid GR from selected region R
        3. Form a combined pyramid LS from LA and LB using nodes
           of GR as weights:
             • LS(i,j) = GR(I,j,)*LA(I,j) + (1-GR(I,j))*LB(I,j)
        4. Collapse the LS pyramid to get the final blended image




http://graphics.cs.cmu.edu/courses/15-463/2010_spring/Lectures/blending.pdf
Results
Results
Results
Results
Analysis
 Alpha blending is good as far as there is no moving objects in the
  images.
 The results of Pyramid blending is reasonably good (5 level
  Pyramid reduction and expansion was used in that) to remove the
  parallax problem. For Videos, ghosting effects can create a
  problem.
 The results with Optimal Seam Finding methods are very good but
  there is a visible seam as linear blending was not performed after
  finding the optimal seam. So, after apply some blending
  techniques to remove the intensity difference at seam will results
  the best.
Real Time Implementation (25 FPS)
For offline processing you can implement any of
 the blending techniques, as far as online
 processing is concern the implementations
 contain nested for loops and multiple if
 statements, if one can remove the loops by
 finding the generic mathematical relation, then
 might be these techniques are suitable for
 requirement of 25 frames per second.
References
 Arturo F., Serge B., “Removing pedestrians from Google Street
  View images”, IEEE International Workshop on Mobile Vision
  (IWMV), June 2010.

 A. Efros, W. Freeman. “Image quilting for texture synthesis and
  transfer”, In Proceedings of SIGGRAPH 2001.

 N. Patrik, “Image Stitching using Watersheds and Graph Cuts”,
  Center of Mathematical Sciences, Lund University, Sweden.
Q&A

Advance image blending

  • 1.
    Advance Image Blending Presenters: Muhammad Naeem Tayyab Muhammad Umer Kakli
  • 2.
    Outline Alpha Blending Optimal SeamCalculation - Minimum Boundary Cut - Watersheds & Graph Cuts Pyramid Blending Questions/Suggestions
  • 3.
    Alpha Blending Each imageis multiplied by a weighting function which decreases or increases monotonically in overlapped area; the resulting images are then summed to form the mosaic.
  • 4.
  • 5.
  • 6.
  • 7.
  • 8.
    How to findan Optimal Cut? Optimal seam finding methods try to place the seam where the intensity difference between the two images is as low as possible.
  • 9.
    Similarity Measures Following arethe two similarity measures for all values of i,j e(i,j)=255-abs(I1(i,j)-I2(i,j)) e(i,j)=(I1(i,j)-I2(i,j))^2 e(i,j)=abs(I1(i,j)-I2(i,j))/max(I1(i,j)-I2(i,j)))
  • 10.
    Negative of theDifference
  • 11.
  • 12.
    Minimum Error BoundaryCut The minimal cost path through the error surface is computed from the following equation The minimum cut was the optimal seam between the two images.
  • 13.
  • 14.
  • 15.
  • 16.
  • 17.
  • 18.
    Optimal Seam usingWatersheds Watersheds - A labeled matrix identifying the watershed regions of the input matrix, which can have any dimension. We Apply watershed on Negative of Difference image. Optimal Seam is calculated using the same method discussed above.
  • 19.
  • 20.
  • 21.
  • 22.
  • 23.
  • 24.
  • 25.
    Pyramid Blending 1 0 1 0 1 0 Left pyramid blend Right pyramid http://graphics.cs.cmu.edu/courses/15-463/2010_spring/Lectures/blending.pdf
  • 26.
    Pyramid Blending  General Approach: 1. Build Laplacian pyramids LA and LB from images A and B 2. Build a Gaussian pyramid GR from selected region R 3. Form a combined pyramid LS from LA and LB using nodes of GR as weights: • LS(i,j) = GR(I,j,)*LA(I,j) + (1-GR(I,j))*LB(I,j) 4. Collapse the LS pyramid to get the final blended image http://graphics.cs.cmu.edu/courses/15-463/2010_spring/Lectures/blending.pdf
  • 27.
  • 28.
  • 29.
  • 30.
  • 31.
    Analysis  Alpha blendingis good as far as there is no moving objects in the images.  The results of Pyramid blending is reasonably good (5 level Pyramid reduction and expansion was used in that) to remove the parallax problem. For Videos, ghosting effects can create a problem.  The results with Optimal Seam Finding methods are very good but there is a visible seam as linear blending was not performed after finding the optimal seam. So, after apply some blending techniques to remove the intensity difference at seam will results the best.
  • 32.
    Real Time Implementation(25 FPS) For offline processing you can implement any of the blending techniques, as far as online processing is concern the implementations contain nested for loops and multiple if statements, if one can remove the loops by finding the generic mathematical relation, then might be these techniques are suitable for requirement of 25 frames per second.
  • 33.
    References  Arturo F.,Serge B., “Removing pedestrians from Google Street View images”, IEEE International Workshop on Mobile Vision (IWMV), June 2010.  A. Efros, W. Freeman. “Image quilting for texture synthesis and transfer”, In Proceedings of SIGGRAPH 2001.  N. Patrik, “Image Stitching using Watersheds and Graph Cuts”, Center of Mathematical Sciences, Lund University, Sweden.
  • 34.