CN-116168089-B - Method for calibrating parameters in defocused camera based on circular hole targets
Abstract
The invention provides a method for calibrating parameters in a defocusing camera based on a round hole target, which comprises the steps of firstly establishing an internal parameter matrix model containing unknown image distance, focal length and camera center position coordinates according to a ray trace model, secondly moving the round hole target for multiple times, obtaining the size of each element in the matrix by using a Zhang Zhengyou calibration method, thirdly moving a point light source position to calculate a polynomial value containing the image distance and the focal length, fourthly moving a CCD camera, establishing a nonlinear equation set according to difference information of different image distances and focal lengths, and correspondingly establishing the parameters obtained in the second step to the internal parameter matrix model in the first step, and solving the image distance, the camera focal length, the camera center position coordinates and the point light source position. The invention can solve the focal length under the condition of unknown image distance and the coordinates of the center point of the camera, and solves the problem that most calibration methods assume that the image distance is equal to the focal length and the calibration is not accurate enough under the condition that the image plane deviates from the focal plane.
Inventors
- WANG JIHONG
- WU ZHIQING
- CHU JUNQIU
- LIU XINGLING
- Gu Yanda
Assignees
- 中国科学院光电技术研究所
Dates
- Publication Date
- 20260512
- Application Date
- 20230207
Claims (5)
- 1. A method for calibrating parameters in an out-of-focus camera based on a circular hole target is characterized by comprising the following steps: Firstly, defining a coordinate system O A -X w Y w Z w by taking a point light source as an origin, and defining a point A coordinate [ (] , , 0) C point coordinates [ ] , , ) D point coordinates [ ] , , ) According to the ray tracing model, a new internal parameter matrix model comprising unknown quantity, namely image distance, camera focal length, camera center position coordinates and point light source position is established; Wherein, the camera center is used as the origin to define a coordinate system O A -X w Y w Z w , and the point A coordinate is defined , , 0) C point coordinates [ ] , , ) D point coordinates [ ] , , ) From C point to D point, can be obtained according to ray trace: Wherein: 、 、 、 The included angle between the D point and the X w axis, the included angle between the Y w axis and the included angle between the C point and the X w axis, the included angle between the C point and the Y w axis, The distance from the main point of the camera to the CCD target surface, Focal length of the camera; From point E to point C on the virtual object plane, the point A can be regarded as the origin in Zhang Zhengyou calibration internal parameters by satisfying the small-hole imaging model, and the point E reaches the point C and is expressed in a matrix form as follows: Wherein, the method comprises the following steps of , , ) The E point coordinates; Further deriving the matrix from the camera coordinate system to the image coordinate system from E-point to D-point can be expressed as: For infinity targets Approaching infinity, it is possible to obtain: From the image coordinate system to the pixel coordinate system, the internal parameter matrix is obtained without considering the inclination factor: Wherein, define As an internal reference matrix, contains unknowns: is the distance from the center of the main lens to the target surface of the camera, For the focal length of the camera, The distance direction between the center of the lens and the origin is the distance direction , ) Is the point light source coordinate , ) As the center coordinates of the camera, Respectively represent The physical length of one pixel in the direction on the camera target surface, Is a known quantity; Moving the round hole target for multiple times, and obtaining the size of each element in the new internal parameter matrix by using Zhang Zhengyou calibration method; Solving the internal parameter matrix based on Zhang Zhengyou camera calibration method, and then solving the size of each element in the internal parameter matrix in the step one: Wherein: , , , the known quantities which are all solved by Zhang Zhengyou calibration method can be obtained: step three, moving the point light sources, and solving a polynomial comprising an image distance and a camera focal length according to the distances between the point light sources at different positions; And fourthly, moving the CCD camera, establishing a nonlinear equation set according to difference information of different image distances and camera focal distances and an internal parameter matrix model corresponding to the first step in the size of each element in the new internal parameter matrix obtained by using Zhang Zhengyou calibration method, and solving the image distance, the camera focal distance, the camera center position coordinate and the point light source position.
- 2. The method for calibrating parameters in an out-of-focus camera based on a circular hole target as set forth in claim 1, wherein the method comprises defining a camera coordinate system O A -X w Y w Z w with a camera center as an origin, defining a point A coordinate , , 0) C point coordinates [ ] , , ) D point coordinates [ ] , , ) According to the ray tracing model, establishing an image distance containing unknown quantity Focal length of camera The central position coordinates of the camera ) Position of point light source , ) Distance of principal point of lens on optical axis Is described.
- 3. The method for calibrating the parameters in the defocusing camera based on the round hole target according to claim 2 is characterized by comprising the following steps of moving the round hole target for a plurality of times, obtaining an image of light rays emitted from the round hole target reaching an image surface, storing n images, wherein n is more than or equal to 3, and obtaining the size of each element in a new internal parameter matrix by utilizing a Zhang Zhengyou calibration method.
- 4. The method for calibrating parameters in an out-of-focus camera based on a circular hole target according to claim 3, wherein the third step is to move the point light source position and calculate the value of a polynomial comprising the image distance and the focal length of the camera.
- 5. The method for calibrating parameters in the out-of-focus camera based on the circular hole target as set forth in claim 4, wherein the step four is to move the camera target surface along the optical axis, and according to the movement distance, to establish a system of equations including moving the CCD camera a plurality of times, and solving the system of equations including the image distance, the focal length of the camera, the coordinates of the center position of the camera and the point light source position.
Description
Method for calibrating parameters in defocused camera based on circular hole targets Technical Field The invention belongs to the field of optical imaging and photoelectric measurement, and particularly relates to a method for calibrating parameters in an out-of-focus camera based on a round hole target. Background The geometrical correspondence between a point on the surface of a three-dimensional object and a point of a two-dimensional image is determined by a geometrical imaging model of a camera and the position and the posture of the camera, wherein parameters of the geometrical imaging model are parameters in the camera, and an internal parameter matrix generally comprises a focal length, main point coordinates and a tilting factor. Camera calibration is an important step in three-dimensional measurement, and aims to obtain the relationship between a world coordinate system and a pixel coordinate system, and the calibration accuracy directly influences the accuracy of a vision measurement system. The current main front camera calibration methods can be divided into two types, namely a self-calibration method and a target calibration method. The self-calibration method needs rigid characteristics in a measured scene, the application range of the self-calibration method is limited, and the target calibration method is widely applied due to simplicity and convenience. The method is widely used in a target calibrating method, wherein a Zhang Zhengyou calibrating method, a Zhang Zhengyou calibrating method is used for setting a world coordinate system, a camera coordinate system, an image coordinate system and a pixel coordinate system, the world coordinate system is an external parameter matrix from the camera coordinate system to the camera coordinate system, the pixel coordinate system is an internal parameter matrix from the camera coordinate system to the pixel coordinate system, the method obtains the internal parameter matrix based on a pinhole imaging model, and the image distance is assumed to be equal to the focal length, and if the image plane deviates from a focal plane, the focal length obtained by calibration is not accurate enough. Disclosure of Invention Aiming at the defects and shortcomings in the prior art, the invention provides a method for calibrating parameters in an out-of-focus camera based on a round hole target, realizes accurate calibration of parameters in monocular vision system imaging, and provides a technical basis for guaranteeing three-dimensional perception precision of monocular stereoscopic vision technology. The technical scheme adopted by the invention is that the method for calibrating the parameters in the defocusing camera based on the round hole target comprises the following steps: Firstly, defining a coordinate system O A-XwYwZw by taking a point light source as an origin, defining an A point coordinate (x A,yA, 0), a C point coordinate (x C,yC,zC), and a D point coordinate (x D,yD,zD), and establishing a new internal reference matrix model containing unknown quantities, namely an image distance L, a focal length f, a camera center position coordinate (u 0,v0) and a distance z C between a lens main point on an optical axis. And secondly, defining a round hole target vertical to a Z axis as a coordinate under a world coordinate system, moving the round hole target for a plurality of times to obtain the coordinate of light rays emitted from the round hole on the camera target, storing images of n (n is more than or equal to 3 and is usually 4-6) of light rays emitted from the target reaching an image plane, and obtaining the size of each element in the parameter matrix in the step one by using a Zhang Zhengyou calibration method. And thirdly, moving the point light source positions to obtain polynomial values containing image distance and focal length under different point light source positions. And fourthly, moving the CCD camera along the optical axis to obtain a moving distance, and solving a system focal length and a principal point coordinate by using a simultaneous equation system, wherein the simultaneous equation system solves a system image distance, the focal length, a camera center position coordinate and a point light source position according to the parameter equation and the camera moving distance information in the second step. Further, a first step of defining a camera coordinate system O A-XwYwZw by taking a camera center as an origin, defining an A point coordinate (x A,yA, 0), a C point coordinate (x C,yC,zC), a D point coordinate (x D,yD,zD), and establishing a new internal parameter matrix model comprising unknowns, namely an image distance L, a focal length f, a camera center position coordinate (u 0,v0), a point light source position (x A,yA) and a distance z C between a lens main point on an optical axis according to a ray tracing model. And step two, moving the round hole target for multiple times to obtain an image of the arrival of lig