Initial DLS add
This commit is contained in:
14
modules/calib3d/src/dls.cpp
Normal file
14
modules/calib3d/src/dls.cpp
Normal file
@@ -0,0 +1,14 @@
|
||||
#include <iostream>
|
||||
#include "dls.h"
|
||||
|
||||
|
||||
dls::dls()
|
||||
{
|
||||
// TODO Auto-generated constructor stub
|
||||
}
|
||||
|
||||
|
||||
dls::~dls()
|
||||
{
|
||||
// TODO Auto-generated destructor stub
|
||||
}
|
17
modules/calib3d/src/dls.h
Normal file
17
modules/calib3d/src/dls.h
Normal file
@@ -0,0 +1,17 @@
|
||||
#ifndef dls_h
|
||||
#define dls_h
|
||||
|
||||
#include "opencv2/core/core_c.h"
|
||||
|
||||
class dls
|
||||
{
|
||||
public:
|
||||
dls();
|
||||
~dls();
|
||||
|
||||
private:
|
||||
|
||||
};
|
||||
|
||||
|
||||
#endif
|
@@ -44,6 +44,7 @@
|
||||
#include "epnp.h"
|
||||
#include "p3p.h"
|
||||
#include "opencv2/calib3d/calib3d_c.h"
|
||||
#include "dls.h"
|
||||
|
||||
#include <iostream>
|
||||
using namespace cv;
|
||||
@@ -92,6 +93,19 @@ bool cv::solvePnP( InputArray _opoints, InputArray _ipoints,
|
||||
c_distCoeffs.rows*c_distCoeffs.cols ? &c_distCoeffs : 0,
|
||||
&c_rvec, &c_tvec, useExtrinsicGuess );
|
||||
return true;
|
||||
}
|
||||
else if (flags == DLS)
|
||||
{
|
||||
std::cout << "DLS" << std::endl;
|
||||
cv::Mat undistortedPoints;
|
||||
cv::undistortPoints(ipoints, undistortedPoints, cameraMatrix, distCoeffs);
|
||||
|
||||
//dls PnP;
|
||||
// DO SOMETHING
|
||||
|
||||
cv::Mat R, rvec = _rvec.getMat(), tvec = _tvec.getMat();
|
||||
|
||||
|
||||
}
|
||||
else
|
||||
CV_Error(CV_StsBadArg, "The flags argument must be one of CV_ITERATIVE, CV_P3P or CV_EPNP");
|
||||
|
Reference in New Issue
Block a user