Skip to content

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

@guillepinto

Description

@guillepinto

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

Metadata

Metadata

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions