Added wrappers of cvTriangulatePoints()

This commit is contained in:
Ilya Lysenkov 2012-03-29 10:39:06 +00:00
parent 8d9d964550
commit 37db334f8a
2 changed files with 20 additions and 0 deletions

View File

@ -674,6 +674,10 @@ CV_EXPORTS void computeCorrespondEpilines( InputArray points1,
int whichImage, InputArray F,
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();
/*!

View File

@ -407,3 +407,19 @@ cvCorrectMatches(CvMat *F_, CvMat *points1_, CvMat *points2_, CvMat *new_points1
if( 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);
}