I am using the function findTransformECC
for automatic image alignment. I am only correcting for a shift so I use the warp mode MOTION_TRANSLATION
. Image alignment works perfectly with cv2.warpAffine
.
Next thing I would like to do is to use the warpMatrix
to shift a whole batch of images. I can do this without loading the images in Python so I do not want to use the OpenCV functions to do the job. However, I do not fully understand the contents of the warpMatrix
.
My matrix looks like:
array([[1., 0., 7.1342],
[0., 1., 7.0116]], dtype=float32)
I suppose the last column represents the shift in pixels. But which row corresponds to which axis? And what do the other columns represent?