Presentation is loading. Please wait.

Presentation is loading. Please wait.

More on Stereo. Outline Fast window-based correlationFast window-based correlation DiffusionDiffusion Energy minimizationEnergy minimization Graph cutsGraph.

Similar presentations


Presentation on theme: "More on Stereo. Outline Fast window-based correlationFast window-based correlation DiffusionDiffusion Energy minimizationEnergy minimization Graph cutsGraph."— Presentation transcript:

1 More on Stereo

2 Outline Fast window-based correlationFast window-based correlation DiffusionDiffusion Energy minimizationEnergy minimization Graph cutsGraph cuts

3 Window-Based Correlation For each pixelFor each pixel – For each disparity For each pixel in windowFor each pixel in window –Compute difference – Find disparity with minimum SSD

4 Reverse Order of Loops For each disparityFor each disparity – For each pixel For each pixel in windowFor each pixel in window –Compute difference Find disparity with minimum SSD at each pixelFind disparity with minimum SSD at each pixel

5 Incremental Computation Given SSD of a window, at some disparityGiven SSD of a window, at some disparity Image 1 Image 2

6 Incremental Computation Want: SSD at next locationWant: SSD at next location Image 1 Image 2

7 Incremental Computation Subtract contributions from leftmost column, add contributions from rightmost columnSubtract contributions from leftmost column, add contributions from rightmost column Image 1 Image 2 + + + + +               

8 Selecting Window Size Small window: more detail, but more noiseSmall window: more detail, but more noise Large window: more robustness, less detailLarge window: more robustness, less detail Example:Example:

9 Selecting Window Size 3 pixel window 20 pixel window

10 Non-Square Windows Compromise: have a large window, but higher weight near the centerCompromise: have a large window, but higher weight near the center Example: GaussianExample: Gaussian For each disparityFor each disparity – For each pixel Compute weighted SSDCompute weighted SSD

11 Diffusion For each disparityFor each disparity – For each pixel Compute difference in intensitiesCompute difference in intensities – For n iterations: E i  (1-4 ) E i +  E jE i  (1-4 ) E i +  E j Sum is over four neighbors of each pixelSum is over four neighbors of each pixel

12 Non-Linear Diffusion To prevent blurring even more, only perform diffusion in ambiguous regionsTo prevent blurring even more, only perform diffusion in ambiguous regions For each pixel, compute certaintyFor each pixel, compute certainty – High certainty iff one disparity has low error, aothers have high error For each pixel, only perform diffusion if certainty goes upFor each pixel, only perform diffusion if certainty goes up

13 Certainty Metrics for Non-Linear Diffusion Winner margin: normalized difference between lowest and second-lowest errorWinner margin: normalized difference between lowest and second-lowest error Negative entropy:Negative entropy:

14 Results Scharstein and Szeliski, 1996Scharstein and Szeliski, 1996 3 pixel window 20 pixel window Nonlinear diffusion

15 Energy Minimization Another approach to preventing incorrectAnother approach to preventing incorrect Make assumption: disparities vary (mostly) smoothly across imageMake assumption: disparities vary (mostly) smoothly across image Minimize energy function: E data + E smoothnessMinimize energy function: E data + E smoothness E data : how well does disparity match dataE data : how well does disparity match data E smoothness : how well does disparity match that of neighbors – regularizationE smoothness : how well does disparity match that of neighbors – regularization

16 Energy Minimization If data and energy terms are nice (continuous, smooth, etc.) can try to minimize via gradient descent, etc.If data and energy terms are nice (continuous, smooth, etc.) can try to minimize via gradient descent, etc. In practice, disparities only piecewise smoothIn practice, disparities only piecewise smooth Design smoothness function that doesn’t penalize large jumps too muchDesign smoothness function that doesn’t penalize large jumps too much – Example: V(  )=min(|  |, K)

17 Energy Minimization Hard to find global minimum of non- smooth functionsHard to find global minimum of non- smooth functions – Many local minima – Provably NP-hard Practical algorithms look for approximate minima (e.g., simulated annealing)Practical algorithms look for approximate minima (e.g., simulated annealing)

18 Energy Minimization via Graph Cuts Boykov, Veksler, and Zabih, 2001Boykov, Veksler, and Zabih, 2001 Define a class of operationsDefine a class of operations – e.g., change some of the disparities to  Look for operations that reduce energyLook for operations that reduce energy Terminate when no operations of the class being considered reduce energyTerminate when no operations of the class being considered reduce energy

19 Energy Minimization via Graph Cuts Different kinds of operations:Different kinds of operations: Challenge: how to find operations that reduce energy the mostChallenge: how to find operations that reduce energy the most

20 Energy Minimization via Graph Cuts Represent possible operations as cuts through graphsRepresent possible operations as cuts through graphs Graph cut: minimal subset of edges that separates two (given) edges of graphGraph cut: minimal subset of edges that separates two (given) edges of graph Fast algorithms for computing minimal-cost cutsFast algorithms for computing minimal-cost cuts

21 Energy Minimization via Graph Cuts  -  swap: interchange  and  labels  -  swap: interchange  and  labels

22 Energy Minimization via Graph Cuts  expansion: add pixels to  class  expansion: add pixels to  class

23 Results Image Ground truth Swap algorithm Expansion algorithm

24 Results Image Ground truth Normalized correlation Simulated annealing

25 Energy Minimization for Image Smoothing Apply same principle: image should be close to original image, but piecewise smoothApply same principle: image should be close to original image, but piecewise smooth Original image Noise added Local energy minimum with one-pixel changes Local energy minimum with  -expansion


Download ppt "More on Stereo. Outline Fast window-based correlationFast window-based correlation DiffusionDiffusion Energy minimizationEnergy minimization Graph cutsGraph."

Similar presentations


Ads by Google