C++ – How to solve an error with imgproc.hpp and core.hpp

copencv

i used a c++ programm for image processing using opencv 2.1. and that program has below include files:

#include "opencv2/core/core.hpp"
#include "opencv2/imgproc/imgproc.hpp"
#include "opencv2/highgui/highgui.hpp"
#include <iostream>
#include <math.h>
#include <string.h>

but after debuging the program i get error message as:

fatal error C1083: Cannot open include file: 'opencv2/core/core.hpp': No such file or directory.

that is same as for imgproc.hpp and highgui.hpp after that i changed #include "opencv2/highgui/highgui.hpp" to #include <highgui.h> and that error solved.

But i could not find a solution for imgproc.hpp and highgui.hpp and there are no files named imgproc.hpp and highgui.hpp inside the opencv folder.

How can i solve this error?

Best Answer

From the path separator, I assume you are using *nix OS. So the following shell commands should help you to find the correct location of the header files:

locate highgui.h
locate highgui.hpp