Applied proposed fix
authorBoaz Stolk <boaz.stolk@gmail.com>
Wed, 15 Oct 2014 18:40:04 +0000 (20:40 +0200)
committerBoaz Stolk <boaz.stolk@gmail.com>
Wed, 15 Oct 2014 20:36:38 +0000 (22:36 +0200)
modules/calib3d/test/test_affine3d_estimator.cpp
modules/video/test/test_estimaterigid.cpp

index c677275..2608815 100644 (file)
@@ -80,9 +80,9 @@ struct WrapAff
     WrapAff(const Mat& aff) : F(aff.ptr<double>()) {}
     Point3f operator()(const Point3f& p)
     {
-        return Point3d( p.x * F[0] + p.y * F[1] + p.z *  F[2] +  F[3],
-                        p.x * F[4] + p.y * F[5] + p.z *  F[6] +  F[7],
-                        p.x * F[8] + p.y * F[9] + p.z * F[10] + F[11]  );
+        return Point3f( (float)(p.x * F[0] + p.y * F[1] + p.z *  F[2] +  F[3]),
+                        (float)(p.x * F[4] + p.y * F[5] + p.z *  F[6] +  F[7]),
+                        (float)(p.x * F[8] + p.y * F[9] + p.z * F[10] + F[11])  );
     }
 };
 
index 50508b4..00cb07b 100644 (file)
@@ -75,8 +75,8 @@ struct WrapAff2D
     WrapAff2D(const Mat& aff) : F(aff.ptr<double>()) {}
     Point2f operator()(const Point2f& p)
     {
-        return Point2d( p.x * F[0] + p.y * F[1] +  F[2],
-                        p.x * F[3] + p.y * F[4] +  F[5]);
+        return Point2f( (float)(p.x * F[0] + p.y * F[1] + F[2]),
+                        (float)(p.x * F[3] + p.y * F[4] + F[5]) );
     }
 };