The following code demostrates a shift by 1000 in the X direction
float32_t src1[8];
float32_t src2[8];
src1[0] = 0; src1[1] = 0;
src1[2] = 0; src1[3] = 10000;
src1[4] = 10000; src1[5] = 10000;
src1[6] = 10000; src1[7] = 0;
src2[0] = 1000; src2[1] = 0;
src2[2] = 1000; src2[3] = 10000;
src2[4] = 11000; src2[5] = 10000;
src2[6] = 11000; src2[7] = 0;
Running:
fcvGetPerspectiveTransformf32 (src1, src2, M);
Produces the following perspective transformation (which is completely wrong):
It seems like fcvGetPerspectiveTransformf32 is broken or maybe I'm missing somthing here.
I saw some thread about a bug in fcvGetPerspectiveTransformf32 but I didn't think it wouldn't work in such a trivial case?!
Any thoughts?
I downloaded FactCV 1.2.0 and retested the code from above, but now the app crashes when it get to this line:
fcvGetPerspectiveTransformf32 (src1, src2, M);