fixed 7 point mode in findFundamentalMat #1978
This commit is contained in:
parent
5dd1ec98f7
commit
4500c48349
@ -1102,7 +1102,7 @@ cv::Mat cv::findFundamentalMat( InputArray _points1, InputArray _points2,
|
|||||||
CV_Assert( npoints >= 0 && points2.checkVector(2) == npoints &&
|
CV_Assert( npoints >= 0 && points2.checkVector(2) == npoints &&
|
||||||
points1.type() == points2.type());
|
points1.type() == points2.type());
|
||||||
|
|
||||||
Mat F(3, 3, CV_64F);
|
Mat F(method == CV_FM_7POINT ? 9 : 3, 3, CV_64F);
|
||||||
CvMat _pt1 = points1, _pt2 = points2;
|
CvMat _pt1 = points1, _pt2 = points2;
|
||||||
CvMat matF = F, c_mask, *p_mask = 0;
|
CvMat matF = F, c_mask, *p_mask = 0;
|
||||||
if( _mask.needed() )
|
if( _mask.needed() )
|
||||||
@ -1113,6 +1113,8 @@ cv::Mat cv::findFundamentalMat( InputArray _points1, InputArray _points2,
|
|||||||
int n = cvFindFundamentalMat( &_pt1, &_pt2, &matF, method, param1, param2, p_mask );
|
int n = cvFindFundamentalMat( &_pt1, &_pt2, &matF, method, param1, param2, p_mask );
|
||||||
if( n <= 0 )
|
if( n <= 0 )
|
||||||
F = Scalar(0);
|
F = Scalar(0);
|
||||||
|
if( n == 1 )
|
||||||
|
F = F.rowRange(0, 3);
|
||||||
return F;
|
return F;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user