calib3d: fix the test fail on Calib3d_SolvePnP.accuracy#9189
calib3d: fix the test fail on Calib3d_SolvePnP.accuracy#9189opencv-pushbot merged 1 commit intoopencv:masterfrom
Conversation
| SOLVEPNP_UPNP = 4, //!< Exhaustive Linearization for Robust Camera Pose and Focal Length Estimation @cite penate2013exhaustive | ||
| SOLVEPNP_AP3P = 5 //!< An Efficient Algebraic Solution to the Perspective-Three-Point Problem @cite Ke17 | ||
| SOLVEPNP_AP3P = 5, //!< An Efficient Algebraic Solution to the Perspective-Three-Point Problem @cite Ke17 | ||
| SOLVEPNP_MAX_COUNT = 6, //!< Used for count |
There was a problem hiding this comment.
Please remove "value" and "comma":
__SOLVEPNP_MAX_COUNT //!< Used for count
There was a problem hiding this comment.
Thank you. Fixed.
| Point3f pmax = Point3f(10, 10, 10)) | ||
| { | ||
| const Point3f delta = pmax - pmin; | ||
| RNG rng(0x99999999); // fix the seed to use "fixed" input 3D points |
There was a problem hiding this comment.
I believe we should not fix point cloud between different test cases. Try to use cv::theRNG() or ts->get_rng() instead.
There was a problem hiding this comment.
Thank you. Fixed
| case SOLVEPNP_UPNP: | ||
| opoints = std::vector<Point3f>(points.begin(), points.begin()+4); | ||
| break; | ||
| case SOLVEPNP_AP3P: |
There was a problem hiding this comment.
SOLVEPNP_AP3P is swapped with SOLVEPNP_UPNP in this switch statement.
There was a problem hiding this comment.
I made a mistake. Thank you for reviewing.
|
On my local, this fix let many tests pass, except |
|
One more thing. I think it's reasonable fix, but any opinion ? |
|
I believe that eps increase is fine. |
3392369 to
259dfac
Compare
|
I really appreciate your nice review. |
* move array size to enum * move array size to member variable * loosen the eps of SOLVEPNP_P3P * loosen the eps in Calib3d_SolveP3P.accuracy
259dfac to
46bee83
Compare
|
Thank you! 👍 |
This pullrequest changes
resolves #9187