Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

problem in undistortRectify function in Sessions/Session5/Part-2/experimental_passive_depth.ipynb #6

Open
guillepinto opened this issue Aug 16, 2024 · 0 comments
Assignees
Labels

Comments

@guillepinto
Copy link
Member

When running the Notebook some problems are generated when executing the last cells, but they are due to some parameters received by the remap function of cv2 inside the undistortRectify function.

I have a slightly different version of the code that generates the same output as the original and it works in practice.

def undistortRectify(imageR, imageL, stereoMapL_x=stereoMapL[1], stereoMapL_y=stereoMapL[0], stereoMapR_x=stereoMapR[0], stereoMapR_y=stereoMapR[1]):

    # Undistort and rectify images
    undistortedL= cv.remap(imageL, stereoMapL_x, stereoMapL_y, cv.INTER_LANCZOS4, cv.BORDER_CONSTANT, 0)
    undistortedR= cv.remap(imageR, stereoMapR_x, stereoMapR_y, cv.INTER_LANCZOS4, cv.BORDER_CONSTANT, 0)


    return undistortedR, undistortedL
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants