andrewssobral / vehicle_detection_haarcascades

Vehicle Detection by Haar Cascades with OpenCV
533 stars 521 forks source link

Unable to link to OpenCV #9

Closed absnaik810 closed 7 years ago

absnaik810 commented 7 years ago

I am trying to connect this to OpenCV to run it in Ubuntu. However, I am unable to establish this connection. The details of the error are included in the image below:

capture

It mentions CMAKE_MODULE_PATH, which I was unable to find in the project repository. Could you please help me get around this issue? I am doing this as an academic project and would appreciate your prompt help.

Thanks.

andrewssobral commented 7 years ago

Hi @absnaik810 , it seems that your opencv is not well installed. You can use the following tutorial for help: http://www.pyimagesearch.com/2016/10/24/ubuntu-16-04-how-to-install-opencv/ replacing OpenCV 3.1.0 by OpenCV 2.4.13.2 (last release). You can skip the python step if you don't need. Usually, at the end of compiling OpenCV you need to do:

$ sudo make install
$ sudo ldconfig 

and check by:

$ pkg-config --modversion opencv

Hope this help you.

absnaik810 commented 7 years ago

Hi Andrew,

Thanks for your reply. I tried following the steps in the link that you had provided, but now I am facing a new error that says _it is able to find OpenCV, but OpenCVFOUND is set to FALSE due to which OpenCV is not found. Do you have any suggestions about how we could go about solving this error?

The screenshot of the exact error that we faced is below:

capture

In the meanwhile, we thank you again for your help!

andrewssobral commented 7 years ago

Hi @absnaik810 , What is the output when you run?

$ pkg-config --modversion opencv
absnaik810 commented 7 years ago

It says that it was unable to find the package. Does this mean that it is incorrectly installed? Note that I installed it in a virtual environment and Step#6 in the linked webpage did run successfully.