fatal error: opencv2/core/core.hpp: No such file or directory when run capture on Ubuntu 14.04

5,106 views
Skip to first unread message

Jr-Hung Lin

unread,
Apr 3, 2016, 10:33:50 AM4/3/16
to pupil-discuss
Dear all:

I try to run capture from opensource on Ubuntu 14.04.

1. I install all dependencies following the instruction on the website (https://github.com/pupil-labs/pupil/wiki/Dependencies-Installation-Linux)
    , except the ffmpeg modules is https://www.ffmpeg.org/releases/ffmpeg-2.1.8.tar.gz. This can fix some error. 
2. PyAV is working based on some tests.

However when I try to run capture by "sudo python main.py"  under /pupil/pupil_src/capture/.
There are some errors. It says that fatal error: opencv2/core/core.hpp: No such file or directory.
The ../../../shared_cpp/include/common/types.h try to include files  #include <opencv2/core/core.hpp>, but failed.

3. I check whether cv2 is installed using (python import) and it says that the version of cv2 is 2.4.8. But I cannot
    find any files similar to opencv2/core/core.hpp. 

I appreciate if anyone can provide information regarding this issue.

Below are the error message.
======================================================================================
running build_ext
building 'calibration_methods' extension
x86_64-linux-gnu-gcc -pthread -fno-strict-aliasing -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fPIC -I/usr/lib/python2.7/dist-packages/numpy/core/include -I../../../capture/pupil_detectors/singleeyefitter -I../../../shared_cpp/include -I/usr/local/include/eigen3 -I/usr/include/eigen3 -I/usr/include/python2.7 -c calibration_methods.cpp -o build/temp.linux-x86_64-2.7/calibration_methods.o -std=c++11 -w -O2
cc1plus: warning: command line option ??Wstrict-prototypes??is valid for C/ObjC but not for C++ [enabled by default]
In file included from bundleCalibration.h:23:0,
                 from calibration_methods.cpp:285:
../../../shared_cpp/include/common/types.h:14:33: fatal error: opencv2/core/core.hpp: No such file or directory
 #include <opencv2/core/core.hpp>
                                 ^
compilation terminated.
error: command 'x86_64-linux-gnu-gcc' failed with exit status 1
Process Process-1:
Traceback (most recent call last):
  File "/usr/lib/python2.7/multiprocessing/process.py", line 258, in _bootstrap
    self.run()
  File "/usr/lib/python2.7/multiprocessing/process.py", line 114, in run
    self._target(*self._args, **self._kwargs)
  File "/home/john/pupil/pupil_src/capture/world.py", line 79, in world
    from calibration_routines import calibration_plugins, gaze_mapping_plugins
  File "/home/john/pupil/pupil_src/shared_modules/calibration_routines/__init__.py", line 17, in <module>
    from screen_marker_calibration import Screen_Marker_Calibration
  File "/home/john/pupil/pupil_src/shared_modules/calibration_routines/screen_marker_calibration.py", line 28, in <module>
    from finish_calibration import finish_calibration
  File "/home/john/pupil/pupil_src/shared_modules/calibration_routines/finish_calibration.py", line 19, in <module>
    from optimization_calibration import  bundle_adjust_calibration
  File "/home/john/pupil/pupil_src/shared_modules/calibration_routines/optimization_calibration/__init__.py", line 18, in <module>
    from calibration_methods import  bundle_adjust_calibration
ImportError: No module named calibration_methods


 

Pupil Labs Info

unread,
Apr 6, 2016, 5:57:16 AM4/6/16
to pupil-...@googlegroups.com
The problem here is that gcc cannot find your opencv source files. 

Please make sure your paths are set up right.

M



--
You received this message because you are subscribed to the Google Groups "pupil-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to pupil-discus...@googlegroups.com.
To post to this group, send email to pupil-...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/pupil-discuss/b5a1e8c4-87eb-4ee4-b638-e1b721ca3e83%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.



--
Pupil Labs
research + development + design

Jr-Hung Lin

unread,
Apr 6, 2016, 6:08:26 AM4/6/16
to pupil-discuss
Dear M:

Thanks for your reply. It helps a lot. One more question:

Does it mean that I have to  install OpenCV Source Code or I just need to 
need to modify shared_cpp/include/common/types.h ?

Best
                            John

Pupil Labs Info

unread,
May 14, 2016, 12:55:48 PM5/14/16
to pupil-...@googlegroups.com
Sorry to not have replied to this:

You will need to install opencv via:

```shell
apt-get install libopencv-dev
```

Best,

Moritz




For more options, visit https://groups.google.com/d/optout.
Reply all
Reply to author
Forward
0 new messages