Closed DihengChen closed 6 years ago
Since r
and c
correspond to the input's lengths, this will prevent indexing out of the array's bounds.
Thanks you for your reply! But I am still confused. The i_k and j_k are used as index of matrix D0, and D0 is (c+1)*(r+1) matrix. So r and c will not be out of D0's bound.
While r
and c
won't be out of bounds, i + k
and j + k
might. In the last loop iteration, i
will be r-1
. When a warp
different from 1
, e.g., 2
, is given, i + k
will be r - 1 + 2
and thus out of bounds for D0
. The same applies for j
of course.
@pierre-rouanet resolved, close?