CPC G06T 7/80 (2017.01) | 20 Claims |
1. A camera calibration method, comprising:
setting up a camera in a space;
selecting or establishing a first vertical line segment and a second vertical line segment in the space, wherein the first vertical line segment includes a first endpoint and a second endpoint, and the second vertical line segment includes a third endpoint and a fourth endpoint;
capturing an image including the first vertical line segment and the second vertical line segment in the space by the camera;
obtaining a first endpoint height of the first endpoint, a second endpoint height of the second endpoint, a third endpoint height of the third endpoint and a fourth endpoint height of the fourth endpoint;
obtaining a first endpoint image coordinates corresponding to the first endpoint and a second endpoint image coordinates corresponding to the second endpoint in the image;
obtaining a third endpoint image coordinates corresponding to the third endpoint and a fourth endpoint image coordinates corresponding to the fourth endpoint in the image;
based on the first endpoint image coordinates and the first endpoint height, the second endpoint image coordinates and the second endpoint height, the third endpoint image coordinates and the third endpoint height, and the fourth endpoint image coordinates and the fourth endpoint height, calculating a focal length, a first rotation angle, a second rotation angle and a third translation vector element of a translation vector of the camera;
calculating a third rotation angle of the camera based on a reference direction of the space, the focal length, the first rotation angle and the second rotation angle of the camera; and
calculating a first translation vector element and a second translation vector element of the translation vector of the camera based on a reference point of the space, the focal length, the first rotation angle, the second rotation angle, the third rotation angle, and the third translation vector element of the translation vector of the camera.
|