Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

darknet - update to compile on Debian 11 #2504

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
GPU=0
CUDNN=0
OPENCV=0
OPENCV=1
OPENMP=0
DEBUG=0

Expand Down Expand Up @@ -42,8 +42,8 @@ CFLAGS+=$(OPTS)
ifeq ($(OPENCV), 1)
COMMON+= -DOPENCV
CFLAGS+= -DOPENCV
LDFLAGS+= `pkg-config --libs opencv` -lstdc++
COMMON+= `pkg-config --cflags opencv`
LDFLAGS+= `pkg-config --libs opencv4` -lstdc++
COMMON+= `pkg-config --cflags opencv4`
endif

ifeq ($(GPU), 1)
Expand Down
6 changes: 5 additions & 1 deletion src/image_opencv.cpp
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
#include "opencv2/core/core_c.h"
#include "opencv2/videoio/legacy/constants_c.h"
#include "opencv2/highgui/highgui_c.h"

#ifdef OPENCV

#include "stdio.h"
Expand Down Expand Up @@ -60,7 +64,7 @@ Mat image_to_mat(image im)

image mat_to_image(Mat m)
{
IplImage ipl = m;
IplImage ipl = cvIplImage(m);
image im = ipl_to_image(&ipl);
rgbgr_image(im);
return im;
Expand Down