更新时间:2023-10-15 23:12:04
我认为您忘记了对undistortPoints
的调用中指定了新相机矩阵.如果您查看函数的文档,它表示签名是:
I think you forgot to specify the new camera matrix in your call to undistortPoints
. If you look at the documentation of the function, it says that the signature is:
Python: cv.UndistortPoints(src, dst, cameraMatrix, distCoeffs, R=None, P=None) → None
其中dst
是未失真后的点的数组,并且如果P
是同一性或省略,则它包含归一化的点坐标",即在使用校准矩阵在图像中投影之前.
where dst
is the array of points after undistortion and "if P
is identity or omitted, then it contains normalized point coordinates", meaning before projection in the image using the calibration matrix.
如果将P
设置为cameraMatrix
,则该功能应该可以实现预期的效果.
The function should do what you expect if you set P
to your cameraMatrix
.