[Bf-blender-cvs] [5933b24] master: Update Ceres to the latest upstream
Sergey Sharybin
noreply at git.blender.org
Wed Jan 1 17:37:53 CET 2014
Commit: 5933b2455c409963580ea616047f2f2ee332ff71
Author: Sergey Sharybin
Date: Sun Dec 29 16:59:15 2013 +0600
https://developer.blender.org/rB5933b2455c409963580ea616047f2f2ee332ff71
Update Ceres to the latest upstream
Summary:
This brings up much easier termination type usage,
which for us means we might use:
ceres::Summary::IsSolutionUsable()
instead of doing manual funky enum values check.
Reviewers: keir
Differential Revision: https://developer.blender.org/D153
===================================================================
M extern/libmv/libmv-capi.cc
M extern/libmv/libmv/multiview/fundamental.cc
M extern/libmv/libmv/multiview/homography.cc
M extern/libmv/libmv/tracking/track_region.cc
M extern/libmv/libmv/tracking/track_region.h
M extern/libmv/third_party/ceres/ChangeLog
M extern/libmv/third_party/ceres/include/ceres/solver.h
M extern/libmv/third_party/ceres/include/ceres/types.h
M extern/libmv/third_party/ceres/internal/ceres/compressed_row_sparse_matrix.cc
M extern/libmv/third_party/ceres/internal/ceres/covariance_impl.cc
M extern/libmv/third_party/ceres/internal/ceres/lapack.cc
M extern/libmv/third_party/ceres/internal/ceres/lapack.h
M extern/libmv/third_party/ceres/internal/ceres/line_search_minimizer.cc
M extern/libmv/third_party/ceres/internal/ceres/linear_solver.h
M extern/libmv/third_party/ceres/internal/ceres/minimizer.cc
M extern/libmv/third_party/ceres/internal/ceres/problem_impl.cc
M extern/libmv/third_party/ceres/internal/ceres/program.cc
M extern/libmv/third_party/ceres/internal/ceres/program.h
M extern/libmv/third_party/ceres/internal/ceres/solver.cc
M extern/libmv/third_party/ceres/internal/ceres/solver_impl.cc
M extern/libmv/third_party/ceres/internal/ceres/solver_impl.h
M extern/libmv/third_party/ceres/internal/ceres/sparse_normal_cholesky_solver.cc
M extern/libmv/third_party/ceres/internal/ceres/suitesparse.cc
M extern/libmv/third_party/ceres/internal/ceres/suitesparse.h
M extern/libmv/third_party/ceres/internal/ceres/trust_region_minimizer.cc
M extern/libmv/third_party/ceres/internal/ceres/types.cc
===================================================================
diff --git a/extern/libmv/libmv-capi.cc b/extern/libmv/libmv-capi.cc
index 95ac2ff..474501a 100644
--- a/extern/libmv/libmv-capi.cc
+++ b/extern/libmv/libmv-capi.cc
@@ -332,9 +332,7 @@ int libmv_trackRegion(const libmv_TrackRegionOptions *options,
}
/* TODO(keir): Update the termination string with failure details. */
- if (track_region_result.termination == libmv::TrackRegionResult::PARAMETER_TOLERANCE ||
- track_region_result.termination == libmv::TrackRegionResult::FUNCTION_TOLERANCE ||
- track_region_result.termination == libmv::TrackRegionResult::GRADIENT_TOLERANCE ||
+ if (track_region_result.termination == libmv::TrackRegionResult::CONVERGENCE ||
track_region_result.termination == libmv::TrackRegionResult::NO_CONVERGENCE)
{
tracking_result = true;
diff --git a/extern/libmv/libmv/multiview/fundamental.cc b/extern/libmv/libmv/multiview/fundamental.cc
index 7a1433c..ea8594c 100644
--- a/extern/libmv/libmv/multiview/fundamental.cc
+++ b/extern/libmv/libmv/multiview/fundamental.cc
@@ -538,9 +538,7 @@ bool EstimateFundamentalFromCorrespondences(
LG << "Final refined matrix:\n" << *F;
- return !(summary.termination_type == ceres::DID_NOT_RUN ||
- summary.termination_type == ceres::NUMERICAL_FAILURE ||
- summary.termination_type == ceres::USER_ABORT);
+ return summary.IsSolutionUsable();
}
} // namespace libmv
diff --git a/extern/libmv/libmv/multiview/homography.cc b/extern/libmv/libmv/multiview/homography.cc
index cbd3ec7..ce533a3 100644
--- a/extern/libmv/libmv/multiview/homography.cc
+++ b/extern/libmv/libmv/multiview/homography.cc
@@ -330,9 +330,7 @@ bool EstimateHomography2DFromCorrespondences(
LG << "Final refined matrix:\n" << *H;
- return !(summary.termination_type == ceres::DID_NOT_RUN ||
- summary.termination_type == ceres::NUMERICAL_FAILURE ||
- summary.termination_type == ceres::USER_ABORT);
+ return summary.IsSolutionUsable();
}
/**
diff --git a/extern/libmv/libmv/tracking/track_region.cc b/extern/libmv/libmv/tracking/track_region.cc
index 9e0bf9a..ef6dac6 100644
--- a/extern/libmv/libmv/tracking/track_region.cc
+++ b/extern/libmv/libmv/tracking/track_region.cc
@@ -1331,9 +1331,7 @@ void TemplatedTrackRegion(const FloatImage &image1,
// Of the things that can happen in the first pass, don't try the brute
// pass (and second attempt) if the error is one of the terminations below.
- if (result->termination == TrackRegionResult::PARAMETER_TOLERANCE ||
- result->termination == TrackRegionResult::FUNCTION_TOLERANCE ||
- result->termination == TrackRegionResult::GRADIENT_TOLERANCE ||
+ if (result->termination == TrackRegionResult::CONVERGENCE ||
result->termination == TrackRegionResult::SOURCE_OUT_OF_BOUNDS ||
result->termination == TrackRegionResult::DESTINATION_OUT_OF_BOUNDS ||
result->termination == TrackRegionResult::INSUFFICIENT_PATTERN_AREA) {
@@ -1488,7 +1486,7 @@ void TemplatedTrackRegion(const FloatImage &image1,
// TODO(keir): Update the result statistics.
// TODO(keir): Add a normalize-cross-correlation variant.
- if (summary.termination_type == ceres::USER_ABORT) {
+ if (summary.termination_type == ceres::USER_FAILURE) {
result->termination = TrackRegionResult::FELL_OUT_OF_BOUNDS;
return;
}
@@ -1500,8 +1498,7 @@ void TemplatedTrackRegion(const FloatImage &image1,
}
// Avoid computing correlation for tracking failures.
- HANDLE_TERMINATION(DID_NOT_RUN);
- HANDLE_TERMINATION(NUMERICAL_FAILURE);
+ HANDLE_TERMINATION(FAILURE);
// Otherwise, run a final correlation check.
if (options.minimum_correlation > 0.0) {
@@ -1520,13 +1517,11 @@ void TemplatedTrackRegion(const FloatImage &image1,
// than Ceres's parameter tolerance, which operates on the raw parameter
// values rather than the pixel shifts of the patch corners.
if (summary.termination_type == ceres::USER_SUCCESS) {
- result->termination = TrackRegionResult::PARAMETER_TOLERANCE;
+ result->termination = TrackRegionResult::CONVERGENCE;
return;
}
- HANDLE_TERMINATION(PARAMETER_TOLERANCE);
- HANDLE_TERMINATION(FUNCTION_TOLERANCE);
- HANDLE_TERMINATION(GRADIENT_TOLERANCE);
+ HANDLE_TERMINATION(CONVERGENCE);
HANDLE_TERMINATION(NO_CONVERGENCE);
#undef HANDLE_TERMINATION
};
diff --git a/extern/libmv/libmv/tracking/track_region.h b/extern/libmv/libmv/tracking/track_region.h
index 58742ca..2ced9dd 100644
--- a/extern/libmv/libmv/tracking/track_region.h
+++ b/extern/libmv/libmv/tracking/track_region.h
@@ -110,12 +110,9 @@ struct TrackRegionOptions {
struct TrackRegionResult {
enum Termination {
// Ceres termination types, duplicated; though, not the int values.
- PARAMETER_TOLERANCE,
- FUNCTION_TOLERANCE,
- GRADIENT_TOLERANCE,
+ CONVERGENCE,
NO_CONVERGENCE,
- DID_NOT_RUN,
- NUMERICAL_FAILURE,
+ FAILURE,
// Libmv specific errors.
SOURCE_OUT_OF_BOUNDS,
diff --git a/extern/libmv/third_party/ceres/ChangeLog b/extern/libmv/third_party/ceres/ChangeLog
index 2bd4206..854712f 100644
--- a/extern/libmv/third_party/ceres/ChangeLog
+++ b/extern/libmv/third_party/ceres/ChangeLog
@@ -1,3 +1,147 @@
+commit 2b16b0080b6e673eaaf9ed478c9e971d9fcd65de
+Author: Sameer Agarwal <sameeragarwal at google.com>
+Date: Fri Dec 20 15:22:26 2013 -0800
+
+ CompressedRowSparseMatrix::AppendRows and DeleteRows bugfix.
+
+ CompressedRowSparseMatrix can store the row and column block structure
+ but the AppendRows and DeleteRows methods did not pay attention to them.
+ This meant that it was possible to get to a CompressedRowSparseMatrix
+ whose block structure did not match the contents of the matrix.
+
+ This change fixes this problem.
+
+ Change-Id: I1b3c807fc03d8c049ee20511e2bc62806d211b81
+
+commit 27bb4a8589c47a65b5ea2c01872a903043d0ef74
+Author: Sameer Agarwal <sameeragarwal at google.com>
+Date: Wed Dec 18 13:06:58 2013 -0800
+
+ Handle empty problems consistently.
+
+ Until now Ceres was inconsistent in the way it handled a solve
+ call on an "empty" Problem. If the problem did not contain
+ any residual or parameter blocks, it failed. However, if after
+ constructing the reduced program, the problem was found to not
+ contain any modifiable parameter blocks, it was considered a valid
+ problem which had a constant objective function value.
+
+ When creating problems automatically, it is often the case that
+ an empty problem is a corner case. This change makes handling this
+ corner case consistent with the rest of Ceres logic.
+
+ Change-Id: Ia9da09fbf5d5cd7eae6b39a92c1976b8645db9fe
+
+commit dcee120bac04911bf01d8365bddca87c74ce2af9
+Author: Sameer Agarwal <sameeragarwal at google.com>
+Date: Sat Dec 7 21:48:56 2013 -0800
+
+ Consolidate SolverTerminationType enum.
+
+ 1. Rename SolverTerminationType to TerminationType.
+ 2. Consolidate the enum as
+ a. CONVERGENCE - subsumes FUNCTION_TOLERANCE, PARAMETER_TOLERANCE and GRADIENT_TOLERANCE
+ b. NO_CONVERGENCE
+ c. FAILURE - captures all kinds of failures including DID_NOT_RUN.
+ d. USER_SUCCESS
+ e. USER_FAILURE
+ 3. Solver::Summary::error is renamed to be Solver::Summary::message, to both
+ reduce confusion as well as capture its true meaning.
+
+ Change-Id: I27a382e66e67f5a4750d0ee914d941f6b53c326d
+
+commit d1cf320bb4f032cb14b20114a29ce2d867307492
+Author: Sergey Sharybin <sergey.vfx at gmail.com>
+Date: Thu Nov 28 23:11:11 2013 +0600
+
+ Made collections port compatible with MSVC2008
+
+ The issue was caused by the fact that in this version
+ of MSVC unordered_map class is defined in <unordered_map>
+ header file, but this file declares the class int std::tr1
+ namespace.
+
+ This confused existing assumption that if there's an
+ existing <unordered_map> file then class is declared
+ in std namespace.
+
+ Added an extra check to CMake which detects whether
+ it's std or std::tr1 which actually contains class
+ of unordered_map.
+
+ Change-Id: Ic5cf41913895a6ce8e791cc7602d7cf5492c34de
+
+commit 324eccb5f6ce2a1a0061ec9f3c40778a029a2d97
+Author: Sameer Agarwal <sameeragarwal at google.com>
+Date: Tue Dec 3 09:28:14 2013 -0800
+
+ Restore the state of the Problem after a call to Evaluate.
+
+ Calling Problem::Evaluate mutates the state of the parameter blocks.
+ In particular, depending on the set and order of parameter blocks
+ passed to the evaluate call, it will change the internal indexing
+ used by the Program object used by ProblemImpl. This needs to be
+ undone before Evaluate returns, otherwise the Problem object
+ is in an invalid state.
+
+ To help with testing and debugging in the future, a new method
+ Program::IsValid has been added which checks whether the problem
+ has its parameter and residual blocks in the right state.
+
+ Thanks to Stefan Leutenegger for reporting this.
+
+ Change-Id: I209b486a31433f0cbb58b570047649eca6d42b56
+
+commit 3b1ad31a1fe89fe0bd78e1fffdf22d47d43faaf5
+Author: Sameer Agarwal <sameeragarwal at google.com>
+Date: Mon Dec 2 15:43:20 2013 -0800
+
+ Fix build breakage on old versions of SuiteSparse.
+
+ Change-Id: I2a061615fc374abef2ed323c298359002a6fc5f1
+
+commit 5fd480692b0a0c87e2af2f5a8754042a14f5f089
+Author: Sameer Agarwal <sameeragarwal at google.com>
+Date: Mon Dec 2 12:16:53 2013 -0800
+
+ Add more documentation to the linear solver enums.
+
+ Change-Id: Id57f76f73fa38043c0b6729972b1de8578ad7ede
+
+commit d73acd035359886dfa1c5762b01c6f6449edcab8
+Author: Sameer Agarwal <sameeragarwal at google.com>
+Date: Mon Dec 2 12:02:03 2013 -0800
+
+ Lint cleanup from William Rucklidge.
+
+ Change-Id: I8abcfd369f41b895ce746a21a35f250fe05c39d1
+
+commit 3faac6a28cec4c99c41421d3f585f3786be443b3
+Author: Sameer Agarwal <sameeragarwal at google.com>
+Date: Thu Nov 28 07:13:26 2013 -0800
+
+ More lint cleanups and breakage fixes.
+
+ The previous CL was a premature submit due to lack of coffee.
+
+ Change-Id: Id425d0ef332f569a954f0413e6b1ae6087f40f30
+
+commit ed92366592a951041bd0367c24006101ef
@@ Diff output truncated at 10240 characters. @@
More information about the Bf-blender-cvs
mailing list