ArticleslgStudy

computer science

Summed-area table

Summed-area table is a computer science 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 Summed-area table rather than just read about it. In short: A summed-area table is a data structure and algorithm for quickly and efficiently generating the sum of values in a rectangular subset of a grid. In the image processing domain, it is also known as an integral image.

Summed-area table — main illustration
Summed-area table — illustration

Key takeaways

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

Reference excerpt

A summed-area table is a data structure and algorithm for quickly and efficiently generating the sum of values in a rectangular subset of a grid. In the image processing domain, it is also known as an integral image. It was introduced to computer graphics in 1984 by Frank Crow for use with mipmaps. In computer vision it was popularized by Lewis and then given the name "integral image" and prominently used within the Viola–Jones object detection framework in 2001. Historically, this principle is very well known in the study of multi-dimensional probability distribution functions, namely in computing 2D (or ND) probabilities (area under the probability distribution) from the respective cumulative distribution functions.

The algorithm As the name suggests, the value at any point (x, y) in the summed-area table is the sum of all the pixels above and to the left of (x, y), inclusive:

I ( x , y ) = ∑ x ′ ≤ x y ′ ≤ y i ( x ′ , y ′ ) {\displaystyle I(x,y)=\sum _{\begin{smallmatrix}x'\leq x\\y'\leq y\end{smallmatrix}}i(x',y')}

where i ( x , y ) {\displaystyle i(x,y)} is the value of the pixel at (x,y). The summed-area table can be computed efficiently in a single pass over the image, as the value in the summed-area table at (x, y) is just:

I ( x , y ) = i ( x , y ) + I ( x , y − 1 ) + I ( x − 1 , y ) − I ( x − 1 , y − 1 ) {\displaystyle I(x,y)=i(x,y)+I(x,y-1)+I(x-1,y)-I(x-1,y-1)} (Noted that the summed matrix is calculated from top left corner)

Once the summed-area table has been computed, evaluating the sum of intensities over any rectangular area requires exactly four array references regardless of the area size. That is, the notation in the figure at right, having A = (x0, y0), B = (x1, y0), C = (x0, y1) and D = (x1, y1), the sum of i(x,y) over the rectangle spanned by A, B, C, and D is:

∑ x 0 < x ≤ x 1 y 0 < y ≤ y 1 i ( x , y ) = I ( D ) + I ( A ) − I ( B ) − I ( C ) {\displaystyle \sum _{\begin{smallmatrix}x_{0}<x\leq x_{1}\\y_{0}<y\leq y_{1}\end{smallmatrix}}i(x,y)=I(D)+I(A)-I(B)-I(C)}

Extensions This method is naturally extended to continuous domains. The method can be also extended to high-dimensional images. If the corners of the rectangle are x p {\displaystyle x^{p}} with p {\displaystyle p} in { 0 , 1 } d {\displaystyle \{0,1\}^{d}} , then the sum of image values contained in the rectangle are computed with the formula

∑ p ∈ { 0 , 1 } d ( − 1 ) d − ‖ p ‖ 1 I ( x p ) {\displaystyle \sum _{p\in \{0,1\}^{d}}(-1)^{d-\|p\|_{1}}I(x^{p})}

… excerpt ends here. Continue reading the full article.

Illustrations

Summed-area table: Using a summed-area table (2.) of a 6×6 matrix (1.) to sum up a subrectangle of its values; each coloured spot highlights the sum inside the rectangle of that colour.
Using a summed-area table (2.) of a 6×6 matrix (1.) to sum up a subrectangle of its values; each coloured spot highlights the sum inside the rectangle of that colour.
Summed-area table: A description of computing a sum in the summed-area table data structure/algorithm
A description of computing a sum in the summed-area table data structure/algorithm
Summed-area table illustration

Worked examples

Example 1 — a first encounter with Summed-area table

Start with the simplest possible case. Write down what Summed-area table claims or describes in one sentence, then invent the smallest concrete situation in which that sentence is true. In computer science, 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 Summed-area table 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 Summed-area table 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 Summed-area table

In research
Summed-area table appears in computer science 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 Summed-area table 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
Summed-area table is common in secondary-school and first-year university syllabi. It links to neighbouring topics Computer graphics data structures, Digital geometry, so understanding it makes those chapters shorter.
In everyday life
Look for Summed-area table 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 “Summed-area table” →

Affiliate

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

How to study Summed-area table in 20 minutes

  1. Read the reference excerpt below once, without taking notes.
  2. Close the page and write down what Summed-area table 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 Summed-area table out loud to somebody else — or to Teacher Smith in the lgStudy chat.

Frequently asked questions

What is Summed-area table in simple terms?

A summed-area table is a data structure and algorithm for quickly and efficiently generating the sum of values in a rectangular subset of a grid. In the image processing domain, it is also known as an integral image.

Why does Summed-area table matter?

Because it connects several computer science 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 Summed-area table?

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 Summed-area table.

Tags

  • Computer graphics data structures
  • Digital geometry

Keep exploring