spmallick / learnopencv

Learn OpenCV : C++ and Python Examples
https://www.learnopencv.com/
21.38k stars 11.63k forks source link

compiling multi-person-openpose.cpp issues #573

Open roga76 opened 3 years ago

roga76 commented 3 years ago

if i compile this file, I get the following errors: /home/xavier-nx/project/learnopencv/learnopencv/OpenPose-Multi-Person/multi-person-openpose.cpp: In function ‘int main(int, char**)’: /home/xavier-nx/project/learnopencv/learnopencv/OpenPose-Multi-Person/multi-person-openpose.cpp:344:48: error: ‘DNN_BACKEND_CUDA’ is not a member of ‘cv::dnn’ inputNet.setPreferableBackend(cv::dnn::DNN_BACKEND_CUDA); ^~~~ /home/xavier-nx/project/learnopencv/learnopencv/OpenPose-Multi-Person/multi-person-openpose.cpp:345:47: error: ‘DNN_TARGET_CUDA’ is not a member of ‘cv::dnn’ inputNet.setPreferableTarget(cv::dnn::DNN_TARGET_CUDA); ^~~~~~~

howto resolve the issue?

busyyang commented 3 years ago

Please check the version of OpenCV. It should be 4.x.x.