OpenCV not found when I have it installed? - c++

I am trying to compile a cpp file from the dlib library using cmake.
When I use the command cmake ..
It gives me this error OpenCV not found, so we won't build the webcam_face_pose_ex example.
I have OpenCV installed and to be sure I just reinstalled it using brew install opencv
Would like some help on what else I could do?

Download the opencv sources and follow the instructions to build and install the project using make. This will allow make to install opencv to where it can find it later.
When complete, re-compile the dlib project using cmake.

Related

how to install nasm on mingw for build openh264 library for windows application using pjsip library

I am struggling with build openh264 library in mingw . showing some error like nasm not INSTALLED ERROR found ..How to resolve the issues..
actually i want to add video settings in pjsip library for running call applications..
I have put command in mingw like >>make install .
Anyone know the issues or correct command to build the library.
Any help.thanks in advance...
https://trac.pjsip.org/repos/wiki/Getting-Started/Windows#BuildPreparationforWindows
https://trac.pjsip.org/repos/ticket/1947
I ran into this issue as well, and I had to install NASM on MinGW. The latest version of NASM wouldn't install for me, so I used this version:
https://www.nasm.us/pub/nasm/releasebuilds/2.12.03rc1/
I copied nasm-2.12.03rc1.zip and unzipped it to /MinGW/msys/1.0/nasm-2.12.03rc1/ from Windows Explorer, then I installed it using the steps here:
https://github.com/letolabs/nasm/blob/master/INSTALL
Within the MinGW shell, I then ran "cd /openh264-master/" and "make" to install OpenH264.
Hope this helps!

Fatal error: opencv2/sfm.hpp: no such file or directory #include <opencv2/sfm.hpp>

I'm a beginner with opencv library. I've installed it on Ubuntu 17.04 and everything during the installation was perfect, no error at all.
I've installed the Opencv-master, builded it, then I downloaded the opencv_contrib-master and added it to the build folder.
I'm trying to build the scene_reconstruction using SFM (structure for motion). I've installed all the dependencies with:
sudo apt-get install libeigen3-dev libgflags-dev libgoogle-glog-dev
Then I've installed the Ceres Solver:
git clone https://ceres-solver.googlesource.com/ceres-solver
cd ceres-solver
mkdir build && cd build
cmake ..
make -j4
make test
sudo make install
Everything was ok, no error at all.
I tried to write the example_sfm_scene_reconstruction.cpp following the official documentation from here (Tutorial Scene Reconstruction).
With cmake . there weren't any errors but when I try to do make I've this error:
screenshot
The english version is fatal error: opencv2/sfm.hpp: no such file or directory #include
Maybe the path is not correct or I don't know what to think.
Thanks!
You have to build the OpenCV Release together with the Contrib Release. To build OpenCV with the Contrib Repository you will have to add a parameter to cmake:
cd <opencv_build_directory>
cmake -DOPENCV_EXTRA_MODULES_PATH=<opencv_contrib>/modules <opencv_source_directory>
make -j5
I recommend getting a stable opencv version (e.g. 3.3.1) as opposed to checking out the master branch. Make sure that contrib is the same version. If you are unsure at all, just follow the instructions here:
https://github.com/opencv/opencv_contrib
Also, you will need the dependencies for the sfm module before compiling opencv.

build opencv with extra modules error ocv_download

I try to build openCV with Extramodules. If I try to configure the projectfiles (vc14 x32 on windows 10) with cmake there's the error:
CMake Error at opencv_contrib-master/modules/xfeatures2d/cmake/download_vgg.cmake:13 (ocv_download):
Unknown CMake command "ocv_download".
Did anyone ever have this problem and knows how to solve it?
The simple answer is you are using incompatible versions of opencv and opencv_contrib, you might be installing current version of opencv_contrib on maybe opencv2.4.xx
Well, the download link for opencv contrib in CMake script https://raw.githubusercontent.com/opencv/opencv_3rdparty/fccf7cd6a4b12079f73bbfb21745f9babcd4eb1d now is 400: Invalid request.
From the commit https://github.com/opencv/opencv_contrib/commit/593e78c5d084aa0a29eb1e0459fc7f7a4dd52ea8 you can try to ignore the added line in CMakeLists include(cmake/download_vgg.cmake) and rebuild.
The below is basing on my experience, I'm not sure it will works for OpenCV 3.0.
Maybe you can try to clone opencv contrib from git, then copy it to somewhere (for example modules directory in opencv source code). Then use CMAKE to set OPENCV_EXTRA_MODULES_PATH. If the hash is correct then it won't download and use the offline package.
I have try and build success OpenCV 2.x with IPP.
Hope it help.
Just follow instructions here.
Make sure you have active internet connection while building Opencv with contrib module.
When you hit config button on cmake(gui), it downloads other files like
vgg_generated_...
boostdesc_binboost_...
boostdesc_lbgm.i
P.S: i compiled Opencv 3.1 with contrib. Cmake downloaded required files & configure was Done.

opencv2/opencv.hpp: No such file or directory using Eclipse IDE

I'm trying to test OpenCV (3.0.0) with Eclipse IDE (Version: Mars Release (4.5.0)) but for some reason I fail to successfully include all the library path.
Can you tell me how is it possible that the include directory is in the project explorer with the file *opencv.hpp* in it but still fails to find it during the build process? And how can I fix it?
I'm not sure what operating system you are using or how you installed OpenCV but I faced the same problem when installing OpenCV 3.1.0 on Ubuntu 15.10. I was following these instructions.
It turns out that after I ran make I forgot to run make install to actually install the compiled libraries.
I'm not sure if this problem has anything to do with Eclipse.

Cross compiling opencv project for ARM

How do I cross compile my opencv C++ program for ARM?
I have successfully compiled opencv for ARM, But I haven't run
make install
my understanding is that doing this will move the compiled opencv in my system directories. I already have opencv built and installed for my system. Will installing opencv compiled for ARM mess up my native opencv?
When I compile opencv project for my system I specify the opencv Library Path and header directories with -L and -I options. I want to compile the same project for arm, how do i go about doing this.
Doing a simple
make install
installs the OpenCV in the build directory inside a 'install' folder.
Works only for opencv versions above 2.4.x