Answering my own question. There isn't such a function, but finding the (x, y) bounds and Homography matrices from ComputeRectificationParams.m, then using the Homography and undistortion equations, then using interp2 to move forward gives accurate rectification. See https://www.mathworks.com/help///visionhdl/ug/stereoscopic-rectification.html for details.
Is there a Matlab version of the OpenCV function initUndistortRectifyMap()?
5 次查看(过去 30 天)
显示 更早的评论
https://docs.opencv.org/3.4/da/d54/group__imgproc__transform.html#ga7dfb72c9cf9780a347fbe3d1c47e5d5a
I need the undistortion and rectification transformation maps for a project.
0 个评论
采纳的回答
Yuval Levental
2020-11-15
1 个评论
ft28
2022-6-15
Hi Yuval, I am also looking for the mapx and mapy calculation like in OpenCV cvInitUndistortRectifyMap().
How did you solve that with using homography matrix and x,y bounds?
I received these information by using paramStruct = toStruct(stereoParams) and get H1, H2, XBounds, YBounds, but dont have any idea how to proceed now. Do you have any code to share?
Thx
Fatih
更多回答(1 个)
Debasish Samal
2020-11-13
Hi,
The rectifyStereoImages function returns undistorted and rectified versions of the input images using the stereo parameters. I think, this is what you are looking for. Please refer to the documentation of the same to know more about the function.
Thanks.
-Debasish
另请参阅
产品
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!