Okay, I am looking for something akin to integral images (summed area tables) as used in the acceleration of integral calculations over a window.
I have an image I and its gradient image G. I want to calculate the straight line integral from two arbitrary points a and b in the image of the absolute value of G. Obviously I can step over the line (1-t)a + t*b, t in [0, 1] and sum up given the right t step size. I want, however, to do this several million times so I would like some acceleration structure that preferably doesn't require me to run a loop for every pair (a, b).
Does anyone know of an existing algorithm to accomplish this sort of thing?