lincolnhard / head-pose-estimation

Real-time head pose estimation built with OpenCV and dlib
MIT License
580 stars 172 forks source link

cv::Mat does not accept four-parameter constructor #33

Closed ssterling closed 3 years ago

ssterling commented 3 years ago

There doesn’t seem to exist a constructor for a cv::Mat object which accepts the four parameters specified in your C++ code. Are you using a specific version of OpenCV which has such a constructor, or is my compiler (clang) simply misunderstanding something?

D:\path\to\face.cc(63,43): error : no matching constructor for initialization of 'cv::Mat'
          static const cv::Mat camera_intrinsics = cv::Mat(3, 3, CV_64FC1, K);
                                                   ^       ~~~~~~~~~~~~~~~~~
ssterling commented 3 years ago

Turns out it was because I had made K[9] and D[5] constexpr. Oops.