필터 지우기
필터 지우기

How is integral image used in image processing?

조회 수: 9 (최근 30일)
Kyle
Kyle 2011년 8월 23일
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
Kyle
Kyle 2011년 8월 24일
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 2011년 8월 24일
Technical note: "integral image" is defined at http://en.wikipedia.org/wiki/Summed_area_table

댓글을 달려면 로그인하십시오.

채택된 답변

David Young
David Young 2011년 8월 24일
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
Walter Roberson
Walter Roberson 2011년 8월 25일
Shortcut to the image alone:
http://www.nowpublishers.com/10.1561%5CCGV06%5C0600000017%5CCGV01743x.gif
David Young
David Young 2011년 8월 26일
Yes, I think your comment is correct: the integral image is only helpful if your mask is largely composed of uniform rectangular areas.

댓글을 달려면 로그인하십시오.

추가 답변 (0개)

Community Treasure Hunt

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

Start Hunting!

Translated by