HI:
各位水友,我调用opencv 的undistort函数,视频没有得到矫正,请教一下原因。
- else if (imgFmt == "ABGR32")
- {
- imgbuf[i] = cv::Mat(imgHeight, imgWidth, CV_8UC4, outbuf[i]);
- cv::cvtColor(imgbuf[i], imgbuf[i], cv::COLOR_RGBA2BGR);
- cv::imshow(windowName + std::to_string(i), imgbuf[i]);
- cv::Mat cb_final;
- std::cout << "camera Matrix is " << cameraMatrix << std::endl;
- std::cout << "distCoeffs is " << distCoeffs << std::endl;
- undistort(imgbuf[i], cb_final, cameraMatrix, distCoeffs);
- cv::imshow("ccccccc", cb_final);
- }
复制代码 终端打印的标定参数
camera Matrix is [414.3595, 0.81274998, 640.57178;
0, 362.49072, 364.70981;
0, 0, 1]
distCoeffs is [-0.045435999, 0.015187, -0.0028009999, -0.00065599999, 0]
标定也加载上了,就是图像没有被矫正。
|
|
|
|
|
共 6 个关于本帖的回复 最后回复于 2021-4-15 18:46