I followed the opencv tutorials called \'Camera calibration and 3d reconstruction\' (https://docs.opencv.org/3.0-beta/doc/py_tutorials/py_calib3d/py_table_of_contents_calib3