0

I am trying to test out object detection on a video I have but ran into this issue

Demo needs OpenCV for webcam images.

So I changed OPENCV=1 in the Makefile but ran into this error now

./src/image_opencv.cpp:5:10: fatal error: 'opencv2/opencv.hpp' file not found
#include "opencv2/opencv.hpp"
         ^~~~~~~~~~~~~~~~~~~~
1 error generated.

OpenCV works on my laptop for both Xcode and VSCode so I am not sure why this is happening.

yudhiesh
  • 6,383
  • 3
  • 16
  • 49
  • What is the opencv version you are using ? Can you run this on terminal ```pkg-config --modversion opencv``` – Yunus Temurlenk May 23 '20 at 14:22
  • @YunusTemurlenk it shows 2.x.x and when I try pkg-config --modversion opencv4 it says 4.3.0. Could me having both of them be the problem? – yudhiesh May 23 '20 at 14:33
  • @YunusTemurlenk also I have no issue using opencv on Xcode for my object detection project. – yudhiesh May 23 '20 at 14:36
  • yolov3 works for opencv 3.4.2 or higher. You cant have 2 versions of opencv at the same time. If you try to install opencv before uninstalling previous one it will occur some problems. My suggestion is clear opencv and install again. *Note:* I might be wrong – Yunus Temurlenk May 23 '20 at 14:40
  • How do i uninstall Opencv 2.x.x? Since its not a specific version? – yudhiesh May 23 '20 at 15:10

1 Answers1

0

The error was fixed by setting the path to the absolute path of the model weights and model configuration files.

yudhiesh
  • 6,383
  • 3
  • 16
  • 49