1
0
mirror of https://github.com/opencv/opencv.git synced 2026-07-31 00:03:03 +04:00

Add broken implementation note for DLS and UPnP.

Add CV_LOG_DEBUG.
This commit is contained in:
catree
2020-08-22 23:27:39 +02:00
parent f53ff0d01c
commit dda1bf1887
2 changed files with 23 additions and 7 deletions
+10
View File
@@ -48,6 +48,7 @@
#include "ap3p.h"
#include "ippe.hpp"
#include "opencv2/calib3d/calib3d_c.h"
#include <opencv2/core/utils/logger.hpp>
namespace cv
{
@@ -780,6 +781,15 @@ int solvePnPGeneric( InputArray _opoints, InputArray _ipoints,
vector<Mat> vec_rvecs, vec_tvecs;
if (flags == SOLVEPNP_EPNP || flags == SOLVEPNP_DLS || flags == SOLVEPNP_UPNP)
{
if (flags == SOLVEPNP_DLS)
{
CV_LOG_DEBUG(NULL, "Broken implementation for SOLVEPNP_DLS. Fallback to EPnP.");
}
else if (flags == SOLVEPNP_UPNP)
{
CV_LOG_DEBUG(NULL, "Broken implementation for SOLVEPNP_UPNP. Fallback to EPnP.");
}
Mat undistortedPoints;
undistortPoints(ipoints, undistortedPoints, cameraMatrix, distCoeffs);
epnp PnP(cameraMatrix, opoints, undistortedPoints);