libmv: fix matrix address being printed instead of actual values

This commit is contained in:
Sergey Sharybin 2013-10-02 10:18:43 +00:00
parent 0959482acb
commit 724b015da2
3 changed files with 16 additions and 12 deletions

@ -446,14 +446,16 @@ class FundamentalSymmetricEpipolarCostFunctor {
}; };
/* Fundamental transformation estimation. */ /* Fundamental transformation estimation. */
bool FundamentalFromCorrespondencesEuc(const Mat &x1, bool FundamentalFromCorrespondencesEuc(
const Mat &x2, const Mat &x1,
const FundamentalEstimationOptions &options, const Mat &x2,
Mat3 *F) { const FundamentalEstimationOptions &options,
Mat3 *F) {
// Step 1: Algebraic fundamental estimation. // Step 1: Algebraic fundamental estimation.
bool algebraic_success = NormalizedEightPointSolver(x1, x2, F); bool algebraic_success = NormalizedEightPointSolver(x1, x2, F);
LG << "Algebraic result " << algebraic_success << ", estimated matrix " << F; LG << "Algebraic result " << algebraic_success
<< ", estimated matrix:\n" << *F;
if (!algebraic_success && !options.use_refine_if_algebraic_fails) { if (!algebraic_success && !options.use_refine_if_algebraic_fails) {
return false; return false;
@ -490,7 +492,7 @@ bool FundamentalFromCorrespondencesEuc(const Mat &x1,
VLOG(1) << "Summary:\n" << summary.FullReport(); VLOG(1) << "Summary:\n" << summary.FullReport();
LG << "Final refined matrix: " << F; LG << "Final refined matrix:\n" << *F;
return !(summary.termination_type == ceres::DID_NOT_RUN || return !(summary.termination_type == ceres::DID_NOT_RUN ||
summary.termination_type == ceres::NUMERICAL_FAILURE); summary.termination_type == ceres::NUMERICAL_FAILURE);

@ -175,10 +175,11 @@ struct FundamentalEstimationOptions {
* correspondences by doing algebraic estimation first followed with result * correspondences by doing algebraic estimation first followed with result
* refinement. * refinement.
*/ */
bool FundamentalFromCorrespondencesEuc(const Mat &x1, bool FundamentalFromCorrespondencesEuc(
const Mat &x2, const Mat &x1,
const FundamentalEstimationOptions &options, const Mat &x2,
Mat3 *F); const FundamentalEstimationOptions &options,
Mat3 *F);
} // namespace libmv } // namespace libmv

@ -220,7 +220,8 @@ bool Homography2DFromCorrespondencesEuc(
Homography2DFromCorrespondencesLinear(x1, x2, H, Homography2DFromCorrespondencesLinear(x1, x2, H,
options.expected_algebraic_precision); options.expected_algebraic_precision);
LG << "Algebraic result " << algebraic_success << ", estimated matrix " << H; LG << "Algebraic result " << algebraic_success
<< ", estimated matrix:\n" << *H;
if (!algebraic_success && !options.use_refine_if_algebraic_fails) { if (!algebraic_success && !options.use_refine_if_algebraic_fails) {
return false; return false;
@ -257,7 +258,7 @@ bool Homography2DFromCorrespondencesEuc(
VLOG(1) << "Summary:\n" << summary.FullReport(); VLOG(1) << "Summary:\n" << summary.FullReport();
LG << "Final refined matrix: " << H; LG << "Final refined matrix:\n" << *H;
return !(summary.termination_type == ceres::DID_NOT_RUN || return !(summary.termination_type == ceres::DID_NOT_RUN ||
summary.termination_type == ceres::NUMERICAL_FAILURE); summary.termination_type == ceres::NUMERICAL_FAILURE);