Darknet: Demo needs OpenCV for webcam images.

Created on 29 Mar 2018  路  12Comments  路  Source: pjreddie/darknet

i googled it and searched stackoverflow, and i am unable to find any solutions.

hope to hear you suggestions!
demo

Most helpful comment

Hi. You should opencv =1 in makefile, and make again

All 12 comments

Hi. You should opencv =1 in makefile, and make again

much appreciate, i follow the readme but didnt see make it again!
it works like charm.

sorry, what do you mean by "You should opencv =1 in makefile, and make again"? what's the command line should I run here?

@namtran0110 You should edit this line in the Makefile file: https://github.com/AlexeyAB/darknet/blob/2c5e383c04655fe45f3f533eb3a69a80acbf3561/Makefile#L4

And then just run command:
make

deepin_screenshot
I edit the line(OPENCV=1) in the Makefile, but when i run make command i get this error, and the darknet file is deleted, someone help me !!!!

image
same with @Bernardo2282 I edit the line(OPENCV=1) in the Makefile and get different error, if use the default(OPENCV=0), it's able to predict image.

Same as above two, would love some more insight into this

Hi,
I am going through the opencv installation for darknet and running into an issue. I spent few hours troubleshooting this to the point that i exhausted all my resources. please help.


ubuntu@ubuntu-ThinkPad-X1-Carbon:~/darknet$ make
g++ -Iinclude/ -Isrc/ -DOPENCV pkg-config --cflags opencv -Wall -Wno-unused-result -Wno-unknown-pragmas -Wfatal-errors -fPIC -Ofast -DOPENCV -c ./src/image_opencv.cpp -o obj/image_opencv.o
Package opencv was not found in the pkg-config search path.
Perhaps you should add the directory containing `opencv.pc'
to the PKG_CONFIG_PATH environment variable
No package 'opencv' found
./src/image_opencv.cpp:5:10: fatal error: opencv2/opencv.hpp: No such file or directory
#include "opencv2/opencv.hpp"
^~~~~~~~
compilation terminated.
Makefile:86: recipe for target 'obj/image_opencv.o' failed
make: * [obj/image_opencv.o] Error 1
ubuntu@ubuntu-ThinkPad-X1-Carbon:~/darknet$ python3
Python 3.6.7 (default, Oct 22 2018, 11:32:17)
[GCC 8.2.0] on linux
Type "help", "copyright", "credits" or "license" for more information.

import cv2
cv2.__version__
'4.0.0'
quit()
ubuntu@ubuntu-ThinkPad-X1-Carbon:~/darknet$


I have got error when I changed opencv=1 and then run make command.
"No package 'opencv' found
./src/image_opencv.cpp:15:36: fatal error: opencv2/core/version.hpp: No such file or directory
#include "
UPDATE:
Solved the problem by correctly installed opencv. It seems that the ubuntu community has completed the documentation on installing openCV, all you have to do now is to download the installation script from https://github.com/jayrambhia/Install-OpenCV/blob/master/Ubuntu/opencv_latest.sh and execute it.

I have encountered the same error when i try this code with yolo. Please give me a solution on this error. I'm so thanks you.

je rencontre la meme dificult茅 avec yolov3

@VanessaMachi... Have you found the solution? please help me with this...I have same issue

Was this page helpful?
0 / 5 - 0 ratings

Related issues

job2003 picture job2003  路  3Comments

arianaa30 picture arianaa30  路  3Comments

sujithm picture sujithm  路  3Comments

cadip92 picture cadip92  路  3Comments

groot-1313 picture groot-1313  路  4Comments