Skip to content

Commit 933f53e

Browse files
committed
Merge pull request #956 from alalek:opencv_world_with_contrib
2 parents 0514c1f + 0729569 commit 933f53e

30 files changed

+38
-266
lines changed

modules/dnn/CMakeLists.txt

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@ if(WINRT)
33
endif()
44

55
set(the_description "Deep neural network module. It allows to load models from different frameworks and to make forward pass")
6-
set(OPENCV_MODULE_IS_PART_OF_WORLD OFF)
76

87
ocv_add_module(dnn opencv_core opencv_imgproc PRIVATE_REQUIRED "${LAPACK_LIBRARIES}" WRAP python matlab)
98
ocv_warnings_disable(CMAKE_CXX_FLAGS -Wno-shadow -Wno-parentheses -Wmaybe-uninitialized -Wsign-promo
@@ -36,7 +35,7 @@ endif()
3635
# ----------------------------------------------------------------------------
3736
# Resolve libprotobuf dependency
3837
# ----------------------------------------------------------------------------
39-
include(cmake/OpenCVFindLibProtobuf.cmake)
38+
include(${CMAKE_CURRENT_SOURCE_DIR}/cmake/OpenCVFindLibProtobuf.cmake)
4039
ocv_source_group("Src\\protobuf" FILES ${PROTOBUF_SRCS} ${PROTOBUF_HDRS})
4140
ocv_module_include_directories(include ${PROTOBUF_INCLUDE_DIR})
4241

modules/dnn/cmake/OpenCVFindLibProtobuf.cmake

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ if(PROTOBUF_FOUND)
2828
# nothing
2929
else()
3030
include(${CMAKE_CURRENT_LIST_DIR}/download_protobuf.cmake)
31-
add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/3rdparty/protobuf)
31+
add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/3rdparty/protobuf ${CMAKE_BINARY_DIR}/3rdparty/protobuf)
3232
set(PROTOBUF_LIBRARIES libprotobuf)
3333
set(PROTOBUF_INCLUDE_DIR ${PROTOBUF_CPP_PATH}/protobuf-3.1.0/src)
3434
endif()

modules/dnn/src/caffe/caffe_importer.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@
3939
//
4040
//M*/
4141

42-
#include "precomp.hpp"
42+
#include "../precomp.hpp"
4343
using namespace cv;
4444
using namespace cv::dnn;
4545

modules/dnn/src/layers/convolution_layer.cpp

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -60,12 +60,12 @@ BaseConvolutionLayerImpl::BaseConvolutionLayerImpl():
6060
inpGroupCn(0), outGroupCn(0),
6161
ksize(0), bias(false), tryUseOpenCL(false)
6262
{
63-
#if HAVE_CBLAS
64-
if (getBlasThreads() != cv::getThreadNum())
65-
{
66-
setBlasThreads(cv::getThreadNum());
67-
}
68-
#endif
63+
#ifdef HAVE_LAPACK
64+
if (getBlasThreads() != cv::getThreadNum())
65+
{
66+
setBlasThreads(cv::getThreadNum());
67+
}
68+
#endif
6969
}
7070

7171
void BaseConvolutionLayerImpl::init()

modules/dnn/src/layers/elementwise_layers.hpp

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -46,9 +46,7 @@
4646
#include <cmath>
4747
#include <opencv2/dnn/all_layers.hpp>
4848
#include <opencv2/core/ocl.hpp>
49-
#ifdef HAVE_OPENCL
50-
#include "modules/dnn/opencl_kernels_dnn.hpp"
51-
#endif
49+
#include "opencl_kernels_dnn.hpp"
5250

5351
namespace cv
5452
{

modules/dnn/src/layers/lrn_layer.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@
4242
#include "../precomp.hpp"
4343
#include "layers_common.hpp"
4444
#include "lrn_layer.hpp"
45-
#include "modules/dnn/opencl_kernels_dnn.hpp"
45+
#include "opencl_kernels_dnn.hpp"
4646
#include <opencv2/imgproc.hpp>
4747
#include <opencv2/core/ocl.hpp>
4848
#include <opencv2/dnn/shape_utils.hpp>

modules/dnn/src/layers/softmax_layer.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@
4343
#include "layers_common.hpp"
4444
#include "softmax_layer.hpp"
4545
#include <opencv2/core/ocl.hpp>
46-
#include "modules/dnn/opencl_kernels_dnn.hpp"
46+
#include "opencl_kernels_dnn.hpp"
4747
#include <algorithm>
4848
#include <stdlib.h>
4949
using std::max;

modules/dnn/src/tensorflow/tf_importer.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
Implementation of Tensorflow models parser
1010
*/
1111

12-
#include "precomp.hpp"
12+
#include "../precomp.hpp"
1313
using namespace cv;
1414
using namespace cv::dnn;
1515

modules/dnn/src/torch/THGeneral.cpp

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,22 @@
11
#if defined(ENABLE_TORCH_IMPORTER) && ENABLE_TORCH_IMPORTER
2-
#include "THGeneral.h"
32
#include <opencv2/core.hpp>
43

5-
extern "C"
6-
{
7-
8-
#ifndef TH_HAVE_THREAD
9-
#define __thread
10-
#endif
11-
124
#if defined(TH_DISABLE_HEAP_TRACKING)
135
#elif (defined(__unix) || defined(_WIN32))
146
#include <malloc.h>
157
#elif defined(__APPLE__)
168
#include <malloc/malloc.h>
179
#endif
1810

11+
#include "THGeneral.h"
12+
13+
extern "C"
14+
{
15+
16+
#ifndef TH_HAVE_THREAD
17+
#define __thread
18+
#endif
19+
1920
/* Torch Error Handling */
2021
static void defaultTorchErrorHandlerFunction(const char *msg, void*)
2122
{

modules/dpm/src/precomp.cpp

Lines changed: 0 additions & 44 deletions
This file was deleted.

0 commit comments

Comments
 (0)