From 2ddbb5d1e1a15978c3bcaaa580738195be59642b Mon Sep 17 00:00:00 2001 From: Sergey Sharybin Date: Mon, 30 Sep 2013 09:35:04 +0000 Subject: Fix for plane track jittering Jittering was caused by homography not being estimated accurate enough. Before this, only algebraic estimation was used, which is indeed not so much great, Now use algebraic estimation followed with refinement step using Ceres minimizer. The code was already there since keyframe selection patch, made such estimation a generic function in multiview/ and changed API for estimation in order to pass all additional options via an options structure (the same way as it's done fr Ceres). This includes changes to both homography and fundamental estimation. TODO: - Need to document Ceres functors better. - Need to support homogeneous coordinates (currently only euclidean coords are supported). --- source/blender/blenkernel/intern/tracking.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'source/blender/blenkernel/intern/tracking.c') diff --git a/source/blender/blenkernel/intern/tracking.c b/source/blender/blenkernel/intern/tracking.c index fd92ec9f462..b8711f6e5f6 100644 --- a/source/blender/blenkernel/intern/tracking.c +++ b/source/blender/blenkernel/intern/tracking.c @@ -3340,7 +3340,7 @@ static void track_plane_from_existing_motion(MovieTrackingPlaneTrack *plane_trac break; } - libmv_homography2DFromCorrespondencesLinear(x1, x2, num_correspondences, H_double, 1e-8); + libmv_homography2DFromCorrespondencesEuc(x1, x2, num_correspondences, H_double); mat3f_from_mat3d(H, H_double); @@ -3444,7 +3444,7 @@ void BKE_tracking_homography_between_two_quads(/*const*/ float reference_corners float_corners_to_double(reference_corners, x1); float_corners_to_double(corners, x2); - libmv_homography2DFromCorrespondencesLinear(x1, x2, 4, H_double, 1e-8); + libmv_homography2DFromCorrespondencesEuc(x1, x2, 4, H_double); mat3f_from_mat3d(H, H_double); } -- cgit v1.2.3