8000 Error for solvePnP in feature_detector.cpp when using cmake · Issue #1 · jan-skarupa/facerig · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Error for solvePnP in feature_detector.cpp when using cmake #1

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
NerveCoordinator opened this issue Aug 17, 2019 · 0 comments
Open

Comments

@NerveCoordinator
Copy link
NerveCoordinator commented Aug 17, 2019

I installed the following libraries:

sudo apt install libglm-dev libopencv-dev libassimp-dev libglfw3 libglfw3-dev

but when I run cmake I get the following error:

[ 45%] Linking CXX static library libRender.a
[ 65%] Built target Render
Scanning dependencies of target InputPipeline
[ 70%] Building CXX object src/input_pipeline/CMakeFiles/InputPipeline.dir/analyzers/face_detector_harr.cpp.o
[ 75%] Building CXX object src/input_pipeline/CMakeFiles/InputPipeline.dir/analyzers/feature_detector.cpp.o
/home/zephyr/workspace/ML/HelperCelestAI/facerig/src/input_pipeline/analyzers/feature_detector.cpp: In member function ‘std::array<float, 3> FeatureDetector::detect_face_direction(const std::array<cv::Point_<int>, 68>&)’:
/home/zephyr/workspace/ML/HelperCelestAI/facerig/src/input_pipeline/analyzers/feature_detector.cpp:38:18: error: invalid initialization of reference of type ‘cv::InputArray’ {aka ‘const cv::_InputArray&’} from expression of type ‘std::array<cv::Point3_<double>, 6>’
     cv::solvePnP(reference_points, rigging_landmarks, camera_matrix, dist_coeffs, rotation_vector, translation_vector);
                  ^~~~~~~~~~~~~~~~
In file included from /usr/include/opencv2/opencv.hpp:56,
                 from /home/zephyr/workspace/ML/HelperCelestAI/facerig/src/input_pipeline/analyzers/feature_detector.h:4,
                 from /home/zephyr/workspace/ML/HelperCelestAI/facerig/src/input_pipeline/analyzers/feature_detector.cpp:1:
/usr/include/opencv2/calib3d.hpp:581:19: note: in passing argument 1 of ‘bool cv::solvePnP(cv::InputArray, cv::InputArray, cv::InputArray, cv::InputArray, cv::OutputArray, cv::OutputArray, bool, int)’
 CV_EXPORTS_W bool solvePnP( InputArray objectPoints, InputArray imagePoints,
                   ^~~~~~~~
make[2]: *** [src/input_pipeline/CMakeFiles/InputPipeline.dir/build.make:76: src/input_pipeline/CMakeFiles/InputPipeline.dir/analyzers/feature_detector.cpp.o] Error 1
make[1]: *** [CMakeFiles/Makefile2:129: src/input_pipeline/CMakeFiles/InputPipeline.dir/all] Error 2
make: *** [Makefile:84: all] Error 2

As far as I can tell openCV is installed correctly (tested with the sample code here). The core of this error appears to be this line:

feature_detector.cpp:38:18: error: invalid initialization of reference of type ‘cv::InputArray’ {aka ‘const cv::_InputArray&’} from expression of type ‘std::array<cv::Point3_<double>, 6>’

I don't know OpenCV, so I'm not quite sure where to go from here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant
0