Ask Your Question
0

integral image

asked 2014-09-25 20:31:50 -0600

gardezi gravatar image

hello , I know what integral image is and how it works but I just want to know what was the reason that we needed integral image. What problem were we facing which drove ou need to make this algorithm

Thanks in Advance

edit retag flag offensive close merge delete

1 answer

Sort by » oldest newest most voted
5

answered 2014-09-25 22:35:17 -0600

rwong gravatar image

Integral image is a form of optimization known as Strength Reduction, which is applied to Digital filtering.

The computational advantage is that it drops an O(n) operation, where n is the length of the boxcar filter, down to O(1), namely a constant-time operation, or exactly (2*N) operations where N is the number of dimensions. (For 2D images, this means exactly 4 operations.)

My explanation might not be universally accepted, but please bear with me. It requires knowledge of college-level digital signal processing. (There may also be typos in my math, as I haven't done this rigorously for many years.)

The concept is also known as summed-area table, and can be applied to any number of dimensions. However, in my explanation below, I will only discuss my insights on discrete time domain, using a 1-D example.

The technique is used to speed up "boxcar filter". That is, for integer (x: a <= x < b), sum up the signal f[x] multiplied by some constant.

Suppose the height of the boxcar function is h. Let u[] be the unit step function.

The boxcar function is then h * (u[x - a] - u[x - b]). (The multiplication is scalar.)

Recall that time shifts can be written as convolution with Kronecker delta (impulse) function δ_a, δ_b for delays of a and b respectively.

Also, the derivative of step function is Kronecker delta (impulse), and the anti-derivative (integral from negative infinity up to current x) of Kronecker delta is the step function.

The boxcar function can then be rewritten as the anti-derivative (integral) of a Kronecker delta of positive h at time a, and a delta of negative h at time b.

Ironically, the anti-derivative is equivalent to a convolution with the step function.

So, to calculate the convolution of a boxcar with a user-defined input function (such as the image), we have:
conv ( input , conv ( unit_step , h * (delta_at_a - delta_at_b) ) )

Integral image and Summed-area table rearrange the association - convolutions are associative.

Now we have
conv ( conv ( input, unit_step ), h * (delta_at_a - delta_at_b) )

The term, conv ( input, unit_step ), is what Integral Image means.

edit flag offensive delete link more

Comments

Thanks but can you please make it a little simple because I have not studied digital signal processing. I am kind of new to computer vision.

gardezi gravatar imagegardezi ( 2014-09-26 02:28:02 -0600 )edit

Sorry, I realize my explanation is way too complicated. There is a much simpler explanation. If you know high-school calculus (derivatives, definite integral and indefinite integral), integral image is just the computation of the indefinite integral, or anti-derivative. Then, the lookup is just the evaluation of the anti-derivative at exactly two points, lower bound "a" and upper bound "b", which gives the same numerical result as the definite integral of the original input from "a" to "b".

rwong gravatar imagerwong ( 2014-09-26 22:34:27 -0600 )edit

Question Tools

1 follower

Stats

Asked: 2014-09-25 20:31:50 -0600

Seen: 1,696 times

Last updated: Sep 25 '14