1 / 36

Epipolar lines

Epipolar lines. epipolar plane. epipolar lines. epipolar lines. Baseline. O’. O. Rectification.

roza
Download Presentation

Epipolar lines

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. Epipolar lines epipolar plane epipolar lines epipolar lines Baseline O’ O

  2. Rectification • Rectification: rotation and scaling of each camera’s coordinate frame to make the epipolar lines horizontal and equi-height,by bringing the two image planes to be parallel to the baseline • Rectification is achieved by applying homography to each of the two images

  3. Rectification Baseline O’ O

  4. Cyclopean coordinates • In a rectified stereo rig with baseline of length , we place the origin at the midpoint between the camera centers. • a point is projected to: • Left image: , • Right image: , • Cyclopean coordinates:

  5. Disparity • Disparity is inverse proportional to depth • Constant disparity constant depth • Larger baseline, more stable reconstruction of depth (but more occlusions, correspondence is harder) (Note that disparity is defined in a rectified rig in a cyclopean coordinate frame)

  6. Random dot stereogram • Depth can be perceived from a random dot pair of images (Julesz) • Stereo perception is based solely on local information (low level)

  7. Moving random dots

  8. Compared elements • Pixel intensities • Pixel color • Small window (e.g. or ), often using normalized correlation to offset gain • Features and edges (less common) • Mini segments

  9. Dynamic programming • Each pair of epipolar lines is compared independently • Local cost, sum of unary term and binary term • Unary term: cost of a single match • Binary term: cost of change of disparity (occlusion) • Analogous to string matching (‘diff’ in Unix)

  10. String matching • Swing → String S t r i n g Start S w i n g End

  11. String matching • Cost: #substitutions + #insertions + #deletions S t r i n g S w i n g

  12. Dynamic Programming • Shortest path in a grid • Diagonals: constant disparity • Moving along the diagonal – pay unary cost (cost of pixel match) • Move sideways – pay binary cost, i.e. disparity change (occlusion, right or left) • Cost prefers fronto-parallel planes. Penalty is paid for tilted planes

  13. Dynamic Programming Start , Complexity?

  14. Probability interpretation: Viterbi algorithm • Markov chain • States: discrete set of disparity • Log probabilities: product sum

  15. Probability interpretation: Viterbi algorithm • Markov chain • States: discrete set of disparity • Maximum likelihood: minimize sum of negative logs • Viterbi algorithm: equivalent to shortest path

  16. Dynamic Programming: Pros and Cons • Advantages: • Simple, efficient • Achieves global optimum • Generally works well • Disadvantages:

  17. Dynamic Programming: Pros and Cons • Advantages: • Simple, efficient • Achieves global optimum • Generally works well • Disadvantages: • Works separately on each epipolar line, does not enforce smoothness across epipolars • Prefers fronto-parallel planes • Too local? (considers only immediate neighbors)

  18. Markov Random Field • Graph In our case: graph isa 4-connected gridrepresenting one image • States: disparity • Minimize energy of the form • Interpreted as negative log probabilities

  19. Iterated Conditional Modes (ICM) • Initialize states (= disparities) for every pixel • Update repeatedly each pixel by the most likely disparity given the values assigned to its neighbors: • Markov blanket: the state of a pixel only depends on the states of its immediate neighbors • Similar to Gauss-Seidel iterations • Slow convergence to (often bad) local minimum

  20. Graph cuts: expansion moves • Assume is non-negative and is metric: • We can apply more semi-global moves using minimal s-t cuts • Converges faster to a better (local) minimum

  21. α-Expansion • In any one round, expansion move allows each pixel to either • change its state to α, or • maintain its previous state Each round is implemented via max flow/min cut • One iteration: apply expansion moves sequentially with all possible disparity values • Repeat till convergence

  22. α-Expansion • Every round achieves a globally optimal solution over one expansion move • Energy decreases (non-increasing) monotonically between rounds • At convergence energy is optimal with respect to all expansion moves, and within a scale factor from the global optimum: where

  23. α-Expansion (1D example)

  24. α-Expansion (1D example)

  25. α-Expansion (1D example)

  26. α-Expansion (1D example)

  27. α-Expansion (1D example) • But what about?

  28. α-Expansion (1D example)

  29. α-Expansion (1D example)

  30. α-Expansion (1D example)

  31. α-Expansion (1D example) • Such a cut cannot be obtained due to triangle inequality:

  32. Common Metrics • Potts model: • Truncated : • Truncated squared difference is not a metric

  33. Reconstruction with graph-cuts Original Result Ground truth

  34. A different application: detect skyline • Input: one image, oriented with sky above • Objective: find the skyline in the image • Graph: grid • Two states: sky, ground • Unary (data) term: • State = sky, low if blue, otherwise high • State = ground, high if blue, otherwise low • Binary term for vertical connections: • If the state of a node is sky, the node above should also be sky (set to infinity if not) • If the state of a node is ground, the node below should also be ground • Solve with expansion move. This is a binary (two state) problem, and so graph cut can find the global optimum in one expansion move

More Related