Added wrappers of cvTriangulatePoints()
This commit is contained in:
@@ -674,6 +674,10 @@ CV_EXPORTS void computeCorrespondEpilines( InputArray points1,
|
|||||||
int whichImage, InputArray F,
|
int whichImage, InputArray F,
|
||||||
OutputArray lines );
|
OutputArray lines );
|
||||||
|
|
||||||
|
CV_EXPORTS_W void triangulatePoints( InputArray projMatr1, InputArray projMatr2,
|
||||||
|
InputArray projPoints1, InputArray projPoints2,
|
||||||
|
OutputArray points4D );
|
||||||
|
|
||||||
template<> CV_EXPORTS void Ptr<CvStereoBMState>::delete_obj();
|
template<> CV_EXPORTS void Ptr<CvStereoBMState>::delete_obj();
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
|
|||||||
@@ -407,3 +407,19 @@ cvCorrectMatches(CvMat *F_, CvMat *points1_, CvMat *points2_, CvMat *new_points1
|
|||||||
if( new_points2 )
|
if( new_points2 )
|
||||||
cvConvert( points2, new_points2 );
|
cvConvert( points2, new_points2 );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void cv::triangulatePoints( InputArray _projMatr1, InputArray _projMatr2,
|
||||||
|
InputArray _projPoints1, InputArray _projPoints2,
|
||||||
|
OutputArray _points4D )
|
||||||
|
{
|
||||||
|
Mat matr1 = _projMatr1.getMat(), matr2 = _projMatr2.getMat();
|
||||||
|
Mat points1 = _projPoints1.getMat(), points2 = _projPoints2.getMat();
|
||||||
|
|
||||||
|
CvMat cvMatr1 = matr1, cvMatr2 = matr2;
|
||||||
|
CvMat cvPoints1 = points1, cvPoints2 = points2;
|
||||||
|
|
||||||
|
_points4D.create(4, points1.cols, points1.type());
|
||||||
|
CvMat cvPoints4D = _points4D.getMat();
|
||||||
|
|
||||||
|
cvTriangulatePoints(&cvMatr1, &cvMatr2, &cvPoints1, &cvPoints2, &cvPoints4D);
|
||||||
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user