even in 2d output will have all 4 corners of window if its in middle or 2 if its at the edge of image output will be `ii[end] - ii[start - 1]` in 1D vector or eg if both start and end are in first row in 2d image..