gpt4 book ai didi

c++ - calibrateCamera() 中的 Opencv 错误 : assertion failled i < 0,

转载 作者:太空宇宙 更新时间:2023-11-03 22:52:28 25 4
gpt4 key购买 nike

我收到以下错误消息

OpenCV 错误:创建断言失败 (i < 0),文件/tmp/OpenCV-2.4.0/modules/core/src/matrix.cpp,第 1335 行在抛出“cv::Exception”实例后调用终止 what():/tmp/OpenCV-2.4.0/modules/core/src/matrix.cpp:1335: 错误: (-215) i < 0 in function create

在运行我的代码时:

此错误的可能原因是什么?

代码:

int main(int argc, char ** argv)
{
// some code ...
Mat rvec, tvec;
calibrateCamera(obPts, imPts, imSize, cameraMatrix, distortionCoef, rvec, tvec);
}

最佳答案

我们需要给rvectvec作为vector<cv::Mat>

示例代码中rvectvec属于 cv::Mat

关于c++ - calibrateCamera() 中的 Opencv 错误 : assertion failled i < 0,,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/36566188/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com