@@ -77,18 +77,18 @@ void PoseSolver::solveGeneric(InputArray _objectPoints, InputArray _normalizedIn
77
77
OutputArray _Ma, OutputArray _Mb)
78
78
{
79
79
// argument checking:
80
- size_t n = static_cast <size_t >(_objectPoints .rows () * _objectPoints .cols ()); // number of points
80
+ size_t n = static_cast <size_t >(_normalizedInputPoints .rows ()) * static_cast < size_t >(_normalizedInputPoints .cols ()); // number of points
81
81
int objType = _objectPoints.type ();
82
82
int type_input = _normalizedInputPoints.type ();
83
83
84
84
CV_CheckType (objType, objType == CV_32FC3 || objType == CV_64FC3,
85
85
" Type of _objectPoints must be CV_32FC3 or CV_64FC3" );
86
86
CV_CheckType (type_input, type_input == CV_32FC2 || type_input == CV_64FC2,
87
- " Type of _normalizedInputPoints must be CV_32FC3 or CV_64FC3 " );
87
+ " Type of _normalizedInputPoints must be CV_32FC2 or CV_64FC2 " );
88
88
CV_Assert (_objectPoints.rows () == 1 || _objectPoints.cols () == 1 );
89
89
CV_Assert (_objectPoints.rows () >= 4 || _objectPoints.cols () >= 4 );
90
90
CV_Assert (_normalizedInputPoints.rows () == 1 || _normalizedInputPoints.cols () == 1 );
91
- CV_Assert (static_cast <size_t >(_objectPoints.rows () * _objectPoints.cols ()) == n);
91
+ CV_Assert (static_cast <size_t >(_objectPoints.rows ()) * static_cast < size_t >( _objectPoints.cols ()) == n);
92
92
93
93
Mat normalizedInputPoints;
94
94
if (type_input == CV_32FC2)
@@ -101,7 +101,7 @@ void PoseSolver::solveGeneric(InputArray _objectPoints, InputArray _normalizedIn
101
101
}
102
102
103
103
Mat objectInputPoints;
104
- if (type_input == CV_32FC3)
104
+ if (objType == CV_32FC3)
105
105
{
106
106
_objectPoints.getMat ().convertTo (objectInputPoints, CV_64F);
107
107
}
0 commit comments