Working example of stereo camera calibration?

I’m struggling with calibrating a stereo camera system using a checkerboard. For troubleshooting purposes I am looking for working sample code and sample input images demonstrating cv2.stereoCalibrate() and cv2.stereoRectify(). Is there any out there?

I finally found Chapter 9 of OpenCV 3 Computer Vision with Python Cookbook. The notebooks “03 Stereo rig calibration estimation of extrinsics” and “08 Aligning two views via stereo rectification” seem to work.