🎮 Simulator EP08_03: Rectangular Sum with Integral Image
Internal
Choose a rectangle (x1, y1) – (x2, y2). The integral image II includes virtual border (−1) with zeros for exception-free validation.
Upper-Left Corner (x1, y1) = (1,1)
x1
y1
Lower-Right Corner (x2, y2) = (2,2)
x2
y2
Original Image I (4×4)
Integral Image II (With Virtual Border −1)
+ II(y2, x2)
− II(y2, x1−1)
− II(y1−1, x2)
+ II(y1−1, x1−1)
Description: Figure 8.17: EP08_03 Simulator: Rectangular Sum in O(1) — Multiple Edge Cases