Home Ask Login Register

Developers Planet

Your answer is one click away!

WebSight February 2016

fatal error: opencv2/photo.hpp OpenCV 3.0 install

I am compiling, from source, a branch of the artoolkit which relies on OpenCV 3.0. The OS is Ubuntu 14.04.

When i run make it reports this error.....

'fatal error: opencv2/photo.hpp: No such file or directory"

In Ubuntu....

I have usr/local/include/opencv2 which contains core.hpp etc. However there is no module for photo.hpp.

I have attempted to install opencv 3.0 a few times after purging all the opencv2 files in the include folders.

How do i link to this file?




This is a repeat of a questions posted on Opencv Answers that has not recieved any attention.



Jordan Camp February 2016

run sudo apt-get install libopencv-dev from the terminal

the header file photo.hpp is found in /usr/indlude/opencv2/photo

The Makefile you have is searching for this header in /usr/include/opencv2 which is one level above where apt has installed it so you need to put a symlink in that directory which points to the correct location. Type this into your terminal

cd /usr/include/opencv2
sudo ln -s /usr/include/opencv2/photo/photo.hpp photo.hpp

then run make again and it should compile

Post Status

Asked in February 2016
Viewed 1,239 times
Voted 8
Answered 1 times


Leave an answer

Quote of the day: live life