Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in / Register
Toggle navigation
O
opencv
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Packages
Packages
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
submodule
opencv
Commits
60676dbb
Commit
60676dbb
authored
Jul 20, 2016
by
Alexander Alekhin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix build: move LOG macro from stitching public headers
parent
b34272f8
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
64 additions
and
51 deletions
+64
-51
util.hpp
modules/stitching/include/opencv2/stitching/detail/util.hpp
+0
-50
precomp.hpp
modules/stitching/src/precomp.hpp
+2
-0
util_log.hpp
modules/stitching/src/util_log.hpp
+58
-0
stitching_detailed.cpp
samples/cpp/stitching_detailed.cpp
+4
-1
No files found.
modules/stitching/include/opencv2/stitching/detail/util.hpp
View file @
60676dbb
...
@@ -46,56 +46,6 @@
...
@@ -46,56 +46,6 @@
#include <list>
#include <list>
#include "opencv2/core.hpp"
#include "opencv2/core.hpp"
#ifndef ENABLE_LOG
#define ENABLE_LOG 0
#endif
// TODO remove LOG macros, add logging class
#if ENABLE_LOG
#ifdef ANDROID
#include <iostream>
#include <sstream>
#include <android/log.h>
#define LOG_STITCHING_MSG(msg) \
do { \
Stringstream _os; \
_os << msg; \
__android_log_print(ANDROID_LOG_DEBUG, "STITCHING", "%s", _os.str().c_str()); \
} while(0);
#else
#include <iostream>
#define LOG_STITCHING_MSG(msg) for(;;) { std::cout << msg; std::cout.flush(); break; }
#endif
#else
#define LOG_STITCHING_MSG(msg)
#endif
#define LOG_(_level, _msg) \
for(;;) \
{ \
using namespace std; \
if ((_level) >= ::cv::detail::stitchingLogLevel()) \
{ \
LOG_STITCHING_MSG(_msg); \
} \
break; \
}
#define LOG(msg) LOG_(1, msg)
#define LOG_CHAT(msg) LOG_(0, msg)
#define LOGLN(msg) LOG(msg << std::endl)
#define LOGLN_CHAT(msg) LOG_CHAT(msg << std::endl)
//#if DEBUG_LOG_CHAT
// #define LOG_CHAT(msg) LOG(msg)
// #define LOGLN_CHAT(msg) LOGLN(msg)
//#else
// #define LOG_CHAT(msg) do{}while(0)
// #define LOGLN_CHAT(msg) do{}while(0)
//#endif
namespace
cv
{
namespace
cv
{
namespace
detail
{
namespace
detail
{
...
...
modules/stitching/src/precomp.hpp
View file @
60676dbb
...
@@ -99,4 +99,6 @@
...
@@ -99,4 +99,6 @@
# include "opencv2/stitching/stitching_tegra.hpp"
# include "opencv2/stitching/stitching_tegra.hpp"
#endif
#endif
#include "util_log.hpp"
#endif
#endif
modules/stitching/src/util_log.hpp
0 → 100644
View file @
60676dbb
// This file is part of OpenCV project.
// It is subject to the license terms in the LICENSE file found in the top-level directory
// of this distribution and at http://opencv.org/license.html.
#ifndef __OPENCV_STITCHING_UTIL_LOG_HPP__
#define __OPENCV_STITCHING_UTIL_LOG_HPP__
#ifndef ENABLE_LOG
#define ENABLE_LOG 0
#endif
// TODO remove LOG macros, add logging class
#if ENABLE_LOG
#ifdef ANDROID
#include <iostream>
#include <sstream>
#include <android/log.h>
#define LOG_STITCHING_MSG(msg) \
do { \
Stringstream _os; \
_os << msg; \
__android_log_print(ANDROID_LOG_DEBUG, "STITCHING", "%s", _os.str().c_str()); \
} while(0);
#else
#include <iostream>
#define LOG_STITCHING_MSG(msg) for(;;) { std::cout << msg; std::cout.flush(); break; }
#endif
#else
#define LOG_STITCHING_MSG(msg)
#endif
#define LOG_(_level, _msg) \
for(;;) \
{ \
using namespace std; \
if ((_level) >= ::cv::detail::stitchingLogLevel()) \
{ \
LOG_STITCHING_MSG(_msg); \
} \
break; \
}
#define LOG(msg) LOG_(1, msg)
#define LOG_CHAT(msg) LOG_(0, msg)
#define LOGLN(msg) LOG(msg << std::endl)
#define LOGLN_CHAT(msg) LOG_CHAT(msg << std::endl)
//#if DEBUG_LOG_CHAT
// #define LOG_CHAT(msg) LOG(msg)
// #define LOGLN_CHAT(msg) LOGLN(msg)
//#else
// #define LOG_CHAT(msg) do{}while(0)
// #define LOGLN_CHAT(msg) do{}while(0)
//#endif
#endif // __OPENCV_STITCHING_UTIL_LOG_HPP__
samples/cpp/stitching_detailed.cpp
View file @
60676dbb
...
@@ -56,10 +56,13 @@
...
@@ -56,10 +56,13 @@
#include "opencv2/stitching/detail/matchers.hpp"
#include "opencv2/stitching/detail/matchers.hpp"
#include "opencv2/stitching/detail/motion_estimators.hpp"
#include "opencv2/stitching/detail/motion_estimators.hpp"
#include "opencv2/stitching/detail/seam_finders.hpp"
#include "opencv2/stitching/detail/seam_finders.hpp"
#include "opencv2/stitching/detail/util.hpp"
#include "opencv2/stitching/detail/warpers.hpp"
#include "opencv2/stitching/detail/warpers.hpp"
#include "opencv2/stitching/warpers.hpp"
#include "opencv2/stitching/warpers.hpp"
#define ENABLE_LOG 1
#define LOG(msg) std::cout << msg
#define LOGLN(msg) std::cout << msg << std::endl
using
namespace
std
;
using
namespace
std
;
using
namespace
cv
;
using
namespace
cv
;
using
namespace
cv
::
detail
;
using
namespace
cv
::
detail
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment