Redundant calculation of initUndistortRectifyMap ?
balaji-ch opened this issue · 1 comments
balaji-ch commented
In stereo_depth.py 's Undistortion and Rectification part
leftMapX, leftMapY = cv2.initUndistortRectifyMap(K1, D1, R1, P1, (width, height), cv2.CV_32FC1)
left_rectified = cv2.remap(leftFrame, leftMapX, leftMapY, cv2.INTER_LINEAR, cv2.BORDER_CONSTANT)
rightMapX, rightMapY = cv2.initUndistortRectifyMap(K2, D2, R2, P2, (width, height), cv2.CV_32FC1)
right_rectified = cv2.remap(rightFrame, rightMapX, rightMapY, cv2.INTER_LINEAR, cv2.BORDER_CONSTANT)
I think it is not needed to initUndistortRectifyMap for every frame. It could have been done just for the first frame. is my understanding correct ?
-- Thank you,
Balaji
aliyasineser commented
Hello @balaji-ch , I made this project years ago and I'm not working on Computer Vision field anymore(at least for now). I'm actually not sure about what you have mentioned. But if it's true and you come with some references/experiments in your PR, I can accept the contribution. Thank you so much for creating this issue, and sorry for seeing it very late. Kind regards