severin-lemaignan / gazr

3D head pose estimation using monocular vision
Other
179 stars 55 forks source link

Could not find a package configuration file provided by "dlib" #2

Closed sarmadm closed 7 years ago

sarmadm commented 7 years ago

Hi

I have installed dlib and it works fine ,

when I cmake gazr this error is shown :

 ubuntu@ubuntu~/gazr/build$ cmake ..

CMake Error at CMakeLists.txt:6 (find_package):
  By not providing "Finddlib.cmake" in CMAKE_MODULE_PATH this project has
  asked CMake to find a package configuration file provided by "dlib", but
  CMake did not find one.

  Could not find a package configuration file provided by "dlib" with any of
  the following names:

    dlibConfig.cmake
    dlib-config.cmake

can you help please to resolve this

severin-lemaignan commented 7 years ago

Well, you might need to tell CMake where you have installed CMake. Something like:

$ cmake -Ddlib_DIR=<dlib install path>/lib/cmake/dlib ..

should do.

sarmadm commented 7 years ago

Hi , I'm using opencv 3.2

I have got errors and I changed

#include <opencv2/highgui/highgui.hpp> to #include "opencv2/highgui.hpp" and #include <opencv2/imgproc/imgproc.hpp> to #include "opencv2/imgproc.hpp"

and it comipled it successfuly , but when I try to execute this line

./head_pose_test ../share/shape_predictor_68_face_landmarks.dat it shows this error

ubuntu@ubuntu:~/gazr/build$ ./head_pose_test ../share/shape_predictor_68_face_landmarks.dat

bash: ./head_pose_test: No such file or directory

here how I compile it

ubuntu@ubuntu:~/gazr/build$ cmake -Ddlib_DIR=home/tofi/dlib/lib/cmake/dlib ..

-- Found OpenCV: /usr (found version "3.2.0") found components:  core imgproc calib3d highgui 
-- OpenCV version: 3.2.0
-- Found OpenCV: /usr (found version "3.2.0") found components:  core imgproc calib3d highgui imgcodecs videoio 
-- Boost version: 1.61.0
-- Found the following Boost libraries:
--   program_options
-- Configuring done
-- Generating done
-- Build files have been written to: /home/tofi/gazr/build

ubuntu@ubuntu:~/gazr/build$ make
[ 25%] Built target gazr
[ 50%] Built target gazr_benchmark_head_pose_single_frame
[ 75%] Built target gazr_show_head_pose
[100%] Built target gazr_estimate_head_direction
ubuntu@ubuntu:~/gazr/build$ ./head_pose_test ../share/shape_predictor_68_face_landmarks.dat
bash: ./head_pose_test: No such file or directory
severin-lemaignan commented 7 years ago

Yes, as you can see from the compilation output, the name of test samples have changed. You can try:

./gazr_show_head_pose ../share/shape_predictor_68_face_landmarks.dat

I'll update the README accordingly.