0

I have used the MOTION_HOMOGRAPHY function in OpenCV (python3.6) 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, and I guess I'm just trying to check that the terms in the last row are a transformation of intensity. Thanks in advance.

Christoph Rackwitz
  • 11,317
  • 4
  • 27
  • 36
T Walker
  • 330
  • 1
  • 3
  • 12
  • best to use version-*non*-specific tags. almost nobody monitors version-*specific* tags. – Christoph Rackwitz Apr 28 '22 at 07:01
  • h31 and h32 is needed for perspective effect. If h31=h32=0, it becomes affine transform. – fana Apr 28 '22 at 07:39
  • Very roughly speaking, they are for determining the denominator relative to the perspective effect based on the position on the original image. – fana Apr 28 '22 at 07:47

0 Answers0