mirror of
https://github.com/opencv/opencv.git
synced 2026-07-29 23:33:05 +04:00
Move C API of opencv_calib3d to separate file
This commit is contained in:
@@ -181,12 +181,12 @@ public:
|
||||
LtL[j][k] += Lx[j]*Lx[k] + Ly[j]*Ly[k];
|
||||
}
|
||||
completeSymm( _LtL );
|
||||
|
||||
|
||||
eigen( _LtL, matW, matV );
|
||||
_Htemp = _invHnorm*_H0;
|
||||
_H0 = _Htemp*_Hnorm2;
|
||||
_H0.convertTo(_model, _H0.type(), 1./_H0.at<double>(2,2) );
|
||||
|
||||
|
||||
return 1;
|
||||
}
|
||||
|
||||
@@ -292,7 +292,7 @@ cv::Mat cv::findHomography( InputArray _points1, InputArray _points2,
|
||||
{
|
||||
npoints = p.checkVector(3, -1, false);
|
||||
if( npoints < 0 )
|
||||
CV_Error(CV_StsBadArg, "The input arrays should be 2D or 3D point sets");
|
||||
CV_Error(Error::StsBadArg, "The input arrays should be 2D or 3D point sets");
|
||||
if( npoints == 0 )
|
||||
return Mat();
|
||||
convertPointsFromHomogeneous(p, p);
|
||||
@@ -317,7 +317,7 @@ cv::Mat cv::findHomography( InputArray _points1, InputArray _points2,
|
||||
else if( method == LMEDS )
|
||||
result = createLMeDSPointSetRegistrator(cb, 4, confidence, maxIters)->run(src, dst, H, tempMask);
|
||||
else
|
||||
CV_Error(CV_StsBadArg, "Unknown estimation method");
|
||||
CV_Error(Error::StsBadArg, "Unknown estimation method");
|
||||
|
||||
if( result && npoints > 4 )
|
||||
{
|
||||
@@ -475,7 +475,7 @@ static int run7Point( const Mat& _m1, const Mat& _m2, Mat& _fmatrix )
|
||||
return n;
|
||||
}
|
||||
|
||||
|
||||
|
||||
static int run8Point( const Mat& _m1, const Mat& _m2, Mat& _fmatrix )
|
||||
{
|
||||
double a[9*9], w[9], v[9*9];
|
||||
@@ -585,11 +585,11 @@ static int run8Point( const Mat& _m1, const Mat& _m2, Mat& _fmatrix )
|
||||
gemm( T2, F0, 1., 0, 0., TF, GEMM_1_T );
|
||||
F0 = Mat(3, 3, CV_64F, fmatrix);
|
||||
gemm( TF, T1, 1., 0, 0., F0, 0 );
|
||||
|
||||
|
||||
// make F(3,3) = 1
|
||||
if( fabs(F0.at<double>(2,2)) > FLT_EPSILON )
|
||||
F0 *= 1./F0.at<double>(2,2);
|
||||
|
||||
|
||||
return 1;
|
||||
}
|
||||
|
||||
@@ -671,7 +671,7 @@ cv::Mat cv::findFundamentalMat( InputArray _points1, InputArray _points2,
|
||||
{
|
||||
npoints = p.checkVector(3, -1, false);
|
||||
if( npoints < 0 )
|
||||
CV_Error(CV_StsBadArg, "The input arrays should be 2D or 3D point sets");
|
||||
CV_Error(Error::StsBadArg, "The input arrays should be 2D or 3D point sets");
|
||||
if( npoints == 0 )
|
||||
return Mat();
|
||||
convertPointsFromHomogeneous(p, p);
|
||||
@@ -739,7 +739,7 @@ void cv::computeCorrespondEpilines( InputArray _points, int whichImage,
|
||||
{
|
||||
npoints = points.checkVector(3);
|
||||
if( npoints < 0 )
|
||||
CV_Error( CV_StsBadArg, "The input should be a 2D or 3D point set");
|
||||
CV_Error( Error::StsBadArg, "The input should be a 2D or 3D point set");
|
||||
Mat temp;
|
||||
convertPointsFromHomogeneous(points, temp);
|
||||
points = temp;
|
||||
@@ -893,7 +893,7 @@ void cv::convertPointsFromHomogeneous( InputArray _src, OutputArray _dst )
|
||||
}
|
||||
}
|
||||
else
|
||||
CV_Error(CV_StsUnsupportedFormat, "");
|
||||
CV_Error(Error::StsUnsupportedFormat, "");
|
||||
}
|
||||
|
||||
|
||||
@@ -974,7 +974,7 @@ void cv::convertPointsToHomogeneous( InputArray _src, OutputArray _dst )
|
||||
}
|
||||
}
|
||||
else
|
||||
CV_Error(CV_StsUnsupportedFormat, "");
|
||||
CV_Error(Error::StsUnsupportedFormat, "");
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user