yuxng / PoseCNN

A Convolutional Neural Network for 6D Object Pose Estimation in Cluttered Scenes
https://rse-lab.cs.washington.edu/projects/posecnn/
MIT License
761 stars 245 forks source link

‘CV_P3P, CV_EPNP not declared in this scope' #85

Closed Moogert closed 5 years ago

Moogert commented 5 years ago

Hello,

When trying to compile, I get the following errors:

/home/trina2/PoseCNN/lib/synthesize/synthesize.cpp:1340:94: error: ‘CV_EPNP’ was not declared in this
 scope
 cv::solvePnP(points3D, points2D, camMat, cv::Mat(), hyp.pose.first, hyp.pose.second, true, CV_EPNP);

and

e2D(const int*, const float*, const float*, int, int, int, float, float, float, float, float*)’:
/home/trina2/PoseCNN/lib/synthesize/synthesize.cpp:1575:19: error: ‘CV_P3P’ was not declared in this 
scope
   int pnpMethod = CV_P3P;

The offending lines are here:

screenshot from 2019-02-27 15-30-06

screenshot from 2019-02-27 15-31-51

has anyone had similar issues?

Moogert commented 5 years ago

It seems the info at this link has solved the problem. In short, replace the variables names with the following:

CV_ITERATIVE = 0, CV_EPNP = 1, CV_P3P = 2, CV_DLS = 3