From f32615653b241e1edef17a874be2258194e14402 Mon Sep 17 00:00:00 2001 From: Sergey Sharybin Date: Sat, 1 Jun 2013 10:30:46 +0000 Subject: Update libmv from own branch Fixes compilation error on win32 and shall give few cpu ticks boost by passing vectors by reference rather than by value. --- extern/libmv/ChangeLog | 49 ++++------------------ .../libmv/simple_pipeline/keyframe_selection.cc | 9 ++-- 2 files changed, 15 insertions(+), 43 deletions(-) (limited to 'extern') diff --git a/extern/libmv/ChangeLog b/extern/libmv/ChangeLog index 0176fda6455..bfa8b295944 100644 --- a/extern/libmv/ChangeLog +++ b/extern/libmv/ChangeLog @@ -1,3 +1,12 @@ +commit 2cd653e2952379da7daf56edcd9e71b0aa929f90 +Author: Sergey Sharybin +Date: Sat Jun 1 16:20:35 2013 +0600 + + Pass vectors by a reference + + Saves couple of time which used to waste on copying objects, + also solves win32 compilation errors caused by alignment. + commit f61b8198b9bddd8d2fa53feae7924aa23df48cbd Author: Sergey Sharybin Date: Thu May 30 18:00:03 2013 +0600 @@ -593,43 +602,3 @@ Date: Fri Mar 1 17:44:54 2013 +0600 Fixed incorrect order of arguments passing to EXPECT_EQ in keyframe selection tests. - -commit d38ebb74693fdf5b8f0fecf62a3d8c9c53b0b84a -Author: Sergey Sharybin -Date: Fri Mar 1 17:40:38 2013 +0600 - - Modal (aka tripod) solver rework - - Several major things are done in this commit: - - - First of all, logic of modal solver was changed. - We do not rely on only minimizer to take care of - guessing rotation for frame, but we're using - analytical rotation computation for point clouds - to obtain initial rotation. - - Then this rotation is being refined using Ceres - minimizer and now instead of minimizing average - distance between points of point of two clouds, - minimization of reprojection error of point - cloud onto frame happens. - - This gives quite a bit of precision improvement. - - - Second bigger improvement here is using bundle - adjustment for a result of first step when we're - only estimating rotation between neighbor images - and reprojecting markers. - - This averages error across the image sequence - avoiding error accumulation. Also, this will - tweak bundles themselves a bit for better match. - - - And last bigger improvement here is support of - camera intrinsics refirenment. - - This allowed to significantly improve solution - for real-life footage and results after such - refining are much more usable than it were before. - - Thanks to Keir for the help and code review! diff --git a/extern/libmv/libmv/simple_pipeline/keyframe_selection.cc b/extern/libmv/libmv/simple_pipeline/keyframe_selection.cc index 256b056015a..71993845e39 100644 --- a/extern/libmv/libmv/simple_pipeline/keyframe_selection.cc +++ b/extern/libmv/libmv/simple_pipeline/keyframe_selection.cc @@ -33,7 +33,8 @@ namespace libmv { namespace { -Vec2 NorrmalizedToPixelSpace(Vec2 vec, const CameraIntrinsics &intrinsics) { +Vec2 NorrmalizedToPixelSpace(const Vec2 &vec, + const CameraIntrinsics &intrinsics) { Vec2 result; double focal_length_x = intrinsics.focal_length_x(); @@ -62,7 +63,8 @@ Mat3 IntrinsicsNormalizationMatrix(const CameraIntrinsics &intrinsics) { class HomographySymmetricGeometricCostFunctor { public: - HomographySymmetricGeometricCostFunctor(Vec2 x, Vec2 y) + HomographySymmetricGeometricCostFunctor(const Vec2 &x, + const Vec2 &y) : x_(x), y_(y) { } template @@ -141,7 +143,8 @@ void ComputeHomographyFromCorrespondences(const Mat &x1, const Mat &x2, class FundamentalSymmetricEpipolarCostFunctor { public: - FundamentalSymmetricEpipolarCostFunctor(Vec2 x, Vec2 y) + FundamentalSymmetricEpipolarCostFunctor(const Vec2 &x, + const Vec2 &y) : x_(x), y_(y) {} template -- cgit v1.2.3