CN115479556A - A binary defocus three-dimensional measurement method and device for subtracting the mean value of phase error - Google Patents

A binary defocus three-dimensional measurement method and device for subtracting the mean value of phase error Download PDF

Info

Publication number
CN115479556A
CN115479556A CN202110800600.6A CN202110800600A CN115479556A CN 115479556 A CN115479556 A CN 115479556A CN 202110800600 A CN202110800600 A CN 202110800600A CN 115479556 A CN115479556 A CN 115479556A
Authority
CN
China
Prior art keywords
phase
mean value
binary
defocus
phase error
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.)
Granted
Application number
CN202110800600.6A
Other languages
Chinese (zh)
Other versions
CN115479556B (en
Inventor
游迪
游志胜
朱江平
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Sichuan University
Original Assignee
Sichuan University
Priority date (The priority date 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 date listed.)
Filing date
Publication date
Application filed by Sichuan University filed Critical Sichuan University
Priority to CN202110800600.6A priority Critical patent/CN115479556B/en
Publication of CN115479556A publication Critical patent/CN115479556A/en
Application granted granted Critical
Publication of CN115479556B publication Critical patent/CN115479556B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G01MEASURING; TESTING
    • G01BMEASURING LENGTH, THICKNESS OR SIMILAR LINEAR DIMENSIONS; MEASURING ANGLES; MEASURING AREAS; MEASURING IRREGULARITIES OF SURFACES OR CONTOURS
    • G01B11/00Measuring arrangements characterised by the use of optical techniques
    • G01B11/24Measuring arrangements characterised by the use of optical techniques for measuring contours or curvatures
    • G01B11/25Measuring arrangements characterised by the use of optical techniques for measuring contours or curvatures by projecting a pattern, e.g. one or more lines, moiré fringes on the object
    • G01B11/2504Calibration devices

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Length Measuring Devices By Optical Means (AREA)

Abstract

The invention relates to the field of optical three-dimensional measurement, in particular to a binary defocusing three-dimensional measurement method and device for reducing a phase error mean value. Firstly, carrying out binary coding on a sine stripe image by adopting an error diffusion algorithm to obtain a coding stripe group; then, calculating to obtain a phase error mean value; the coding fringe group is projected to the position of an object to be measured in an out-of-focus mode, fringe images returned by the object to be measured are collected, and a measuring phase is obtained by adopting the multi-step phase shift method; and subtracting the phase error mean value from the measured phase to obtain an actual phase, and reconstructing through a phase diagram to obtain the three-dimensional data of the object to be measured. The invention reduces the root mean square error of the final phase result by subtracting the phase error mean value from the original phase result, thereby effectively improving the final measurement precision and effectively improving the accuracy of the detection result of the invention.

Description

一种减相位误差均值的二值离焦三维测量方法及装置A binary defocus three-dimensional measurement method and device for subtracting the mean value of phase error

技术领域technical field

本发明涉及光学三维测量领域,特别是一种减相位误差均值的二值离焦三维测量方法及装置。The invention relates to the field of optical three-dimensional measurement, in particular to a method and device for binary defocus three-dimensional measurement by subtracting the mean value of phase error.

背景技术Background technique

基于条纹结构光的三维测量是一种非接触式的测量方法,它具有很多优点,比如高精度以及高速度等。它广泛应用于自动加工、高速在线检测、航空航天、物理仿形等领域。Three-dimensional measurement based on striped structured light is a non-contact measurement method, which has many advantages, such as high precision and high speed. It is widely used in automatic processing, high-speed online detection, aerospace, physical profiling and other fields.

通常情况下,商用的数字光学投影仪都有一定非线性问题存在,这会导致最后的三维测量结果有很大的误差,为了解决这个问题,业内提出了很多方法,其中二值离焦技术是一种常用的克服投影仪非线性的方法。这类方法通常是首先对标准正弦条纹图像进行二值编码(也就是用0和1来表示图像的每个像素值),然后通过离焦投影,投射出接近标准正弦的条纹图像来进行后续的条纹结构光测量。二值离焦技术除了能解决投影仪非线性问题以外,还可以充分利用数字投影仪的特性,提高条纹投射的速度,继而提高三维测量的速度。Usually, commercial digital optical projectors have certain nonlinear problems, which will lead to large errors in the final three-dimensional measurement results. In order to solve this problem, many methods have been proposed in the industry, among which binary defocus technology is A commonly used method to overcome the nonlinearity of projectors. This type of method usually first performs binary encoding on the standard sinusoidal fringe image (that is, uses 0 and 1 to represent each pixel value of the image), and then projects a fringe image close to the standard sine through defocus projection for subsequent Striped structured light measurement. In addition to solving the non-linear problem of the projector, the binary defocus technology can also make full use of the characteristics of the digital projector to increase the speed of fringe projection, and then improve the speed of three-dimensional measurement.

但由于二值离焦技术在离焦投影后的条纹与标准正弦条纹之间的相位误差,继而在相位重建后,会导致三维测量结果出现较大的误差。因此,如今需要一种能够降低离焦投影后的条纹与标准正弦条纹之间的相位误差,从而降低三维测量的误差的离焦投影的三维测量方法。However, due to the phase error between the fringe after defocus projection and the standard sinusoidal fringe of binary defocus technology, and then after phase reconstruction, it will lead to a large error in the three-dimensional measurement results. Therefore, there is a need for a three-dimensional measurement method for out-of-focus projection that can reduce the phase error between the out-of-focus projected fringes and the standard sinusoidal fringes, thereby reducing the error in three-dimensional measurement.

发明内容Contents of the invention

本发明的目的在于克服现有技术中所存在的离焦投影后的条纹与标准正弦条纹之间的相位误差较大导致三维测量结果误差较大的问题,提供一种减相位误差均值的二值离焦三维测量方法及装置。The purpose of the present invention is to overcome the problem in the prior art that the large phase error between the defocused projected fringe and the standard sinusoidal fringe leads to a large error in the three-dimensional measurement result, and to provide a binary method for subtracting the mean value of the phase error Three-dimensional out-of-focus measurement method and device.

为了实现上述发明目的,本发明提供了以下技术方案:In order to realize the above-mentioned purpose of the invention, the present invention provides the following technical solutions:

一种减相位误差均值的二值离焦三维测量方法,包括以下步骤:A binary defocus three-dimensional measurement method for subtracting phase error mean, comprising the following steps:

S1:采用误差扩散算法对正弦条纹图像进行二值编码,得到编码条纹组;S1: Use the error diffusion algorithm to binary code the sinusoidal fringe image to obtain the coded fringe group;

S2:对所述编码条纹组进行高斯模糊,采用多步相移法得到预测相位,并将所述预测相位与理想相位作差,并计算所有像素的相位误差的平均值,得到相位误差均值;所述理想相位为对所述正弦条纹图像采用所述多步相移法计算得到的相位;S2: performing Gaussian blur on the coded stripe group, using a multi-step phase shift method to obtain a predicted phase, and making a difference between the predicted phase and the ideal phase, and calculating the average value of the phase errors of all pixels to obtain the average value of the phase error; The ideal phase is the phase calculated by the multi-step phase shift method for the sinusoidal fringe image;

S3:将所述编码条纹组离焦投影至待测物体处,采集所述待测物体返回的条纹图像,采用所述多步相移法得到测量相位;S3: defocusing the coded fringe group to the object to be measured, collecting the fringe image returned by the object to be measured, and obtaining the measurement phase by using the multi-step phase shift method;

S4:将所述测量相位减去所述相位误差均值,得到实际相位,再通过空间相位展开获得展开相位,最后通过展开相位图重建得到所述待测物体的三维数据。本发明通过从原本的相位结果中减去了相位误差均值,减小了最后相位结果的均方根误差,从而有效的提高了最后的测量精度,有效地提高了本发明检测结果的准确性。S4: Subtracting the average value of the phase error from the measured phase to obtain an actual phase, then obtaining an unfolded phase through spatial phase unfolding, and finally reconstructing the three-dimensional data of the object to be measured through unfolding a phase map. The present invention reduces the root mean square error of the final phase result by subtracting the mean value of the phase error from the original phase result, thereby effectively improving the final measurement accuracy and the accuracy of the detection result of the present invention.

作为本发明的优选方案,所述步骤S2与步骤S3能同时执行或交换执行顺序。As a preferred solution of the present invention, the step S2 and the step S3 can be executed at the same time or the order of execution can be exchanged.

作为本发明的优选方案,采用多步相移法计算相位的计算式为:As a preferred solution of the present invention, the formula for calculating the phase using the multi-step phase shift method is:

Figure BDA0003164577010000031
Figure BDA0003164577010000031

其中N代表多步相移的步数,(x,y)为像素坐标,In(x,y)为(x,y)的像素值,φ(x,y)为(x,y)的相位值。Among them, N represents the number of steps of multi-step phase shift, (x, y) is the pixel coordinate, I n (x, y) is the pixel value of (x, y), φ(x, y) is the value of (x, y) phase value.

作为本发明的优选方案,所述相位误差均值的计算式为:As a preferred solution of the present invention, the formula for calculating the mean value of the phase error is:

Figure BDA0003164577010000032
Figure BDA0003164577010000032

其中M代表像素个数,(x,y)为像素坐标,φbi(x,y)为高斯模糊后的所述编码条纹组计算出的预测相位,φideal(x,y)为所述正弦条纹图像计算出的理想相位,Mean为相位误差均值。Wherein M represents the number of pixels, (x, y) is the pixel coordinates, φ bi (x, y) is the predicted phase calculated by the encoded stripe group after Gaussian blur, and φ ideal (x, y) is the sine The ideal phase calculated from the fringe image, Mean is the mean value of the phase error.

作为本发明的优选方案,所述步骤S2中采用计算机仿真进行高斯模糊,用于模拟离焦效果。As a preferred solution of the present invention, computer simulation is used to perform Gaussian blur in the step S2 to simulate the defocus effect.

作为本发明的优选方案,所述步骤S3采用数字投影仪进行离焦投影。As a preferred solution of the present invention, the step S3 uses a digital projector for out-of-focus projection.

一种三维测量装置,包括至少一个处理器,至少一个执行焦离投影的投影装置,至少一个采集待测物体返回图像的采集相机以及与所述至少一个处理器通信连接的存储器;所述投影装置以及采集相机分别与所述处理器通信连接;所述存储器存储有可被所述至少一个处理器执行的指令,所述指令被所述至少一个处理器执行,以使所述至少一个处理器能够执行上述任一项所述的方法。A three-dimensional measurement device, comprising at least one processor, at least one projection device for performing focal projection, at least one acquisition camera for collecting returned images of an object to be measured, and a memory connected in communication with the at least one processor; the projection device And the collection camera is respectively connected to the processor in communication; the memory stores instructions that can be executed by the at least one processor, and the instructions are executed by the at least one processor, so that the at least one processor can Perform any of the methods described above.

与现有技术相比,本发明的有益效果:Compared with prior art, the beneficial effect of the present invention:

本发明通过从原本的相位结果中减去了相位误差均值,减小了最后相位结果的均方根误差,从而有效的提高了最后的测量精度,有效地提高了本发明检测结果的准确性。The present invention reduces the root mean square error of the final phase result by subtracting the mean value of the phase error from the original phase result, thereby effectively improving the final measurement accuracy and the accuracy of the detection result of the present invention.

附图说明Description of drawings

图1为本发明实施例1所述的一种减相位误差均值的二值离焦三维测量方法的流程示意图;FIG. 1 is a schematic flow chart of a binary defocus three-dimensional measurement method for subtracting the mean value of the phase error described in Embodiment 1 of the present invention;

图2为本发明实施例2所述的一种减相位误差均值的二值离焦三维测量方法中步骤S1生成的编码条纹组示意图;FIG. 2 is a schematic diagram of a coded fringe group generated in step S1 in a binary defocus three-dimensional measurement method for subtracting the mean value of phase error described in Embodiment 2 of the present invention;

图3为本发明实施例2所述的一种减相位误差均值的二值离焦三维测量方法中步骤S2生成的模拟离焦投影的条纹图;Fig. 3 is a fringe diagram of the simulated defocus projection generated in step S2 in a binary defocus three-dimensional measurement method for subtracting the mean value of the phase error described in Embodiment 2 of the present invention;

图4为本发明实施例2所述的一种减相位误差均值的二值离焦三维测量方法中步骤S3实际拍摄的条纹图;Fig. 4 is a fringe pattern actually taken in step S3 in a binary defocus three-dimensional measurement method for subtracting the mean value of the phase error described in Embodiment 2 of the present invention;

图5为本发明实施例2所述的一种减相位误差均值的二值离焦三维测量方法中在小离焦量,不同条纹周期的条件下,本发明实施方法与传统方法获取的相位结果的对比图;Fig. 5 shows the phase results obtained by the implementation method of the present invention and the traditional method under the conditions of small defocus amount and different fringe periods in a binary defocus three-dimensional measurement method of subtracting the mean value of the phase error described in Embodiment 2 of the present invention comparison chart;

图6为本发明实施例3所述的一种利用了实施例1所述的一种减相位误差均值的二值离焦三维测量方法的一种三维测量装置的结构示意图。FIG. 6 is a schematic structural diagram of a three-dimensional measurement device according to Embodiment 3 of the present invention, which utilizes the binary defocus three-dimensional measurement method described in Embodiment 1 by subtracting the mean value of the phase error.

具体实施方式detailed description

下面结合试验例及具体实施方式对本发明作进一步的详细描述。但不应将此理解为本发明上述主题的范围仅限于以下的实施例,凡基于本发明内容所实现的技术均属于本发明的范围。The present invention will be further described in detail below in conjunction with test examples and specific embodiments. However, it should not be understood that the scope of the above subject matter of the present invention is limited to the following embodiments, and all technologies realized based on the content of the present invention belong to the scope of the present invention.

在众多学者提出的正弦条纹二值编码方法中,“误差扩散算法”是一种常用的,效果优异的正弦条纹二值编码方法。它的基本思想是将已处理元素的量化误差向未处理元素加权扩散,从而减少整个编码面的量化误差。Among the sinusoidal fringe binary coding methods proposed by many scholars, the "error diffusion algorithm" is a commonly used and effective sinusoidal fringe binary coding method. Its basic idea is to weight the quantization error of the processed elements to the unprocessed elements, thereby reducing the quantization error of the entire coding surface.

经过仔细研究发现,利用某个确定的误差扩散核的误差扩散算法对某个确定的正弦条纹图进行二值编码后,在不同的离焦量下进行离焦投影,并采用任意多步相移法计算相位,最后获取的相位误差都具有相同的均值。After careful study, it is found that after binary encoding of a certain sinusoidal fringe pattern by using the error diffusion algorithm of a certain error diffusion kernel, the defocus projection is performed under different defocus amounts, and any multi-step phase shift is adopted The phase is calculated by the method, and the final obtained phase errors all have the same mean value.

而业内对相位误差的评价指标一般都是采用均方根误差(RMS),其表达式如下:The evaluation index of phase error in the industry generally adopts the root mean square error (RMS), and its expression is as follows:

Figure BDA0003164577010000051
Figure BDA0003164577010000051

进一步,可以发现均方根误差可以由误差的方差以及误差均值进行表示,如下:Further, it can be found that the root mean square error can be expressed by the variance of the error and the mean value of the error, as follows:

Figure BDA0003164577010000052
Figure BDA0003164577010000052

其中,V是误差的方差,E是误差均值。Among them, V is the variance of the error, and E is the mean value of the error.

可以明显看出,如果减去误差均值对均方根误差(RMS)的影响,这样就可以减小最后的均方根误差值(RMS)。It can be clearly seen that if the influence of the error mean value on the root mean square error (RMS) is subtracted, the final root mean square error value (RMS) can be reduced in this way.

所以,结合我们的研究发现,我们可以通过提前的计算机仿真,计算出相应的相位误差均值,然后再从实际测量到的相位结果中减去该相位误差均值,就可以减小最后的相位均方根误差值(RMS)。Therefore, combined with our research findings, we can calculate the corresponding mean value of the phase error through computer simulation in advance, and then subtract the mean value of the phase error from the actually measured phase result to reduce the final phase mean square Root error value (RMS).

但该技术方案成立的重要条件是,离焦量的改变不会影响最后获取的相位误差的均值。在此,本发明特别用数学分析证明离焦量的改变不会影响最后获取的相位误差的均值。However, an important condition for the establishment of this technical solution is that the change of the defocus amount will not affect the mean value of the finally acquired phase error. Here, the present invention particularly uses mathematical analysis to prove that the change of the defocus amount will not affect the mean value of the finally obtained phase error.

采用四步相移法时,条纹的相位误差

Figure BDA0003164577010000061
和条纹的强度误差ΔAn有如下关系:When using the four-step phase shift method, the phase error of the fringe
Figure BDA0003164577010000061
It has the following relationship with the intensity error ΔA n of the stripes:

Figure BDA0003164577010000062
Figure BDA0003164577010000062

其中,

Figure BDA0003164577010000063
为第n帧图的强度误差,n∈[0,3],
Figure BDA0003164577010000064
为相位,B为所述条纹图像中条纹的调制度。in,
Figure BDA0003164577010000063
is the intensity error of the nth frame image, n∈[0,3],
Figure BDA0003164577010000064
is the phase, and B is the modulation degree of the fringe in the fringe image.

假设,高斯核g代表某离焦量,作用于投影条纹图,则ΔAn以及B都会发生变化:Assuming that the Gaussian kernel g represents a certain amount of defocus and acts on the projected fringe pattern, then both ΔA n and B will change:

Figure BDA0003164577010000065
Figure BDA0003164577010000065

B'=t1BB'=t 1 B

其中,

Figure BDA0003164577010000066
表示离焦后的第n帧的强度误差,*表示卷积运算符,t1表示在高斯核g作用下,标准正弦函数的调制度会有一个固定系数的变化。in,
Figure BDA0003164577010000066
Indicates the intensity error of the nth frame after defocusing, * indicates the convolution operator, and t 1 indicates that under the action of the Gaussian kernel g, the modulation degree of the standard sine function will have a fixed coefficient change.

所以,变化后的条纹的相位误差,可以表示为:Therefore, the phase error of the changed fringes can be expressed as:

Figure BDA0003164577010000067
Figure BDA0003164577010000067

由于高斯核的对称特性,可以有:Due to the symmetric nature of the Gaussian kernel, it is possible to have:

Figure BDA0003164577010000068
Figure BDA0003164577010000068

因此,相位误差均值可以有如下推导:Therefore, the mean value of the phase error can be derived as follows:

Figure BDA0003164577010000071
Figure BDA0003164577010000071

所以很明显有:So obviously there is:

Figure BDA0003164577010000072
Figure BDA0003164577010000072

所以,离焦量的改变不会影响最后获取的相位误差的均值。如表1所示,在条纹周期为60像素时,不同的离焦量所获取的相位误差的均值是基本不变的(即为0.0228±0.0003,误差小于0.0003,可以忽略)。Therefore, the change of the defocus amount will not affect the average value of the phase error obtained last. As shown in Table 1, when the fringe period is 60 pixels, the average value of the phase error obtained by different defocus amounts is basically unchanged (that is, 0.0228±0.0003, and the error is less than 0.0003, which can be ignored).

表1Table 1

小离焦small defocus 中离焦Medium defocus 大离焦large defocus 相位误差平均值Average value of phase error 0.02270.0227 0.02310.0231 0.02250.0225

实施例1Example 1

如图1所示,一种减相位误差均值的二值离焦三维测量方法,包括以下步骤:As shown in Figure 1, a binary defocus three-dimensional measurement method for subtracting the mean value of the phase error comprises the following steps:

S1:采用误差扩散算法对正弦条纹图像进行二值编码,得到编码条纹组;S1: Use the error diffusion algorithm to binary code the sinusoidal fringe image to obtain the coded fringe group;

S2:对所述编码条纹组进行高斯模糊,采用多步相移法得到预测相位,并将所述预测相位与理想相位作差,得到相位误差均值;所述理想相位为对所述正弦条纹图像采用所述多步相移法计算得到的相位;S2: Perform Gaussian blur on the coded fringe group, use a multi-step phase shift method to obtain a predicted phase, and make a difference between the predicted phase and the ideal phase to obtain the average value of the phase error; the ideal phase is the sinusoidal fringe image The phase calculated by the multi-step phase shift method;

S3:将所述编码条纹组离焦投影至待测物体处,采集所述待测物体返回的条纹图像,采用所述多步相移法得到测量相位;S3: defocusing the coded fringe group to the object to be measured, collecting the fringe image returned by the object to be measured, and obtaining the measurement phase by using the multi-step phase shift method;

S4:将所述测量相位减去所述相位误差均值,得到实际相位,再通过空间相位展开获得展开相位,最后通过展开相位图重建得到所述待测物体的三维数据。S4: Subtracting the average value of the phase error from the measured phase to obtain an actual phase, then obtaining an unfolded phase through spatial phase unfolding, and finally reconstructing the three-dimensional data of the object to be measured through unfolding a phase map.

其中,步骤S2和步骤S3可交换执行顺序或同时执行。Wherein, step S2 and step S3 may be executed in exchange order or executed simultaneously.

采用多步相移法计算相位的计算式为:The formula for calculating the phase using the multi-step phase shift method is:

Figure BDA0003164577010000081
Figure BDA0003164577010000081

其中,N代表多步相移的步数,(x,y)为像素坐标,In(x,y)为(x,y)的像素值,φ(x,y)为(x,y)的相位值。Among them, N represents the step number of multi-step phase shift, (x, y) is the pixel coordinate, I n (x, y) is the pixel value of (x, y), φ (x, y) is (x, y) phase value.

所述相位误差均值的计算式为:The formula for calculating the mean value of the phase error is:

Figure BDA0003164577010000082
Figure BDA0003164577010000082

其中M代表像素个数,φbi(x,y)为高斯模糊后的所述编码条纹组计算出的预测相位,φideal(x,y)为所述正弦条纹图像计算出的理想相位,Mean为相位误差均值。Wherein M represents the number of pixels, φ bi (x, y) is the predicted phase calculated by the encoded fringe group after Gaussian blur, and φ ideal (x, y) is the ideal phase calculated by the sinusoidal fringe image, Mean is the mean value of the phase error.

实施例2Example 2

S1:使用Floyd-Steinberg误差扩散算法对分辨率为912*1140,周期为60像素的正弦条纹图进行二值编码,得到编码条纹组,如图2所示。S1: Use the Floyd-Steinberg error diffusion algorithm to perform binary encoding on the sinusoidal fringe pattern with a resolution of 912*1140 and a period of 60 pixels to obtain a coded fringe group, as shown in Figure 2.

S2:利用计算机仿真,使用窗口大小为9*9,标准差为3的高斯核对步骤S1生成的二值化的条纹图进行高斯模糊,来模拟离焦投影,并使用四步相移法计算出预测相位,与理想相位比较,计算出相位误差均值,所述相位误差均值为0.0207。图3展示了模拟出来的离焦投影的条纹图。S2: Using computer simulation, use a Gaussian kernel with a window size of 9*9 and a standard deviation of 3 to perform Gaussian blur on the binarized fringe image generated in step S1 to simulate defocused projection, and use the four-step phase shift method to calculate The predicted phase is compared with the ideal phase to calculate the average value of the phase error, and the average value of the phase error is 0.0207. Figure 3 shows the fringe pattern of the simulated out-of-focus projection.

S3:利用数字投影仪,对步骤S1生成的编码条纹组离焦投影至待测物体处,采集所述待测物体返回的条纹图像,并利用四步相移法测定出相应的相位结果,然后从该相位结果中减去步骤S2计算出的相位误差均值,得到最后的更准确的相位结果。相位结果误差RMS从0.035降到了0.027。图4展示了实际拍摄的条纹图。S3: Utilize a digital projector to defocus project the coded fringe group generated in step S1 to the object to be measured, collect the fringe image returned by the object to be measured, and use a four-step phase shift method to measure the corresponding phase result, and then Subtract the phase error mean value calculated in step S2 from the phase result to obtain a final more accurate phase result. The phase result error RMS is reduced from 0.035 to 0.027. Figure 4 shows the actual fringe image taken.

S4:将所述测量相位减去所述相位误差均值,得到实际相位,再通过空间相位展开获得展开相位,使用提前标定好的系统参数,最后通过展开相位图重建得到所述待测物体的三维数据。S4: Subtract the mean value of the phase error from the measured phase to obtain the actual phase, and then obtain the unfolded phase through spatial phase unfolding, use the system parameters calibrated in advance, and finally obtain the three-dimensional image of the object to be measured by reconstructing the unfolded phase map data.

这里提前标定好的系统参数,是通过单目结构光系统的标定过程获取的。这些参数包含相机的内参矩阵Kc和投影仪的内参矩阵Kp,以及相机和投影仪之间的外参矩阵:旋转矩阵R和平移矩阵T。以及相机和投影仪的畸变系数dc和dp。The system parameters calibrated in advance here are obtained through the calibration process of the monocular structured light system. These parameters include the internal reference matrix Kc of the camera and the internal reference matrix Kp of the projector, as well as the external parameter matrix between the camera and the projector: the rotation matrix R and the translation matrix T. And the distortion coefficients dc and dp of the camera and projector.

图5为在小离焦量,不同条纹周期的条件下,本专利方法与传统方法获取的相位结果的比较情况(减均值与不减均值)。从结果中,可以看出,本专利方法相较传统方法可以有效降低相位误差的均方根误差(RMS)。Figure 5 is a comparison of the phase results obtained by the patented method and the traditional method under the conditions of small defocus and different fringe periods (mean subtraction and no mean subtraction). From the results, it can be seen that the patented method can effectively reduce the root mean square error (RMS) of the phase error compared with the traditional method.

实施例3Example 3

如图6所示,一种三维测量装置,包括至少一个处理器,至少一个执行焦离投影的投影装置,至少一个采集待测物体返回图像的采集相机以及与所述至少一个处理器通信连接的存储器;所述投影装置以及采集相机分别与所述处理器通信连接;所述存储器存储有可被所述至少一个处理器执行的指令,所述指令被所述至少一个处理器执行,以使所述至少一个处理器能够执行前述实施例所述的一种减相位误差均值的二值离焦三维测量方法。所述输入输出接口可以包括显示器、键盘、鼠标、以及USB接口,用于输入输出数据;电源用于为三维测量装置提供电能。As shown in FIG. 6, a three-dimensional measurement device includes at least one processor, at least one projection device for performing focal projection, at least one collection camera for collecting returned images of the object to be measured, and a communication device connected to the at least one processor. memory; the projection device and the acquisition camera are respectively connected in communication with the processor; the memory stores instructions that can be executed by the at least one processor, and the instructions are executed by the at least one processor, so that all The at least one processor is capable of executing the binary defocus three-dimensional measurement method of subtracting the mean value of the phase error described in the foregoing embodiments. The input and output interfaces may include a display, a keyboard, a mouse, and a USB interface for inputting and outputting data; the power supply is used for providing electric energy for the three-dimensional measuring device.

本领域技术人员可以理解:实现上述方法实施例的全部或部分步骤可以通过程序指令相关的硬件来完成,前述的程序可以存储于计算机可读取存储介质中,该程序在执行时,执行包括上述方法实施例的步骤;而前述的存储介质包括:移动存储设备、只读存储器(Read Only Memory,ROM)、磁碟或者光盘等各种可以存储程序代码的介质。Those skilled in the art can understand that all or part of the steps for implementing the above-mentioned method embodiments can be completed by hardware related to program instructions, and the aforementioned programs can be stored in computer-readable storage media. The steps of the method embodiment; and the foregoing storage medium includes: a removable storage device, a read only memory (Read Only Memory, ROM), a magnetic disk or an optical disk, and other various media that can store program codes.

当本发明上述集成的单元以软件功能单元的形式实现并作为独立的产品销售或使用时,也可以存储在一个计算机可读取存储介质中。基于这样的理解,本发明实施例的技术方案本质上或者说对现有技术做出贡献的部分可以以软件产品的形式体现出来,该计算机软件产品存储在一个存储介质中,包括若干指令用以使得一台计算机设备(可以是个人计算机、服务器、或者网络设备等)执行本发明各个实施例所述方法的全部或部分。而前述的存储介质包括:移动存储设备、ROM、磁碟或者光盘等各种可以存储程序代码的介质。When the above-mentioned integrated units of the present invention are realized in the form of software function units and sold or used as independent products, they can also be stored in a computer-readable storage medium. Based on this understanding, the technical solutions of the embodiments of the present invention can be embodied in the form of software products in essence or the part that contributes to the prior art. The computer software products are stored in a storage medium and include several instructions for Make a computer device (which may be a personal computer, a server, or a network device, etc.) execute all or part of the methods described in various embodiments of the present invention. The aforementioned storage medium includes various media capable of storing program codes such as removable storage devices, ROMs, magnetic disks or optical disks.

以上所述仅为本发明的较佳实施例而已,并不用以限制本发明,凡在本发明的精神和原则之内所作的任何修改、等同替换和改进等,均应包含在本发明的保护范围之内。The above descriptions are only preferred embodiments of the present invention, and are not intended to limit the present invention. Any modifications, equivalent replacements and improvements made within the spirit and principles of the present invention should be included in the protection of the present invention. within range.

Claims (7)

1. A binary out-of-focus three-dimensional measurement method for subtracting a phase error mean value is characterized by comprising the following steps:
s1: carrying out binary coding on the sinusoidal fringe image by adopting an error diffusion algorithm to obtain a coding fringe group;
s2: carrying out Gaussian blur on the coding stripe group, obtaining a predicted phase by adopting a multi-step phase shift method, carrying out difference on the predicted phase and an ideal phase, and calculating the average value of phase errors of all pixels to obtain a phase error average value; the ideal phase is calculated by the multi-step phase shift method on the sine stripe image;
s3: the coding fringe group is projected to the position of an object to be measured in an out-of-focus mode, fringe images returned by the object to be measured are collected, and a measuring phase is obtained by adopting the multi-step phase shift method;
s4: and subtracting the phase error mean value from the measured phase to obtain an actual phase, then obtaining an unfolded phase through space phase unfolding, and finally obtaining three-dimensional data of the object to be measured through unfolding phase diagram reconstruction.
2. The method for binary defocus three-dimensional measurement of phase error mean value according to claim 1, wherein the steps S2 and S3 can be executed simultaneously or in an alternative order.
3. The method for binary defocus three-dimensional measurement of the mean value of the phase error according to claim 1, wherein the calculation formula for calculating the phase by adopting the multi-step phase shift method is as follows:
Figure FDA0003164571000000011
where N represents the number of steps in the multi-step phase shift, (x, y) is the pixel coordinate, I n (x, y) is the pixel value of (x, y), and φ (x, y) is the phase value of (x, y).
4. The method for binary out-of-focus three-dimensional measurement of phase error mean value according to claim 1, wherein the phase error mean value is calculated by the following formula:
Figure FDA0003164571000000021
where M represents the number of pixels and (x, y) is the pixel coordinate, phi bi (x, y) is the predicted phase, phi, calculated for the encoded group of stripes after Gaussian blur ideal (x, y) is an ideal phase calculated by the sine stripe image, and Mean is a phase error Mean value.
5. The method for measuring binary defocus three-dimensional value by subtracting the mean value of phase error according to claim 1, wherein the step S2 is performed by using computer simulation to perform gaussian blur for simulating defocus effect.
6. The phase error mean subtraction binary defocus three-dimensional measurement method according to claim 1, wherein the step S3 adopts a digital projector to perform defocus projection.
7. A three-dimensional measuring device is characterized by comprising at least one processor, at least one projection device for executing focus-departure projection, at least one acquisition camera for acquiring return images of an object to be measured and a memory which is in communication connection with the at least one processor; the projection device and the acquisition camera are respectively in communication connection with the processor; the memory stores instructions executable by the at least one processor to enable the at least one processor to perform the method of any one of claims 1 to 6.
CN202110800600.6A 2021-07-15 2021-07-15 Binary defocusing three-dimensional measurement method and device for subtracting phase error mean value Active CN115479556B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110800600.6A CN115479556B (en) 2021-07-15 2021-07-15 Binary defocusing three-dimensional measurement method and device for subtracting phase error mean value

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110800600.6A CN115479556B (en) 2021-07-15 2021-07-15 Binary defocusing three-dimensional measurement method and device for subtracting phase error mean value

Publications (2)

Publication Number Publication Date
CN115479556A true CN115479556A (en) 2022-12-16
CN115479556B CN115479556B (en) 2025-01-14

Family

ID=84420070

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110800600.6A Active CN115479556B (en) 2021-07-15 2021-07-15 Binary defocusing three-dimensional measurement method and device for subtracting phase error mean value

Country Status (1)

Country Link
CN (1) CN115479556B (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN118243000A (en) * 2024-02-02 2024-06-25 北京控制工程研究所 Component deformation detection method and device

Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20110080471A1 (en) * 2009-10-06 2011-04-07 Iowa State University Research Foundation, Inc. Hybrid method for 3D shape measurement
CN104567730A (en) * 2015-01-15 2015-04-29 四川大学 Method for generating light field with sine structure by means of space-time binary encoding
CN108168464A (en) * 2018-02-09 2018-06-15 东南大学 For the phase error correction approach of fringe projection three-dimension measuring system defocus phenomenon
CN109579738A (en) * 2019-01-04 2019-04-05 北京理工大学 A kind of two-value striped defocus optical projection system low-frequency filter characteristics measurement method
CN110084127A (en) * 2019-03-29 2019-08-02 南京航空航天大学 A kind of magnetic suspension rotor vibration measurement method of view-based access control model
US20190271540A1 (en) * 2016-12-15 2019-09-05 Southeast University Error correction method for fringe projection profilometry system
CN110375673A (en) * 2019-07-01 2019-10-25 武汉斌果科技有限公司 A kind of big depth of field two-value defocus method for three-dimensional measurement based on multifocal optical projection system
CN111156928A (en) * 2020-02-07 2020-05-15 武汉玄景科技有限公司 Grating three-dimensional scanner moire fringe eliminating method based on DLP projection
CN111598929A (en) * 2020-04-26 2020-08-28 云南电网有限责任公司电力科学研究院 Two-dimensional unwrapping method based on time series differential interferometric synthetic aperture radar data

Patent Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20110080471A1 (en) * 2009-10-06 2011-04-07 Iowa State University Research Foundation, Inc. Hybrid method for 3D shape measurement
CN104567730A (en) * 2015-01-15 2015-04-29 四川大学 Method for generating light field with sine structure by means of space-time binary encoding
US20190271540A1 (en) * 2016-12-15 2019-09-05 Southeast University Error correction method for fringe projection profilometry system
CN108168464A (en) * 2018-02-09 2018-06-15 东南大学 For the phase error correction approach of fringe projection three-dimension measuring system defocus phenomenon
CN109579738A (en) * 2019-01-04 2019-04-05 北京理工大学 A kind of two-value striped defocus optical projection system low-frequency filter characteristics measurement method
CN110084127A (en) * 2019-03-29 2019-08-02 南京航空航天大学 A kind of magnetic suspension rotor vibration measurement method of view-based access control model
CN110375673A (en) * 2019-07-01 2019-10-25 武汉斌果科技有限公司 A kind of big depth of field two-value defocus method for three-dimensional measurement based on multifocal optical projection system
CN111156928A (en) * 2020-02-07 2020-05-15 武汉玄景科技有限公司 Grating three-dimensional scanner moire fringe eliminating method based on DLP projection
CN111598929A (en) * 2020-04-26 2020-08-28 云南电网有限责任公司电力科学研究院 Two-dimensional unwrapping method based on time series differential interferometric synthetic aperture radar data

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
赵洋等: "深度学习精确相位获取的离焦投影三维测量", 红外与激光工程, no. 7, 25 July 2020 (2020-07-25), pages 169 - 176 *
郑东亮等: "提高数字光栅投影测量系统精度的gamma校正技术", 光学学报, no. 5, 10 May 2011 (2011-05-10), pages 124 - 129 *

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN118243000A (en) * 2024-02-02 2024-06-25 北京控制工程研究所 Component deformation detection method and device

Also Published As

Publication number Publication date
CN115479556B (en) 2025-01-14

Similar Documents

Publication Publication Date Title
Zhang et al. Robust and efficient multi-frequency temporal phase unwrapping: optimal fringe frequency and pattern sequence selection
CN113607085B (en) Binary defocus three-dimensional measurement method and device based on half-broken sine stripes
Zhou et al. Accurate and robust estimation of camera parameters using RANSAC
CN106092158B (en) Physical parameter method of estimation, device and electronic equipment
CN113643372B (en) Three-dimensional weld extraction method and system
Wang et al. High-accuracy calibration of high-speed fringe projection profilometry using a checkerboard
Li et al. Global phase accuracy enhancement of structured light system calibration and 3D reconstruction by overcoming inevitable unsatisfactory intensity modulation
CN115979178A (en) Three-dimensional measurement method, system, device and medium based on polarization fringe projection
Qi et al. Invalid-point removal based on epipolar constraint in the structured-light method
CN112802084B (en) Three-dimensional shape measurement method, system and storage medium based on deep learning
Hu et al. Estimating gray intensities for saturated speckle to improve the measurement accuracy of digital image correlation
Bai et al. Recent progress of full-field three-dimensional shape measurement based on phase information
CN115479556A (en) A binary defocus three-dimensional measurement method and device for subtracting the mean value of phase error
Feng et al. Adaptive fringe projection for 3D shape measurement with large reflectivity variations by using image fusion and predicted search
Zhang et al. Accurate measurement of high-reflective surface based on adaptive fringe projection technique
Li et al. Instrument reading recognition by deep learning of capsules network model for digitalization in industrial internet of things
CN118714467B (en) Polarized sine stripe pattern correction method, structured light three-dimensional reconstruction method and system
An et al. A modified multi-exposure fusion method for laser measurement of specular surfaces
CN118864764A (en) A 3D reconstruction method based on fusion of structured light and polarization information
CN115900580B (en) A structured light three-dimensional imaging system and a nonlinear error suppression method
WO2025001429A1 (en) 3d imaging system, calibration method and calibration apparatus therefor, and calibration device
CN112797917B (en) A high-precision digital speckle interference phase quantitative measurement method
CN118195974B (en) Metal artifact correction method and related device for CT image
CN114577140A (en) Robust stripe projection system calibration method
Zheng et al. High reflective objects 3D shape measurement based on WGIF exposure fusion

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