问题描述
当我运行代码时,校准工作但它无法将 arucoMarker 相机参数加载到 exe 窗口中。
当我调试代码时
cmd每次进入都会得到错误DynamicLib::libraryload ....\opencv_videoio_gstreamer452_64d.dll
vid.isOpened()
vid.read(frame)
void cameraCalibrationProcess(Mat& cameraMatrix,Mat& distortionCoefficients)
{
Mat frame;
Mat drawtoframe;
vector<Mat> savedImages;
vector<vector<Point2f>> markerCorners,rejectedCandidates; //for aruco marker
VideoCapture vid(0);
if (!vid.isOpened())
{
return;
}
int framepersecond = 20;
namedWindow("Webcam",WINDOW_AUTOSIZE);
while (true)
{
if (!vid.read(frame))
break;
vector<Vec2f> foundpoints;
bool found = false;
found = findChessboardCorners(frame,checkerboard,foundpoints,CALIB_CB_ADAPTIVE_THRESH | CALIB_CB_norMALIZE_IMAGE | CALIB_CB_FAST_CHECK);
frame.copyTo(drawtoframe);
drawChessboardCorners(drawtoframe,found);
if (found)
{
imshow("Webcam",drawtoframe);
}
else
imshow("Webcam",frame);
char character = waitKey(1000 / framepersecond);
}
解决方法
暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!
如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。
小编邮箱:dio#foxmail.com (将#修改为@)