摘要 |
The present invention provides an apparatus and a method for calibrating a camera, to perform camera calibration by using a single image including an arbitrary rectangle. The apparatus comprises: a camera capturing a surroundings rectangle to generate an image; an input unit receiving a divided diagonal ratio with respect to the surroundings rectangle; a memory to store a program for camera calibration; and a processor to perform the camera calibration according to the program. The program comprises the following steps: extracting a diagonal factor of a central rectangle from an image; calculating the length of a central line of projection by referring to a divided diagonal ratio of a surrounding rectangle and the diagonal factor of the central rectangle; calculating a projection angle corresponding to each diagonal of the central rectangle by referring to the length of the central line of projection; calculating an angle between the diagonals of the surrounding rectangle by referring to the projection angle and the angle between the diagonals of the central rectangle; calculating a central point of projection by referring to the projection angle, the angle between the diagonals of the central rectangle, and the angle between the diagonals of the surroundings rectangle; and calculating an external and an internal factor of a camera corresponding to the central point of projection and the central rectangle. |