How is integral image used in image processing?

8 vues (au cours des 30 derniers jours)
Kyle
Kyle le 23 Août 2011
Hi,
With integral image, the task of calculating the area of an upright rectangular region is reduced to four operations. Thus, the computation time is invariant to size of the rectangular. HOWEVER the result of the four operation is the SUM of pixel (of integral image) within the rectangular region. SO HOW is the SUM used for object detection?
My understanding (correct me if i'm wrong)
Let say i have an image with 100*100 pixels. So the resultant integral image will be 100*100 pixels as well. The used of integral image is because its computational time of any rectangle region is almost constant(invariant to size). So let say i have an object of interest in the image, the object is in a 50*50 pixels window. So the calculate of the sum of pixel within the window is constant time even if the window size increase. >>>after this point i'm stuck. How is value of the sum of pixel within a rectangular window useful?
Thanks
  4 commentaires
Kyle
Kyle le 24 Août 2011
Viola–Jones object detection framework and SURF uses integral image to speed up the processing time. But i cant figure out how they improve the time by using integral image.
Walter Roberson
Walter Roberson le 24 Août 2011
Technical note: "integral image" is defined at http://en.wikipedia.org/wiki/Summed_area_table

Connectez-vous pour commenter.

Réponse acceptée

David Young
David Young le 24 Août 2011
Here's a simplified example, that relates to the (more complex) ways that SURF uses integral images.
Suppose you want to estimate the x-gradient of an image at a particular position and scale. A high-quality (in some sense) result is given by summing the pixelwise product of the image with the x-derivative of a Gaussian mask, but maybe this is too expensive.
Instead, you might make a fast approximation by summing the pixels in a rectangular region to the left of the point of interest, doing the same for a region to the right, and then taking the difference between the two sums. The size of the region sets the scale at which you're estimating the gradient. In MATLAB, something like this:
% set xpos and ypos to be position of interest, s to be
% half the size of region of interest (scale parameter)
lregion = Image(ypos-s:ypos+s, xpos-s:xpos-1);
rregion = Image(ypos-s:ypos+s, xpos+1:xpos+s);
lmean = mean(lregion(:));
rmean = mean(rregion(:));
xgradient = (rmean - lmean) / s;
Now suppose you want to speed it up further. Clearly, the integral image can be used to do that, since most of the computation just makes the sums of the pixels in rectangular regions.
Lots of computations can use variants of this approach: Haar and Walsh transforms are important examples.
  3 commentaires
Walter Roberson
Walter Roberson le 25 Août 2011
Shortcut to the image alone:
http://www.nowpublishers.com/10.1561%5CCGV06%5C0600000017%5CCGV01743x.gif
David Young
David Young le 26 Août 2011
Yes, I think your comment is correct: the integral image is only helpful if your mask is largely composed of uniform rectangular areas.

Connectez-vous pour commenter.

Plus de réponses (0)

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by