I am trying to compute a projective transformation out of four pairs of points following the procedure described in this post, namely:
- Two circular points.
- A similarity rotation center.
- An arbitrary point.
The projection applied is sources=H*destinations using the following two matrices
sources =
1.0e+002 *
0.0100 0.0100 3.4150 5.1200
0 + 0.0100i 0 - 0.0100i 0.0100 6.8300
0 0 0.0100 0.0100
and
destinations =
1.0e+003 *
0.0061 - 1.5022i 0.0061 + 1.5022i 0.3380 0.5120
-1.1516 + 0.3142i -1.1516 - 0.3142i 0.0016 0.6830
0.0010 0.0010 0.0010 0.0010
As result I am obtaining a complex matrix which I cannot use for transforming my input image and points. Is worth to mention that the transformation is not exact but works almost good from sources to destinations except for an imaginary part that is added and don't know where it comes from, and from destinations to sources is just not working.
I am thinking this is due to to the fact of mapping complex numbers, since from the early first step when solving for A and B I am getting complex numbers and they never get canceled out.
I would appreciate any insight on how to tackle this.
PD: this question arose from this other one