Estimate intrinsics and extrinsics from a set of undistorted and rectified images

Hi,
I have a set of already undistorted and rectified images pairs (stereo images) of chessboards.
I am trying to obtain the stereo camera parameters using them.
I tried using this code opencv/stereo_calib.cpp at master · opencv/opencv (github.com)
Is it correct to use this code if the input images are already undistorted and rectified?

Thank you