Skip to content

Commit

Permalink
Merge pull request opencv#484 from cbalint13:sfm
Browse files Browse the repository at this point in the history
  • Loading branch information
alalek committed Dec 22, 2015
2 parents df56f27 + a5e7d8f commit 10ad8a9
Showing 1 changed file with 15 additions and 11 deletions.
26 changes: 15 additions & 11 deletions modules/sfm/src/libmv_capi.h
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,10 @@ using namespace cv;
using namespace cv::sfm;
using namespace libmv;

using namespace google;

namespace gflags {}
using namespace gflags;

////////////////////////////////////////
// Based on 'libmv_capi' (blender API)
Expand All @@ -84,26 +88,26 @@ void libmv_initLogging(const char* argv0) {
// Make it so FATAL messages are always print into console.
char severity_fatal[32];
snprintf(severity_fatal, sizeof(severity_fatal), "%d",
google::GLOG_FATAL);
GLOG_FATAL);

google::InitGoogleLogging(argv0);
google::SetCommandLineOption("logtostderr", "1");
google::SetCommandLineOption("v", "0");
google::SetCommandLineOption("stderrthreshold", severity_fatal);
google::SetCommandLineOption("minloglevel", severity_fatal);
InitGoogleLogging(argv0);
SetCommandLineOption("logtostderr", "1");
SetCommandLineOption("v", "0");
SetCommandLineOption("stderrthreshold", severity_fatal);
SetCommandLineOption("minloglevel", severity_fatal);
}

void libmv_startDebugLogging(void) {
google::SetCommandLineOption("logtostderr", "1");
google::SetCommandLineOption("v", "2");
google::SetCommandLineOption("stderrthreshold", "1");
google::SetCommandLineOption("minloglevel", "0");
SetCommandLineOption("logtostderr", "1");
SetCommandLineOption("v", "2");
SetCommandLineOption("stderrthreshold", "1");
SetCommandLineOption("minloglevel", "0");
}

void libmv_setLoggingVerbosity(int verbosity) {
char val[10];
snprintf(val, sizeof(val), "%d", verbosity);
google::SetCommandLineOption("v", val);
SetCommandLineOption("v", val);
}


Expand Down

0 comments on commit 10ad8a9

Please sign in to comment.