bundles / skimage 0.26.1rc0.dev0+git20260530.b607368ff / skimage / transform / integral / integrate
function
skimage.transform.integral:integrate
source: /dev/scikit-image/src/skimage/transform/integral.py :52
Signature
def integrate ( ii , start , end ) Summary
Use an integral image to integrate over a given window.
Parameters
ii: ndarrayIntegral image.
start: List of tuples, each tuple of length equal to dimension of `ii`Coordinates of top left corner of window(s). Each tuple in the list contains the starting row, col, ... index i.e
[(row_win1, col_win1, ...), (row_win2, col_win2,...), ...].end: List of tuples, each tuple of length equal to dimension of `ii`Coordinates of bottom right corner of window(s). Each tuple in the list containing the end row, col, ... index i.e
[(row_win1, col_win1, ...), (row_win2, col_win2, ...), ...].
Returns
S: scalar or ndarrayIntegral (sum) over the given window(s).
Examples
arr = np.ones((5, 6), dtype=float)
✓ii = integral_image(arr) integrate(ii, (1, 0), (1, 2)) # sum from (1, 0) to (1, 2) integrate(ii, [(3, 3)], [(4, 5)]) # sum from (3, 3) to (4, 5) integrate(ii, [(1, 0), (3, 3)], [(1, 2), (4, 5)])⚠
See also
- integral_image
Create an integral image / summed area table.
Aliases
-
skimage.transform.integrate