Reputation: 1088
I am getting following error message
OpenCV Error: Assertion failed (i < 0) in create, file /tmp/OpenCV-2.4.0/modules/core/src/matrix.cpp, line 1335 terminate called after throwing an instance of 'cv::Exception' what(): /tmp/OpenCV-2.4.0/modules/core/src/matrix.cpp:1335: error: (-215) i < 0 in function create
while running my code:
What will be possible reasons for this error ?
Code:
int main(int argc, char ** argv)
{
// some code ...
Mat rvec, tvec;
calibrateCamera(obPts, imPts, imSize, cameraMatrix, distortionCoef, rvec, tvec);
}
Upvotes: 1
Views: 1057
Reputation: 1088
We need to give rvec
and tvec
as vector<cv::Mat>
In the sample code rvec
and tvec
is of cv::Mat
Upvotes: 1