With OpenCV, I compute the homography between, say, these two images:
and
Don't worry about the strange white form on the right side, it is due to the smartphone holder I use. The homography, given by findHomography() function (using points detected with the Fast feature detector and the HammingLUT descriptor matcher), is:
A = [ 1.412817430564191, 0.0684947165270289, -517.7751355800591;
-0.002927297251810, 1.210310757993256, 39.56631316477566;
0.000290600259844, -9.348301989015293e-05, 1]
Now, I use the same process to compute the homography between the same images that have been rotated by 180 degrees (upside down), using imagemagick (as a matter of fact, I would be equally interested to know the relation for rotation of 90 or 270 degrees...). Here they are:
and
With these images, the homography becomes:
B = [ 0.7148688519736168, 0.01978048500375845, 325.8330631554814;
-0.1706219498833541, 0.8666521745094313, 64.72944905752504;
-0.0002078857275647, -5.080048486810413e-05, 1]
Now, the question is how do you relate A and B? The two first diagonal values of A are close to the inverse of the same in B, but it's not very precise (.707805537 instead of 0.71486885). My ultimate purpose would to use the wanted relation to transform final matrix, avoiding to compute a costly image rotation.