-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdarknet.patch
65 lines (61 loc) · 1.54 KB
/
darknet.patch
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
diff --git a/Makefile b/Makefile
index 5635f8f..ab1d1a8 100644
--- a/Makefile
+++ b/Makefile
@@ -1,10 +1,10 @@
-GPU=0
-CUDNN=0
-CUDNN_HALF=0
-OPENCV=0
+GPU=1
+CUDNN=1
+CUDNN_HALF=1
+OPENCV=1
AVX=0
-OPENMP=0
-LIBSO=0
+OPENMP=1
+LIBSO=1
ZED_CAMERA=0
ZED_CAMERA_v2_8=0
@@ -63,7 +63,7 @@ CC=gcc
endif
CPP=g++ -std=c++11
-NVCC=nvcc
+NVCC=/usr/local/cuda/bin/nvcc
OPTS=-Ofast
LDFLAGS= -lm -pthread
COMMON= -Iinclude/ -I3rdparty/stb/include
diff --git a/include/darknet.h b/include/darknet.h
index 892ad71..ac4e043 100644
--- a/include/darknet.h
+++ b/include/darknet.h
@@ -16,6 +16,9 @@
#include <assert.h>
#include <pthread.h>
+#define printf(...)
+#define fprintf(...)
+
#ifndef LIB_API
#ifdef LIB_EXPORTS
#if defined(_MSC_VER)
diff --git a/src/http_stream.cpp b/src/http_stream.cpp
index c8e9b5e..b0fa6e4 100644
--- a/src/http_stream.cpp
+++ b/src/http_stream.cpp
@@ -446,6 +446,7 @@ public:
std::vector<uchar> outbuf;
std::vector<int> params;
+ std::ostream cerr(0);
params.push_back(IMWRITE_JPEG_QUALITY);
params.push_back(quality);
cv::imencode(".jpg", frame, outbuf, params); //REMOVED FOR COMPATIBILITY
@@ -537,7 +538,7 @@ void send_mjpeg(mat_cv* mat, int port, int timeout, int quality)
static MJPG_sender wri(port, timeout, quality);
//cv::Mat mat = cv::cvarrToMat(ipl);
wri.write(*(cv::Mat*)mat);
- std::cout << " MJPEG-stream sent. \n";
+ //std::cout << " MJPEG-stream sent. \n";
}
catch (...) {
cerr << " Error in send_mjpeg() function \n";