The invention discloses a
zoom camera attitude calibration method and
system based on a rectangular structure, and belongs to the technical field of
image processing. The method comprises the following steps: acquiring pixel coordinates of four corners of a rectangle, solving the segmentation proportion of the
diagonal lines of the quadrangle according to the pixel coordinates of the four corner points, solving the
focal length of the camera according to the rectangular vertical relation, solving corresponding physical coordinates of four corners of the rectangle on a normalized imaging plane,solving three-dimensional projection coordinates according to the physical coordinates of the four corners of the rectangle, solving a
rotation matrix R, and reprojecting the image where the deformedrectangle is located to obtain a corrected image where the corrected rectangle is located. According to the method and the
system, only rectangular image information is needed, rectangular physical size information is not needed, under the condition that the size of a rectangular object is not easy to know, the
focal length of the
zoom camera can be solved, camera attitude calibration and reprojection can be carried out to obtain a corrected image, and compared with a traditional
algorithm, the method has wider applicability.