Fast calculation of integral image in matlab

After implementing a mex-files for calculating integral image in matlab, a friend of mine told me this can be easily done with the cumsum function in matlab.

intImage = cumsum(cumsum(double(img)),2);


9 Responses to Fast calculation of integral image in matlab

  1. Dan says:

    Hi, I have a question (if possible)
    Is there a work-around that allow us to calculate the integral image of an image just on the borders (a kind of frame – stripe)?
    For example, setting to zero all the pixel st ( k<=x<=H-k, k<=y<=W-k).

    Would this approach speed up the performances while preserving, for example, stitching algorithm functionalities?

    Many thanks

  2. mohsenam says:

    If I have understood your question correctly then I think it can be done quite easily by taking a mask lets say M. Set all the ‘boundary-strip’ pixels == 1
    and rest equal to zero in mask.
    img = mask.*img;
    then use the above
    intImage = cumsum(cumsum(double(img)),2);

  3. Andrew says:

    Any just-as-easy way to do the reverse?

  4. helboi says:

    Could this be extended in 3D. I would like to compute à 3D integral image

  5. malar says:

    how integral image increase the integral image will be calculated.

  6. The most important application for the fleshlight
    is a action beyond the shopping cart application page, regretfully together with this strategy your can not make an effort to apply multiple codes about the same
    screen. Our recommendation is to try and use the code with the highest cheap first to find if it is
    valid for your order. Each discount code discipline
    for Fleshlight is considered just over the examination order button during
    the image below. Whenever you click review order you will be qualified to see when
    the coupon has applied properly. You are not able to stack
    multiple. The exact code laws neighborhood for Fleshlight often is a action
    past each purchasing basket site, sad to say employing this strategy you actually can not be sure that you utilize several codes about the same screen.
    Our very own very own technique will most likely getting just be sure to use the legislation aided by the finest low
    cost starting to check if you think it can be applied to your prescribe.
    The code legislation place of expertise to make fleshlight
    bargains is actually throughout the evaluate
    order switch in the look under. If you happen to push overview order you could verify that the exact coupon offers needed fast.

  7. kris says:

    code is well … but what is the input and output of that program…pls give me one example or send me

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: