ArticleslgStudy

mathematics

Semi-global matching

Semi-global matching is a mathematics topic covered in the lgStudy science library. This page brings together a partial reference excerpt, illustrations, worked examples, real-world applications and a short study plan, so you can understand Semi-global matching rather than just read about it. In short: Semi-global matching (SGM) is a computer vision algorithm for the estimation of a dense disparity map from a rectified stereo image pair, introduced in 2005 by Heiko Hirschmüller while working at the German Aerospace Center. Given its predictable run time, its favourable trade-off between quality of the results and computing time, and its suitability for fast parallel implementation in ASIC or FPGA, it has encounter…

Semi-global matching — main illustration
Semi-global matching — illustration

Key takeaways

  • Semi-global matching belongs to mathematics; place it in that map before memorising details.
  • Learn the definition first, then one example that makes the definition concrete.
  • Connect Semi-global matching to a quantity you can measure, compute or draw — that is where exam questions come from.
  • Reproduce the core statement of Semi-global matching from memory before moving on to harder problems.

Reference excerpt

Semi-global matching (SGM) is a computer vision algorithm for the estimation of a dense disparity map from a rectified stereo image pair, introduced in 2005 by Heiko Hirschmüller while working at the German Aerospace Center. Given its predictable run time, its favourable trade-off between quality of the results and computing time, and its suitability for fast parallel implementation in ASIC or FPGA, it has encountered wide adoption in real-time stereo vision applications such as robotics and advanced driver assistance systems.

Problem Pixelwise stereo matching allows to perform real-time calculation of disparity maps by measuring the similarity of each pixel in one stereo image to each pixel within a subset in the other stereo image. Given a rectified stereo image pair, for a pixel with coordinates ( x , y ) {\displaystyle (x,y)} the set of pixels in the other image is usually selected as { ( x ^ , y ) | x ^ ≥ x , x ^ ≤ x + D } {\displaystyle \{({\hat {x}},y)|{\hat {x}}\geq x,{\hat {x}}\leq x+D\}} , where D {\displaystyle D} is a maximum allowed disparity shift. A simple search for the best matching pixel produces many spurious matches, and this problem can be mitigated with the addition of a regularisation term that penalises jumps in disparity between adjacent pixels, with a cost function in the form

E ( d ) = ∑ p D ( p , d p ) + ∑ p , q ∈ N R ( p , d p , q , d q ) {\displaystyle E({\boldsymbol {d}})=\sum _{p}D(p,d_{p})+\sum _{p,q\in {\mathcal {N}}}R(p,d_{p},q,d_{q})}

where D ( p , d p ) {\displaystyle D(p,d_{p})} is the pixel-wise dissimilarity cost at pixel p {\displaystyle p} with disparity d p {\displaystyle d_{p}} , and R ( p , d p , q , d q ) {\displaystyle R(p,d_{p},q,d_{q})} is the regularisation cost between pixels p {\displaystyle p} and q {\displaystyle q} with disparities d p {\displaystyle d_{p}} and d q {\displaystyle d_{q}} respectively, for all pairs of neighbouring pixels N {\displaystyle {\mathcal {N}}} . Such constraint can be efficiently enforced on a per-scanline basis by using dynamic programming (e.g. the Viterbi algorithm), but such limitation can still introduce streaking artefacts in the depth map, because little or no regularisation is performed across scanlines. A possible solution is to perform global optimisation in 2D, which is however an NP-complete problem in the general case. For some families of cost functions (e.g. submodular functions) a solution with strong optimality properties can be found in polynomial time using graph cut optimization, however such global methods are generally too expensive for real-time processing.

Algorithm

… excerpt ends here. Continue reading the full article.

Worked examples

Example 1 — a first encounter with Semi-global matching

Start with the simplest possible case. Write down what Semi-global matching claims or describes in one sentence, then invent the smallest concrete situation in which that sentence is true. In mathematics, the smallest case is usually a single object, a single equation or a single measurement. Check that every symbol or term in your sentence has a meaning in that case.

Example 2 — changing one variable

Take the situation from Example 1 and change exactly one quantity: double it, halve it, or set it to zero. Predict what should happen to Semi-global matching before you calculate. Comparing your prediction with the result is the fastest way to find out whether you understand the idea or only the words.

Example 3 — an exam-style question

Typical questions about Semi-global matching ask you to (a) state it precisely, (b) apply it to given data, and (c) explain a limitation. Practise writing all three answers in under five minutes; the third part is what separates a full-mark answer from an average one.

Applications of Semi-global matching

In research
Semi-global matching appears in mathematics research whenever the underlying quantities have to be modelled precisely. Papers usually cite it as a starting assumption and then explore where it breaks down.
In technology and industry
Engineering practice reuses Semi-global matching in design rules, simulations and safety margins. Knowing the idea lets you read a specification sheet and understand why the numbers look the way they do.
In the classroom
Semi-global matching is common in secondary-school and first-year university syllabi. It links to neighbouring topics Geometry in computer vision, so understanding it makes those chapters shorter.
In everyday life
Look for Semi-global matching outside the textbook — in sport, cooking, traffic, electronics or the sky above you. An example you found yourself is remembered far longer than one you were given.
Ask Teacher Smith questions about this articleOpens your AI tutor with a question about “Semi-global matching” →

Affiliate

Preply — study more efficiently by working with a personal tutor. 50% off.

How to study Semi-global matching in 20 minutes

  1. Read the reference excerpt below once, without taking notes.
  2. Close the page and write down what Semi-global matching means in your own words.
  3. Compare your version with the excerpt and mark what you missed.
  4. Work through the three examples above with pen and paper.
  5. Explain Semi-global matching out loud to somebody else — or to Teacher Smith in the lgStudy chat.

Frequently asked questions

What is Semi-global matching in simple terms?

Semi-global matching (SGM) is a computer vision algorithm for the estimation of a dense disparity map from a rectified stereo image pair, introduced in 2005 by Heiko Hirschmüller while working at the German Aerospace Center. Given its predictable run time, its favourable trade-off between quality o…

Why does Semi-global matching matter?

Because it connects several mathematics ideas at once: it gives you a definition you can apply, a quantity you can calculate, and a way to check whether a result is plausible.

How should I study Semi-global matching?

Read the excerpt, restate it from memory, then work through the examples and applications listed on this page. The five-step study plan above takes about twenty minutes.

What does this page cover?

It gives you a compact reference excerpt plus original lgStudy explanations, examples, applications and study material on Semi-global matching.

Tags

  • Geometry in computer vision

Keep exploring