compiling opencv for OTB [closed]

asked 2014-09-04 01:19:51 -0500

I am trying to use OpenCV for the OTB library on Linux. I've downloaded openCV 2.4.9 and compiled it with cmake/make. When I compile OTB using opencv, I have a bunch of error messages due to missing files in opencv2. There is a single header in this directory and I don't find the other headers to be included. Where can I find those missing files ?

#include "opencv2/core/core_c.h"
#include "opencv2/core/core.hpp"
#include "opencv2/flann/miniflann.hpp"
#include "opencv2/imgproc/imgproc_c.h"
#include "opencv2/imgproc/imgproc.hpp"
#include "opencv2/photo/photo.hpp"
#include "opencv2/video/video.hpp"
#include "opencv2/features2d/features2d.hpp"
#include "opencv2/objdetect/objdetect.hpp"
#include "opencv2/calib3d/calib3d.hpp"
#include "opencv2/ml/ml.hpp"
#include "opencv2/highgui/highgui_c.h"
#include "opencv2/highgui/highgui.hpp"
#include "opencv2/contrib/contrib.hpp"
edit retag flag offensive reopen merge delete

Closed for the following reason the question is answered, right answer was accepted by berak
close date 2014-09-08 04:33:02.379107

Comments

don't look in opencv/include, but your_install_folder/include (given, you ran make install, anything nessecary should have been copied there)

berak gravatar imageberak ( 2014-09-04 01:24:31 -0500 )edit

I could not run make install because I am not admin. Is it necessary ?

radouxju gravatar imageradouxju ( 2014-09-04 02:32:32 -0500 )edit

you could try to install it to a path where you're allowed to do so, like /home/me

cmake -DOPENCV_INSTALL_PREFIX=/home/me

if that's still not possible, you will have to add all include folders from the modules to your include path, like -Iopencv/modules/core/include (very painful)

berak gravatar imageberak ( 2014-09-04 02:40:30 -0500 )edit

I asked my admin to run the make install, but it did not help. The problem is still the same: I can find core and flann, but the other modules are missing.

radouxju gravatar imageradouxju ( 2014-09-04 06:37:47 -0500 )edit

@berak It worked with a local install dir, thanks.

radouxju gravatar imageradouxju ( 2014-09-08 04:26:25 -0500 )edit

ahh, good.

berak gravatar imageberak ( 2014-09-08 04:32:26 -0500 )edit