Commit 782ccc18 authored by Leonid Beynenson's avatar Leonid Beynenson

Made changes in the stitching module to make correct logging on Android.

parent 5cbec286
......@@ -44,14 +44,27 @@
#define __OPENCV_STITCHING_UTIL_HPP__
#include <list>
#include "cvconfig.h"
#include "opencv2/core/core.hpp"
#define ENABLE_LOG 1
// TODO remove LOG macros, add logging class
#if ENABLE_LOG
#if ANDROID
#include <iostream>
#define LOG(msg) { std::cout << msg; std::cout.flush(); }
#include <sstream>
#include <android/log.h>
#define LOG(msg) \
do { \
std::stringstream _os; \
_os << msg; \
__android_log_print(ANDROID_LOG_DEBUG, "STITCHING", "%s", _os.str().c_str()); \
} while(0);
#else
#include <iostream>
#define LOG(msg) do { std::cout << msg; std::cout.flush(); } while(0);
#endif
#else
#define LOG(msg)
#endif
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment