1 | initial version |
Many thanks Eduardo for your thorough analysis, and the time you invested for it :-)
This is not an answer, but a recap of my results following your suggestions. I was much less sucessful than you : I saw unstable results when using the optimized version, and no success when disabling the optimizations.
Here is a recap of what I saw:
Here is a full recap of my results with opencv 3.1:
Using cv::SOLVEPNP_UPNP
Using cv::SOLVEPNP_DLS
Using cv::SOLVEPNP_EPNP
Using cv::SOLVEPNP_P3P
Using CV_ITERATIVE
Notes:
I did not understand your remark "if we don't cast to float values, cv::SOLVEPNP_ITERATIVE return completly wrong results". Where did you add a cast?
On which OS did you make your tests ?
We do have a bug, don't you think ?
2 | No.2 Revision |
Many thanks Eduardo for your thorough analysis, and the time you invested for it :-)
This is not an answer, but a recap of my results following your suggestions. I was much less sucessful than you : I saw unstable results when using the optimized version, and no success when disabling the optimizations.
Note : my tests were run under OSX El Capitan. I did not test linux or windows yet.
Here is a recap of what I saw:
Here is a full recap of my results with opencv 3.1:
Using cv::SOLVEPNP_UPNP
Using cv::SOLVEPNP_DLS
Using cv::SOLVEPNP_EPNP
Using cv::SOLVEPNP_P3P
Using CV_ITERATIVE
Notes:
I did not understand your remark "if we don't cast to float values, cv::SOLVEPNP_ITERATIVE return completly wrong results". Where did you add a cast?
On which OS did you make your tests ?
We do have a bug, don't you think ?
3 | No.3 Revision |
Many thanks Eduardo for your thorough analysis, and the time you invested for it :-)
This is not an answer, but a recap of my results following your suggestions. I was much less sucessful than you : I saw unstable results when using the optimized version, and no success when disabling the optimizations.
Note : my tests were run under OSX El Capitan. I did not test linux or windows yet.
Here is a recap of what I saw:
Here is a full recap of my results with opencv 3.1:3.1. I also tested the master branch, with the same results:
Using cv::SOLVEPNP_UPNP
Using cv::SOLVEPNP_DLS
Using cv::SOLVEPNP_EPNP
Using cv::SOLVEPNP_P3P
Using CV_ITERATIVE
Notes:
I did not understand your remark "if we don't cast to float values, cv::SOLVEPNP_ITERATIVE return completly wrong results". Where did you add a cast?
On which OS did you make your tests ?
We do have a bug, don't you think ?
4 | No.4 Revision |
Note : this answer was edited following Eduardo's edit of his own answer. The initial unstable results under OSX were due to an error in the code. Sorry about this.
Many thanks Eduardo for your thorough analysis, and the time you invested for it :-)
This is not an answer, but a recap of my results following your suggestions.
I was much less sucessful than you : I saw unstable results when using the optimized version, and no success when disabling the optimizations. suggestions.
Note : my tests were run under OSX El Capitan. I did not test linux or windows yet.
I was much less sucessful than you : I saw unstable results when using the optimized version, and no success when disabling the optimizations.
Here is a recap of what I saw:
Here is a full recap of my results with opencv 3.1. I also tested the master branch, with the same results:
Using cv::SOLVEPNP_UPNP
Using cv::SOLVEPNP_DLS
Using cv::SOLVEPNP_EPNP
Using cv::SOLVEPNP_P3P
Using CV_ITERATIVE
Notes:
I did not understand your remark "if we don't cast to float values, cv::SOLVEPNP_ITERATIVE return completly wrong results". Where did you add a cast?
On which OS did you make your tests ?
We do have a bug, don't you think ?
5 | No.5 Revision |
Note : this answer was edited following Eduardo's edit of his own answer. The initial unstable results under OSX were due to an error in the code. Sorry about this.
Many thanks Eduardo for your thorough analysis, and the time you invested for it :-)
This is not an answer, but a recap of my results following your suggestions.
Note : my tests were run under OSX El Capitan. I did not test linux or windows yet. I have the same results as you :
I was much less sucessful than you : I saw unstable results when using the optimized version, and no success when disabling the optimizations.
Here is a recap of what I saw:
Here is a full recap of my results with opencv 3.1. I also tested the master branch, with the same results:
Using cv::SOLVEPNP_UPNP
Using cv::SOLVEPNP_DLS
Using cv::SOLVEPNP_EPNP
Using cv::SOLVEPNP_P3P
Using CV_ITERATIVE
Notes:
I did not understand your remark "if we don't cast to float values, cv::SOLVEPNP_ITERATIVE return completly wrong results". Where did you add a cast?
On which OS did you make your tests ?
We do have a bug, don't you think ?
6 | No.6 Revision |
Note : this answer was edited following Eduardo's edit of his own answer. The initial unstable results under OSX were due to an error in the code. Sorry about this.
Many thanks Eduardo for your thorough analysis, and the time you invested for it :-)
This is not an answer, but a recap of my results following your suggestions.
Note : my tests were run under OSX El Capitan. I did not test linux or windows yet. I have the same results as you :
I was much less sucessful than you : I saw unstable results when using the optimized version, and no success when disabling the optimizations.
Here is a recap of what I saw:
Here is a full recap of my results with opencv 3.1. I also tested the master branch, with the same results:
Using cv::SOLVEPNP_UPNP
Using cv::SOLVEPNP_DLS
Using cv::SOLVEPNP_EPNP
Using cv::SOLVEPNP_P3P
Using CV_ITERATIVE
Notes:
I did not understand your remark "if we don't cast to float values, cv::SOLVEPNP_ITERATIVE return completly wrong results". Where did you add a cast?
On which OS did you make your tests ?
We do have a bug, don't you think ?
7 | No.7 Revision |
Note 1 : this answer was edited following Eduardo's edit of his own answer. The initial unstable results under OSX were due to an error in the code. Sorry about this.
Note 2 : I made a more thorough analysis, that compares several strategies (after having added the distorsion coeffs of the camera). The code can would not fit here, but it can be found at https://github.com/pthom/TestSolvePnp
enum SolvePnpStrategy
{
Strategy_MySolvePnp_Epnp, //an home baked adapter of epnp using the epnp library source code
Strategy_MySolvePnpPosit, //an home baked adapter of cvPOSIT (deprecated "OpenCV 1" pose estimation method)
Strategy_solvePnp_P3p, // opencv SOLVEPNP_P3P method
Strategy_solvePnp_Iterative_InitialGuess, // opencv SOLVEPNP_ITERATIVE method with an initial guess
Strategy_solvePnp_Epnp //opencv SOLVEPNP_EPNP method
};
Based on my experimentations, the order of the 3d points and image points does matter. It has to be adapted depending upon the strategy !
Original answer below
Many thanks Eduardo for your thorough analysis, and the time you invested for it :-)
This is not an answer, but a recap of my results following your suggestions.
Note : my tests were run under OSX El Capitan. I did not test linux or windows yet. I have the same results as you :
I was much less sucessful than you : I saw unstable results when using the optimized version, and no success when disabling the optimizations.
Here is a recap of what I saw:
Here is a full recap of my results with opencv 3.1. I also tested the master branch, with the same results:
Using cv::SOLVEPNP_UPNP
Using cv::SOLVEPNP_DLS
Using cv::SOLVEPNP_EPNP
Using cv::SOLVEPNP_P3P
Using CV_ITERATIVE
Notes:
I did not understand your remark "if we don't cast to float values, cv::SOLVEPNP_ITERATIVE return completly wrong results". Where did you add a cast?
On which OS did you make your tests ?
We do have a bug, don't you think ?
8 | No.8 Revision |
Note 1 : this answer was edited following Eduardo's edit of his own answer. The initial unstable results under OSX were due to an error in the code. Sorry about this.
Note 2 :
I made a more thorough analysis, that compares several strategies (after having added the distorsion coeffs of the camera). The code can would not fit here, but it can be found at https://github.com/pthom/TestSolvePnp
enum SolvePnpStrategy
{
Strategy_MySolvePnp_Epnp, //an home baked adapter of epnp using the epnp library source code
Strategy_MySolvePnpPosit, //an home baked adapter of cvPOSIT (deprecated "OpenCV 1" pose estimation method)
Strategy_solvePnp_P3p, // opencv SOLVEPNP_P3P method
Strategy_solvePnp_Iterative_InitialGuess, // opencv SOLVEPNP_ITERATIVE method with an initial guess
Strategy_solvePnp_Epnp //opencv SOLVEPNP_EPNP method
};
Based on my experimentations, the order of the 3d points and image points does matter. It has to be adapted depending upon the strategy !
Original answer below
Many thanks Eduardo for your thorough analysis, and the time you invested for it :-)
This is not an answer, but a recap of my results following your suggestions.
Note : my tests were run under OSX El Capitan. I did not test linux or windows yet. I have the same results as you :
I was much less sucessful than you : I saw unstable results when using the optimized version, and no success when disabling the optimizations.
Here is a recap of what I saw:
Here is a full recap of my results with opencv 3.1. I also tested the master branch, with the same results:
Using cv::SOLVEPNP_UPNP
Using cv::SOLVEPNP_DLS
Using cv::SOLVEPNP_EPNP
Using cv::SOLVEPNP_P3P
Using CV_ITERATIVE
Notes:
I did not understand your remark "if we don't cast to float values, cv::SOLVEPNP_ITERATIVE return completly wrong results". Where did you add a cast?
On which OS did you make your tests ?
We do have a bug, don't you think ?
9 | No.9 Revision |
Note 1 : this answer was edited following Eduardo's edit of his own answer. The initial unstable results under OSX were due to an error in the code. Sorry about this.
Note 2 : I made a more thorough analysis, that compares several strategies (after having added the distorsion coeffs of the camera). The code would not fit here, but it can be found at https://github.com/pthom/TestSolvePnp
enum SolvePnpStrategy
{
Strategy_MySolvePnp_Epnp, //an home baked adapter of epnp using the epnp library source code
Strategy_MySolvePnpPosit, //an home baked adapter of cvPOSIT (deprecated "OpenCV 1" pose estimation method)
Strategy_solvePnp_P3p, // opencv SOLVEPNP_P3P method
Strategy_solvePnp_Iterative_InitialGuess, // opencv SOLVEPNP_ITERATIVE method with an initial guess
Strategy_solvePnp_Epnp //opencv SOLVEPNP_EPNP method
};
Based on my experimentations, the order of the 3d points and image points does matter. It has to be adapted depending upon the strategy !
Original answer below
Many thanks Eduardo for your thorough analysis, and the time you invested for it :-)
This is not an answer, but a recap of my results following your suggestions.
Note : my tests were run under OSX El Capitan. I did not test linux or windows yet. I have the same results as you :
I was much less sucessful than you : I saw unstable results when using the optimized version, and no success when disabling the optimizations.
Here is a recap of what I saw:
Here is a full recap of my results with opencv 3.1. I also tested the master branch, with the same results:
Using cv::SOLVEPNP_UPNP
Using cv::SOLVEPNP_DLS
Using cv::SOLVEPNP_EPNP
Using cv::SOLVEPNP_P3P
Using CV_ITERATIVE
Notes:
I did not understand your remark "if we don't cast to float values, cv::SOLVEPNP_ITERATIVE return completly wrong results". Where did you add a cast?
On which OS did you make your tests ?
We do have a bug, don't you think ?