Ask Your Question

Revision history [back]

The function Undistort can be used to display the rectification. Try something like this:

# Left camera
dst1=cv2.undistort(vidL,cameraMatrixLeft,distCoeffsLeft) # apply calibration to left camera
cv2.namedWindow('Left Calibrated',cv2.WINDOW_NORMAL) # resizeable window
cv2.imshow('Left Calibrated',dst1) # display left image
# Right camera
dst2=cv2.undistort(vidR,cameraMatrixRight,distCoeffsRight) # apply calibration to right camera
cv2.namedWindow('Right Calibrated',cv2.WINDOW_NORMAL) # resizeable window
cv2.imshow('Right Calibrated',dst2) # display right image

Cheers, Jordan