What kind of geometric transformation (more general than a projective transform / homography) is this?

78 Views Asked by At

I have an A4 (21 * 29.7 cm) sheet of paper, that, when photographed with a phone camera, looks like the quadrilateral $ABCD$.
If we precisely know the coordinates of the four points A, B, C, D on the photo, and also the desired target coordinates of A', B', C', D' , we can do a perspective/projective transform / homography / deskewing. It currently works (succesfully with Python with opencv library).

Problem: the position of E', F' (i.e. E, F transformed by the homography) is not exactly what it should be. Example: A'B' is 21 cm, A'C' is 29.7 cm, but the length A'E' is 9.7 cm, whereas on the original sheet of paper, this length was 10 cm. It is not bad, but I would like to improve the precision of this homography.

The real problem: an homography is totally fixed by 4 input points (A, B, C, D) and 4 target points (A', B', C', D'), so there is no degree of freedom left to choose between the result (1), (2) or (3) below (see the orange numbers on the graph).

Question: is there a more general transform than an homography allowing to have situation (1), (2), (3), or any other position of E', F'? More precisely, is there a well-known kind of transform that can respect these conditions:

  • A should be mapped to A',
  • B to B',
  • C to C',
  • D to D',
  • E to E''

?

(This seems to require 10 degrees of freedom?)

enter image description here

Note:

  • The 3 or 4 millimeters error does not come from lack of precision of my measurement on the sheet of paper (I did it with ~ 0.5mm precision), it also does not come from the lack of precision of the measurement of the coordinates of A, B, C, D (i did it precisely and carefully, by zooming, etc.)

  • I suspect it comes from camera lense distorsion:

    enter image description here

    but this is uncontrollable (it varies from a camera to another)