anhttran / 3dmm_cnn

Regressing Robust and Discriminative 3D Morphable Models with a very Deep Neural Network
Other
857 stars 254 forks source link

error: ‘Rodrigues’ is not a member of ‘cv’ #21

Closed ronyuzhang closed 6 years ago

ronyuzhang commented 6 years ago

when i use "make" to compile this project, i have a mistake as follows:

/home/zhangyao/zyao/3dmm_cnn/modules/PoseExpr/src/BaselFaceEstimator.cpp: In member function ‘void BaselFaceEstimator::estimatePose3D(cv::Mat, cv::Mat, cv::Mat, cv::Mat&, cv::Mat&)’: /home/zhangyao/zyao/3dmm_cnn/modules/PoseExpr/src/BaselFaceEstimator.cpp:207:2: error: ‘Rodrigues’ is not a member of ‘cv’ cv::Rodrigues(rMatP, rVec); ^ modules/PoseExpr/CMakeFiles/PoseExprLib.dir/build.make:134: recipe for target 'modules/PoseExpr/CMakeFiles/PoseExprLib.dir/src/BaselFaceEstimator.cpp.o' failed make[2]: [modules/PoseExpr/CMakeFiles/PoseExprLib.dir/src/BaselFaceEstimator.cpp.o] Error 1 CMakeFiles/Makefile2:140: recipe for target 'modules/PoseExpr/CMakeFiles/PoseExprLib.dir/all' failed make[1]: [modules/PoseExpr/CMakeFiles/PoseExprLib.dir/all] Error 2 Makefile:127: recipe for target 'all' failed make: *** [all] Error 2

i installed opencv 2.4.13 .

anhttran commented 6 years ago

I am sorry for my late response. Your code may link to a wrong OpenCV version. Instead of running "make", you can run "make VERBOSE=1" and check the terminal output. Best, Anh

msiraj83 commented 6 years ago

@anhttran .. yes. i have the same problem. My opecv version is 3.3.0. Can you tell us how to change the code for opencv 3.3.0.

msiraj83 commented 6 years ago

How we can run this code in opencv3.3.0 ??? I think there will some changes regarding contrib module. Can anybody help in this regards..

msiraj83 commented 6 years ago

I install the dependices on other system and install opencv2.4.9 version. Its compile successfully..

QuantumLiu commented 6 years ago

Same problem, my opencv version is 3.3.1 .

anhttran commented 6 years ago

My code currently supports only OpenCV 2. Please install OpenCV 2 (e.g. opencv2.4.9) and config your code to use it.

Best, Anh

QuantumLiu commented 6 years ago

I edited codes to supports opencv3

leaf918 commented 6 years ago

@QuantumLiu how to edit the code?

QuantumLiu commented 6 years ago

@leaf918 It's quite complex.The key point is those member functions is contain in opencv3/xxx.h instead of cv2.h

leaf918 commented 6 years ago

To fix this problem ,my solution is install opencv 2413 aside opencv3x,and modify the cmakelist.txt file in the project with refer opencv2413.

chenmingjiong commented 4 years ago

Add this line: #include <opencv2/calib3d.hpp> (I find it when searching for "Rodrigues" in https://docs.opencv.org/4.1.2/.)