Thank you for your previous answer, that was exactly what I needed.
I expose my new doubts:
In the dispx_raw and dispy_raw matrixes, the element number 1 is the top left and the last is the bottom right of the correlation? If so: The sequence is row by row or column by column?
I am trying to remove the rigid body displacement from my correlation by taking the first element displacement and substract it from every other element displacement in every image.
This would theoretically give me just the relative displacement between the first element and the rest. Am I right?