Code for both monocular and stereo camera calibration