In the camera calibration code { cv2.cornerSubPix() } will be of no use.In the updated code it is assigned to the (corners2) variable which is passed down to { cv2.drawChessboardCorners() }