CN114705216B - Secondary calibration method for three-dimensional vision measurement system - Google Patents
Secondary calibration method for three-dimensional vision measurement system Download PDFInfo
- Publication number
- CN114705216B CN114705216B CN202210166594.8A CN202210166594A CN114705216B CN 114705216 B CN114705216 B CN 114705216B CN 202210166594 A CN202210166594 A CN 202210166594A CN 114705216 B CN114705216 B CN 114705216B
- Authority
- CN
- China
- Prior art keywords
- calibration
- world coordinate
- value
- vision measurement
- standard component
- 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.)
- Active
Links
- 238000005259 measurement Methods 0.000 title claims abstract description 54
- 238000000034 method Methods 0.000 title claims abstract description 30
- 238000005457 optimization Methods 0.000 claims abstract description 13
- 238000004422 calculation algorithm Methods 0.000 claims abstract description 10
- 238000011156 evaluation Methods 0.000 claims abstract description 4
- 238000006243 chemical reaction Methods 0.000 claims description 8
- 238000012897 Levenberg–Marquardt algorithm Methods 0.000 claims description 3
- 238000012545 processing Methods 0.000 claims description 2
- 238000012795 verification Methods 0.000 claims 1
- 230000000007 visual effect Effects 0.000 description 9
- 238000010586 diagram Methods 0.000 description 7
- 230000036544 posture Effects 0.000 description 5
- 101100012902 Saccharomyces cerevisiae (strain ATCC 204508 / S288c) FIG2 gene Proteins 0.000 description 4
- 230000008859 change Effects 0.000 description 3
- 238000002474 experimental method Methods 0.000 description 3
- 230000006870 function Effects 0.000 description 3
- 230000006872 improvement Effects 0.000 description 3
- 230000008569 process Effects 0.000 description 3
- 101000827703 Homo sapiens Polyphosphoinositide phosphatase Proteins 0.000 description 2
- 102100023591 Polyphosphoinositide phosphatase Human genes 0.000 description 2
- 238000003384 imaging method Methods 0.000 description 2
- 238000000691 measurement method Methods 0.000 description 2
- 238000012986 modification Methods 0.000 description 2
- 230000004048 modification Effects 0.000 description 2
- 230000000737 periodic effect Effects 0.000 description 2
- 230000003252 repetitive effect Effects 0.000 description 2
- 101001121408 Homo sapiens L-amino-acid oxidase Proteins 0.000 description 1
- 102100026388 L-amino-acid oxidase Human genes 0.000 description 1
- 101100233916 Saccharomyces cerevisiae (strain ATCC 204508 / S288c) KAR5 gene Proteins 0.000 description 1
- 230000009286 beneficial effect Effects 0.000 description 1
- 238000004364 calculation method Methods 0.000 description 1
- 230000007547 defect Effects 0.000 description 1
- 230000007812 deficiency Effects 0.000 description 1
- 238000013461 design Methods 0.000 description 1
- 238000001514 detection method Methods 0.000 description 1
- 238000000605 extraction Methods 0.000 description 1
- 230000014509 gene expression Effects 0.000 description 1
- 239000011159 matrix material Substances 0.000 description 1
- 230000003287 optical effect Effects 0.000 description 1
- 238000004441 surface measurement Methods 0.000 description 1
- 238000013519 translation Methods 0.000 description 1
Classifications
-
- G—PHYSICS
- G01—MEASURING; TESTING
- G01C—MEASURING DISTANCES, LEVELS OR BEARINGS; SURVEYING; NAVIGATION; GYROSCOPIC INSTRUMENTS; PHOTOGRAMMETRY OR VIDEOGRAMMETRY
- G01C25/00—Manufacturing, calibrating, cleaning, or repairing instruments or devices referred to in the other groups of this subclass
Landscapes
- Engineering & Computer Science (AREA)
- Manufacturing & Machinery (AREA)
- Physics & Mathematics (AREA)
- General Physics & Mathematics (AREA)
- Radar, Positioning & Navigation (AREA)
- Remote Sensing (AREA)
- Length Measuring Devices By Optical Means (AREA)
Abstract
Description
技术领域Technical Field
本发明涉及视觉测量系统标定技术领域,具体涉及一种用于三维视觉测量系统的二次标定方法。The present invention relates to the technical field of visual measurement system calibration, and in particular to a secondary calibration method for a three-dimensional visual measurement system.
背景技术Background Art
视觉测量具有非接触、测量速度快、精度高、测量方法灵活等优点,广泛应用在缺陷检测、三维面形测量等多个领域。三维视觉测量方法因其速度快、精度高、实用性强等特点成为三维测量的最佳方法之一,三维视觉测量的关键就是获得相机拍摄图片的像素坐标和其对应的世界坐标系下坐标之间的关系,为了准确地描述该关系,需要对相机组成的测量系统进行参数标定即系统标定。在三维视觉测量中,系统标定是系统工作的基本步骤和关键环节,系统标定的精度将会直接影响三维视觉测量系统的测量精度。Visual measurement has the advantages of non-contact, fast measurement speed, high accuracy, and flexible measurement methods. It is widely used in many fields such as defect detection and three-dimensional surface measurement. The three-dimensional visual measurement method has become one of the best methods for three-dimensional measurement due to its fast speed, high accuracy, and strong practicality. The key to three-dimensional visual measurement is to obtain the relationship between the pixel coordinates of the camera image and its corresponding coordinates in the world coordinate system. In order to accurately describe this relationship, it is necessary to calibrate the parameters of the measurement system composed of cameras, that is, system calibration. In three-dimensional visual measurement, system calibration is the basic step and key link of the system operation. The accuracy of system calibration will directly affect the measurement accuracy of the three-dimensional visual measurement system.
三维视觉测量系统标定首先需要获得世界坐标系坐标和图像坐标系坐标,世界坐标系的世界坐标的获取是通过建立世界坐标系,此时建立的坐标系称为理想坐标系,由于轴系误差或者标定靶位姿误差,实际的世界坐标系与理想坐标系之间会存在一定的偏差,因此获得的世界坐标系下的实际值与理想值也存在偏差,这个偏差将会影响到系统标定的精度。另一方面,三维视觉测量系统标定后,系统经过长时间放置或者在搬运系统的过程中发生磕碰时,系统内部结构将会发生微小漂移,伴随着系统内部结构的改变,测量系统的参数也会发生改变,初始系统标定的结果将不再适用。因此,需要对系统进行二次标定以保证系统具有较高的测量精度。The calibration of the 3D vision measurement system first requires obtaining the coordinates of the world coordinate system and the image coordinate system. The world coordinates of the world coordinate system are obtained by establishing the world coordinate system. The coordinate system established at this time is called the ideal coordinate system. Due to the axis system error or the calibration target posture error, there will be a certain deviation between the actual world coordinate system and the ideal coordinate system. Therefore, there is also a deviation between the actual value and the ideal value obtained in the world coordinate system. This deviation will affect the accuracy of the system calibration. On the other hand, after the 3D vision measurement system is calibrated, if the system is placed for a long time or bumps during the transportation of the system, the internal structure of the system will drift slightly. With the change of the internal structure of the system, the parameters of the measurement system will also change, and the results of the initial system calibration will no longer apply. Therefore, it is necessary to calibrate the system twice to ensure that the system has a high measurement accuracy.
发明内容Summary of the invention
针对现有技术存在的不足,本发明的目的在于提供具有重要的实用价值的一种用于三维视觉测量系统的二次标定方法,以提高三维视觉测量系统的标定精度和测量精度。In view of the deficiencies in the prior art, the purpose of the present invention is to provide a secondary calibration method for a three-dimensional vision measurement system with important practical value, so as to improve the calibration accuracy and measurement accuracy of the three-dimensional vision measurement system.
为了实现上述目的,本发明提供如下技术方案:In order to achieve the above object, the present invention provides the following technical solutions:
一种用于三维视觉测量系统的二次标定方法,包括:A secondary calibration method for a three-dimensional vision measurement system, comprising:
步骤S1:根据世界坐标值和图像坐标值对系统模型进行初次标定;Step S1: Initially calibrate the system model according to the world coordinate value and the image coordinate value;
步骤S2:用初次标定的系统模型对标准件进行三维重建,根据重建结果对标定误差评价;Step S2: Use the initially calibrated system model to perform three-dimensional reconstruction of the standard part, and evaluate the calibration error based on the reconstruction result;
步骤S3:依据标定误差评价结果,对初次系统标定时采用世界坐标值进行优化,利用优化后的世界坐标值对初次标定的系统模型进行二次标定;Step S3: according to the calibration error evaluation result, the world coordinate value is optimized during the initial system calibration, and the system model of the initial calibration is recalibrated using the optimized world coordinate value;
步骤S4:利用二次标定后的系统模型重建标准件,直到重建标准件的结果与其的理论值误差满足预设条件,获得高精度标定结果。Step S4: Reconstruct the standard part using the system model after the secondary calibration, until the error between the result of the reconstructed standard part and its theoretical value meets the preset condition, thereby obtaining a high-precision calibration result.
在本发明中,进一步的,还包括:步骤S5:对步骤S4中标定结果进行精度验证。In the present invention, further, it also includes: Step S5: verifying the accuracy of the calibration result in Step S4.
在本发明中,进一步的,所述步骤S4包括:In the present invention, further, step S4 includes:
步骤S41:对标准件重建,并求取每个标准件实际值与理想值的偏差Δi;Step S41: Reconstruct the standard parts and obtain the deviation Δ i between the actual value and the ideal value of each standard part;
步骤S42:对所有的实际值与理想值的偏差求和为,计算公式如下:Step S42: Sum the deviations between all actual values and ideal values to obtain the value of:
步骤S43:判断是否满足预设条件,不满足则返回步骤S31,满足则步骤S44;Step S43: Determine whether the preset conditions are met, if not, return to step S31, if yes, go to step S44;
步骤S44:获得重建标准件精度最高的偏转角,计算此时的世界坐标值,利用该坐标对系统进行标定,获得为高精度标定结果。Step S44: Obtain the deflection angle with the highest accuracy for reconstructing the standard component, calculate the world coordinate value at this time, and use the coordinate to calibrate the system to obtain a high-precision calibration result.
在本发明中,进一步的,所述步骤S3包括:采用最优化算法对坐标系之间的偏转角进行优化,并将优化后的结果代入世界坐标系中获得优化后的世界坐标值。In the present invention, further, step S3 includes: optimizing the deflection angle between the coordinate systems by using an optimization algorithm, and substituting the optimized result into the world coordinate system to obtain the optimized world coordinate value.
在本发明中,进一步的,坐标系之间的偏转角与实际世界坐标值的表示关系如下:In the present invention, further, the relationship between the deflection angle between the coordinate systems and the actual world coordinate value is as follows:
X=X0+Z0·sinα·cosβX=X 0 +Z 0 ·sin α ·cos β
Y=Y0+Z0·sinα·sinβY=Y 0 +Z 0 ·sin α ·sin β
Z=Z0·cosαZ=Z 0 ·cos α
其中,XYZ分别为世界坐标系的三个轴向的坐标值,α为靶标移动方向与理想运动方向的夹角,β为OwZw轴在面的投影与OwXw轴的夹角。Where XYZ are the coordinate values of the three axes of the world coordinate system, α is the angle between the target moving direction and the ideal moving direction, and β is the angle between the projection of the OwZw axis on the surface and the OwXw axis.
在本发明中,进一步的,所述步骤S5包括:利用二次系统标定后的系统模型重建不同的标准件或同一标准件的不同位姿,将重建后的结果与标准件的理论值对比,验证系统测量的精度。In the present invention, further, step S5 includes: using the system model after secondary system calibration to reconstruct different standard parts or different postures of the same standard part, comparing the reconstructed results with the theoretical values of the standard parts, and verifying the accuracy of system measurement.
在本发明中,进一步的,所述步骤S1前设有步骤S0,步骤S0:获得不同位置特征点的世界坐标下的世界坐标值和图像坐标系下的图像坐标值以及相位值。In the present invention, further, step S0 is provided before step S1, and step S0: obtaining the world coordinate values of feature points at different positions under the world coordinate system and the image coordinate values and phase values under the image coordinate system.
在本发明中,进一步的,所述步骤S0包括:In the present invention, further, the step S0 includes:
S0-1:建立世界坐标与相机像素之间转化关系,其中转换关系可表示为:S0-1: Establish the conversion relationship between world coordinates and camera pixels, where the conversion relationship can be expressed as:
其中,u、v为相机像平面某点坐标,xw、yw、zw为对应的世界坐标系下的世界坐标;Among them, u and v are the coordinates of a point on the camera image plane, and xw , yw , and zw are the world coordinates in the corresponding world coordinate system;
S0-2:获得各个靶标点的世界坐标系下的坐标值;S0-2: Obtain the coordinate value of each target point in the world coordinate system;
S0-3:获得各个靶标点的图像坐标系下的坐标值和相位值。S0-3: Obtain the coordinate value and phase value of each target point in the image coordinate system.
在本发明中,进一步的,所述图像坐标系下的图像坐标值以及相位值的获取方法:In the present invention, further, a method for obtaining image coordinate values and phase values in the image coordinate system is as follows:
获取相机拍摄靶标的拍摄图片,并对图片进行处理获得各个靶标点的圆心的像素值;通过相机拍摄被投影仪投影周期性条纹的靶标,将拍摄的图片进行解算获得每个像素对应的相位大小,通过插值运算获得每个靶标圆心对应的相位值。The image of the target taken by the camera is obtained, and the image is processed to obtain the pixel value of the center of each target point; the target with periodic stripes projected by the projector is photographed by the camera, the photographed image is solved to obtain the phase size corresponding to each pixel, and the phase value corresponding to the center of each target is obtained by interpolation operation.
在本发明中,优选的,所述最优化算法包括但不限于Levenberg-Marquardt算法。In the present invention, preferably, the optimization algorithm includes but is not limited to the Levenberg-Marquardt algorithm.
与现有技术相比,本发明的有益效果是:Compared with the prior art, the present invention has the following beneficial effects:
1、本发明采用优化迭代的方式,对三维视觉测量系统进行二次标定,不需要对系统标定过程进行重复性实验,在减少工作量的同时可以进行高效率的系统标定。1. The present invention adopts an optimized iterative method to perform secondary calibration on the three-dimensional vision measurement system. There is no need to perform repetitive experiments on the system calibration process, and efficient system calibration can be performed while reducing the workload.
2、本发明对长时间放置或者发生微动的系统进行二次标定,解决了系统硬件发生漂移而系统参数发生改变的问题,不需要对系统进行重新标定实验即可对系统参数进行校正。2. The present invention performs secondary calibration on the system which has been placed for a long time or has micro-movement, thereby solving the problem that the system hardware drifts and the system parameters change. The system parameters can be corrected without recalibrating the system.
3、本发明在对标定靶标位姿无要求的前提下,保证系统具有较高的测量精度,对原有标定结果进行二次标定,提高系统的测量精度。3. Under the premise that there is no requirement for the calibration target position and posture, the present invention ensures that the system has high measurement accuracy, performs secondary calibration on the original calibration results, and improves the measurement accuracy of the system.
附图说明BRIEF DESCRIPTION OF THE DRAWINGS
附图用来提供对本发明的进一步理解,并且构成说明书的一部分,与本发明的实施例一起用于解释本发明,并不构成对本发明的限制。在附图中:The accompanying drawings are used to provide a further understanding of the present invention and constitute a part of the specification. Together with the embodiments of the present invention, they are used to explain the present invention and do not constitute a limitation of the present invention. In the accompanying drawings:
图1是本发明一种用于三维视觉测量系统的二次标定方法的流程图;FIG1 is a flow chart of a secondary calibration method for a three-dimensional vision measurement system according to the present invention;
图2是三维视觉测量系统标定时理想与实际靶标位置关系的示意图;FIG2 is a schematic diagram of the relationship between the ideal and actual target positions during calibration of a three-dimensional vision measurement system;
图3是本发明的三维视觉测量系统测量模型示意图;3 is a schematic diagram of a measurement model of a three-dimensional vision measurement system of the present invention;
图4是本发明的标准台阶的三维模型与其重建结果示意图;FIG4 is a schematic diagram of a three-dimensional model of a standard step of the present invention and its reconstruction result;
图5是本发明的中步骤S0的工作流程示意图;FIG5 is a schematic diagram of the workflow of step S0 of the present invention;
图6是本发明的中步骤S4的工作流程示意图;FIG6 is a schematic diagram of the workflow of step S4 of the present invention;
图7为本发明的方法优化前后的重建标准件结果;FIG7 is the results of reconstructing standard parts before and after optimization by the method of the present invention;
图8为系统重投影误差示意图。FIG8 is a schematic diagram of system reprojection error.
具体实施方式DETAILED DESCRIPTION
下面将结合本发明实施例中的附图,对本发明实施例中的技术方案进行清楚、完整地描述,显然,所描述的实施例仅仅是本发明一部分实施例,而不是全部的实施例。基于本发明中的实施例,本领域普通技术人员在没有做出创造性劳动前提下所获得的所有其他实施例,都属于本发明保护的范围。The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
需要说明的是,当组件被称为“固定于”另一个组件,它可以直接在另一个组件上或者也可以存在居中的组件。当一个组件被认为是“连接”另一个组件,它可以是直接连接到另一个组件或者可能同时存在居中组件。当一个组件被认为是“设置于”另一个组件,它可以是直接设置在另一个组件上或者可能同时存在居中组件。本文所使用的术语“垂直的”、“水平的”、“左”、“右”以及类似的表述只是为了说明的目的。It should be noted that when a component is referred to as being "fixed to" another component, it may be directly on the other component or there may also be a component centered. When a component is considered to be "connected to" another component, it may be directly connected to the other component or there may also be a component centered. When a component is considered to be "set on" another component, it may be directly set on the other component or there may also be a component centered. The terms "vertical", "horizontal", "left", "right" and similar expressions used herein are for illustrative purposes only.
除非另有定义,本文所使用的所有的技术和科学术语与属于本发明的技术领域的技术人员通常理解的含义相同。本文中在本发明的说明书中所使用的术语只是为了描述具体的实施例的目的,不是旨在于限制本发明。本文所使用的术语“及/或”包括一个或多个相关的所列项目的任意的和所有的组合。Unless otherwise defined, all technical and scientific terms used herein have the same meaning as those commonly understood by those skilled in the art of the present invention. The terms used herein in the specification of the present invention are only for the purpose of describing specific embodiments and are not intended to limit the present invention. The term "and/or" used herein includes any and all combinations of one or more related listed items.
如图2所示,本发明提供一种三维视觉测量系统,该系统包括相机1和投影仪2,将平面靶标4放在精密位移台3上,使其运动方向与靶标平面垂直。As shown in FIG2 , the present invention provides a three-dimensional vision measurement system, which includes a camera 1 and a projector 2 , and a planar target 4 is placed on a precision translation stage 3 so that its movement direction is perpendicular to the target plane.
在系统标定过程中所使用的世界坐标系下的靶标圆点中心坐标值的精度将会影响到系统标定的精度,因此需要获得各个靶标点在世界坐标系下的世界坐标值为实际坐标系下的坐标值提高系统标定的准确度;同时对内部结构发生漂移的测量系统进行二次标定,提高系统测量精度。The accuracy of the target point center coordinate value in the world coordinate system used in the system calibration process will affect the accuracy of the system calibration. Therefore, it is necessary to obtain the world coordinate value of each target point in the world coordinate system as the coordinate value in the actual coordinate system to improve the accuracy of the system calibration; at the same time, the measurement system with drift in the internal structure is recalibrated to improve the system measurement accuracy.
具体的,请参见图1,本发明一较佳实施方式提供一种用于三维视觉测量系统的二次标定方法,包括:Specifically, referring to FIG. 1 , a preferred embodiment of the present invention provides a secondary calibration method for a three-dimensional vision measurement system, comprising:
步骤S0:获得不同位置特征点的世界坐标下的世界坐标值和图像坐标系下的图像坐标值以及相位值。Step S0: obtaining the world coordinate values of feature points at different positions in the world coordinate system and the image coordinate values and phase values in the image coordinate system.
步骤S1:根据世界坐标值和图像坐标值对系统进行初次标定;Step S1: Initially calibrate the system according to the world coordinate value and the image coordinate value;
步骤S2:用初次标定的系统对标准件进行三维重建,根据重建结果对标定误差评价;Step S2: Use the initially calibrated system to perform three-dimensional reconstruction of the standard part, and evaluate the calibration error based on the reconstruction result;
步骤S3:依据标定误差评价结果,对初次系统标定时采用世界坐标值进行优化,利用优化后的世界坐标值对初次标定的系统进行二次标定;Step S3: according to the calibration error evaluation result, the world coordinate value is optimized during the initial system calibration, and the initially calibrated system is recalibrated using the optimized world coordinate value;
步骤S4:利用二次标定后的系统重建标准件,直到重建标准件的结果与其的理论值误差满足预设条件,获得高精度标定结果;Step S4: Reconstructing the standard part using the system after the secondary calibration until the error between the result of the reconstructed standard part and its theoretical value meets a preset condition, thereby obtaining a high-precision calibration result;
步骤S5:对步骤S4中标定结果进行精度验证。Step S5: verify the accuracy of the calibration result in step S4.
基于上述实施例,本发明首先根据世界坐标值和图像坐标值对系统进行初次标定,获得系统模型,在根据初次系统标定的结果也就是获得的系统模型对标准件进行三维创建,初次评定系统的标定精度。然后,采用一种新的优化方法对三维视觉测量系统初次标定结果进行优化,利用优化后的世界坐标对系统模型进行二次标定获得新的系统模型,并且使用不同于优化所用的标准件进行验证,并求得系统的重投影误差,最终证明该发明在重建结果精度上有了非常有效的提升。Based on the above embodiments, the present invention first performs an initial calibration on the system according to the world coordinate values and the image coordinate values to obtain a system model, and then creates a three-dimensional standard part according to the result of the initial system calibration, that is, the obtained system model, and initially evaluates the calibration accuracy of the system. Then, a new optimization method is used to optimize the initial calibration result of the three-dimensional visual measurement system, and the system model is recalibrated using the optimized world coordinates to obtain a new system model, and is verified using standard parts different from those used for optimization, and the reprojection error of the system is obtained, which ultimately proves that the invention has a very effective improvement in the accuracy of the reconstruction results.
基于上述实施例,本发明具有如下特点:Based on the above embodiments, the present invention has the following characteristics:
本发明采用优化迭代的方式,对三维视觉测量系统进行二次标定,不需要对系统标定过程进行重复性实验,在减少工作量的同时可以进行高效率的系统标定。The present invention adopts an optimized iterative method to perform secondary calibration on the three-dimensional vision measurement system, and does not need to perform repetitive experiments on the system calibration process. It can perform efficient system calibration while reducing the workload.
本发明对长时间放置或者发生微动的系统进行二次标定,解决了系统硬件发生漂移而系统参数发生改变的问题,不需要对系统进行重新标定实验即可对系统参数进行校正。The present invention performs secondary calibration on a system that has been placed for a long time or has micro-movements, thereby solving the problem of system hardware drifting and system parameter changes, and the system parameters can be corrected without the need for recalibration experiments on the system.
本发明在对标定靶标位姿无要求的前提下,保证系统具有较高的测量精度,对原有标定结果进行二次标定,提高系统的测量精度。Under the premise that there is no requirement on the calibration target position and posture, the present invention ensures that the system has high measurement accuracy, performs secondary calibration on the original calibration results, and improves the measurement accuracy of the system.
进一步的,在本发明中,如图5所示,步骤S0包括:Further, in the present invention, as shown in FIG5 , step S0 includes:
S0-1:建立世界坐标与相机像素之间转化关系;S0-1: Establish the conversion relationship between world coordinates and camera pixels;
示例性的,如图3所示为建立的世界坐标与相机像素之间转化关系示意图,建立世界坐标系,其中Ow为世界坐标系原点,Xw、Yw、Zw分别为世界坐标系的三个轴向。Exemplarily, as shown in FIG3 , a schematic diagram of the conversion relationship between the established world coordinates and camera pixels is shown, a world coordinate system is established, wherein O w is the origin of the world coordinate system, and X w , Y w , and Z w are the three axes of the world coordinate system.
世界坐标系经过RT旋转矩阵变换为相机坐标系,其中,Oc为相机坐标系原点,Xc、Yc、Zc分别为相机坐标系的三个轴向;其中,Op为投影仪坐标系原点,Xp、Yp、Zp分别为投影仪坐标系的三个轴向。The world coordinate system is transformed into the camera coordinate system through the RT rotation matrix, where Oc is the origin of the camera coordinate system, and Xc , Yc , and Zc are the three axes of the camera coordinate system; where Op is the origin of the projector coordinate system, and Xp , Yp , and Zp are the three axes of the projector coordinate system.
其中,转换关系可表示为式:Among them, the conversion relationship can be expressed as:
其中,u、v为相机像平面某点坐标,xw、yw、zw为对应的世界坐标系下的世界坐标。Among them, u and v are the coordinates of a point on the camera image plane, and xw , yw , and zw are the world coordinates in the corresponding world coordinate system.
相对的,相机坐标系成像模型可表示为:In contrast, the camera coordinate imaging model can be expressed as:
同时,将投影仪看作“逆相机”可以得到投影仪成像模型:At the same time, considering the projector as an "inverse camera" can obtain the projector imaging model:
如此,基于上述实施例建立了世界坐标与相机像素之间转化关系,需要说明的是此时建立的坐标系为理想坐标系,为后续的系统标定奠定基础。In this way, based on the above embodiment, a conversion relationship between world coordinates and camera pixels is established. It should be noted that the coordinate system established at this time is an ideal coordinate system, which lays the foundation for subsequent system calibration.
S0-2:获得各个靶标点的世界坐标系下的坐标值;S0-2: Obtain the coordinate value of each target point in the world coordinate system;
示例性的,建立世界坐标系,使世界坐标系的OwXw轴、OwYw轴和OwZw轴相互垂直,获得此时世界坐标系的特征点的世界坐标值。具体的,如图2所示,靶标最左上角的点为世界坐标系的原点Ow,向右过横排靶标点圆心为轴,向下过竖排靶标点远心为OwXw轴,垂直于靶标平面为OwZw轴,由于靶标各个圆点的中心距离已知,每次沿轴运动的距离已知,因此可以获得靶标OwYw各个靶标圆点的世界坐标系下的世界坐标值,具体是根据靶标的步进距离以及靶标点的间距计算获得。Exemplarily, a world coordinate system is established so that the OwXw axis , OwYw axis and OwZw axis of the world coordinate system are perpendicular to each other, and the world coordinate value of the feature point of the world coordinate system at this time is obtained. Specifically, as shown in FIG2 , the point at the upper left corner of the target is the origin Ow of the world coordinate system, the axis passing through the center of the horizontal row of target points to the right, the axis passing through the telecenter of the vertical row of target points downward is the OwXw axis, and the axis perpendicular to the target plane is the OwZw axis. Since the center distance of each target point is known, the distance moved along the axis each time is known, so the world coordinate value of each target point of the target OwYw in the world coordinate system can be obtained, which is specifically calculated based on the stepping distance of the target and the spacing of the target points.
S0-3:获得各个靶标点的图像坐标系下的坐标值和相位值。S0-3: Obtain the coordinate value and phase value of each target point in the image coordinate system.
具体的,通过相机1拍摄平面靶标,得到相机1拍摄靶标的拍摄图片,并对图片进行处理可提取获得各个靶标点的圆心的像素值;接着,通过相机1拍摄被投影仪2投影周期性条纹的靶标,将拍摄的图片进行解算获得每个像素对应的相位大小,通过插值运算获得每个平面靶标圆心对应的相位值。Specifically, a planar target is photographed by camera 1 to obtain a picture of the target photographed by camera 1, and the picture is processed to extract the pixel value of the center of each target point; then, the target on which periodic stripes are projected by projector 2 is photographed by camera 1, the photographed picture is solved to obtain the phase size corresponding to each pixel, and the phase value corresponding to the center of each planar target is obtained by interpolation operation.
示例性的,采用图像处理技术提取靶标圆心对应的像素坐标,具体可以使用椭圆拟合及中心提取。此外,相位值可由相位解算以及插值运算获得。Exemplarily, the pixel coordinates corresponding to the center of the target circle are extracted by using image processing technology, and specifically, ellipse fitting and center extraction can be used. In addition, the phase value can be obtained by phase solution and interpolation operation.
进一步的,在本发明中,步骤S1:根据世界坐标值和图像坐标值对系统进行初次标定。具体的,根据世界坐标值和图像坐标值对系统进行初次标定将求得的世界坐标系下的坐标和图像坐标系下的坐标以及相位值代入已知的系统模型,用最小二乘法求解,即可得到系统的参数,也就是完成了已知系统模型的初次标定,得到了系统模型。Further, in the present invention, step S1: the system is initially calibrated according to the world coordinate value and the image coordinate value. Specifically, the system is initially calibrated according to the world coordinate value and the image coordinate value, and the coordinates in the world coordinate system and the coordinates in the image coordinate system and the phase value are substituted into the known system model, and the system parameters can be obtained by solving with the least square method, that is, the initial calibration of the known system model is completed, and the system model is obtained.
进一步的,在完成初次标定后,需要对标定精度进行评价,也就是进行步骤步骤S2:用初次标定的系统对标准件进行三维重建,根据重建结果对标定误差评价。Furthermore, after the initial calibration is completed, the calibration accuracy needs to be evaluated, that is, step S2 is performed: the standard part is 3D reconstructed using the initially calibrated system, and the calibration error is evaluated according to the reconstruction result.
优选的,本发明的标准件包括但不限于标准台阶。如图4所示,初次标定后的系统重建标准台阶,通过理论值和测量值对比获得初次标定后系统重建精度。Preferably, the standard parts of the present invention include but are not limited to standard steps. As shown in FIG4 , the system reconstructs the standard steps after the initial calibration, and the reconstruction accuracy of the system after the initial calibration is obtained by comparing the theoretical value with the measured value.
为了提高系统标定精度和测量精度,本方案还对系统进行二次标定。In order to improve the system calibration accuracy and measurement accuracy, this solution also performs a secondary calibration on the system.
如图2所示,理想情况下,靶标移动的方向与平面靶标4垂直,但是由于系统误差导致靶标移动方向发生改变,与理想运动方向存在一个夹角,此时轴在面的投影与则的夹角为α,此时OwZw轴在面的投影与OwXw轴的夹角β,则坐标系之间的偏转角(α和/或β)与实际世界坐标值的表示关系如下:As shown in FIG2 , ideally, the target moving direction is perpendicular to the plane target 4, but due to the system error, the target moving direction changes, and there is an angle with the ideal moving direction. At this time, the angle between the projection of the axis on the plane and the O w Z w axis is α, and the angle between the projection of the O w Z w axis on the plane and the O w X w axis is β. The relationship between the deflection angle (α and/or β) between the coordinate systems and the actual world coordinate value is as follows:
X=X0+Z0·sinα·cosβX=X 0 +Z 0 ·sin α ·cos β
Y=Y0+Z0·sinα·sinβY=Y 0 +Z 0 ·sin α ·sin β
Z=Z0·cosαZ=Z 0 ·cos α
其中,XYZ分别为世界坐标系的三个轴向的坐标值,α为靶标移动方向与理想运动方向的夹角,β为OwZw轴在面的投影与OwXw轴的夹角。Where XYZ are the coordinate values of the three axes of the world coordinate system, α is the angle between the target moving direction and the ideal moving direction, and β is the angle between the projection of the OwZw axis on the surface and the OwXw axis.
由于α、β均未知,因此采用最优化算法对坐标系之间的偏转角进行优化,并将优化后的结果代入世界坐标系中获得优化后的世界坐标值,利用优化后的世界坐标值对初次标定的系统进行二次标定,获得新的系统参数。Since α and β are unknown, an optimization algorithm is used to optimize the deflection angle between the coordinate systems, and the optimized result is substituted into the world coordinate system to obtain the optimized world coordinate value. The system that was initially calibrated is recalibrated using the optimized world coordinate value to obtain new system parameters.
优选的,本实施最优化算法采用Levenberg-Marquardt算法,但不限于该算法。Preferably, the optimization algorithm of this implementation adopts the Levenberg-Marquardt algorithm, but is not limited to this algorithm.
在二次标定完成后即可得到新的系统模型,执行步骤S4:利用二次标定后的系统重建标准件,直到重建标准件的结果与其的理论值误差满足预设条件,获得高精度标定结果。After the secondary calibration is completed, a new system model can be obtained, and step S4 is executed: the standard parts are reconstructed using the system after the secondary calibration until the error between the result of the reconstructed standard parts and its theoretical value meets the preset condition, thereby obtaining a high-precision calibration result.
示例性的,如图6所示,步骤S4包括:Exemplarily, as shown in FIG6 , step S4 includes:
步骤S41:对标准台阶重建,并求取每个标准台阶实际值与理想值的偏差Δi;其中,偏差Δi为标准台阶实际值h0i与理想值hi之间的差值。Step S41: Reconstruct the standard steps and obtain the deviation Δ i between the actual value and the ideal value of each standard step; wherein the deviation Δ i is the difference between the actual value h 0i of the standard step and the ideal value h i .
步骤S42:对所有的实际值与理想值的偏差求和为Δ,计算公式如下:Step S42: summing up the deviations between all actual values and ideal values to be Δ, and the calculation formula is as follows:
步骤S43:判断是否满足预设条件,不满足则返回步骤S31,满足则步骤S44;具体的,预设条件也就是选定的循环条件,循环条件为Δ最小,也可根据实际进行设定,当循环条件不成立时则返回到步骤S31中执行,直到循环条件成立为止。Step S43: Determine whether the preset condition is met. If not, return to step S31. If met, go to step S44. Specifically, the preset condition is the selected loop condition. The loop condition is Δ minimum, which can also be set according to actual conditions. When the loop condition is not met, return to step S31 and execute until the loop condition is met.
步骤S44:获得重建标准件精度最高的偏转角,计算此时的世界坐标值,利用该坐标对系统进行标定,获得为高精度标定结果。如图8所示,此时获得重建精度最高,同时获得较小的重投影误差。Step S44: Obtain the deflection angle with the highest reconstruction accuracy of the standard component, calculate the world coordinate value at this time, and use the coordinate to calibrate the system to obtain a high-precision calibration result. As shown in Figure 8, the highest reconstruction accuracy is obtained at this time, and a smaller reprojection error is obtained.
如此,完成了系统的二次标定,本发明基于最优化算法,对标准件的重建结果及其理论值的偏差分析,以得到重建标准件误差最小为优化目标,让其接近实际值,从而实现对系统进行高精度二次标定。In this way, the secondary calibration of the system is completed. Based on the optimization algorithm, the present invention analyzes the deviation between the reconstruction results of the standard parts and their theoretical values, with the optimization goal of minimizing the error of the reconstructed standard parts and making it close to the actual value, thereby realizing high-precision secondary calibration of the system.
在本发明中,进一步的,在标定完成后,还需对系统测量精度进行评价,具体的,利用二次系统标定后的系统模型重建不同的标准件或同一标准件的不同位姿,将重建后的结果与标准件的理论值对比获得系统测量的精度。在本实施例中,如图7所示,测量误差由12降低到2以内,如此可得使用本发明使三维视觉测量系统测量精度得到有效提升。In the present invention, further, after the calibration is completed, the system measurement accuracy needs to be evaluated. Specifically, the system model after the secondary system calibration is used to reconstruct different standard parts or different postures of the same standard part, and the reconstructed results are compared with the theoretical values of the standard parts to obtain the system measurement accuracy. In this embodiment, as shown in Figure 7, the measurement error is reduced from 12 to within 2, so the measurement accuracy of the three-dimensional visual measurement system can be effectively improved by using the present invention.
应当指出,对于本领域的普通技术人员来说,在不脱离本发明原理的前提下,还可以对本发明进行若干改进和修饰,这些改进和修饰也落入本发明权利要求的保护范围内。It should be pointed out that, for those skilled in the art, several improvements and modifications may be made to the present invention without departing from the principles of the present invention, and these improvements and modifications also fall within the protection scope of the claims of the present invention.
本领域普通技术人员可以意识到,结合本文中所公开的实施例描述的各示例的单元及算法步骤,能够以电子硬件、或者计算机软件和电子硬件的结合来实现。这些功能究竟以硬件还是软件方式来执行,取决于技术方案的特定应用和设计约束条件。专业技术人员可以对每个特定的应用来使用不同方法来实现所描述的功能,但是这种实现不应认为超出本发明的范围。Those of ordinary skill in the art will appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of the present invention.
应当理解,本申请实施例中,从权、各个实施例、特征可以互相组合结合,都能实现解决前述技术问题。It should be understood that in the embodiments of the present application, the various embodiments and features can be combined with each other to solve the aforementioned technical problems.
所述功能如果以软件功能单元的形式实现并作为独立的产品销售或使用时,可以存储在一个计算机可读取存储介质中。基于这样的理解,本发明的技术方案本质上或者说对现有技术做出贡献的部分或者该技术方案的部分可以以软件产品的形式体现出来,该计算机软件产品存储在一个存储介质中,包括若干指令用以使得一台计算机设备(可以是个人计算机,服务器,或者网络设备等)执行本发明各个实施例所述方法的全部或部分步骤。而前述的存储介质包括:U盘、移动硬盘、只读存储器(ROM,Read-Only Memory)、随机存取存储器(RAM,Random Access Memory)、磁碟或者光盘等各种可以存储程序代码的介质。If the functions are implemented in the form of software functional units and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention, or the part that contributes to the prior art or the part of the technical solution, can be embodied in the form of a software product. The computer software product is stored in a storage medium, including several instructions for enabling a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the methods described in each embodiment of the present invention. The aforementioned storage medium includes: various media that can store program codes, such as a USB flash drive, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk.
上述说明是针对本发明较佳可行实施例的详细说明,但实施例并非用以限定本发明的专利申请范围,凡本发明所提示的技术精神下所完成的同等变化或修饰变更,均应属于本发明所涵盖专利范围。The above description is a detailed description of the preferred feasible embodiments of the present invention, but the embodiments are not intended to limit the scope of the patent application of the present invention. All equivalent changes or modified changes completed under the technical spirit suggested by the present invention should fall within the patent scope covered by the present invention.
Claims (10)
Priority Applications (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN202210166594.8A CN114705216B (en) | 2022-02-23 | 2022-02-23 | Secondary calibration method for three-dimensional vision measurement system |
Applications Claiming Priority (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN202210166594.8A CN114705216B (en) | 2022-02-23 | 2022-02-23 | Secondary calibration method for three-dimensional vision measurement system |
Publications (2)
| Publication Number | Publication Date |
|---|---|
| CN114705216A CN114705216A (en) | 2022-07-05 |
| CN114705216B true CN114705216B (en) | 2024-08-23 |
Family
ID=82166148
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| CN202210166594.8A Active CN114705216B (en) | 2022-02-23 | 2022-02-23 | Secondary calibration method for three-dimensional vision measurement system |
Country Status (1)
| Country | Link |
|---|---|
| CN (1) | CN114705216B (en) |
Citations (2)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN103900504A (en) * | 2014-04-10 | 2014-07-02 | 华中科技大学 | Nano-scale real-time three-dimensional visual information feedback method |
| CN107358631A (en) * | 2017-06-27 | 2017-11-17 | 大连理工大学 | A kind of binocular vision method for reconstructing for taking into account three-dimensional distortion |
Family Cites Families (1)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN110335310B (en) * | 2019-07-09 | 2021-07-02 | 中国大恒(集团)有限公司北京图像视觉技术分公司 | Calibration method under non-common vision field |
-
2022
- 2022-02-23 CN CN202210166594.8A patent/CN114705216B/en active Active
Patent Citations (2)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN103900504A (en) * | 2014-04-10 | 2014-07-02 | 华中科技大学 | Nano-scale real-time three-dimensional visual information feedback method |
| CN107358631A (en) * | 2017-06-27 | 2017-11-17 | 大连理工大学 | A kind of binocular vision method for reconstructing for taking into account three-dimensional distortion |
Also Published As
| Publication number | Publication date |
|---|---|
| CN114705216A (en) | 2022-07-05 |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| CN109118545B (en) | Three-dimensional imaging system calibration method and system based on rotating shaft and binocular camera | |
| CN102750697B (en) | Parameter calibration method and device | |
| CN105096329B (en) | A method of accurately correcting image distortion of ultra-wide-angle camera | |
| CN106408556B (en) | A Calibration Method for Small Object Measurement System Based on General Imaging Model | |
| CN111331592A (en) | Tool center point correction device for robotic arm, method thereof, and robotic arm system | |
| CN116071433A (en) | Camera calibration method and system, computer readable storage medium | |
| CN107633533B (en) | High-precision circular marker point center positioning method and device under large distortion lens | |
| CN108898635A (en) | A kind of control method and system improving camera calibration precision | |
| CN115115550B (en) | Image perspective correction method and device based on camera visual angle transformation | |
| CN111062966B (en) | Method to optimize camera tracking based on L-M algorithm and polynomial interpolation | |
| CN113324528A (en) | Close-range photogrammetry target positioning method and system with known camera station position | |
| CN114241059B (en) | Synchronous calibration method for camera and light source in photometric stereo vision system | |
| CN114663533A (en) | Multi-view camera calibration method and system based on nonlinear optimization | |
| CN117994359B (en) | A linear array camera calibration method based on auxiliary camera and related device | |
| CN111462245A (en) | Zoom camera attitude calibration method and system based on rectangular structure | |
| CN118314217A (en) | A multi-camera calibration method and device for workpiece shape, position and size measurement | |
| Wang et al. | A new calibration model and method of camera lens distortion | |
| CN114705216B (en) | Secondary calibration method for three-dimensional vision measurement system | |
| CN110930458A (en) | A simple method for calibrating external parameters of Nao robot camera | |
| CN107240077B (en) | Visual measurement method based on elliptic conformation deviation iterative correction | |
| CN114820810A (en) | Analysis method based on Tsai camera plane calibration algorithm | |
| CN117670990A (en) | Positioning method and device of three-dimensional camera, electronic equipment and storage medium | |
| CN118037605A (en) | Planar imaging perspective deformation correction method based on extrinsic parameter adjustment | |
| CN118544360A (en) | Robot vision detection method, system, terminal and medium based on laser compensation | |
| CN119068058A (en) | A method for calibrating intrinsic parameters of a monocular camera in a motion capture system |
Legal Events
| Date | Code | Title | Description |
|---|---|---|---|
| PB01 | Publication | ||
| PB01 | Publication | ||
| SE01 | Entry into force of request for substantive examination | ||
| SE01 | Entry into force of request for substantive examination | ||
| GR01 | Patent grant | ||
| GR01 | Patent grant |