Merge branch '2.4'
This commit is contained in:
@@ -1,27 +1,6 @@
|
||||
#include <jni.h>
|
||||
|
||||
#include "converters.h"
|
||||
|
||||
#ifdef ANDROID
|
||||
|
||||
#include <android/log.h>
|
||||
#define LOG_TAG "org.opencv.core.Mat"
|
||||
#define LOGE(...) ((void)__android_log_print(ANDROID_LOG_ERROR, LOG_TAG, __VA_ARGS__))
|
||||
#ifdef DEBUG
|
||||
#define LOGD(...) ((void)__android_log_print(ANDROID_LOG_DEBUG, LOG_TAG, __VA_ARGS__))
|
||||
#else //!DEBUG
|
||||
#define LOGD(...)
|
||||
#endif //DEBUG
|
||||
|
||||
#else
|
||||
#define LOGE(...)
|
||||
#define LOGD(...)
|
||||
#endif
|
||||
|
||||
#ifdef _MSC_VER
|
||||
# pragma warning(disable:4800)
|
||||
#endif
|
||||
|
||||
#include "common.h"
|
||||
#include "opencv2/core/core.hpp"
|
||||
|
||||
using namespace cv;
|
||||
|
@@ -1,12 +1,5 @@
|
||||
#include <jni.h>
|
||||
|
||||
#if defined DEBUG && defined ANDROID
|
||||
#include <android/log.h>
|
||||
#define MODULE_LOG_TAG "OpenCV.highgui"
|
||||
#define LOGD(...) ((void)__android_log_print(ANDROID_LOG_DEBUG, MODULE_LOG_TAG, __VA_ARGS__))
|
||||
#else
|
||||
#define LOGD(...)
|
||||
#endif
|
||||
#define LOG_TAG "org.opencv.highgui.VideoCapture"
|
||||
#include "common.h"
|
||||
|
||||
#include "opencv2/opencv_modules.hpp"
|
||||
#ifdef HAVE_OPENCV_HIGHGUI
|
||||
|
33
modules/java/generator/src/cpp/common.h
Normal file
33
modules/java/generator/src/cpp/common.h
Normal file
@@ -0,0 +1,33 @@
|
||||
#ifndef __JAVA_COMMON_H__
|
||||
#define __JAVA_COMMON_H__
|
||||
|
||||
#if !defined(__ppc__)
|
||||
// to suppress warning from jni.h on OS X
|
||||
# define TARGET_RT_MAC_CFM 0
|
||||
#endif
|
||||
#include <jni.h>
|
||||
|
||||
#ifdef __ANDROID__
|
||||
# include <android/log.h>
|
||||
# define LOGE(...) ((void)__android_log_print(ANDROID_LOG_ERROR, LOG_TAG, __VA_ARGS__))
|
||||
# ifdef DEBUG
|
||||
# define LOGD(...) ((void)__android_log_print(ANDROID_LOG_DEBUG, LOG_TAG, __VA_ARGS__))
|
||||
# else
|
||||
# define LOGD(...)
|
||||
# endif
|
||||
#else
|
||||
# define LOGE(...)
|
||||
# define LOGD(...)
|
||||
#endif
|
||||
|
||||
#include "converters.h"
|
||||
|
||||
#include "core_manual.hpp"
|
||||
#include "features2d_manual.hpp"
|
||||
|
||||
|
||||
#ifdef _MSC_VER
|
||||
# pragma warning(disable:4800 4244)
|
||||
#endif
|
||||
|
||||
#endif //__JAVA_COMMON_H__
|
@@ -1,12 +1,5 @@
|
||||
#include "converters.h"
|
||||
|
||||
#if defined DEBUG && defined ANDROID
|
||||
#include <android/log.h>
|
||||
#define MODULE_LOG_TAG "OpenCV.converters"
|
||||
#define LOGD(...) ((void)__android_log_print(ANDROID_LOG_DEBUG, MODULE_LOG_TAG, __VA_ARGS__))
|
||||
#else //DEBUG
|
||||
#define LOGD(...)
|
||||
#endif //DEBUG
|
||||
#define LOG_TAG "org.opencv.utils.Converters"
|
||||
#include "common.h"
|
||||
|
||||
using namespace cv;
|
||||
|
||||
|
@@ -1,5 +1,3 @@
|
||||
#include <jni.h>
|
||||
|
||||
#include "opencv2/opencv_modules.hpp"
|
||||
#include "opencv2/core/core.hpp"
|
||||
#include "features2d_manual.hpp"
|
||||
|
15
modules/java/generator/src/cpp/core_manual.cpp
Normal file
15
modules/java/generator/src/cpp/core_manual.cpp
Normal file
@@ -0,0 +1,15 @@
|
||||
#define LOG_TAG "org.opencv.core.Core"
|
||||
#include "common.h"
|
||||
|
||||
static int quietCallback( int, const char*, const char*, const char*, int, void* )
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
void cv::setErrorVerbosity(bool verbose)
|
||||
{
|
||||
if(verbose)
|
||||
cv::redirectError(0);
|
||||
else
|
||||
cv::redirectError((cv::ErrorCallback)quietCallback);
|
||||
}
|
@@ -2,6 +2,13 @@
|
||||
|
||||
#include "opencv2/core/core.hpp"
|
||||
|
||||
namespace cv
|
||||
{
|
||||
|
||||
CV_EXPORTS_W void setErrorVerbosity(bool verbose);
|
||||
|
||||
}
|
||||
|
||||
#if 0
|
||||
|
||||
namespace cv
|
||||
|
@@ -1,4 +1,4 @@
|
||||
#include <jni.h>
|
||||
#include "common.h"
|
||||
|
||||
#include "opencv2/opencv_modules.hpp"
|
||||
|
||||
|
@@ -1,24 +1,14 @@
|
||||
#include <jni.h>
|
||||
#define LOG_TAG "org.opencv.android.Utils"
|
||||
#include "common.h"
|
||||
|
||||
#include "opencv2/core/core.hpp"
|
||||
#include "opencv2/imgproc/imgproc.hpp"
|
||||
|
||||
#ifdef ANDROID
|
||||
|
||||
#ifdef __ANDROID__
|
||||
#include <android/bitmap.h>
|
||||
|
||||
#include <android/log.h>
|
||||
#define LOG_TAG "org.opencv.android.Utils"
|
||||
#define LOGE(...) ((void)__android_log_print(ANDROID_LOG_ERROR, LOG_TAG, __VA_ARGS__))
|
||||
#ifdef DEBUG
|
||||
#define LOGD(...) ((void)__android_log_print(ANDROID_LOG_DEBUG, LOG_TAG, __VA_ARGS__))
|
||||
#else //!DEBUG
|
||||
#define LOGD(...)
|
||||
#endif //DEBUG
|
||||
|
||||
using namespace cv;
|
||||
|
||||
|
||||
extern "C" {
|
||||
|
||||
/*
|
||||
@@ -168,4 +158,4 @@ JNIEXPORT void JNICALL Java_org_opencv_android_Utils_nMatToBitmap
|
||||
|
||||
} // extern "C"
|
||||
|
||||
#endif //ANDROID
|
||||
#endif //__ANDROID__
|
Reference in New Issue
Block a user