I have used the MOTION_HOMOGRAPHY function in OpenCV (python3.6, enhanced correlation coefficient) to register a pair of images, and I am trying to interpret the 3 x 3 warp matrix the function returns:

H = 
[1.304     6.65e-2    -19.71
 3.19e-3   1.163      -22.92
 3.84e-5   2.06e-4    1     ]

I'm not sure what the h31 (3.84e-5) and h32 (2.06e-4) terms mean. I have read here, here, and here, but all the examples show these terms as zero. In my mind:

  • 1.304 is the stretching/scaling along x
  • 6.65e-2 is the shearing in x
  • -19.71 is translation along x
  • 3.19e-3 is the shearing in y
  • 1.163 is the stretching/scaling in y
  • -22.92 is the translation along y

Is this right?

  • 3.84e-5 is the stretching/scaling in z?
  • 2.06e-4 is the shear in z?
  • 1 is the translation along z?

I think z is the intensity of my image. As a secondary question, does a homography matrix transform intensity? Thanks in advance.


1 Answer 1


The last row is basically used when working in homogenous coordinate system which is used to provide mathematical relation for doing out of plane rotations or Projective Transforms as opposed to Affine transforms.

enter image description here


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.