WO2018201677A1 - Bundle adjustment-based calibration method and device for telecentric lens-containing three-dimensional imaging system - Google Patents
Bundle adjustment-based calibration method and device for telecentric lens-containing three-dimensional imaging system Download PDFInfo
- Publication number
- WO2018201677A1 WO2018201677A1 PCT/CN2017/107274 CN2017107274W WO2018201677A1 WO 2018201677 A1 WO2018201677 A1 WO 2018201677A1 CN 2017107274 W CN2017107274 W CN 2017107274W WO 2018201677 A1 WO2018201677 A1 WO 2018201677A1
- Authority
- WO
- WIPO (PCT)
- Prior art keywords
- target
- parameter
- projection device
- calibration
- imaging
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Ceased
Links
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T7/00—Image analysis
- G06T7/80—Analysis of captured images to determine intrinsic or extrinsic camera parameters, i.e. camera calibration
- G06T7/85—Stereo camera calibration
Definitions
- the invention relates to the field of three-dimensional imaging and optical three-dimensional reconstruction, in particular to a calibration method and device for a telecentric lens three-dimensional imaging system based on beam adjustment.
- Three-dimensional imaging based on phase fringe coding is simple, fast in calculation and high in measurement accuracy, and is widely used in three-dimensional imaging and measurement of objects.
- the image containing the sinusoidal fringes is projected onto the object to be tested by the projection device, and the shape of the surface of the object causes the projected structured light image to be differently modulated, and the structured light image with the modulated information is acquired by the camera, combined with the mediation method and stereoscopic vision.
- the technology can obtain three-dimensional digital topography data of an object.
- the main object of the present invention is to provide a calibration method and apparatus for a telecentric lens three-dimensional imaging system based on beam adjustment, which aims to solve the technical problem of low precision of the three-dimensional imaging system in the prior art.
- a first aspect of the present invention provides a calibration method for a telecentric lens three-dimensional imaging system based on beam adjustment, the method being applied to a three-dimensional imaging system, the three-dimensional imaging system comprising: a telecentric lens Projection device, camera device having a telecentric lens, and a movable platform; the optical axis of the projection device is perpendicular to the movable platform placed horizontally, and the optical axis of the imaging device is preset with the movable platform An angle on which the target is placed on the movable platform, the movable platform
- the calibration method includes:
- Step 1 Move the movable platform such that the target is in a plurality of different target postures, and in each target posture, project the target with uniform light, and collect the image through the imaging device. Delineating a target image under the target attitude, and projecting the fringe pattern to the target by using the projection device, and acquiring a fringe pattern under the target posture by using the imaging device;
- Step 2 Initializing an internal parameter and an external parameter of the imaging device to obtain an internal reference and an external parameter after initializing the parameter of the imaging device, and using a target image and a plurality of target postures under different target postures according to the beam adjustment method Performing joint nonlinear optimization on the three-dimensional coordinate system parameter of the target and the initialized internal and external parameters to obtain calibration parameters of the imaging device to complete calibration of the imaging device;
- Step 3 De-phase and phase-expand the fringe pattern acquired by a plurality of different target poses by using the N-step phase shift method to obtain a phase unwrapping diagram of a plurality of different target poses;
- Step 4 Initializing an internal parameter and an external parameter of the projection device to obtain an internal parameter and an external parameter after initialization of the projection device, and using a phase adjustment diagram of the plurality of different target postures according to a beam adjustment method, The three-dimensional coordinate system parameter of the target and the initialized internal and external parameters are jointly nonlinearly optimized to obtain calibration parameters of the projection device to complete calibration of the projection device;
- Step 5 Calibrate the three-dimensional imaging system by using calibration parameters of the imaging device and calibration parameters of the projection device, and obtain calibration parameters of the three-dimensional imaging system to complete calibration of the three-dimensional imaging system.
- the present invention also provides a calibration device for a telecentric lens three-dimensional imaging system based on beam adjustment, the device being applied to a three-dimensional imaging system, the three-dimensional imaging system comprising: a projection device having a telecentric lens, An imaging device having a telecentric lens and a movable platform; the optical axis of the projection device is perpendicular to the movable platform placed horizontally, and an optical axis of the imaging device is at a preset angle with the movable platform.
- a target is placed on the movable platform, and the movable platform is always within a common depth of field of the imaging device and the projection device, and the calibration device includes:
- An acquisition module for moving the movable platform such that the target is in a plurality of different target positions And in each target posture, using uniform light to project to the target, collecting the target image in the target posture by the imaging device, and projecting the fringe pattern to the projection device by using the projection device Using the imaging device to acquire a fringe pattern under the target posture;
- An imaging device calibration module is configured to initialize an internal parameter and an external parameter of the imaging device to obtain an internal reference and an external parameter after the initialization of the parameter of the imaging device, and use a plurality of different target postures based on a beam adjustment method
- the target image, the three-dimensional coordinate system parameter of the target, and the initialized internal reference and the external parameter are jointly nonlinearly optimized to obtain calibration parameters of the imaging device to complete calibration of the imaging device;
- the obtaining module is configured to dephase and phase unfold the fringe pattern acquired by the plurality of different target poses by using the N-step phase shift method, and obtain a phase unwrapping diagram of the plurality of different target poses;
- a projection device calibration module configured to initialize an internal parameter and an external parameter of the projection device, to obtain an internal reference and an external parameter after the initialization of the projection device, and use the plurality of different target postures according to a beam adjustment method a phase unwrapping map, a three-dimensional coordinate system parameter of the target, and a joint non-linear optimization of the initialized internal and external parameters to obtain calibration parameters of the projection device to complete calibration of the projection device;
- a system calibration module configured to calibrate the three-dimensional imaging system by using calibration parameters of the imaging device and calibration parameters of the projection device, to obtain calibration parameters of the three-dimensional imaging system, to complete calibration of the three-dimensional imaging system .
- the invention provides a calibration method for a telecentric lens three-dimensional imaging system based on beam adjustment, in which a camera device with a telecentric lens and a projection device with a telecentric lens are used in a three-dimensional imaging system, and the camera is imaged by a beam adjustment method.
- the device and the projection device are non-linearly calibrated, and the three-dimensional imaging system is calibrated by using the calibration parameters of the calibrated imaging device and the projection device.
- FIG. 1 is a schematic structural view of a telecentric lens three-dimensional imaging system based on beam adjustment according to an embodiment of the present invention
- Figure 1.1 is a schematic diagram of a double telecentric lens in an embodiment of the present invention.
- Figure 1.2 is a schematic diagram of a coordinate system established in an embodiment of the present invention.
- FIG. 2 is a schematic flow chart of a calibration method of a three-dimensional imaging system of a telecentric lens based on beam adjustment according to an embodiment of the present invention
- FIG. 3 is a schematic diagram of functional modules of a calibration device of a three-dimensional imaging system of a telecentric lens based on beam adjustment in an embodiment of the present invention.
- FIG. 1 is a schematic structural diagram of a three-dimensional imaging system for a telecentric lens based on beam adjustment according to an embodiment of the present invention
- the three-dimensional imaging system includes: a telecentric lens Projection equipment, camera equipment with telecentric lenses, and a movable platform.
- the optical axis of the projection device is perpendicular to the horizontally movable platform, and the optical axis of the imaging device is at a predetermined angle with the movable platform, and the preset angle may be in a range of 70 to 85 degrees. among them,
- the movable platform can be placed on a horizontal test bench, and the target can be placed on the movable platform.
- the movable platform can move up and down and move left and right, and can also adjust the angle of the movable platform to the horizontal plane, wherein by moving the movable platform, the target can be placed in different target postures.
- the telecentric lens can use a double telecentric lens
- the projection device can use a DMD projector
- the camera device can use a CMOS device or a digital camera.
- the movable platform is always within the common depth of field of the imaging device and the projection device, so that the image projected by the projection device onto the target is clear, and the image captured by the imaging device is also clear.
- the telecentric lens Compared with the existing pinhole model lens, the telecentric lens has high measurement accuracy and is suitable for high-precision measurement.
- the telecentric lens can be divided into an object telecentric lens, an image telecentric lens, and a double telecentric lens.
- a double telecentric lens as an example, please refer to FIG. 1.1, which is the principle of the double telecentric lens in the embodiment of the present invention. Figure.
- the schematic diagram can also be called a telecentric lens model.
- the telecentric lens model is a parallel imaging model. In the depth of field of the telecentric lens, the distance between the object and the lens does not change. Affecting the magnification of the image by the camera device, in order to better describe the telecentric lens model, a coordinate system as shown in Fig. 1.2 is established, wherein O w (X w , Y w , Z w ) is the world coordinate system as a unified coordinate system. Describe the relative position of all objects in the space.
- the camera coordinate system is O c (X c Y c Z c ).
- the optical axis of the camera is selected as the Z c of the camera coordinate system.
- the coordinate conversion relationship is similar to the pinhole model.
- the camera coordinate system is a coordinate system based on the imaging plane.
- the optical axis is taken as the coordinate system Z axis, and the points on the world coordinate system correspond to the points on the camera coordinate system.
- the image coordinates may also be referred to as pixel coordinates, belonging to the coordinates in the pixel coordinate system, and the pixel coordinate system refers to the arrangement coordinate system of the pixel points on the pixel surface of the camera.
- the pixel point in the upper left corner of the image is taken as the coordinate origin, and the abscissa is represented.
- the number of rows of pixels, the ordinate indicates the number of columns.
- telecentric lens imaging is parallel projection imaging, the camera coordinate system loses the Z-axis during imaging.
- the above information therefore, telecentric lens imaging can be understood as two-dimensional coordinate information projected onto the imaging surface of the imaging device at a certain magnification.
- the camera coordinates and image coordinates are as follows:
- the telecentric lens imaging model is as follows:
- m denotes the magnification of the telecentric lens
- s denotes the distortion factor of the telecentric lens
- (u 0 , v 0 ) denotes the origin of the pixel coordinate system
- r denotes the rotation matrix and the translation matrix in the outer parameter, respectively
- d u , d v are the physical dimensions of each pixel in the X-axis and Y-axis directions, respectively.
- the external parameter is obtained by combining the known initialization internal parameter and the normalization matrix.
- h ij represents the number of the i-th row and the j-th column in the normalized matrix H, according to the above formula ( 3.1)
- the normalized matrix formula (3.2) can be obtained:
- this normalization function H can be directly solved by the DLT method.
- R the unit is orthogonal to the matrix, so you can get:
- the position of the image plane can be arbitrarily set within the depth of field of the telecentric lens, and it is assumed here that the pixel point at the center of the image is regarded as the center of the image, so that (u 0 , v 0 ) can be determined by known CCD information, thereby The translation matrix t s in equation (3.6) can be determined.
- r 1 , r 2 , and r 3 are the coordinate vectors of the R matrix, because the unit orthogonal matrix feature of R can only provide a constraint using a circular marker point target, taking any point in the marker point as a control point. And to ensure that the target has a slight displacement along the Z-axis through the displacement platform, and r 13 and r 23 can also be obtained by using equation (3.8).
- the telecentric lens imaging model of the telecentric lens can be obtained, and the initialization of the external parameters and the internal parameters of the imaging device and the projection device can be realized based on the telecentric lens imaging model.
- k 1 to k 5 are distortion coefficients, where (k 1 , k 2 , k 5 ) represent different radial parameters in three directions, and (k 3 , k 4 ) represents a distortion parameter in the tangential direction.
- the distortion coefficient can be determined using equation (3.9).
- FIG. 2 is a schematic flowchart of a calibration method of a telecentric lens three-dimensional imaging system based on beam adjustment according to a first embodiment of the present invention, including:
- Step 201 Move the movable platform such that the target is in a plurality of different target postures, and in each target posture, use uniform light to project to the target, and collect the image through the imaging device. Delineating a target image under the target attitude, and projecting the fringe pattern to the target by using the projection device, and acquiring a fringe pattern under the target posture by using the imaging device;
- the present invention it is required to collect target images and fringe patterns in a plurality of different target postures. And after the movable platform moves to a certain target attitude, the uniform light is emitted by the uniform light source, and the uniform light is projected onto the target, and the target image under the target posture is acquired by the imaging device. After the target image is acquired in the target posture, the target posture is kept unchanged, the fringe pattern is projected onto the target by using the projection device, and the fringe pattern under the target posture is acquired by using the imaging device. . Pass In the above manner, the target image and the fringe pattern in a certain target posture can be collected, and the target image in a plurality of different target postures can be obtained by moving the movable platform to different target postures. And striped pattern.
- a plurality of fringe patterns have been saved in the projection device, and the plurality of fringe patterns can use four sinusoidal fringe patterns with a fringe period of 20 and nine fringe patterns in two directions. And implanting the projection device such that the projection device can project the sine fringe pattern and the Gray code fringe pattern to the target. Specifically, in each target pose, the projection device will project the sinusoidal fringe pattern and the Gray code fringe pattern onto the target in sequence, and the imaging device will also perform a collection after each fringe pattern is projected. And collecting the plurality of fringe patterns as the fringe pattern acquired under the target posture.
- the movable platform is always within the depth of field of the imaging device and the projection device regardless of the change of the target posture.
- the target image and the fringe pattern need to be collected in at least three different target poses to complete the collection work.
- the angle between the uniform light source and the movable platform in the embodiment of the present invention does not limit its size as long as there is uniform light projected onto the target on the movable platform, and the image of the projected light is made. Clear, and the target image captured by the camera device is clear.
- Step 202 Initialize an internal parameter and an external parameter of the imaging device to obtain an internal parameter and an external parameter after initializing the parameter of the imaging device, and use a target image and a plurality of target positions under different target postures according to the beam adjustment method. Performing joint nonlinear optimization on the three-dimensional coordinate system parameter of the target and the initialized internal and external parameters to obtain calibration parameters of the imaging device to complete calibration of the imaging device;
- the imaging device is calibrated based on the beam adjustment method, and the calibration parameters of the imaging device may be obtained according to the following formula:
- N represents the total number of target images in a plurality of different target poses
- M represents the number of identified points in the target
- An imaging point representing the jth landmark in the target image at the i-th target pose
- O ij (R, t s , m, u 0 , v 0 , k, X) represents the ith target
- X represents the three-dimensional coordinate system parameter of the target
- R is the rotation matrix of the external parameter of the imaging device
- t s is a translation matrix of the external reference of the imaging device
- m is a magnification of the telecentric lens in the internal reference of the imaging device
- (u 0 , v 0 ) represents an origin of the pixel coordinate system
- k is a distortion coefficient.
- the beam adjustment method is a joint nonlinear optimization of the three-dimensional image parameters of the target and the external and internal parameters of the imaging device.
- the initial value of m is obtained after the camera device is built; the external parameter R, t s is initialized by the parameter, and R usually obtains the partial derivative of R and then substitutes the optimization by Rodrigues ⁇ s law; k is Distortion coefficient, where the initial value of the distortion parameter is set to 0 for the first optimization, and then the second optimization is used to obtain the optimal solution; the initial value of (u 0 , v 0 ) is determined by the camera resolution.
- the Levbery-Marquardt method it can be solved by the Levbery-Marquardt method.
- the beam adjustment method is a nonlinear optimization method.
- the problem of solving the above beam adjustment method becomes the problem of the optimal solution of the Jacobian matrix nonlinear optimization.
- the target contains M marker points, and the target image and the fringe pattern of the N different target poses are collected.
- the dimensions of the Jacobian matrix are:
- the partial derivative of the function to the unrelated variable is 0.
- the Jacobian matrix is large. In order to improve the computational efficiency, reduce the calibration time and introduce the properties of the sparse matrix, and then partition the Jacobian matrix. The operation is performed so that the beam adjustment method can be solved and the corresponding calibration parameters are obtained.
- the calibration of the imaging device can be obtained.
- the parameter, and the calibration parameter includes at least pixel coordinates of the marker point in the target of the imaging device, the magnification of the optimized imaging device, and the optimized rotation matrix and translation matrix, and the internal parameters of the imaging device.
- Step 203 Dephase and phase unfold the fringe pattern acquired by the plurality of different target poses by using the N-step phase shift method, and obtain a phase unwrapping diagram of the plurality of different target poses;
- the N-step phase method is used to dephase and phase unroll the acquired fringe patterns in the plurality of different target poses.
- the phase folding map can be obtained by the phase unwrapping technique, and the phase unwrapping graph can be obtained by the phase unwrapping technique.
- the N-step phase shift method can be a four-step phase shift method or other multi-step phase shift method.
- Step 204 Initialize an internal parameter and an external parameter of the projection device to obtain an internal parameter and an external parameter after the initialization of the projection device, and use a phase unwrapping diagram of the plurality of different target postures according to a beam adjustment method.
- the three-dimensional coordinate system parameter of the target and the initialized internal and external parameters are jointly nonlinearly optimized to obtain calibration parameters of the projection device to complete calibration of the projection device;
- the calibration parameters of the projection device obtained by using the beam adjustment method are as follows:
- N represents the total number of phase unwrapped graphs in a plurality of different target poses
- M represents the number of identified points in the target
- An imaging point representing the jth landmark point in the phase unwrapped map at the i-th target pose
- O ij (R, t s , m, u 0 , v 0 , k, X) represents the ith target
- X represents the three-dimensional coordinate system parameter of the target
- R is the rotation matrix of the external reference of the projection device
- t s is a translation matrix of the external reference of the projection device
- m is a magnification of the telecentric lens in the internal reference of the projection device
- (u 0 , v 0 ) represents an origin of the pixel coordinate system
- k is a distortion coefficient.
- the marker point of the target can be obtained by the phase unwrapping map on the projection device.
- the pixel coordinates of the target marker point recorded by the projection device can be obtained by the beam adjustment method described above, and the pixel coordinates and the phase expansion map of the target marker point recorded by the projection device are obtained.
- Step 205 Calibrate the three-dimensional imaging system by using calibration parameters of the imaging device and calibration parameters of the projection device to obtain calibration parameters of the three-dimensional imaging system to complete calibration of the three-dimensional imaging system.
- the calibration of the three-dimensional imaging system by using the calibration parameters of the imaging camera device and the calibration parameters of the projection device includes:
- Step A Obtain calibration parameters of the three-dimensional imaging system according to the following formula:
- R p represents a rotation matrix in the external reference of the projection device
- t p represents a translation matrix in the external reference of the projection device
- R c represents a rotation matrix in the external reference of the imaging device
- t c represents the imaging
- R s represents the rotation matrix of the three-dimensional imaging system
- t s represents the translation matrix of the three-dimensional imaging system
- p w represents the world coordinate vector of any point P in the space
- Step B performing least squares optimization on the rotation matrix and the translation matrix of the three-dimensional imaging system, and determining the conversion relationship between the pixel coordinates and the world coordinates of the three-dimensional imaging system by using the optimized rotation matrix and the translation matrix.
- the pixel coordinate is a coordinate in the image coordinate system, and the image coordinate system may also be referred to as a camera coordinate system.
- the optical axis is generally taken as the coordinate system Z axis, and the point on the world coordinate system may be One-to-one correspondence with points on the image coordinate system.
- an imaging apparatus having a telecentric lens and a tool are used in a three-dimensional imaging system
- the telecentric lens can perform precise measurement, it is particularly suitable for measurement of an object having a certain depth and thickness and having a radius of a stepped hole. Therefore, the calibration accuracy and measurement accuracy can be further improved.
- FIG. 3 is a schematic diagram of functional modules of a calibration apparatus for a telecentric lens three-dimensional imaging system based on beam adjustment according to a second embodiment of the present invention, wherein the apparatus is applied to a three-dimensional imaging system, and the three-dimensional imaging system includes: a projection apparatus having a telecentric lens, an imaging apparatus having a telecentric lens, and a movable platform; an optical axis of the projection apparatus being perpendicular to the movable platform placed horizontally, an optical axis of the imaging apparatus and the movable
- the platform is at a preset angle, and the target is placed on the movable platform, and the movable platform is always in a common depth of field of the imaging device and the projection device
- the calibration device includes:
- An acquisition module 301 configured to move the movable platform such that the target is in a plurality of different target postures, and in each target posture, the uniform light is projected onto the target through the imaging
- the device collects a target image in the target posture, and projects a fringe pattern to the target by using the projection device, and uses the imaging device to collect a fringe pattern under the target posture;
- the imaging device calibration module 302 is configured to initialize an internal parameter and an external parameter of the imaging device to obtain an internal reference and an external parameter after the initialization of the parameter of the imaging device, and use a plurality of different target postures according to a beam adjustment method.
- the target image, the three-dimensional coordinate system parameter of the target, and the internal parameter and the external parameter after the initialization are jointly nonlinearly optimized, and the calibration parameters of the imaging device are obtained to complete calibration of the imaging device;
- the obtaining module 303 is configured to perform phase cancellation and phase unwrapping of the fringe patterns collected by the plurality of different target poses by using the N-step phase shift method, and obtain phase unwrapping diagrams of the plurality of different target poses;
- a projection device calibration module 304 configured to initialize an internal parameter and an external parameter of the projection device, to obtain an internal reference and an external parameter after the initialization of the projection device, and use the plurality of different target postures according to a beam adjustment method a phase unwrapping diagram, a three-dimensional coordinate system parameter of the target, and a joint nonlinear optimization of the initialized internal and external parameters to obtain calibration parameters of the projection device to complete calibration of the projection device;
- a system calibration module 305 configured to calibrate the three-dimensional imaging system by using calibration parameters of the imaging device and calibration parameters of the projection device, to obtain calibration parameters of the three-dimensional imaging system, to complete the three-dimensional imaging system Calibration.
- the imaging device calibration module 302 is specifically configured to initialize an internal parameter and an external parameter of the imaging device, obtain an internal parameter and an external parameter after the initialization of the parameter of the imaging device, and obtain the imaging device according to the following formula.
- N represents the total number of target images in a plurality of different target poses
- M represents the number of identified points in the target
- An imaging point representing the jth landmark in the target image at the i-th target pose
- O ij (R, t s , m, u 0 , v 0 , k, X) represents the ith target
- X represents the three-dimensional coordinate system parameter of the target
- R is the rotation matrix of the external parameter of the imaging device
- t s is a translation matrix of the external reference of the imaging device
- m is a magnification of the telecentric lens in the internal reference of the imaging device
- (u 0 , v 0 ) represents an origin of the pixel coordinate system
- k is a distortion coefficient.
- the projection device calibration module 304 is specifically configured to initialize an internal parameter and an external parameter of the projection device, obtain an internal parameter and an external parameter after the initialization of the projection device, and obtain a calibration of the projection device according to the following formula. parameter:
- N represents the total number of phase unwrapped graphs in a plurality of different target poses
- M represents the number of identified points in the target
- An imaging point representing the jth marker point in the phase expansion map at the i-th target pose
- O ij (R, t s , m, u 0 , v 0 , k, X) represents the ith target
- X represents the three-dimensional coordinate system parameter of the target
- R is the rotation matrix of the external reference of the projection device
- t s is a translation matrix of the external reference of the projection device
- m is a magnification of the telecentric lens in the internal reference of the projection device
- (u 0 , v 0 ) represents an origin of the pixel coordinate system
- k is a distortion coefficient.
- system calibration module 305 is specifically configured to:
- the calibration parameters of the three-dimensional imaging system are obtained according to the following formula:
- R p represents a rotation matrix in the external reference of the projection device
- t p represents a translation matrix in the external reference of the projection device
- R c represents a rotation matrix in the external reference of the imaging device
- t c represents the imaging
- R s represents the rotation matrix of the three-dimensional imaging system
- t s represents the translation matrix of the three-dimensional imaging system
- p w represents the world coordinate vector of any point P in the space
- an imaging device having a telecentric lens and a projection device having a telecentric lens are used in the three-dimensional imaging system, and the imaging device and the projection device are nonlinearly calibrated by the beam adjustment method, and the calibration is completed by using the beam calibration method.
- the calibration parameters of the subsequent imaging device and projection device are calibrated to the three-dimensional imaging system.
- the telecentric lens can perform precise measurement, it is particularly suitable for measurement of an object having a certain depth and thickness and having a radius of a stepped hole. Therefore, the calibration accuracy and measurement accuracy can be further improved.
- the disclosed apparatus and method can be In other ways.
- the device embodiments described above are merely illustrative.
- the division of the modules is only a logical function division.
- there may be another division manner for example, multiple modules or components may be combined or Can be integrated into another system, or some features can be ignored or not executed.
- the mutual coupling or direct coupling or communication connection shown or discussed may be an indirect coupling or communication connection through some interface, device or module, and may be electrical, mechanical or otherwise.
- the modules described as separate components may or may not be physically separated.
- the components displayed as modules may or may not be physical modules, that is, may be located in one place, or may be distributed to multiple network modules. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution of the embodiment.
- each functional module in each embodiment of the present invention may be integrated into one processing module, or each module may exist physically separately, or two or more modules may be integrated into one module.
- the above integrated modules can be implemented in the form of hardware or in the form of software functional modules.
- the integrated modules if implemented in the form of software functional modules and sold or used as separate products, may be stored in a computer readable storage medium.
- the technical solution of the present invention which is essential or contributes to the prior art, or all or part of the technical solution, may be embodied in the form of a software product stored in a storage medium.
- a number of instructions are included to cause a computer device (which may be a personal computer, server, or network device, etc.) to perform all or part of the steps of the methods described in various embodiments of the present invention.
- the foregoing storage medium includes: a U disk, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk, or an optical disk, and the like. .
Landscapes
- Engineering & Computer Science (AREA)
- Computer Vision & Pattern Recognition (AREA)
- Physics & Mathematics (AREA)
- General Physics & Mathematics (AREA)
- Theoretical Computer Science (AREA)
- Length Measuring Devices By Optical Means (AREA)
Abstract
Description
本发明涉及三维成像及光学三维重建领域,尤其涉及一种基于光束平差的远心镜头三维成像系统的标定方法及装置。The invention relates to the field of three-dimensional imaging and optical three-dimensional reconstruction, in particular to a calibration method and device for a telecentric lens three-dimensional imaging system based on beam adjustment.
基于相位条纹编码的三维成像具有简单,计算速度快、测量精度高等优点,被广泛应用于物体三维成像和测量中。通过投影设备将含有正弦条纹的图像投射到待测物体上,物体表面的形状会使得投射的结构光图像产生不同调制,通过相机获取这些带有调制信息的结构光图像,结合调解方法和立体视觉技术可得到物体的三维数字形貌数据。Three-dimensional imaging based on phase fringe coding is simple, fast in calculation and high in measurement accuracy, and is widely used in three-dimensional imaging and measurement of objects. The image containing the sinusoidal fringes is projected onto the object to be tested by the projection device, and the shape of the surface of the object causes the projected structured light image to be differently modulated, and the structured light image with the modulated information is acquired by the camera, combined with the mediation method and stereoscopic vision. The technology can obtain three-dimensional digital topography data of an object.
现有技术中,由于光学结构本身的限制,三维成像和三维扫描技术在对金属反光物、微小且形状奇异物体等特殊对象的处理上还有很大发展空间,另外在对系统标定,物体相位信息获取的完整度和精度的研究,对三维重建方法和技术等相关核心问题还需不断深入。In the prior art, due to the limitations of the optical structure itself, the three-dimensional imaging and three-dimensional scanning technology still have a great room for the development of special objects such as metal reflectors, small and odd-shaped objects, and in addition to the system calibration, the object phase Research on the completeness and accuracy of information acquisition requires further deepening of relevant core issues such as 3D reconstruction methods and technologies.
目前,如何提升三维成像系统的精度是亟待解决的问题。At present, how to improve the accuracy of the three-dimensional imaging system is an urgent problem to be solved.
发明内容Summary of the invention
本发明的主要目的在于提供一种基于光束平差的远心镜头三维成像系统的标定方法及装置,旨在解决现有技术中三维成像系统的精度低的技术问题。The main object of the present invention is to provide a calibration method and apparatus for a telecentric lens three-dimensional imaging system based on beam adjustment, which aims to solve the technical problem of low precision of the three-dimensional imaging system in the prior art.
为实现上述目的,本发明第一方面提供一种一种基于光束平差的远心镜头三维成像系统的标定方法,所述方法应用于三维成像系统,所述三维成像系统包括:具有远心镜头的投影设备、具有远心镜头的摄像设备及可移动平台;所述投影设备的光轴垂直于水平放置的所述可移动平台,所述摄像设备的光轴与所述可移动平台成预设夹角,所述可移动平台上放置标靶,所述可移动平台始 终处于所述摄像设备及所述投影设备共同景深范围内,所述标定方法包括:To achieve the above object, a first aspect of the present invention provides a calibration method for a telecentric lens three-dimensional imaging system based on beam adjustment, the method being applied to a three-dimensional imaging system, the three-dimensional imaging system comprising: a telecentric lens Projection device, camera device having a telecentric lens, and a movable platform; the optical axis of the projection device is perpendicular to the movable platform placed horizontally, and the optical axis of the imaging device is preset with the movable platform An angle on which the target is placed on the movable platform, the movable platform The calibration method includes:
步骤1、移动所述可移动平台,使得所述标靶处于多个不同标靶姿态下,且在每一个标靶姿态下,利用均匀光投射到所述标靶,通过所述摄像设备采集所述标靶姿态下的标靶图像,及利用所述投影设备将条纹图投射到所述标靶,利用所述摄像设备采集所述标靶姿态下的条纹图;Step 1. Move the movable platform such that the target is in a plurality of different target postures, and in each target posture, project the target with uniform light, and collect the image through the imaging device. Delineating a target image under the target attitude, and projecting the fringe pattern to the target by using the projection device, and acquiring a fringe pattern under the target posture by using the imaging device;
步骤2、对所述摄像设备的内参及外参进行初始化,得到所述摄像设备参数初始化后的内参及外参,基于光束平差法,利用多个不同标靶姿态下的标靶图像、所述标靶的三维坐标系参数及所述初始化后的内参及外参进行联合非线性优化,得到所述摄像设备的标定参数,以完成所述摄像设备的标定;Step 2: Initializing an internal parameter and an external parameter of the imaging device to obtain an internal reference and an external parameter after initializing the parameter of the imaging device, and using a target image and a plurality of target postures under different target postures according to the beam adjustment method Performing joint nonlinear optimization on the three-dimensional coordinate system parameter of the target and the initialized internal and external parameters to obtain calibration parameters of the imaging device to complete calibration of the imaging device;
步骤3、利用N步相移法分别对多个不同标靶姿态下采集到的条纹图进行解相位及相位展开,得到多个不同标靶姿态下的相位展开图;Step 3: De-phase and phase-expand the fringe pattern acquired by a plurality of different target poses by using the N-step phase shift method to obtain a phase unwrapping diagram of a plurality of different target poses;
步骤4、对所述投影设备的内参及外参进行初始化,得到所述投影设备初始化后的内参及外参,基于光束平差法,利用所述多个不同标靶姿态下的相位展开图、所述标靶的三维坐标系参数及所述初始化后的内参及外参进行联合非线性优化,得到所述投影设备的标定参数,以完成所述投影设备的标定;Step 4: Initializing an internal parameter and an external parameter of the projection device to obtain an internal parameter and an external parameter after initialization of the projection device, and using a phase adjustment diagram of the plurality of different target postures according to a beam adjustment method, The three-dimensional coordinate system parameter of the target and the initialized internal and external parameters are jointly nonlinearly optimized to obtain calibration parameters of the projection device to complete calibration of the projection device;
步骤5、利用所述摄像设备的标定参数及所述投影设备的标定参数对所述三维成像系统进行标定,得到所述三维成像系统的标定参数,以完成所述三维成像系统的标定。Step 5: Calibrate the three-dimensional imaging system by using calibration parameters of the imaging device and calibration parameters of the projection device, and obtain calibration parameters of the three-dimensional imaging system to complete calibration of the three-dimensional imaging system.
为实现上述目的,本发明还提供一种基于光束平差的远心镜头三维成像系统的标定装置,所述装置应用于三维成像系统,所述三维成像系统包括:具有远心镜头的投影设备、具有远心镜头的摄像设备及可移动平台;所述投影设备的光轴垂直于水平放置的所述可移动平台,所述摄像设备的光轴与所述可移动平台成预设夹角,所述可移动平台上放置标靶,所述可移动平台始终处于所述摄像设备及所述投影设备共同景深范围内,所述标定装置包括:To achieve the above object, the present invention also provides a calibration device for a telecentric lens three-dimensional imaging system based on beam adjustment, the device being applied to a three-dimensional imaging system, the three-dimensional imaging system comprising: a projection device having a telecentric lens, An imaging device having a telecentric lens and a movable platform; the optical axis of the projection device is perpendicular to the movable platform placed horizontally, and an optical axis of the imaging device is at a preset angle with the movable platform. A target is placed on the movable platform, and the movable platform is always within a common depth of field of the imaging device and the projection device, and the calibration device includes:
采集模块,用于移动所述可移动平台,使得所述标靶处于多个不同标靶姿 态下,且在每一个标靶姿态下,利用均匀光投射到所述标靶,通过所述摄像设备采集所述标靶姿态下的标靶图像,及利用所述投影设备将条纹图投射到所述标靶,利用所述摄像设备采集所述标靶姿态下的条纹图;An acquisition module for moving the movable platform such that the target is in a plurality of different target positions And in each target posture, using uniform light to project to the target, collecting the target image in the target posture by the imaging device, and projecting the fringe pattern to the projection device by using the projection device Using the imaging device to acquire a fringe pattern under the target posture;
摄像设备标定模块,用于对所述摄像设备的内参及外参进行初始化,得到所述摄像设备参数初始化后的内参及外参,基于光束平差法,利用多个不同标靶姿态下的标靶图像、所述标靶的三维坐标系参数及所述初始化后的内参及外参进行联合非线性优化,得到所述摄像设备的标定参数,以完成所述摄像设备的标定;An imaging device calibration module is configured to initialize an internal parameter and an external parameter of the imaging device to obtain an internal reference and an external parameter after the initialization of the parameter of the imaging device, and use a plurality of different target postures based on a beam adjustment method The target image, the three-dimensional coordinate system parameter of the target, and the initialized internal reference and the external parameter are jointly nonlinearly optimized to obtain calibration parameters of the imaging device to complete calibration of the imaging device;
获取模块,用于利用N步相移法分别对多个不同标靶姿态下采集到的条纹图进行解相位及相位展开,得到多个不同标靶姿态下的相位展开图;The obtaining module is configured to dephase and phase unfold the fringe pattern acquired by the plurality of different target poses by using the N-step phase shift method, and obtain a phase unwrapping diagram of the plurality of different target poses;
投影设备标定模块,用于对所述投影设备的内参及外参进行初始化,得到所述投影设备初始化后的内参及外参,基于光束平差法,利用所述多个不同标靶姿态下的相位展开图、所述标靶的三维坐标系参数及所述初始化后的内参及外参进行联合非线性优化,得到所述投影设备的标定参数,以完成所述投影设备的标定;a projection device calibration module, configured to initialize an internal parameter and an external parameter of the projection device, to obtain an internal reference and an external parameter after the initialization of the projection device, and use the plurality of different target postures according to a beam adjustment method a phase unwrapping map, a three-dimensional coordinate system parameter of the target, and a joint non-linear optimization of the initialized internal and external parameters to obtain calibration parameters of the projection device to complete calibration of the projection device;
系统标定模块,用于利用所述摄像设备的标定参数及所述投影设备的标定参数对所述三维成像系统进行标定,得到所述三维成像系统的标定参数,以完成所述三维成像系统的标定。a system calibration module, configured to calibrate the three-dimensional imaging system by using calibration parameters of the imaging device and calibration parameters of the projection device, to obtain calibration parameters of the three-dimensional imaging system, to complete calibration of the three-dimensional imaging system .
本发明提供一种基于光束平差的远心镜头三维成像系统的标定方法,在三维成像系统中使用具有远心镜头的摄像设备及具有远心镜头的投影设备,且通过光束平差法对摄像设备及投影设备进行非线性标定,并利用完成标定后的摄像设备及投影设备的标定参数对该三维成像系统进行标定。通过使用光束平差法能够有效减小标靶误差对三维成像系统的标定精度的影响,有效提升了标定精度,进而提高了三维成像系统的精度。 The invention provides a calibration method for a telecentric lens three-dimensional imaging system based on beam adjustment, in which a camera device with a telecentric lens and a projection device with a telecentric lens are used in a three-dimensional imaging system, and the camera is imaged by a beam adjustment method. The device and the projection device are non-linearly calibrated, and the three-dimensional imaging system is calibrated by using the calibration parameters of the calibrated imaging device and the projection device. By using the beam adjustment method, the influence of the target error on the calibration accuracy of the three-dimensional imaging system can be effectively reduced, the calibration accuracy is effectively improved, and the accuracy of the three-dimensional imaging system is improved.
为了更清楚地说明本发明实施例或现有技术中的技术方案,下面将对实施例或现有技术描述中所需要使用的附图作简单地介绍,显而易见地,下面描述中的附图仅仅是本发明的一些实施例,对于本领域技术人员来讲,在不付出创造性劳动的前提下,还可以根据这些附图获得其他的附图。In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings used in the embodiments or the description of the prior art will be briefly described below. Obviously, the drawings in the following description are only It is a certain embodiment of the present invention, and those skilled in the art can obtain other drawings according to these drawings without any creative work.
图1为本发明实施例中基于光束平差的远心镜头三维成像系统的的结构示意图;1 is a schematic structural view of a telecentric lens three-dimensional imaging system based on beam adjustment according to an embodiment of the present invention;
图1.1为本发明实施例中双远心镜头的原理图;Figure 1.1 is a schematic diagram of a double telecentric lens in an embodiment of the present invention;
图1.2为本发明实施例中建立的坐标系的示意图;Figure 1.2 is a schematic diagram of a coordinate system established in an embodiment of the present invention;
图2为本发明实施例中基于光束平差的远心镜头的三维成像系统的标定方法的流程示意图;2 is a schematic flow chart of a calibration method of a three-dimensional imaging system of a telecentric lens based on beam adjustment according to an embodiment of the present invention;
图3为本发明实施例中基于光束平差的远心镜头的三维成像系统的标定装置的功能模块的示意图。3 is a schematic diagram of functional modules of a calibration device of a three-dimensional imaging system of a telecentric lens based on beam adjustment in an embodiment of the present invention.
为使得本发明的发明目的、特征、优点能够更加的明显和易懂,下面将结合本发明实施例中的附图,对本发明实施例中的技术方案进行清楚、完整地描述,显然,所描述的实施例仅仅是本发明一部分实施例,而非全部实施例。基于本发明中的实施例,本领域技术人员在没有做出创造性劳动前提下所获得的所有其他实施例,都属于本发明保护的范围。The technical solutions in the embodiments of the present invention will be clearly and completely described in conjunction with the drawings in the embodiments of the present invention. The embodiments are merely a part of the embodiments of the invention, and not all of the embodiments. All other embodiments obtained by a person skilled in the art based on the embodiments of the present invention without creative efforts are within the scope of the present invention.
为了更好的理解本发明实施例中的技术方案,请参阅图1,为本发明实施例中基于光束平差的远心镜头三维成像系统的结构示意图,该三维成像系统包括:具有远心镜头的投影设备、具有远心镜头的摄像设备及可移动平台。For a better understanding of the technical solution in the embodiments of the present invention, please refer to FIG. 1 , which is a schematic structural diagram of a three-dimensional imaging system for a telecentric lens based on beam adjustment according to an embodiment of the present invention, the three-dimensional imaging system includes: a telecentric lens Projection equipment, camera equipment with telecentric lenses, and a movable platform.
其中,该投影设备的光轴垂直于水平放置的可移动平台,该摄像设备的光轴与该可移动平台成预设夹角,且该预设夹角可以是70~85度的范围内,其中, 可移动平台可放置在水平实验台上,且该可移动平台上可放置标靶。The optical axis of the projection device is perpendicular to the horizontally movable platform, and the optical axis of the imaging device is at a predetermined angle with the movable platform, and the preset angle may be in a range of 70 to 85 degrees. among them, The movable platform can be placed on a horizontal test bench, and the target can be placed on the movable platform.
其中,可移动平台是可以上下移动及左右移动的,也可以调节该可移动平台与水平面的角度,其中,通过移动该可移动平台,可以使得标靶处于不同的标靶姿态下。Wherein, the movable platform can move up and down and move left and right, and can also adjust the angle of the movable platform to the horizontal plane, wherein by moving the movable platform, the target can be placed in different target postures.
其中,远心镜头可以使用双远心镜头,投影设备可以使用DMD投影仪,摄像设备可以使用CMOS器件或数码相机,Among them, the telecentric lens can use a double telecentric lens, the projection device can use a DMD projector, and the camera device can use a CMOS device or a digital camera.
需要说明的是,为了能够实现标定,该可移动平台始终处于摄像设备及投影设备共同景深范围内,以便投影设备投影至标靶上的图像清晰,且摄像设备采集的图像也是清晰的。It should be noted that, in order to achieve calibration, the movable platform is always within the common depth of field of the imaging device and the projection device, so that the image projected by the projection device onto the target is clear, and the image captured by the imaging device is also clear.
为了更好的理解本发明实施例中的技术方案,下面将介绍远心镜头的相关内容。In order to better understand the technical solution in the embodiment of the present invention, the related content of the telecentric lens will be described below.
远心镜头相对于现有的针孔模型镜头具有测量精度高,适用于高精度测量的优点。远心镜头可以分为物方远心镜头、像方远心镜头,及双远心镜头,以双远心镜头为例,请参阅图1.1,为本发明实施例中,双远心镜头的原理图。Compared with the existing pinhole model lens, the telecentric lens has high measurement accuracy and is suitable for high-precision measurement. The telecentric lens can be divided into an object telecentric lens, an image telecentric lens, and a double telecentric lens. Taking a double telecentric lens as an example, please refer to FIG. 1.1, which is the principle of the double telecentric lens in the embodiment of the present invention. Figure.
其中,该原理图也可以称为远心镜头模型,从模型的角度分析,该远心镜头模型是一种平行成像模型,在远心镜头的景深范围内,物体与镜头间的距离变化不会影响摄像设备对图像的放大率,为了更好的描述远心镜头模型,建立如图1.2的坐标系,其中,Ow(Xw,Yw,Zw)是世界坐标系作为统一坐标系来描述空间所有物体的相对位置,相机坐标系为Oc(XcYcZc),通常选择相机的光轴直接作为相机坐标系的Zc。坐标转换关系与针孔模型类似,其中,相机坐标系是依据成像面制定的坐标系,一般常取光轴为坐标系Z轴,世界坐标系上的点与相机坐标系上的点一一对应。其中,图像坐标也可以称为像素坐标,属于像素坐标系中的坐标,且像素坐标系是指相机像素面上像素点的排列坐标系,通常以图像左上角像素点为坐标原点,横坐标表示像素行数,纵坐标表示列数。The schematic diagram can also be called a telecentric lens model. From the perspective of the model, the telecentric lens model is a parallel imaging model. In the depth of field of the telecentric lens, the distance between the object and the lens does not change. Affecting the magnification of the image by the camera device, in order to better describe the telecentric lens model, a coordinate system as shown in Fig. 1.2 is established, wherein O w (X w , Y w , Z w ) is the world coordinate system as a unified coordinate system. Describe the relative position of all objects in the space. The camera coordinate system is O c (X c Y c Z c ). Usually, the optical axis of the camera is selected as the Z c of the camera coordinate system. The coordinate conversion relationship is similar to the pinhole model. The camera coordinate system is a coordinate system based on the imaging plane. Generally, the optical axis is taken as the coordinate system Z axis, and the points on the world coordinate system correspond to the points on the camera coordinate system. . The image coordinates may also be referred to as pixel coordinates, belonging to the coordinates in the pixel coordinate system, and the pixel coordinate system refers to the arrangement coordinate system of the pixel points on the pixel surface of the camera. Usually, the pixel point in the upper left corner of the image is taken as the coordinate origin, and the abscissa is represented. The number of rows of pixels, the ordinate indicates the number of columns.
由于远心镜头成像是平行投影成像,相机坐标系在成像过程中会丢失Z轴 上的信息,因此,远心镜头成像实际可以理解为二维坐标信息经过一定的放大率投射在摄像设备的成像面上。Since telecentric lens imaging is parallel projection imaging, the camera coordinate system loses the Z-axis during imaging. The above information, therefore, telecentric lens imaging can be understood as two-dimensional coordinate information projected onto the imaging surface of the imaging device at a certain magnification.
假设此处镜头放大率是m,则相机坐标和图像坐标如下所示的成像关系:Assuming that the lens magnification is m here, the camera coordinates and image coordinates are as follows:
即 which is
由于上述的成像关系,再考虑到远心镜头的内外参数,由于外参是描述世界坐标和图像坐标之间位置关系转换关系的参数,且由于远心镜头的外参缺少Z轴上参数变化的信息,因此,可以基于远心镜头的放大率m建立远心镜头世界坐标与图像坐标之间的初始转换关系,因此,远心镜头成像模型如下:Due to the above imaging relationship, considering the internal and external parameters of the telecentric lens, since the external parameter is a parameter describing the relationship between the positional relationship between the world coordinates and the image coordinates, and because the external parameters of the telecentric lens lack the parameter variation on the Z axis, Information, therefore, the initial conversion relationship between the telecentric lens world coordinates and the image coordinates can be established based on the magnification m of the telecentric lens. Therefore, the telecentric lens imaging model is as follows:
其中,m表示远心镜头的放大率,s表示远心镜头的扭曲因子,(u0,v0)表示像素坐标系的原点,r,t分别表示外参中的旋转矩阵和平移矩阵,du,dv分别为每个像素在X轴、Y轴方向上的物理尺寸。Where m denotes the magnification of the telecentric lens, s denotes the distortion factor of the telecentric lens, (u 0 , v 0 ) denotes the origin of the pixel coordinate system, r, t denotes the rotation matrix and the translation matrix in the outer parameter, respectively, d u , d v are the physical dimensions of each pixel in the X-axis and Y-axis directions, respectively.
需要说明的是,外参是由已知的初始化内参和归一化矩阵联合得到的,在这里假设hij表示的是归一化矩阵H中第i行第j列的数,根据上式(3.1)可以得到归一化矩阵公式(3.2):It should be noted that the external parameter is obtained by combining the known initialization internal parameter and the normalization matrix. Here, it is assumed that h ij represents the number of the i-th row and the j-th column in the normalized matrix H, according to the above formula ( 3.1) The normalized matrix formula (3.2) can be obtained:
同样的,可以用DLT方法直接求解此归一化函数H。再根据R为单位正交矩阵,所以可以得到: Similarly, this normalization function H can be directly solved by the DLT method. According to R, the unit is orthogonal to the matrix, so you can get:
联立上式可得到公式(3.4):The formula (3.4) can be obtained by the simultaneous formula:
由式(3.1)假设m/du=m/dv=a,则合并式3.1和上式3.4,可以得到以下公式:Assuming that m/d u =m/d v =a from equation (3.1), combining Equation 3.1 with Equation 3.4 above, the following formula can be obtained:
上式有两个非负的解(a2为上式解),所以还需要有一个条件才能求解,由式(3.1)和式(3.2)可以得到基本条件这里的i=1,2且j=1,2.,这样就可以得到a的解,即求得R矩阵中左上的一个2×2的旋转矩阵。There are two non-negative solutions in the above equation (a 2 is the above solution), so there is a need to have a condition to solve. Basic conditions can be obtained from equations (3.1) and (3.2). Here i = 1, 2 and j = 1, 2. Thus, the solution of a can be obtained, that is, a 2 × 2 rotation matrix in the upper left of the R matrix is obtained.
初始化过程中还需要求得r13,r23的值,由公式(3.1)和公式(3.2)点乘关系联立得到,位移参数ts和图像中心点(u0,v0)可以满足的以下公式:In the initialization process, the values of r 13 and r 23 are required to be obtained by the point multiplication relationship of the formula (3.1) and the formula (3.2). The displacement parameter t s and the image center point (u 0 , v 0 ) can be satisfied. The following formula:
上式中(u0,v0)和ts为未知变量,所以不能单独通过(3.6)式直接求解,这个步骤和针孔模型的求解不一样,出现这种现象的原因是归一化函数H在Z轴方向上的坐标变化是没有意义的,因为远心镜头没有焦点(或者理解为焦点在无穷远处),所以h13,h23在数值上为零。因此像平面的位置可以在远心镜头的景深内随意设定,在这里假设将图像中心的像素点看成是图像中心,这样可通过已知的CCD信息确定(u0,v0),从而有公式(3.6)中的平移矩阵ts就可以确定了。In the above formula (u 0 , v 0 ) and t s are unknown variables, so they cannot be solved directly by (3.6). This step is not the same as the solution of the pinhole model. The reason for this phenomenon is the normalization function. The change in the coordinate of H in the Z-axis direction is meaningless because the telecentric lens has no focus (or is understood to be the focus at infinity), so h 13 , h 23 are numerically zero. Therefore, the position of the image plane can be arbitrarily set within the depth of field of the telecentric lens, and it is assumed here that the pixel point at the center of the image is regarded as the center of the image, so that (u 0 , v 0 ) can be determined by known CCD information, thereby The translation matrix t s in equation (3.6) can be determined.
另外,旋转矩阵R中左上的2×2的旋转矩阵前文介绍已经可以得到。然后其余的矩阵参数可以由式(3.3)和式(3.7)联立利用R为单位正交阵的特性得到。In addition, the above description of the 2x2 rotation matrix in the upper left of the rotation matrix R is already available. Then the remaining matrix parameters can be obtained by the combination of equations (3.3) and (3.7) using R as the unit orthogonal array.
r3=r1×r2 (3.7) r 3 =r 1 ×r 2 (3.7)
这其中r1,r2,r3都是R矩阵的坐标矢量,因为R的单位正交阵特征只能提供一个约束运用的是圆形标志点标靶,取标志点中任一点作为控制点,并保证标靶通过位移平台沿Z轴方向有微小的位移,同样可以运用式(3.8)求得r13和r23。Where r 1 , r 2 , and r 3 are the coordinate vectors of the R matrix, because the unit orthogonal matrix feature of R can only provide a constraint using a circular marker point target, taking any point in the marker point as a control point. And to ensure that the target has a slight displacement along the Z-axis through the displacement platform, and r 13 and r 23 can also be obtained by using equation (3.8).
因此,通过上述方式,可以得到远心镜头的远心镜头成像模型,并基于该远心镜头成像模型实现摄像设备及投影设备的外参及内参的初始化。Therefore, in the above manner, the telecentric lens imaging model of the telecentric lens can be obtained, and the initialization of the external parameters and the internal parameters of the imaging device and the projection device can be realized based on the telecentric lens imaging model.
进一步的,考虑镜头畸变,可以得到以下公式:Further, considering the lens distortion, the following formula can be obtained:
(3.9)(3.9)
其中,u和v表示理想坐标系下无畸变的点,同时u′和v′表示含畸变的图像点,且满足在公式中k1~k5均是畸变系数,其中(k1,k2,k5)表示三个方向上的不同径向参数,(k3,k4)表示切向上的畸变参数。利用式(3.9)能够确定畸变系数。Where u and v represent points without distortion in the ideal coordinate system, while u' and v' represent image points with distortion and satisfy In the formula, k 1 to k 5 are distortion coefficients, where (k 1 , k 2 , k 5 ) represent different radial parameters in three directions, and (k 3 , k 4 ) represents a distortion parameter in the tangential direction. The distortion coefficient can be determined using equation (3.9).
基于上述的三维成像系统,请参阅图2,为本发明第一实施例中基于光束平差的远心镜头三维成像系统的标定方法的流程示意图,包括:Based on the above three-dimensional imaging system, please refer to FIG. 2, which is a schematic flowchart of a calibration method of a telecentric lens three-dimensional imaging system based on beam adjustment according to a first embodiment of the present invention, including:
步骤201、移动所述可移动平台,使得所述标靶处于多个不同标靶姿态下,且在每一个标靶姿态下,利用均匀光投射到所述标靶,通过所述摄像设备采集所述标靶姿态下的标靶图像,及利用所述投影设备将条纹图投射到所述标靶,利用所述摄像设备采集所述标靶姿态下的条纹图;Step 201: Move the movable platform such that the target is in a plurality of different target postures, and in each target posture, use uniform light to project to the target, and collect the image through the imaging device. Delineating a target image under the target attitude, and projecting the fringe pattern to the target by using the projection device, and acquiring a fringe pattern under the target posture by using the imaging device;
在本发明实施例中,需要采集多个不同标靶姿态下的标靶图像及条纹图。且在可移动平台移动至某一个标靶姿态之后,通过均匀光光源发出均匀光,并将该均匀光投射到标靶,通过摄像设备采集该标靶姿态下的标靶图像。且在该标靶姿态下完成标靶图像的采集之后,保持标靶姿态不变,利用投影设备将该条纹图投射到该标靶上,并利用摄像设备采集在该标靶姿态下的条纹图。通过 上述方式,可以采集在某一个标靶姿态下的标靶图像及条纹图,且通过移动该可移动平台的到不同标靶姿态下的方式,能够得到多个不同标靶姿态下的标靶图像及条纹图。In the embodiment of the present invention, it is required to collect target images and fringe patterns in a plurality of different target postures. And after the movable platform moves to a certain target attitude, the uniform light is emitted by the uniform light source, and the uniform light is projected onto the target, and the target image under the target posture is acquired by the imaging device. After the target image is acquired in the target posture, the target posture is kept unchanged, the fringe pattern is projected onto the target by using the projection device, and the fringe pattern under the target posture is acquired by using the imaging device. . Pass In the above manner, the target image and the fringe pattern in a certain target posture can be collected, and the target image in a plurality of different target postures can be obtained by moving the movable platform to different target postures. And striped pattern.
需要说明的是,投影设备中已经保存了多个条纹图,该多个条纹图可以利用计算机编写的条纹周期为20的4幅正弦条纹图和9幅格雷码横竖两个方向上的条纹图,且植入该投影设备,使得投影设备可以向标靶投射上述的正弦条纹图及格雷码条纹图。具体的,在每一个标靶姿态下,投影设备都将按照顺序将正弦条纹图及格雷码条纹图投影至标靶上,且摄像设备也将在每一投影一个条纹图之后,进行一次采集,且将采集到的多个条纹图作为该标靶姿态下采集得到的条纹图。It should be noted that a plurality of fringe patterns have been saved in the projection device, and the plurality of fringe patterns can use four sinusoidal fringe patterns with a fringe period of 20 and nine fringe patterns in two directions. And implanting the projection device such that the projection device can project the sine fringe pattern and the Gray code fringe pattern to the target. Specifically, in each target pose, the projection device will project the sinusoidal fringe pattern and the Gray code fringe pattern onto the target in sequence, and the imaging device will also perform a collection after each fringe pattern is projected. And collecting the plurality of fringe patterns as the fringe pattern acquired under the target posture.
需要说明的是,本发明实施例中,无论标靶姿态如何改变,可移动平台始终处于摄像设备及投影设备的景深范围内。It should be noted that, in the embodiment of the present invention, the movable platform is always within the depth of field of the imaging device and the projection device regardless of the change of the target posture.
可以理解的是,在本发明实施例中,需要在至少三个不同的标靶姿态下采集标靶图像及条纹图,以完成采集工作。It can be understood that in the embodiment of the present invention, the target image and the fringe pattern need to be collected in at least three different target poses to complete the collection work.
可以理解的是,本发明实施例中的均匀光光源与可移动平台之间的夹角并不限定其大小,只要有均匀光投射至可移动平台上的标靶,且使得投射的光的图像清晰,且摄像设备采集的标靶图像清晰即可。It can be understood that the angle between the uniform light source and the movable platform in the embodiment of the present invention does not limit its size as long as there is uniform light projected onto the target on the movable platform, and the image of the projected light is made. Clear, and the target image captured by the camera device is clear.
步骤202、对所述摄像设备的内参及外参进行初始化,得到所述摄像设备参数初始化后的内参及外参,基于光束平差法,利用多个不同标靶姿态下的标靶图像、所述标靶的三维坐标系参数及所述初始化后的内参及外参进行联合非线性优化,得到所述摄像设备的标定参数,以完成所述摄像设备的标定;Step 202: Initialize an internal parameter and an external parameter of the imaging device to obtain an internal parameter and an external parameter after initializing the parameter of the imaging device, and use a target image and a plurality of target positions under different target postures according to the beam adjustment method. Performing joint nonlinear optimization on the three-dimensional coordinate system parameter of the target and the initialized internal and external parameters to obtain calibration parameters of the imaging device to complete calibration of the imaging device;
在本发明实施例中,基于光束平差法对摄像设备进行标定,具体可以按照如下公式得到所述摄像设备的标定参数:In the embodiment of the present invention, the imaging device is calibrated based on the beam adjustment method, and the calibration parameters of the imaging device may be obtained according to the following formula:
其中,xBA *表示重投影误差残差值,N表示多个不同标靶姿态下的标靶图像 的总数,M表示所述标靶中标识点的个数,表示在第i个标靶姿态下的标靶图像中的第j个标志点的成像点;Oij(R,ts,m,u0,v0,k,X)表示第i个标靶姿态下的标靶图像中的第j个标志点在像素坐标系中的理想点;X表示所述标靶的三维坐标系参数,R为所述摄像设备外参的旋转矩阵,及ts为所述摄像设备外参的平移矩阵,m为所述摄像设备内参中远心镜头的放大率,(u0,v0)表示所述像素坐标系的原点,k为畸变系数。Where x BA * represents the re-projection error residual value, N represents the total number of target images in a plurality of different target poses, and M represents the number of identified points in the target, An imaging point representing the jth landmark in the target image at the i-th target pose; O ij (R, t s , m, u 0 , v 0 , k, X) represents the ith target The ideal point of the jth marker point in the target image in the pixel coordinate system; X represents the three-dimensional coordinate system parameter of the target, R is the rotation matrix of the external parameter of the imaging device, and t s is a translation matrix of the external reference of the imaging device, m is a magnification of the telecentric lens in the internal reference of the imaging device, (u 0 , v 0 ) represents an origin of the pixel coordinate system, and k is a distortion coefficient.
其中,重投影误差残差值越小越好,以便在非线性优化中尽可能的逼近标志点的Oij(R,ts,m,u0,v0,k,X)。Where the re-projection error residual value is as small as possible, so that In the nonlinear optimization, the O ij (R, t s , m, u 0 , v 0 , k, X) of the landmarks are approximated as much as possible.
其中,光束平差法是将标靶的三维图像参数和摄像设备的外参和内参进行联合非线性优化。Among them, the beam adjustment method is a joint nonlinear optimization of the three-dimensional image parameters of the target and the external and internal parameters of the imaging device.
其中,在初始化方面,m的初始值在搭建摄像设备之后得到;外参外参R,ts由参数初始化得到的,R通常通过Rodrigues`s定律先得到R的偏导数再代入优化;k为畸变系数,这里将畸变参数初始值设为0进行第一次优化,然后通过第二次优化得到最优解;(u0,v0)的初始值由相机分辨率决定。对于这种非线性优化问题,可以用Levenbery-Marquardt法解决。Among them, in the initialization, the initial value of m is obtained after the camera device is built; the external parameter R, t s is initialized by the parameter, and R usually obtains the partial derivative of R and then substitutes the optimization by Rodrigues`s law; k is Distortion coefficient, where the initial value of the distortion parameter is set to 0 for the first optimization, and then the second optimization is used to obtain the optimal solution; the initial value of (u 0 , v 0 ) is determined by the camera resolution. For this nonlinear optimization problem, it can be solved by the Levbery-Marquardt method.
可以理解的是,光束平差法是一种非线性优化方法,求解上述的光束平差法的问题就变成了Jacobian矩阵非线性优化求最优解的问题,在摄像设备的标定中,若标靶包含M个标志点,采集了N个不同标靶姿态下标靶图像及条纹图,则Jacobian矩阵的尺寸为:It can be understood that the beam adjustment method is a nonlinear optimization method. The problem of solving the above beam adjustment method becomes the problem of the optimal solution of the Jacobian matrix nonlinear optimization. In the calibration of the camera equipment, The target contains M marker points, and the target image and the fringe pattern of the N different target poses are collected. The dimensions of the Jacobian matrix are:
4MN×(26+6N+3M)4MN×(26+6N+3M)
由于远心镜头的特殊性,函数对无关变量的偏导数为0,由上式可知,该Jacobian矩阵很大,为了提高运算效率,减少标定时间引入稀疏矩阵的性质,然后对Jacobian矩阵进行分块运算,以便能够完成光束平差法的求解,得到相应的标定参数。Due to the particularity of the telecentric lens, the partial derivative of the function to the unrelated variable is 0. As can be seen from the above equation, the Jacobian matrix is large. In order to improve the computational efficiency, reduce the calibration time and introduce the properties of the sparse matrix, and then partition the Jacobian matrix. The operation is performed so that the beam adjustment method can be solved and the corresponding calibration parameters are obtained.
在本发明实施例中,完成对摄像设备的标定后,可得到该摄像设备的标定 参数,且该标定参数至少包括该摄像设备的标靶中的标志点的像素坐标、优化后的摄像设备的放大率,及优化后的旋转矩阵及平移矩阵、摄像设备的内参。In the embodiment of the present invention, after the calibration of the imaging device is completed, the calibration of the imaging device can be obtained. The parameter, and the calibration parameter includes at least pixel coordinates of the marker point in the target of the imaging device, the magnification of the optimized imaging device, and the optimized rotation matrix and translation matrix, and the internal parameters of the imaging device.
步骤203、利用N步相移法分别对多个不同标靶姿态下采集到的条纹图进行解相位及相位展开,得到多个不同标靶姿态下的相位展开图;Step 203: Dephase and phase unfold the fringe pattern acquired by the plurality of different target poses by using the N-step phase shift method, and obtain a phase unwrapping diagram of the plurality of different target poses;
在本发明实施例中,对于采集到的多个不同标靶姿态下的条纹图,将利用N步相位法分别对该多个不同标靶姿态下的采集到的条纹图进行解相位及相位展开,得到该多个不同标靶姿态下的相位展开图。其中,对于条纹图,可以通过解相位技术得到相位折叠图,并通过相位展开技术得到相位展开图。In the embodiment of the present invention, for the stripe maps of the plurality of different target poses collected, the N-step phase method is used to dephase and phase unroll the acquired fringe patterns in the plurality of different target poses. Obtaining a phase unwrapped graph of the plurality of different target poses. Among them, for the fringe pattern, the phase folding map can be obtained by the phase unwrapping technique, and the phase unwrapping graph can be obtained by the phase unwrapping technique.
可以理解的是,该N步相移法可以是四步相移法,也可以是其他多步相移法,It can be understood that the N-step phase shift method can be a four-step phase shift method or other multi-step phase shift method.
步骤204、对所述投影设备的内参及外参进行初始化,得到所述投影设备初始化后的内参及外参,基于光束平差法,利用所述多个不同标靶姿态下的相位展开图、所述标靶的三维坐标系参数及所述初始化后的内参及外参进行联合非线性优化,得到所述投影设备的标定参数,以完成所述投影设备的标定;Step 204: Initialize an internal parameter and an external parameter of the projection device to obtain an internal parameter and an external parameter after the initialization of the projection device, and use a phase unwrapping diagram of the plurality of different target postures according to a beam adjustment method. The three-dimensional coordinate system parameter of the target and the initialized internal and external parameters are jointly nonlinearly optimized to obtain calibration parameters of the projection device to complete calibration of the projection device;
在本发明实施例中,利用光束平差法得到所述投影设备的标定参数具体如下:In the embodiment of the present invention, the calibration parameters of the projection device obtained by using the beam adjustment method are as follows:
其中,xBA *表示重投影误差残差值,N表示多个不同标靶姿态下的相位展开图的总数,M表示所述标靶中标识点的个数,表示在第i个标靶姿态下的相位展开图中的第j个标志点的成像点;Oij(R,ts,m,u0,v0,k,X)表示第i个标靶姿态下的相位展开图中的第j个标志点在像素坐标系中的理想点;X表示所述标靶的三维坐标系参数,R为所述投影设备外参的旋转矩阵,及ts为所述投影设备外参的平移矩阵,m为所述投影设备内参中远心镜头的放大率,(u0,v0)表示所述像素坐标系的原点,k为畸变系数。Where x BA * represents the reprojection error residual value, N represents the total number of phase unwrapped graphs in a plurality of different target poses, and M represents the number of identified points in the target, An imaging point representing the jth landmark point in the phase unwrapped map at the i-th target pose; O ij (R, t s , m, u 0 , v 0 , k, X) represents the ith target The ideal point of the jth marker point in the phase unwrapped graph in the pixel coordinate system; X represents the three-dimensional coordinate system parameter of the target, R is the rotation matrix of the external reference of the projection device, and t s is a translation matrix of the external reference of the projection device, m is a magnification of the telecentric lens in the internal reference of the projection device, (u 0 , v 0 ) represents an origin of the pixel coordinate system, and k is a distortion coefficient.
在本发明实施例中,通过相位展开图可以获得标靶的标志点在投影设备上 的像素坐标,即通过投影设备的逆成像关系得到投影设备的虚拟“拍摄图像”。In the embodiment of the present invention, the marker point of the target can be obtained by the phase unwrapping map on the projection device. The pixel coordinates, ie the inverse "imaging image" of the projection device, results in a virtual "captured image" of the projection device.
在本发明实施例中,通过上述的光束平差法可得到该投影设备记录的标靶标志点的像素坐标,且将得到该投影设备记录的标靶标志点的像素坐标及相位展开图上投影设备各标志点的像素坐标的对应关系,以完成投影设备的标定,其中,该对应关系属于投影设备的标定参数中的一种,此外,投影设备的标定参数还包括该投影设备优化后的放大率,优化后的旋转矩阵及平移矩阵。In the embodiment of the present invention, the pixel coordinates of the target marker point recorded by the projection device can be obtained by the beam adjustment method described above, and the pixel coordinates and the phase expansion map of the target marker point recorded by the projection device are obtained. Corresponding relationship between pixel coordinates of each marking point of the device to complete calibration of the projection device, wherein the correspondence relationship belongs to one of calibration parameters of the projection device, and further, the calibration parameter of the projection device further includes an optimized amplification of the projection device Rate, optimized rotation matrix and translation matrix.
步骤205、利用所述摄像设备的标定参数及所述投影设备的标定参数对所述三维成像系统进行标定,得到所述三维成像系统的标定参数,以完成所述三维成像系统的标定。Step 205: Calibrate the three-dimensional imaging system by using calibration parameters of the imaging device and calibration parameters of the projection device to obtain calibration parameters of the three-dimensional imaging system to complete calibration of the three-dimensional imaging system.
在本发明实施例中,将利用摄像摄像设备的标定参数及投影设备的标定参数对三维成像系统进行标定包括:In the embodiment of the present invention, the calibration of the three-dimensional imaging system by using the calibration parameters of the imaging camera device and the calibration parameters of the projection device includes:
步骤A、按照如下公式得到所述三维成像系统的标定参数:Step A: Obtain calibration parameters of the three-dimensional imaging system according to the following formula:
Rp·pw+tp=Rs·(Rc·pw+tc)+ts R p ·p w +t p =R s ·(R c ·p w +t c )+t s
其中,Rp表示所述投影设备外参中的旋转矩阵,tp表示所述投影设备外参中的平移矩阵,Rc表示所述摄像设备外参中的旋转矩阵,tc表示所述摄像设备外参中的平移矩阵,Rs表示三维成像系统的旋转矩阵,ts表示三维成像系统的平移矩阵,pw表示空间中任意一点P的世界坐标向量;Wherein, R p represents a rotation matrix in the external reference of the projection device, t p represents a translation matrix in the external reference of the projection device, R c represents a rotation matrix in the external reference of the imaging device, and t c represents the imaging The translation matrix in the external reference of the device, R s represents the rotation matrix of the three-dimensional imaging system, t s represents the translation matrix of the three-dimensional imaging system, and p w represents the world coordinate vector of any point P in the space;
其中,Pw=[xw,yw,zw]T;Where P w = [x w , y w , z w ] T ;
步骤B、对所述三维成像系统的旋转矩阵及平移矩阵进行最小二乘优化,利用优化后的旋转矩阵及平移矩阵确定所述三维成像系统的像素坐标和世界坐标之间的转换关系。Step B: performing least squares optimization on the rotation matrix and the translation matrix of the three-dimensional imaging system, and determining the conversion relationship between the pixel coordinates and the world coordinates of the three-dimensional imaging system by using the optimized rotation matrix and the translation matrix.
其中,像素坐标是图像坐标系中的坐标,该图像坐标系也可称为相机坐标系,依据成像面制定的坐标系,一般常取光轴为坐标系Z轴,世界坐标系上的点可以与图像坐标系上的点一一对应。Wherein, the pixel coordinate is a coordinate in the image coordinate system, and the image coordinate system may also be referred to as a camera coordinate system. According to the coordinate system defined by the imaging plane, the optical axis is generally taken as the coordinate system Z axis, and the point on the world coordinate system may be One-to-one correspondence with points on the image coordinate system.
在本发明实施例中,在三维成像系统中使用具有远心镜头的摄像设备及具 有远心镜头的投影设备,且通过光束平差法对摄像设备及投影设备进行非线性标定,并利用完成标定后的摄像设备及投影设备的标定参数对该三维成像系统进行标定。通过使用光束平差法能够有效减小标靶误差对三维成像系统的标定精度的影响,有效提升了标定精度,进而提高了三维成像系统的精度。进一步的,通过使用具有远心镜头的摄像设备及具有远心镜头的摄像设备,由于远心镜头能够实现精密测量,特别适用于具有一定深度和厚度,且孔的半径成台阶状的物体的测量,因此,能够进一步提高标定精度及测量精度。In an embodiment of the present invention, an imaging apparatus having a telecentric lens and a tool are used in a three-dimensional imaging system A projection device having a telecentric lens, and nonlinearly calibrating the imaging device and the projection device by the beam adjustment method, and calibrating the three-dimensional imaging system by using the calibration parameters of the calibrated imaging device and the projection device. By using the beam adjustment method, the influence of the target error on the calibration accuracy of the three-dimensional imaging system can be effectively reduced, the calibration accuracy is effectively improved, and the accuracy of the three-dimensional imaging system is improved. Further, by using an imaging device having a telecentric lens and an imaging device having a telecentric lens, since the telecentric lens can perform precise measurement, it is particularly suitable for measurement of an object having a certain depth and thickness and having a radius of a stepped hole. Therefore, the calibration accuracy and measurement accuracy can be further improved.
请参阅图3,为本发明第二实施例中基于光束平差的远心镜头三维成像系统的标定装置的功能模块的示意图,其中,该装置应用于三维成像系统,所述三维成像系统包括:具有远心镜头的投影设备、具有远心镜头的摄像设备及可移动平台;所述投影设备的光轴垂直于水平放置的所述可移动平台,所述摄像设备的光轴与所述可移动平台成预设夹角,所述可移动平台上放置标靶,所述可移动平台始终处于所述摄像设备及所述投影设备共同景深范围内,所述标定装置包括:3 is a schematic diagram of functional modules of a calibration apparatus for a telecentric lens three-dimensional imaging system based on beam adjustment according to a second embodiment of the present invention, wherein the apparatus is applied to a three-dimensional imaging system, and the three-dimensional imaging system includes: a projection apparatus having a telecentric lens, an imaging apparatus having a telecentric lens, and a movable platform; an optical axis of the projection apparatus being perpendicular to the movable platform placed horizontally, an optical axis of the imaging apparatus and the movable The platform is at a preset angle, and the target is placed on the movable platform, and the movable platform is always in a common depth of field of the imaging device and the projection device, and the calibration device includes:
采集模块301,用于移动所述可移动平台,使得所述标靶处于多个不同标靶姿态下,且在每一个标靶姿态下,利用均匀光投射到所述标靶,通过所述摄像设备采集所述标靶姿态下的标靶图像,及利用所述投影设备将条纹图投射到所述标靶,利用所述摄像设备采集所述标靶姿态下的条纹图;An
摄像设备标定模块302,用于对所述摄像设备的内参及外参进行初始化,得到所述摄像设备参数初始化后的内参及外参,基于光束平差法,利用多个不同标靶姿态下的标靶图像、所述标靶的三维坐标系参数及所述初始化后的内参及外参进行联合非线性优化,得到所述摄像设备的标定参数,以完成所述摄像设备的标定;The imaging
获取模块303,用于利用N步相移法分别对多个不同标靶姿态下采集到的条纹图进行解相位及相位展开,得到多个不同标靶姿态下的相位展开图;
The obtaining
投影设备标定模块304,用于对所述投影设备的内参及外参进行初始化,得到所述投影设备初始化后的内参及外参,基于光束平差法,利用所述多个不同标靶姿态下的相位展开图、所述标靶的三维坐标系参数及所述初始化后的内参及外参进行联合非线性优化,得到所述投影设备的标定参数,以完成所述投影设备的标定;a projection
系统标定模块305,用于利用所述摄像设备的标定参数及所述投影设备的标定参数对所述三维成像系统进行标定,得到所述三维成像系统的标定参数,以完成所述三维成像系统的标定。a
进一步的,所述摄像设备标定模块302具体用于对所述摄像设备的内参及外参进行初始化,得到所述摄像设备参数初始化后的内参及外参,及按照如下公式得到所述摄像设备的标定参数:Further, the imaging device calibration module 302 is specifically configured to initialize an internal parameter and an external parameter of the imaging device, obtain an internal parameter and an external parameter after the initialization of the parameter of the imaging device, and obtain the imaging device according to the following formula. Calibration parameters:
其中,xBA *表示重投影误差残差值,N表示多个不同标靶姿态下的标靶图像的总数,M表示所述标靶中标识点的个数,表示在第i个标靶姿态下的标靶图像中的第j个标志点的成像点;Oij(R,ts,m,u0,v0,k,X)表示第i个标靶姿态下的标靶图像中的第j个标志点在像素坐标系中的理想点;X表示所述标靶的三维坐标系参数,R为所述摄像设备外参的旋转矩阵,及ts为所述摄像设备外参的平移矩阵,m为所述摄像设备内参中远心镜头的放大率,(u0,v0)表示所述像素坐标系的原点,k为畸变系数。Where x BA * represents the re-projection error residual value, N represents the total number of target images in a plurality of different target poses, and M represents the number of identified points in the target, An imaging point representing the jth landmark in the target image at the i-th target pose; O ij (R, t s , m, u 0 , v 0 , k, X) represents the ith target The ideal point of the jth marker point in the target image in the pixel coordinate system; X represents the three-dimensional coordinate system parameter of the target, R is the rotation matrix of the external parameter of the imaging device, and t s is a translation matrix of the external reference of the imaging device, m is a magnification of the telecentric lens in the internal reference of the imaging device, (u 0 , v 0 ) represents an origin of the pixel coordinate system, and k is a distortion coefficient.
进一步的,所述投影设备标定模块304具体用于对所述投影设备的内参及外参进行初始化,得到所述投影设备初始化后的内参及外参,及按照如下公式得到所述投影设备的标定参数:Further, the projection device calibration module 304 is specifically configured to initialize an internal parameter and an external parameter of the projection device, obtain an internal parameter and an external parameter after the initialization of the projection device, and obtain a calibration of the projection device according to the following formula. parameter:
其中,xBA *表示重投影误差残差值,N表示多个不同标靶姿态下的相位展开图的总数,M表示所述标靶中标识点的个数,表示在第i个标靶姿态下的相 位展开图中的第j个标志点的成像点;Oij(R,ts,m,u0,v0,k,X)表示第i个标靶姿态下的相位展开图中的第j个标志点在像素坐标系中的理想点;X表示所述标靶的三维坐标系参数,R为所述投影设备外参的旋转矩阵,及ts为所述投影设备外参的平移矩阵,m为所述投影设备内参中远心镜头的放大率,(u0,v0)表示所述像素坐标系的原点,k为畸变系数。Where x BA * represents the reprojection error residual value, N represents the total number of phase unwrapped graphs in a plurality of different target poses, and M represents the number of identified points in the target, An imaging point representing the jth marker point in the phase expansion map at the i-th target pose; O ij (R, t s , m, u 0 , v 0 , k, X) represents the ith target The ideal point of the jth marker point in the phase unwrapped graph in the pixel coordinate system; X represents the three-dimensional coordinate system parameter of the target, R is the rotation matrix of the external reference of the projection device, and t s is a translation matrix of the external reference of the projection device, m is a magnification of the telecentric lens in the internal reference of the projection device, (u 0 , v 0 ) represents an origin of the pixel coordinate system, and k is a distortion coefficient.
进一步的,所述系统标定模块305具体用于:Further, the
按照如下公式得到所述三维成像系统的标定参数:The calibration parameters of the three-dimensional imaging system are obtained according to the following formula:
Rp·pw+tp=Rs·(Rc·pw+tc)+ts R p ·p w +t p =R s ·(R c ·p w +t c )+t s
其中,Rp表示所述投影设备外参中的旋转矩阵,tp表示所述投影设备外参中的平移矩阵,Rc表示所述摄像设备外参中的旋转矩阵,tc表示所述摄像设备外参中的平移矩阵,Rs表示三维成像系统的旋转矩阵,ts表示三维成像系统的平移矩阵,pw表示空间中任意一点P的世界坐标向量;Wherein, R p represents a rotation matrix in the external reference of the projection device, t p represents a translation matrix in the external reference of the projection device, R c represents a rotation matrix in the external reference of the imaging device, and t c represents the imaging The translation matrix in the external reference of the device, R s represents the rotation matrix of the three-dimensional imaging system, t s represents the translation matrix of the three-dimensional imaging system, and p w represents the world coordinate vector of any point P in the space;
其中,Pw=[xw,yw,zw]T;Where P w = [x w , y w , z w ] T ;
以及,对所述三维成像系统的旋转矩阵及平移矩阵进行最小二乘优化,利用优化后的旋转矩阵及平移矩阵确定所述三维成像系统的像素坐标和世界坐标之间的转换关系。And performing least squares optimization on the rotation matrix and the translation matrix of the three-dimensional imaging system, and determining the conversion relationship between the pixel coordinates and the world coordinates of the three-dimensional imaging system by using the optimized rotation matrix and the translation matrix.
在本发明实施例中,在三维成像系统中使用具有远心镜头的摄像设备及具有远心镜头的投影设备,且通过光束平差法对摄像设备及投影设备进行非线性标定,并利用完成标定后的摄像设备及投影设备的标定参数对该三维成像系统进行标定。通过使用光束平差法能够有效减小标靶误差对三维成像系统的标定精度的影响,有效提升了标定精度,进而提高了三维成像系统的精度。进一步的,通过使用具有远心镜头的摄像设备及具有远心镜头的摄像设备,由于远心镜头能够实现精密测量,特别适用于具有一定深度和厚度,且孔的半径成台阶状的物体的测量,因此,能够进一步提高标定精度及测量精度。In the embodiment of the present invention, an imaging device having a telecentric lens and a projection device having a telecentric lens are used in the three-dimensional imaging system, and the imaging device and the projection device are nonlinearly calibrated by the beam adjustment method, and the calibration is completed by using the beam calibration method. The calibration parameters of the subsequent imaging device and projection device are calibrated to the three-dimensional imaging system. By using the beam adjustment method, the influence of the target error on the calibration accuracy of the three-dimensional imaging system can be effectively reduced, the calibration accuracy is effectively improved, and the accuracy of the three-dimensional imaging system is improved. Further, by using an imaging device having a telecentric lens and an imaging device having a telecentric lens, since the telecentric lens can perform precise measurement, it is particularly suitable for measurement of an object having a certain depth and thickness and having a radius of a stepped hole. Therefore, the calibration accuracy and measurement accuracy can be further improved.
在本申请所提供的几个实施例中,应该理解到,所揭露的装置和方法,可 以通过其它的方式实现。例如,以上所描述的装置实施例仅仅是示意性的,例如,所述模块的划分,仅仅为一种逻辑功能划分,实际实现时可以有另外的划分方式,例如多个模块或组件可以结合或者可以集成到另一个系统,或一些特征可以忽略,或不执行。另一点,所显示或讨论的相互之间的耦合或直接耦合或通信连接可以是通过一些接口,装置或模块的间接耦合或通信连接,可以是电性,机械或其它的形式。In the several embodiments provided by the present application, it should be understood that the disclosed apparatus and method can be In other ways. For example, the device embodiments described above are merely illustrative. For example, the division of the modules is only a logical function division. In actual implementation, there may be another division manner, for example, multiple modules or components may be combined or Can be integrated into another system, or some features can be ignored or not executed. In addition, the mutual coupling or direct coupling or communication connection shown or discussed may be an indirect coupling or communication connection through some interface, device or module, and may be electrical, mechanical or otherwise.
所述作为分离部件说明的模块可以是或者也可以不是物理上分开的,作为模块显示的部件可以是或者也可以不是物理模块,即可以位于一个地方,或者也可以分布到多个网络模块上。可以根据实际的需要选择其中的部分或者全部模块来实现本实施例方案的目的。The modules described as separate components may or may not be physically separated. The components displayed as modules may or may not be physical modules, that is, may be located in one place, or may be distributed to multiple network modules. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution of the embodiment.
另外,在本发明各个实施例中的各功能模块可以集成在一个处理模块中,也可以是各个模块单独物理存在,也可以两个或两个以上模块集成在一个模块中。上述集成的模块既可以采用硬件的形式实现,也可以采用软件功能模块的形式实现。In addition, each functional module in each embodiment of the present invention may be integrated into one processing module, or each module may exist physically separately, or two or more modules may be integrated into one module. The above integrated modules can be implemented in the form of hardware or in the form of software functional modules.
所述集成的模块如果以软件功能模块的形式实现并作为独立的产品销售或使用时,可以存储在一个计算机可读取存储介质中。基于这样的理解,本发明的技术方案本质上或者说对现有技术做出贡献的部分或者该技术方案的全部或部分可以以软件产品的形式体现出来,该计算机软件产品存储在一个存储介质中,包括若干指令用以使得一台计算机设备(可以是个人计算机,服务器,或者网络设备等)执行本发明各个实施例所述方法的全部或部分步骤。而前述的存储介质包括:U盘、移动硬盘、只读存储器(ROM,Read-Only Memory)、随机存取存储器(RAM,Random Access Memory)、磁碟或者光盘等各种可以存储程序代码的介质。The integrated modules, if implemented in the form of software functional modules and sold or used as separate products, may be stored in a computer readable storage medium. Based on such understanding, the technical solution of the present invention, which is essential or contributes to the prior art, or all or part of the technical solution, may be embodied in the form of a software product stored in a storage medium. A number of instructions are included to cause a computer device (which may be a personal computer, server, or network device, etc.) to perform all or part of the steps of the methods described in various embodiments of the present invention. The foregoing storage medium includes: a U disk, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk, or an optical disk, and the like. .
需要说明的是,对于前述的各方法实施例,为了简便描述,故将其都表述为一系列的动作组合,但是本领域技术人员应该知悉,本发明并不受所描述的 动作顺序的限制,因为依据本发明,某些步骤可以采用其它顺序或者同时进行。其次,本领域技术人员也应该知悉,说明书中所描述的实施例均属于优选实施例,所涉及的动作和模块并不一定都是本发明所必须的。It should be noted that, for the foregoing method embodiments, for the sake of brevity, they are all described as a series of action combinations, but those skilled in the art should understand that the present invention is not described. The sequence of actions is limited because certain steps may be performed in other sequences or concurrently in accordance with the present invention. In the following, those skilled in the art should also understand that the embodiments described in the specification are all preferred embodiments, and the actions and modules involved are not necessarily required by the present invention.
在上述实施例中,对各个实施例的描述都各有侧重,某个实施例中没有详述的部分,可以参见其它实施例的相关描述。In the above embodiments, the descriptions of the various embodiments are all focused, and the parts that are not detailed in a certain embodiment can be referred to the related descriptions of other embodiments.
以上为对本发明所提供的一种基于光束平差的远心镜头三维成像系统的标定方法及装置的描述,对于本领域的技术人员,依据本发明实施例的思想,在具体实施方式及应用范围上均会有改变之处,综上,本说明书内容不应该理解为对本发明的限制。 The above is a description of a method and a device for calibrating a telecentric lens three-dimensional imaging system based on the beam adjustment provided by the present invention. For those skilled in the art, according to the idea of the embodiment of the present invention, the specific implementation manner and the application range There is a change in the above, and in summary, the contents of this specification should not be construed as limiting the invention.
Claims (8)
Applications Claiming Priority (2)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN201710306655.5 | 2017-05-04 | ||
| CN201710306655.5A CN107230233A (en) | 2017-05-04 | 2017-05-04 | The scaling method and device of telecentric lens 3-D imaging system based on bundle adjustment |
Publications (1)
| Publication Number | Publication Date |
|---|---|
| WO2018201677A1 true WO2018201677A1 (en) | 2018-11-08 |
Family
ID=59934300
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| PCT/CN2017/107274 Ceased WO2018201677A1 (en) | 2017-05-04 | 2017-10-23 | Bundle adjustment-based calibration method and device for telecentric lens-containing three-dimensional imaging system |
Country Status (2)
| Country | Link |
|---|---|
| CN (1) | CN107230233A (en) |
| WO (1) | WO2018201677A1 (en) |
Cited By (3)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN115205399A (en) * | 2022-07-13 | 2022-10-18 | 深圳市优必选科技股份有限公司 | Non-common-view multi-view camera calibration method and device, robot and storage medium |
| CN115953474A (en) * | 2022-10-11 | 2023-04-11 | 梅卡曼德(北京)机器人科技有限公司 | Parameter calibration method, three-dimensional reconstruction method, electronic equipment, and storage medium |
| CN116309822A (en) * | 2023-01-31 | 2023-06-23 | 东南大学 | A back-end optimization method based on multimodal feature association |
Families Citing this family (10)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN107230233A (en) * | 2017-05-04 | 2017-10-03 | 深圳大学 | The scaling method and device of telecentric lens 3-D imaging system based on bundle adjustment |
| CN108489395B (en) * | 2018-04-27 | 2019-03-22 | 中国农业大学 | Vision measurement system structural parameters calibration and affine coordinate system construction method and system |
| CN109341668B (en) * | 2018-10-11 | 2020-12-22 | 重庆邮电大学 | A Multi-Camera Measurement Method Based on Refraction Projection Model and Beam Tracing Method |
| CN110176035B (en) * | 2019-05-08 | 2021-09-28 | 深圳市易尚展示股份有限公司 | Method and device for positioning mark point, computer equipment and storage medium |
| CN110298888B (en) * | 2019-06-12 | 2021-09-07 | 上海智能制造功能平台有限公司 | Camera calibration method based on single-axis high-precision displacement platform |
| CN110595374B (en) * | 2019-09-17 | 2020-05-05 | 中国人民解放军火箭军工程大学 | Large structural part real-time deformation monitoring method based on image transmission machine |
| CN112489109B (en) * | 2020-11-19 | 2022-10-21 | 广州视源电子科技股份有限公司 | Three-dimensional imaging system method and device and three-dimensional imaging system |
| CN113188478B (en) * | 2021-04-28 | 2022-10-18 | 伏燕军 | Mixed calibration method for telecentric microscopic three-dimensional measurement system |
| CN114666480B (en) * | 2022-03-28 | 2023-12-22 | 天津大学 | Pixel-by-pixel calibration method and device for incident light in combined imaging system based on phase information |
| CN116500851B (en) * | 2023-06-30 | 2023-09-08 | 苏州华兴源创科技股份有限公司 | 3D imaging system, calibration method, device, equipment and storage medium thereof |
Citations (4)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| US7046839B1 (en) * | 2000-09-19 | 2006-05-16 | Spg Hydro International Inc. | Techniques for photogrammetric systems |
| CN102654391A (en) * | 2012-01-17 | 2012-09-05 | 深圳大学 | Stripe projection three-dimensional measurement system based on bundle adjustment principle and calibration method thereof |
| CN104729429A (en) * | 2015-03-05 | 2015-06-24 | 深圳大学 | Calibration method of telecentric imaging three-dimension topography measuring system |
| CN107230233A (en) * | 2017-05-04 | 2017-10-03 | 深圳大学 | The scaling method and device of telecentric lens 3-D imaging system based on bundle adjustment |
Family Cites Families (2)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN102889882B (en) * | 2012-09-03 | 2014-11-12 | 北京信息科技大学 | Three-dimensional reconstruction method based on bundle adjustment |
| CN103528543B (en) * | 2013-11-05 | 2015-12-02 | 东南大学 | System calibrating method in a kind of optical grating projection three-dimensional measurement |
-
2017
- 2017-05-04 CN CN201710306655.5A patent/CN107230233A/en active Pending
- 2017-10-23 WO PCT/CN2017/107274 patent/WO2018201677A1/en not_active Ceased
Patent Citations (4)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| US7046839B1 (en) * | 2000-09-19 | 2006-05-16 | Spg Hydro International Inc. | Techniques for photogrammetric systems |
| CN102654391A (en) * | 2012-01-17 | 2012-09-05 | 深圳大学 | Stripe projection three-dimensional measurement system based on bundle adjustment principle and calibration method thereof |
| CN104729429A (en) * | 2015-03-05 | 2015-06-24 | 深圳大学 | Calibration method of telecentric imaging three-dimension topography measuring system |
| CN107230233A (en) * | 2017-05-04 | 2017-10-03 | 深圳大学 | The scaling method and device of telecentric lens 3-D imaging system based on bundle adjustment |
Non-Patent Citations (1)
| Title |
|---|
| LIU, RENSI: "Telecentric Lens Calibration and 3D Imaging System Based on Bundle Adjustment", CHINA MASTER'S THESES FULL-TEXT DATABASE ( ELECTRONIC JOURNALS, 15 July 2017 (2017-07-15) * |
Cited By (3)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN115205399A (en) * | 2022-07-13 | 2022-10-18 | 深圳市优必选科技股份有限公司 | Non-common-view multi-view camera calibration method and device, robot and storage medium |
| CN115953474A (en) * | 2022-10-11 | 2023-04-11 | 梅卡曼德(北京)机器人科技有限公司 | Parameter calibration method, three-dimensional reconstruction method, electronic equipment, and storage medium |
| CN116309822A (en) * | 2023-01-31 | 2023-06-23 | 东南大学 | A back-end optimization method based on multimodal feature association |
Also Published As
| Publication number | Publication date |
|---|---|
| CN107230233A (en) | 2017-10-03 |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| WO2018201677A1 (en) | Bundle adjustment-based calibration method and device for telecentric lens-containing three-dimensional imaging system | |
| CN110296691B (en) | IMU calibration-fused binocular stereo vision measurement method and system | |
| CN106408556B (en) | A Calibration Method for Small Object Measurement System Based on General Imaging Model | |
| CN106595528B (en) | A Telecentric Microscopic Binocular Stereo Vision Measurement Method Based on Digital Speckle | |
| CN106548489B (en) | A kind of method for registering, the three-dimensional image acquisition apparatus of depth image and color image | |
| Douxchamps et al. | High-accuracy and robust localization of large control markers for geometric camera calibration | |
| Gai et al. | A novel dual-camera calibration method for 3D optical measurement | |
| CN115861445B (en) | Hand-eye calibration method based on three-dimensional point cloud of calibration plate | |
| CN109272555B (en) | A method of obtaining and calibrating external parameters of RGB-D camera | |
| CN104182982A (en) | Overall optimizing method of calibration parameter of binocular stereo vision camera | |
| Chen et al. | Self-recalibration of a colour-encoded light system for automated three-dimensionalmeasurements | |
| CN112229323A (en) | Six degrees of freedom measurement method of checkerboard cooperation target based on monocular vision of mobile phone and its application | |
| CN103366356A (en) | General calibration system and method and integrated imaging reconstruction system and method thereof | |
| CN115661226B (en) | Three-dimensional measuring method of mirror surface object, computer readable storage medium | |
| CN116309879A (en) | A robot-assisted multi-view 3D scanning measurement method | |
| CN113034565A (en) | Monocular structured light depth calculation method and system | |
| JP2006098065A (en) | Calibration device and method, and three-dimensional modelling device and system capable of using the same | |
| CN114037768A (en) | Method and device for joint calibration of multiple sets of tracking scanners | |
| CN104794718A (en) | Single-image CT (computed tomography) machine room camera calibration method | |
| CN116500851B (en) | 3D imaging system, calibration method, device, equipment and storage medium thereof | |
| CN113251953B (en) | A mirror angle measurement device and method based on stereo deflection technology | |
| CN114373019A (en) | Method for calibrating camera without public view field by using optimization method | |
| CN119359817A (en) | Calibration method of telecentric three-dimensional measurement system | |
| Gothandaraman et al. | Robot-assisted 3D digital reconstruction of heritage artifacts: area similarity approach | |
| CN113012279B (en) | A non-contact three-dimensional imaging measurement method, system and computer-readable storage medium |
Legal Events
| Date | Code | Title | Description |
|---|---|---|---|
| 121 | Ep: the epo has been informed by wipo that ep was designated in this application |
Ref document number: 17908223 Country of ref document: EP Kind code of ref document: A1 |
|
| NENP | Non-entry into the national phase |
Ref country code: DE |
|
| 122 | Ep: pct application non-entry in european phase |
Ref document number: 17908223 Country of ref document: EP Kind code of ref document: A1 |