Skip to content
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

the running time for solvepnp #6

Open
EightImmortals opened this issue Jan 31, 2018 · 2 comments
Open

the running time for solvepnp #6

EightImmortals opened this issue Jan 31, 2018 · 2 comments

Comments

@EightImmortals
Copy link

Hi:
thank you so much for the code, I have implemented it and the it works, the pose estimation result is fine. However, the runing time for the function "solvePnP" is so big, it seems about 1-second for only running this function. I just used 14 landmarks to estimate the pose(the landmarks are not obtained from Dlib, they are from some other processing output.). Have you ever met this problem or not? I use opencv3.3, and the include files for the source cpp files are:
#include <opencv2/highgui/highgui.hpp>
#include <opencv2/calib3d/calib3d.hpp>"

if the running time for the solvepnp is so big, the real-time processing is impossible.

Thank you so much.

@EightImmortals
Copy link
Author

I use ubuntu16.04 and the cpu infomation is :
processor : 0
vendor_id : GenuineIntel
cpu family : 6
model : 85
model name : Intel(R) Xeon(R) Silver 4110 CPU @ 2.10GHz
stepping : 4
microcode : 0x200002b
cpu MHz : 2100.000
cache size : 11264 KB
physical id : 0
siblings : 16
core id : 0
cpu cores : 8
apicid : 0
initial apicid : 0
fpu : yes
fpu_exception : yes
cpuid level : 22
wp : yes

@lincolnhard
Copy link
Owner

It's very weird that your solvePnP() running so slow.
I have tested on Quad-core ARM® Cortex® A53 with 1.2 GHz per core, and the result is 1.5ms.
Do you build your opencv lib in release mode?
My test is like below:

double time_begin = cv::getTickCount();
cv::solvePnP(object_pts, image_pts, cam_matrix, dist_coeffs, rotation_vec, translation_vec);
double fee_time = (cv::getTickCount() - time_begin) / cv::getTickFrequency() * 1000;
std::cout << "forward fee: " << fee_time << "ms" << std::endl;

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

2 participants