Exercise for integral image implementation.
- Case 1: Naive method
Time complexity is O(n^4). - Case 2: Use the value of previous pixels
Time complexity is O(n^2). - Case 3: Add zero padding to remove if statement in the loop
Time complexity is O(n^2), but faster than Case 2.