Keywords

1 Introduction

Methods of complex 3D object geometry measurement via the triangulation principle using phase triangulation and structured illumination are actively developed and improved [1]. A wide range of practical application of methods in such areas as mechanical engineering, medicine, biology, archeology, and modeling [2,3,4,5,6,7,8] is due to the low cost of the optical-electronic components of the system and its high reliability.

At the same time, modern development of phase triangulation methods focuses on different areas, including reducing measurement time [9, 10] to enable measurement of the geometry of moving objects [11, 12], developing fast and convenient calibration methods [13,14,15], and increasing the measurement accuracy using various methods and approaches [16].

Nevertheless, there are a number of problems associated with the complexity of using the existing phase triangulation methods for high-precision measurements under varying ambient light, narrow dynamic range of sources and receivers of optical radiation, limited depth of field image of a photodetector, and arbitrary light scattering of the measured object surface properties. A review of new methods of phase triangulation is presented. These methods allow measuring three-dimensional geometry under conditions of arbitrary measured object surface light scattering properties, varying measurement setting external illumination, and optical elements limited depth of field of the optical radiation source and receiver. There are five sections in the chapter. The first section presents the steady method for decoding phase images via arbitrary phase shifts. The second section describes the method for the optical radiation source–receiver path nonlinearity compensation in 3D measurements based on phase triangulation. The third section contains methods comparison for structured images decoding under conditions of nonlinearity of the optical radiation source–receiver path. The fourth section includes methods for expanding the dynamic range of phase triangulation measurements. The fifth section describes the method for estimating the spatial modulation optimal frequency in phase triangulation measurements.

2 The Steady Method for Decoding Phase Images with Arbitrary Phase Shifts

The intensity of the observed image at implementing the phase triangulation method may be described by the following expression:

$$ I\left(x,y\right)=A\left(x,y\right)\left(1+V\left(x,y\right)\cos \varphi \left(x,y\right)\right), $$
(21.1)

where I(x, y) is the phase image intensity distribution; A(x, y) is the distribution of background intensity; V(x, y) is the average visibility; and φ(x, y) is the desired distribution of the wave fronts phase difference. The illumination intensity in each point of the structured image is a function of three unknown parameters: background intensity A(x, y), average visibility V(x, y), and difference in phase between wave fronts φ(x, y).

To decode phase images with arbitrary incremental shifts, there are several known approaches, based on solving a system of transcendental equations [17, 18]. Expression (21.1) in vector form is as follows:

$$ I= AR+\left( AV\;\cos\;\phi \right)C+\left( AV\;\sin\;\phi \right)S, $$
(21.2)

where R = (1, …, 1)T, C = (cosδ 0, …, cosδ N − 1)T, S = (sinδ 0, …, sinδ N − 1)T, and the vector dimensions can be determined by the quantity of phase shifts. It can be shown that

$$ AV\kern0.5em \sin \phi =\frac{I\cdot {C}^{\perp }}{S\cdot {C}^{\perp }},\vspace*{-12pt} $$
(21.3)
$$ AV\kern0.5em \cos \phi =\frac{I\cdot {S}^{\perp }}{C\cdot {S}^{\perp }}, $$
(21.4)

where S and C are the vectors orthogonal to vectors S, R and C, R, respectively. Given the properties of the scalar product, we obtainS ⋅ C  = C ⋅ S . Then

$$ \phi =\mathrm{arc}\;\tan \frac{I\cdot {C}^{\perp }}{I\cdot {S}^{\perp }} $$
(21.5)

or

$$ \phi =\mathrm{arc}\;\tan \frac{I^{\perp}\cdot C}{I^{\perp}\cdot S}. $$
(21.6)

In the latter case, the vector I is only needed. The matrix operator I  = M ⋅ I is an appropriate use in this case. The transformation matrix M must meet the following requirements: (M·I)I = 0 and M·R = 0.

For example, with three phase shifts, the skew symmetric matrix satisfies these conditions:

$$ M=\left[\begin{array}{lll}0& 1& -1\\ {}-1& 0& 1\\ {}1& -1& 0\end{array}\right]. $$
(21.7)

Then from (21.6), we obtain the following decoding algorithm:

$$ \phi =\mathrm{arc}\kern0.5em \tan \frac{(MI)\cdot C}{(MI)\cdot S}=\mathrm{arc}\;\tan \frac{\left({I}_1-{I}_2\right){c}_0+\left({I}_2-{I}_0\right){c}_1+\left({I}_0-{I}_1\right){c}_2}{\left({I}_1-{I}_2\right){s}_0+\left({I}_2-{I}_0\right){s}_1+\left({I}_0-{I}_1\right){s}_2}, $$
(21.8)

where c i =  cos δ i, s i =  sin δ i are the corresponding components of vectors C and S.

The matrix M is obtained by symmetrically continuing the matrix (21.8) for an odd number of phase shifts larger than 3:

$$ M=\left[\begin{array}{lll}\begin{array}{lll}0& 1& -1\\ {}-1& 0& 1\\ {}1& -1& 0\end{array}& \begin{array}{l}\vdots \\ {}\vdots \\ {}\vdots \end{array}& \begin{array}{lll}1& -1& 1\\ {}-1& 1& -1\\ {}1& -1& 1\end{array}\\ {}\dots \kern0.5em \dots \kern0.5em \dots & \dots & \begin{array}{lll}\dots & \dots & \dots \end{array}\\ {}\begin{array}{lll}-1& 1& -1\\ {}1& -1& 1\\ {}-1& 1& -1\end{array}& \begin{array}{l}\vdots \\ {}\vdots \\ {}\vdots \end{array}& \begin{array}{lll}0& 1& -1\\ {}-1& 0& 1\\ {}1& -1& 0\end{array}\end{array}\right]. $$
(21.9)

With an even number of phase shifts, the matrix M may be represented as:

$$ M=\left[\begin{array}{ll}0& B\\ {}-B& 0\end{array}\right],B=\left[\begin{array}{lll}\begin{array}{ll}-1& 1\\ {}1& -1\end{array}& \begin{array}{l}\vdots \\ {}\vdots \end{array}& \begin{array}{ll}-1& 1\\ {}1& -1\end{array}\\ {}\begin{array}{ll}\dots & \dots \end{array}& \dots & \begin{array}{ll}\dots & \dots \end{array}\\ {}\begin{array}{ll}-1& 1\\ {}1& -1\end{array}& \begin{array}{l}\vdots \\ {}\vdots \end{array}& \begin{array}{ll}-1& 1\\ {}1& -1\end{array}\end{array}\right]. $$
(21.10)

With four phase shifts, we obtain the following algorithm:

$$ \phi =\mathrm{arc}\;\tan \frac{\left({I}_2-{I}_3\right)\left({c}_1-{c}_0\right)+\left({I}_1-{I}_0\right)\left({c}_2-{c}_3\right)}{\left({I}_2-{I}_3\right)\left({s}_1-{s}_0\right)+\left({I}_1-{I}_0\right)\left({s}_2-{s}_3\right)}. $$
(21.11)

The described algorithm for decoding phase images with a step-by-step shift provides interpretation of phase images at arbitrary phase shifts. However, this method does not fully take into account the additive and multiplicative noise in phase patterns. Therefore, this method cannot minimize the error of phase determination in the presence of noise in the analyzed images. For practical application of this method, the authors, as a rule, use preliminary filtering of the initial phase images, or this method is used for a limited class of objects.

To solve the scientific and technical problem of measuring three-dimensional geometry of large-sized objects by triangulation methods with structured lighting, it is necessary to develop robust approaches for processing and decoding structured images. The authors propose a new method for decoding phase images that minimizes inaccuracy in phase calculation in structured images.

Expression (21.1) can be written in the form:

$$ {I}_i=A+B\cdot \sin \left({\delta}_i\right)+C\cdot \cos \left({\delta}_i\right), $$
(21.12)
$$ \varphi =-\mathrm{arc}\;\tan \left(\frac{B}{C}\right), $$
(21.13)
$$ V=\frac{\sqrt{B^2+{C}^2}}{A}. $$
(21.14)

The coefficients A, B, and C can be calculated from finding the functional minimum of the discrepancy between the experimental and theoretical data S(A, B, C):

$$ S\left(A,B,C\right)=\sum \limits_{i=1}^N{\left({I}_i-A-B\cdot \sin \left({\delta}_i\right)-C\cdot \cos \left({\delta}_i\right)\right)}^2. $$
(21.15)

The minimization condition for S(A, B, C) is the equality of all partial derivatives to zero:

$$ \frac{\partial S}{\partial A}=0,\frac{\partial S}{\partial B}=0,\frac{\partial S}{\partial C}=0. $$
(21.16)

As a result, we have the system of three linear equations:

$$ \left\{\begin{array}{l}{k}_1\cdot A+{k}_2\cdot B+{k}_3\cdot C={k}_7\\ {}{k}_2\cdot A+{k}_4\cdot B+{k}_5\cdot C={k}_8\\ {}{k}_3\cdot A+{k}_5\cdot B+{k}_6\cdot C={k}_9\end{array}\right., $$
(21.17)

where k 1k 9 can be determined from the following equations:

$$ {\displaystyle \begin{array}{l}{k}_1=N;\\ {}{k}_2={\sum}_{i=1}^N\cos \left({\delta}_i\right);\\ {}{k}_3={\sum}_{i=1}^N\sin \left({\delta}_i\right);\end{array}} $$
$$ {\displaystyle \begin{array}{l}{k}_4={\sum}_{i=1}^N{\cos}^2\left({\delta}_i\right);\\ {}{k}_5={\sum}_{i=1}^N\cos \left({\delta}_i\right)\cdotp \sin \left({\delta}_i\right);\\ {}{k}_6={\sum}_{i=1}^N{\sin}^2\left({\delta}_i\right);\end{array}} $$
(21.18)
$$ {\displaystyle \begin{array}{l}{k}_7={\sum}_{i=1}^N{I}_i\\ {}{k}_8={\sum}_{i=1}^N{I}_i\cdot \cos \left({\delta}_i\right);\\ {}{k}_9={\sum}_{i=1}^N{I}_i\cdot \sin \left({\delta}_i\right);\end{array}} $$

Solving the system of linear Eq. (21.17), we obtain the following expressions for A, B, and C:

$$ A=-\frac{k_5^2\cdot {k}_7-{k}_4\cdot {k}_6\cdot {k}_7-{k}_3\cdot {k}_5\cdot {k}_8+{k}_2\cdot {k}_6\cdot {k}_8+{k}_3\cdot {k}_4\cdot {k}_9-{k}_2\cdot {k}_5\cdot {k}_9}{-{k}_3^2\cdot {k}_4+2\cdot {k}_2\cdot {k}_3\cdot {k}_5-{k}_1\cdot {k}_5^2-{k}_2^2\cdot {k}_6+{k}_1\cdot {k}_4\cdot {k}_6}, $$
(21.19)
$$ B=-\frac{k_3\cdot {k}_5\cdot {k}_7-{k}_2\cdot {k}_6\cdot {k}_7-{k}_3^2\cdot {k}_8+{k}_1\cdot {k}_6\cdot {k}_8+{k}_2\cdot {k}_3\cdot {k}_9-{k}_1\cdot {k}_5\cdot {k}_9}{k_3^2\cdot {k}_4-2\cdot {k}_2\cdot {k}_3\cdot {k}_5+{k}_1\cdot {k}_5^2+{k}_2^2\cdot {k}_6-{k}_1\cdot {k}_4\cdot {k}_6}, $$
(21.20)
$$ C=-\frac{-{k}_3\cdot {k}_4\cdot {k}_7-{k}_2\cdot {k}_5\cdot {k}_7-{k}_2\cdot {k}_3\cdot {k}_8+{k}_1\cdot {k}_5\cdot {k}_8+{k}_2^2\cdot {k}_9-{k}_1\cdot {k}_4\cdot {k}_9}{k_3^2\cdot {k}_4-2\cdot {k}_2\cdot {k}_3\cdot {k}_5+{k}_1\cdot {k}_5^2+{k}_2^2\cdot {k}_6-{k}_1\cdot {k}_4\cdot {k}_6}, $$
(21.21)

where φ is calculated from expression (21.13). Standard deviation of the measured intensity S(A, B, C) and that of the phase σ(A, B, C) can be estimated by the following equations:

$$ S\left(A,B,C\right)=\frac{1}{N}\sqrt{\overset{N}{\underset{i=1}{\Sigma}}{\left({I}_i-A-B\cdot \sin \left({\delta}_i\right)-C\cdot \cos \left({\delta}_i\right)\right)}^2}, $$
(21.22)
$$ \sigma \left(A,B,C\right)=\frac{1}{N}\sqrt{\overset{N}{\underset{i=1}{\Sigma}}{\left(\mathrm{arc}\;\cos \left(\frac{I_i-A}{\sqrt{A^2+{B}^2}}\right)+\mathrm{arc}\;\tan \left(\frac{B}{C}\right)-{\delta}_i\right)}^2}. $$
(21.23)

The method of determining the phase shift is based on the classical harmonic regression. The harmonic regression is a variation of the least squares method. The least squares method is based on minimizing the functional of the discrepancy between experimental and theoretical data by varying the desired parameters in a limited range of their possible values. Therefore, the proposed method for determining the phase shift gives a stable solution of the system of Eq. (21.3). That is, it guarantees the minimization of the phase calculation error even in the presence of noise, having zero expectation M and constant variance D in the sample corresponding to certain coordinates (x, y):

$$ M\left(x,y\right)=M\left(\left\{{I}_i\left(x,y\right)\right\},i\in 1\dots N\right)=0 $$
(21.24)
$$ D\left(x,y\right)=D\left(\left\{{I}_i\left(x,y\right)\right\},i\in 1\dots N\right)=\mathrm{const} $$
(21.25)

From expression (21.13), it follows that phase φ does not depend on the distribution of background intensity A. That is why the proposed method minimizes the determination error φ in the presence of noise with constant expectation and variance.

A necessary and sufficient condition for determining the phase φ is the non-degeneracy of the system of linear Eq. (21.17) is:

$$ \operatorname{rank}\left(\begin{array}{lll}N& {\sum}_{i=1}^N\cos \left({\delta}_i\right)& {\sum}_{i=1}^N\sin \left({\delta}_i\right)\\ {}{\sum}_{i=1}^N\cos \left({\delta}_i\right)& {\sum}_{i=1}^N{\cos}^2\left({\delta}_i\right)& {\sum}_{i=1}^N\cos \left({\delta}_i\right)\cdotp \sin \left({\delta}_i\right)\\ {}{\sum}_{i=1}^N\sin \left({\delta}_i\right)& {\sum}_{i=1}^N\cos \left({\delta}_i\right)\cdotp \sin \left({\delta}_i\right)& {\sum}_{i=1}^N{\sin}^2\left({\delta}_i\right)\end{array}\right)=3. $$
(21.26)

Since expression (21.26) depends only on δ i and N, it determines the necessary and sufficient conditions for finding the solution of the system of Eq. (21.3) by the proposed method depending on the values of the introduced shifts δ i and their number N.

The algorithmic complexity of the proposed method for determining the phase shift depending on the parameter N is the sum of the complexity of all the steps in determining the phase. Given that there is a linear dependence on N in the formulas for coefficients, the complexity of the whole method can be estimated as O(N).

Next, we verify the proposed method. To do this, we compare the result of the presented method for determining the phase shift based on harmonic regression and the generalized algorithm for decoding phase images based on the vector representation of expression (21.3) [19]. The result of the work based on the deviation of the phase measured value from the known initial value can be calculated as:

$$ \varepsilon =\psi -\varphi, $$
(21.27)

where ε is the discrepancy between the measured phase and the original one; ψ is the phase value obtained using the corresponding method; and φ is the initial phase. The initial phase is set by simulating the typical intensity distribution in phase patterns. The shifts in the generation of phase patterns are calculated like a set of random variables with a uniform distribution in the interval [0, 2π). Phase patterns are maiden with background intensity A = 10 and visibility V = 0.5. The phase pattern intensity distribution is set according to Eq. (21.2) with the addition of noise (Figs. 21.1 and 21.2). Noise has Gaussian distribution. The noise level is presented by the background intensity standard deviation.

Fig. 21.1
figure 1

Dependence of intensity in the phase image on the phase shift without adding noise

Fig. 21.2
figure 2

Dependence of intensity in the phase image on the phase shift with added noise

Let us examine whether the error of both methods depends on the value of the found phase φ with constant noise and the same number of phase patterns N. To do this, we build the dependence of deviation ε between the measured phase value and the initial phase for different values of φ given in the interval [0, 2π). The number of phase patterns N = 50. Standard deviation of the noise is 1% of the value of the background intensity A in expression (21.2).

Two hundred different sets of phase patterns were used for the reducement of the stochastic nature of the graphs. The calculated deviations of the measured phase maximum were recorded in the graph. Figure 21.3 shows the obtained dependences of ε on φ. It can be seen that the proposed stable method provides at least an order of magnitude smaller deviation of the obtained phase, independent of the measured value of the initial phase φ.

Fig. 21.3
figure 3

Deviation of the phase, measured by the method of processing phase images, based on the vector representation of the system of equations (dashed line) and a steady method for determining the phase shift based on harmonic regression (solid line) at different values of the phase φ

In practice, phase patterns, as a rule, contain noises of additive nature. Therefore, it is useful to estimate the phase error, depending on the level of additive noise in phase images.

Let us estimate the deviation of the measured phase value from the initial ε, depending on the level of noise superimposed on the intensity distribution in the phase pattern with a constant number of shifts. Since the value of the initial phase φ does not affect ε, it is chosen equal to 0.5 radians. The number of phase patterns N = 50. H is noise standard deviation from the applied to the intensity distribution. H takes values in the range of 0–100% of the background intensity A(2).

The resulting dependence of the measured phase deviation on the noise level is shown in Fig. 21.4. For the method of phase images processing, based on the vector representation of the system of Eq. (21.3), the error exceeds 100% with noise variance of more than 10%. The method of phase pattern processing based on the vector representation of the system of Eq. (21.3) gives unreliable results when the noise dispersion is over 10% of the background intensity. The proposed method for determining the phase shift based on harmonic regression provides an error of less than 50% for noise variance of less than 20%.

Fig. 21.4
figure 4

Deviation of the measured phase: the image processing method based on the vector representation of the system of Eq. (21.3) (dashed line) and a steady method for determining the phase shift based on harmonic regression (solid line)

The number of implementations of phase images N is always limited in the experiment. The optimal number of realizations is required for decoding phase patterns with a given error. We conduct a comparative analysis of the methods in the case of phase recovery from a set of N phase image realizations. The error in determining the phase ψ is analyzed depending on the number N. The additive noise level was set constant with the standard deviation of 5% background intensity level. The phase value to be determined is unchanged and is set at 0.5 radians.

The results of the analysis methods are presented in Fig. 21.5. The error in determining the phase by an algorithm based on the vector representation of a system of transcendental equations does not qualitatively decrease with increasing N.

Fig. 21.5
figure 5

Deviation of the measured phase from the number of shifts: the method of image processing based on the vector representation of the system of Eq. (21.3) (dashed line) and the steady method for determining the phase shift based on harmonic regression (solid line)

Even for small N (N > 5), the error of the method of decoding phase patterns based on the vector representation of the system of Eq. (21.3) is several times higher than that of the presented steady method based on harmonic regression. The simulation results generally demonstrate the stability of the proposed method to noise, its small error when working with a limited set of phase images and practical value.

Thus, a steady method for decoding the structured images has been proposed. It minimizes the measurement error of three-dimensional geometry in the presence of noise in the analyzed images. We consider a generalized algorithm that allows us to obtain a solution to the system of transcendental Eq. (21.3) with arbitrary phase shifts of the probing signal.

The stability of the method is shown in the presence of noise in a series of measurements of intensity of structured images at one point with constant variance and mathematical expectation. An estimate of the standard and measured deviations of the observed image is given to evaluate the reliability of the results. The necessary and sufficient condition for solving the problem by the proposed method is shown. The complexity of the algorithm is estimated depending on the number of photos with various structured images. A comparative analysis of the method presented in this work and the generalized algorithm for decoding phase images based on the vector representation of a system of transcendental equations is carried out. The results of the analysis demonstrate several times lower measurement error when working with a limited set of images.

The proposed method for processing images with spatially modulated phase illumination allows minimizing the error in determining the shift of the initial phase of the probing sinusoid. The received images of the measured object have the form of phase images with a stepwise shift of the initial phase of the probing sinusoid. The steady method for decoding the structured images allows minimizing the measurement error of three-dimensional geometry by the triangulation method with object surface arbitrary light scattering properties measured in a phase-inhomogeneous medium.

3 Method for Nonlinearity Compensation of the Source–Receiver Path of Optical Radiation in 3D Measurements Based on Phase Triangulation

The power characteristics of many input devices, printing, or visualization of images corresponds to a power law:

$$ s={cr}^{\gamma }, $$
(21.28)

where с and γ are the positive constants. Often, Eq. (21.28) is written as

$$ s=c{\left(r+\varepsilon \right)}^{\gamma }, $$
(21.29)

in order to introduce the shift, that is, the initial brightness, when the photodetector input receives a zero optical signal. Devices used by the author as a source and receiver of optical radiation also have a power type of energy characteristics. The graphs of dependences of s on γ for various values are shown in Fig. 21.6.

Fig. 21.6
figure 6

Graphs for equations s = cr γ, for different values of γ (с = 1 in all cases)

Most modern imaging devices have power dependence with an exponent ranging from 1.8 to 2.5. This trend originates from cathode ray tube monitors, in which the luminance brightness has power dependence on voltage. Figure 21.7 shows an image of a linear halftone wedge, which is fed to the monitor input. The image on the monitor screen is darker than it should be.

Fig. 21.7
figure 7

Halftone image with linear wedge (left) and monitor response to linear wedge (right)

Obviously, when using the method based on phase triangulation, it is necessary to control the linearity of the receiving-transfer path between the source of optical radiation and the image receiver. The presence of a nonlinear receiving-transfer characteristic of the path between the source and the receiver of spatially modulated illumination can cause difficult-to-predict systematic errors, which will depend on the magnitude of the phase shift (Fig. 21.8).

Fig. 21.8
figure 8

Type of sinusoidal signal after power conversion

Now there are compensation methods that are based on serial or parallel compensating nonlinearity inclusion, introduction of the compensating nonlinear feedback and linear corrective devices synthesized on the invariance theory.

The simplicity of implementation is advantage of sequential or parallel inclusion of compensating nonlinearity method. However, this method assumes the availability of information about the nonlinearity of characteristics of the receiving-transfer path, which in our case depends on the measured object reflective properties, external lighting, and the internal parameters of the optical radiation source and receiver. Therefore, the method of nonlinearity compensation on the basis of sequential or parallel inclusion of compensating nonlinearity is not applicable in our case.

The nonlinearity compensation method based on compensating nonlinear feedback is inappropriate to our problem. The feedback implies the presence of information about the distribution of structured illumination in the received images. The definition of illumination is the primary task of the optical triangulation method.

The method of modification by additional correction is proposed for compensation for the source–receiver path nonlinearity of optical radiation in 3D phase triangulation measurements.

The dependence of the intensity observed in the image on the intensity emitted by the light source can be represented by some nonlinear function K as follows:

$$ I=K(U). $$
(21.30)

where U is the spatially modulated light intensity emitted to a small area of the investigated object; and I is the pixel intensity of the image the center of this small area is projected into.

If the object light scattering properties, the ambient lighting parameters, and the internal parameters of the structured illumination modulator and receiver do not change during the measurement process, the K function is identical for each pixel in the image. The inverse function K −1 can be calculated if K is smooth and continuous in the accepted values range.

Let us consider the nonlinearity compensation method of the optical radiation source–receiver path in 3D phase triangulation measurements. First, the calibration of the specified path is carried out. Then, to determine the function K, the measured object is lightened with a series of parallel halftone sinusoidal bands. The object under study is consistently illuminated, providing uniform spatial modulation of the radiation source (the illumination intensity is uniform over the entire area of the radiator). The illumination intensity is changed linearly:

$$ {U}^0(i)={U}_0^0+\left(i-1\right){dU}^0 $$
(21.31)

where i is the serial number of uniform illumination, i = 1….M; \( {U}_0^0 \) is the intensity of the first implementation of illumination; and dU 0 is the increment step of illumination intensity.

The dependence of the intensity of the optical radiation source on the observed intensity in such an image is constructed for each point on the received images:

$$ I\left(x,y\right)=K\left(x,y,U\right). $$
(21.32)

A function characterizing the nonlinearity of the source–receiver path of optical radiation is obtained. Then, the inverse function K −1 is built to restore the radiation intensity true value by the value of the registered intensity of the image at the point:

$$ U={K}^{-1}\left(x,y,I\left(x,y\right)\right). $$
(21.33)

It is possible to restore the intensity of the modulated optical radiation on the basis of the function K −1, after obtaining investigation object images which are illuminated by parallel sinusoidal bands,

$$ Y\left(x,y\right)={K}^{-1}\left(x,y,I\left(x,y\right)\right). $$
(21.34)

Here Y(x, y) is the light intensity distribution that is projected onto the measured object. The use of function Y(x, y) instead of I(x, y) in the decoding phase images method in phase triangulation eliminates the systematic phase measurement error of the testing sinusoid.

For the verification of the proposed method, we compare the results obtained by the steady decoding phase image method with and without compensation of the optical radiation source–receiver path. The results of the measured phase deviation from the known initial phase is estimated:

$$ \varepsilon =\left|\psi -\varphi \right|, $$
(21.35)

where ψ is the phase found by compensation method.

Let us set the phase φ at initial position with taking into account typical intensity distribution in the phase images. Since the compared methods can work at arbitrary δ t, shifts in the generation of phase images will have the format of an occasional set in the interval [0, 2π). Phase images are formed with intensity of background A = 10 and visibility V = 0.5.

The intensity distribution in the phase images is set according to (21.28) with the addition of noise. Noise has random character with normal distribution. The level of noise will be estimated by the mean square deviation (RMS) from the intensity of background. We introduce a new parameter T: window width, where we will set different phase shifts in (0, 2π) interval. At T = 2π, the phase shift can take all possible values. The introduction of the parameter T is due to the limitations of the photodetector range, which in the presence of non-switchable hardware and software adaptation automata can lead to uncertain results of intensity measurement in some areas of the formed phase shift values (see Fig. 21.9).

Fig. 21.9
figure 9

Deviation of the value of phase from the level of noise in the distribution of intensity: the method of decoding images without nonlinearity compensation (dashed line) and that with nonlinearity compensation of the source–receiver path of optical radiation (solid line)

In practice, phase images, as a rule, contain noise of additive nature, imposed by the recording photodetector and elements of the receiving path. Therefore, it is useful to estimate the accuracy of phase determination depending on the level of additive noise.

Let us try to find the deviation ε of the phase from the initial one depending on the noise level imposed on the distribution of the intensity in the recorded phase images with known shift number and T = 0.875π. Recorded phase pattern number N = 50; parameter γ = 1.5; and RMS noise H imposed on the distribution of intensity is 0–100% of intensity of background. To decrease the stochastic character of the presented graphs, we use 200 different sets of recorded phase images and put the maximum acquired errors of the measured phase on the graph. Such procedure is followed in all the experiments described below.

The results presented in Fig. 21.9 show that in both cases the character of the phase error growth depending on the noise level ε(H) in the interference patterns has a linear trend. However, at small values of noise level, this error taking into account the path nonlinearity compensation tends to zero, in contrast to the error of phase definition without compensation. If we do not compensate for the nonlinearity of the source–receiver path of optical radiation, then at Т < 2π the method of decoding phase images with arbitrary step-by-step shifts can give unreliable estimates.

Different sources and receivers of optical radiation have different parameters γ, determining the energy characteristics of the device according to (21.28). We estimate the deviation ε depending on the level γ at constant number of shifts N = 50, noise level H = 10%, and the parameter T = 0.875π.

Dependence ε(γ) (see Fig. 21.10) shows that applying the method of the path nonlinearity compensation allows obtaining reliable values of the measured phase at any γ. In addition, from Fig. 21.11, it follows that in the vicinity of γ = 1, the compensation method cannot be used since in this vicinity the signal type after the power conversion remains unchanged (Fig. 21.12).

Fig. 21.10
figure 10

Deviation of the phase for various number of shifts: the method of decoding images without nonlinearity compensation (dashed line) and that with nonlinearity compensation of the source–receiver optical radiation path (solid line)

Fig. 21.11
figure 11

Deviation of the phase from the value γ: the method of decoding images without nonlinearity compensation (dashed line) and that with nonlinearity compensation of the source–receiver path of optical radiation (solid line)

Fig. 21.12
figure 12

Deviation of the measured phase at different window sizes T: the method of decoding phase images without compensation of the path nonlinearity γ1 = 1.5 (large dotted line), γ2 = 2.5 (small dotted line) and that with compensation for nonlinearity of the source–receiver path of optical radiation (solid line)

In experiments, the phase image realization number N is always limited. It is important to know the required number N for decoding phase images with a given accuracy. We perform a comparative analysis of methods in the case of phase recovery from a limited number of images N. We analyze the accuracy of phase determination depending on N (Fig. 21.10). The noise level will be a constant variable equal to 10% of background intensity of a standard deviation, the phase window T = 0.875π, and the parameter γ = 1.5. From graphs in Fig. 21.10, it follows that when using the method of decoding phase images without compensation for nonlinearity of the source–receiver path of optical radiation, the phase measurement error (i.e., deviation ε) decreases with increasing N, but converges to a value of about 0.34 radians, which is more than 10% of the measurement range. When compensating for the path nonlinearity, ε converges to a value of about 0.05 radians or 1.5% of the measuring range.

We estimate the phase measurement error for different window sizes T and constant values γ 1 = 1.5; γ 2 = 2.5; H = 10%, N = 50. The results of estimations are shown in Fig. 21.10. At T < 1 rad, ε tends to 50% of the measurement range with and without nonlinearity compensation. At the given parameters H, N, and T < 1, the system (21.3) becomes degenerate and has no stable solution. At T > 4.8 radians, the error in determining the phase with and without compensation is almost the same. At 2 < T < 5, the decoding phase image method without nonlinearity compensation leads to obtaining significant systematic errors.

Thus, the proposed method of nonlinearity compensation of the source–receiver path of radiation in 3D optic measurements based on structured light and phase triangulation minimizes the error of the phase measurements with arbitrary stepwise shifts in the presence of noise and power characteristics of the receiving-transfer devices. Comparison of the steady method of decoding interferograms and method proposed above shows that for T in the range 2 < T < 5, the nonlinearity compensation improves the accuracy of phase triangulation at accidental phase shifts and random noise. The method of nonlinearity compensation allows to reduce the error in several times and to significantly increase the safety of 3D measurement results based on optical phase triangulation with structured light. It allows using modern inexpensive household devices, including those equipped with non-switchable hardware and software adaptation machines, as sources and receivers.

4 Comparing Methods of Structured Image Decoding at Nonlinearity of the Source–Receiver Path of Optical Radiation

In the measurement of a 3D profile using the phase triangulation in the images, there is often additive noise. In addition, most modern devices used to generate and input images have an amplitude characteristic corresponding to the power law, often called “gamma correction” (21.28).

Several approaches are used to compensate for the nonlinearity of the source–receiver path of optical radiation in 3D measurements based on phase triangulation. The first is the use of a matched pair of the source and receiver of optical radiation, for which the nonlinearity of the transfer function is obviously absent, that is, γ = 1 in (21.28). This approach is found in specialized optoelectronic devices that use a single-frame decoding of a three-dimensional setting.

Another and more common approach is based on the application of the four-step phase triangulation method. The method works as follows. Four illuminations are projected on the surface of the measured object. The linear phase shift by adjacent images is π/2. Without taking into account the power transfer function, we obtain:

$$ {I}_n\left(x,y\right)={I}_b\left(x,y\right)+{I}_m\left(x,y\right)\cdot \cos \left(\varphi \left(x,y\right)+\left(n-1\right)\frac{\pi }{2}\right),n=1\dots .4. $$
(21.36)

The phase φ(x, y) can be calculated by the formula:

$$ \varphi \left(x,y\right)=\mathrm{arc}\;\tan \left(\frac{I_4-{I}_2}{I_1-{I}_3}\right). $$
(21.37)

Next, we take into account the power transfer function in the form of a second-degree polynomial

$$ {I}_n\left(x,y\right)={a}_0+{a}_1{S}_n\left(x,y\right)+{a}_2{S}_n^2\left(x,y\right)+\alpha, $$
(21.38)

where a 0, a 1, a 2, and α are the coefficients and S is the received intensity of the phase image with power correction of brightness in accordance with expression (21.28). Given the properties of trigonometric functions, from expressions (21.35), (21.37), (21.38), the following can be obtained:

$$ \varphi \left(x,y\right)=\mathrm{arc}\;\tan \left(\frac{S_4-{S}_2}{S_1-{S}_3}\right). $$
(21.39)

This method is resistant to additive noise and automatically compensates for nonlinear distortions in the measurement results. The disadvantage of the method is the need for all four measurements to fit in the dynamic range of the optical radiation receiver, which is not always possible. For example, in the case of measuring objects with complex profiles and arbitrary light scattering properties in a wide range of values, it is almost impossible to match the source and receiver of radiation. In practice, the used number of phase shifts is often larger than 4. In this case, the obtained phase images are analyzed in fours having successive shifts by π/2 relative to each other, and the results of the measured phase are averaged. The result will be a fairly accurate and reliable measurement method.

The third approach is more universal. It is based on the phase image decoding method, which allows discarding unreliable measurements and performing phase recovery in the images at an arbitrary set of phase shifts of the probing phase image [20]. The phase value ϕ(x, y) can be represented as

$$ \phi \left(x,y\right)=\varphi \left(x,y\right)+\delta \left(x,y\right), $$
(21.40)

where δ(x, y) is the initial phase shift at the formed spatial illumination. Then the expression (21.2) can be presented as:

$$ I\left(x,y\right)={I}_b\left(x,y\right)+{I}_{\mathrm{cos}}\left(x,y\right)\cos \left(\delta \right)+{I}_{\mathrm{sin}}\left(x,y\right)\sin \left(\delta \right), $$
(21.41)
$$ \varphi \left(x,y\right)=-\mathrm{arc}\;\tan \left(\frac{I_{\mathrm{sin}}\left(x,y\right)}{I_{\mathrm{cos}}\left(x,y\right)}\right). $$
(21.42)

The value of the phase φ(x, y) is determined from the condition of minimization of the residual function between theoretical and experimental data:

$$ S\left({I}_b,{I}_{\mathrm{sin}},{I}_{\mathrm{cos}}\right)=\sum \limits_{i=1}^N{I}_i-{I}_b-{I}_{\mathrm{cos}}\cos \left({\delta}_i\right)+{I}_{\mathrm{sin}}\sin \left({\delta}_i\right), $$
(21.43)
$$ \frac{\partial S}{\partial {I}_b}=0;\frac{\partial S}{\partial {I}_{\mathrm{sin}}}=0;\frac{\partial S}{\partial {I}_{\mathrm{cos}}}=0. $$
(21.44)

This method requires direct compensation for nonlinearity of the source–receiver path of optical radiation. Otherwise, its application will lead to systematic deviations of the measured phase [21]. With the help of calibration of the source–receiver path of optical radiation, the transfer function is set in the form of dependence:

$$ Y\left(x,y\right)={K}^{-1}\left(x,y,I\left(x,y\right)\right), $$
(21.45)

where Y(x, y) is the light intensity distribution that is projected onto the measured object. The use of function Y(x, y) instead of I(x, y) allows excluding the systematic measurement error of the phase of the probing sinusoid. Since the dependence Y(x, y) automatically compensates for the background illumination I b(x, y), the expressions (21.43) and (21.44) will be reduced to the following form:

$$ S\left({I}_{\mathrm{sin}},{I}_{\mathrm{cos}}\right)=\sum \limits_{i=1}^N\left({K}^{-1}\left(x,y,{I}_i\left(x,y\right)\right)-{I}_{\mathrm{cos}}\left(x,y\right)\cos \left({\delta}_i\right)+{I}_{\mathrm{sin}}\left(x,y\right)\sin \left({\delta}_i\right)\right),\vspace*{-8pt} $$
(21.46)
$$ \frac{\partial S}{\partial {I}_{\mathrm{sin}}}=0;\frac{\partial S}{\partial {I}_{\mathrm{cos}}}=0. $$
(21.47)

This method is much more laborious, since it requires an additional procedure of calibration of the source–receiver path of optical radiation, but it is more versatile and reliable compared to the four-step method.

For its substantiation, it is required to analyze the error of phase determination in decoding phase images on the basis of iterative four-step method and steady method of decoding phase images with compensation of nonlinearity of the source–receiver path of optical radiation.

The main sources of measurement error of the phase triangulation method are noise on phase images and insufficient dynamic range of the optical radiation receiver. Since in the case of radiation intensity that does not fall within the dynamic range, the recorded intensity in the phase image is unreliable, such data will be discarded, and the phase shift will be calculated from the rest set of reliable measurements.

It is shown in [22] that the phase determination error can be estimated as:

$$ \theta =\frac{\Delta I}{\sqrt{N}\cdot I}, $$
(21.48)

where N is the number of phase shifts, and ΔI/I is the relative error of the intensity measurement by the optical radiation receiver.

Below are the results of analysis of the phase measurement error in decoding phase images based on iterative four-step method and steady method of phase image decoding with compensation for nonlinearity of the source–receiver path of optical radiation. The analysis was performed at different noise levels in phase images, different values of the gamma correction coefficient, and different consistency parameters for sensitivities of the source and receiver of optical radiation.

Let the intensity of the radiation source scattered on the surface of the measured object vary in the range [0…1] in relative dimensionless units. The operating range of the optical radiation receiver is [a, b]. Parameter a takes the values [−1…1], and parameter b takes the values [0…2]. Figure 21.13 gives examples of the source intensity (a) and the observed receiver intensity (b, c, d) at different values of parameters a and b and at the noise level of 5% on the received images. Changes in all parameters allow estimating the measurement error at different light scattering properties of the measured object surface.

Fig. 21.13
figure 13

Examples of intensity of the source (a) and the observed intensity of the receiver with various values of parameters a and b (b, c, d)

Figure 21.14 presents the theoretical error of phase measurement in the absence of noise in phase images. It is obvious that under ideal conditions the measurement error will be zero. In addition, the graph shows that in the area where the inequality a > b is performed, the measurements lose their physical meaning because the dynamic range of the radiation receiver takes an incorrect value.

Fig. 21.14
figure 14

An error in determining the phase from the consistency parameters of the receiver and source of radiation A and B in the absence of noise in the phase patterns

Figures 21.15, 21.16, 21.17, and 21.18 show estimates of the error of phase determining at the noise level of 5% in the phase images and Figs. 21.19, 21.20, 21.21, and 21.22 at a noise level of 10%. Each graph shows measurement errors by a four-step method (darker surface) and a steady method of decoding phase images (lighter surface). The vertical axis and the surface color indicate the standard deviation of the measured phase, and the horizontal axes show the values of parameters A and B, reflecting characteristics of consistency of the source and receiver of optical radiation at the measurement point. Errors are shown at parameter γ = 0.25, γ = 0.5, γ = 1, and γ = 2. The measurement results show that in the region where the operating range of the optical radiation receiver is consistent with the range of the emitted intensity, the error of the methods is approximately the same. When leaving the consistency area, the error of the four-step method increases significantly faster than that of the steady method of decoding phase images.

Fig. 21.15
figure 15

An error of phase determination from the consistency parameters of the receiver and source of radiation A and B; noise level in phase images of 5%, γ = 0.25

Fig. 21.16
figure 16

An error of phase determination from the consistency parameters of the receiver and source of radiation A and B; noise level in the phase images of 5%, γ = 0.5

Fig. 21.17
figure 17

An error of phase determination from the consistency parameters of the receiver and source of radiation A and B; noise level in the phase images of 5%, γ = 1

Fig. 21.18
figure 18

An error of phase determination from the consistency parameters of the receiver and source of radiation A and B; noise level in the phase images of 5%, γ = 2

Fig. 21.19
figure 19

An error of phase determination from the consistency parameters of the receiver and source of radiation A and B; noise level in the phase images of 10%, γ = 0.25

Fig. 21.20
figure 20

An error of phase determination from the consistency parameters of the receiver and source of radiation A and B; noise level in the phase images of 10%, γ = 0.5

Fig. 21.21
figure 21

An error of phase determination from the consistency parameters of the receiver and source of radiation A and B; noise level in the phase images of 10%, γ = 1

Fig. 21.22
figure 22

An error of phase determination from the consistency parameters of the receiver and source of radiation A and B; noise level in the phase images of 10%, γ = 2

Figures 21.23, 21.24, 21.25, and 21.26 show three-dimensional surface sections (Fig. 21.22) at γ = 2 and the noise level of 10% in phase images. The results in the graphs show that for all the values of consistency parameters of the receiver and the radiation source, the method based on the steady decoding of phase images provides the measurement error that is, at least, not worse than that in the four-step method.

Fig. 21.23
figure 23

An error of phase determination from the consistency parameters of the receiver and source of radiation by four-step method (solid line) and steady method of phase image decoding (dashed line). Noise level in the phase images of 10%, γ = 2, B = 1

Fig. 21.24
figure 24

An error of phase determination from the consistency parameters of the receiver and source of radiation by four-step method (solid line) and steady method of phase image decoding (dashed line). Noise level in the phase images of 10%, γ = 2, В = 1.5

Fig. 21.25
figure 25

An error of phase determination from the consistency parameters of the receiver and source of radiation by four-step method (solid line) and steady method of phase image decoding (dashed line). Noise level in the phase images of 10%, γ = 2, А = 0

Fig. 21.26
figure 26

An error of phase determination from the consistency parameters of the receiver and source of radiation by four-step method (solid line) and steady method of phase image decoding (dashed line). Noise level in the phase images of 10%, γ = 2, А = −0.5

Figures 21.27 and 21.28 show the accuracy of phase determination by the four-step method and the steady method of phase image decoding at different consistency parameters of the receiver and source of radiation A and B, for small values of noise of 2% and 10% in the phase images. These graphs show that the error of the measured phase depends on the noise level in the phase patterns. Moreover, in the field of consistency, both methods have almost identical level of error. This is confirmed by the graphs in Figs. 21.3 and 21.4.

Fig. 21.27
figure 27

An error of phase determination by four-step method (solid line) and steady method of phase image decoding (dashed line) from the consistency parameters of the receiver and source of radiation A and B at noise level in the phase images of 2%

Fig. 21.28
figure 28

An error of phase determination by four-step method (solid line) and steady method of phase image decoding (dashed line) from the consistency parameters of the receiver and source of radiation A and B at noise level in the phase images of 10%

Based on the results obtained and the experiments carried out, the following conclusion can be drawn. It is necessary to calculate the initial phase shift only by a set of reliable measurements when measuring by phase triangulation in a limited dynamic range of the receiver and with arbitrary light scattering properties of the measured object surface.

5 Methods for Expanding the Dynamic Range of Phase Triangulation Measurements

One of the disadvantages of the phase step method is the limited range of measured coordinates. Phase values over the image can be unambiguously restored only within the period.

Currently, the problem of phase ambiguity has not been solved. There are many known phase field expansion algorithms [23], using known data on the investigated phase field to calculate the full phase, that is, full period number corresponding to the wave path difference, for example:

  • Sign of phase change in the transition through the period

  • Approximate values of the full phase obtained from other measurement sources and type of measured wave front (smoothness, continuity of derivatives)

  • Change in the band color in interferometers with the same wave paths, change in the band contrast, etc.

  • Difference in phases obtained from several measurements of one object with changed band value

Most of the phase ambiguity elimination algorithms are based on the analysis of the spatial structure of the phase field. The full phase is determined by its expansion, that is, by successive addition or subtraction of 2π to or from the phase value at the adjacent point, if the difference between them exceeds a certain threshold (Fig. 21.29). This procedure is based on the assumption that there are no sharp jumps (more than a period) at the points of transition through the period. To trace the transition boundary, the number of periods has to be an order of magnitude smaller than that of points in the detector array. This is only possible when analyzing a smooth phase front. The addition of 2π can be considered as an extrapolation process. At that phase shift at the previous restored points is considered for determining the phase shift at the following points. The hypothesis of the phase transition existence at some point of the phase field is accepted depending on the results of the analysis of its vicinity.

Fig. 21.29
figure 29

Wave front measured on module 2π

There is a known method for measuring the phase shift on interferograms using an equivalent wavelength. Information about the wavelength of light sources is used a priori.

Optical differences of wave path at any point of the field (x, y) are determined from expressions:

$$ {\Phi}_a+2\pi n=\frac{2\pi }{\lambda_a}\mathrm{OPX}, $$
(21.49)

at wavelength λ a and

$$ {\Phi}_b+2\pi n=\frac{2\pi }{\lambda_b}\mathrm{OPX}, $$
(21.50)

at wavelength λ b. Deducting (21.50) from (21.49) and selecting the optical difference of wave path, we obtain:

$$ \mathrm{OPX} =\frac{\Phi_a-{\Phi}_b}{2\pi }{\lambda}_{\mathrm{eq}}+\left({n}_a-{n}_b\right){\lambda}_{\mathrm{eq}}, $$
(21.51)

where

$$ {\lambda}_{\mathrm{eq}}=\frac{\lambda_a{\lambda}_b}{\left|{\lambda}_a-{\lambda}_b\right|}. $$
(21.52)

Thus, it is possible to determine the phase front with a period equal to the equivalent wavelength λ eq.

The above-mentioned methods of increasing the measurement range are not suitable for the problem of measuring 3D geometry of large objects based on the spatiotemporal modulation of the optical radiation source, since there is no a priori information about the 3D geometry of the measured object.

Below we consider the method of the full phase recovery using the integer analysis, which does not use a priori information about the measured object. The method is based on a series of measurements at different values of interference bands. The band value is determined by the difference in the optical wave path, in which the interference bands change for a period. The band value depends on the angle between the interfering beams, the transmittance of the medium, or the wavelength of the light source.

This work applies a modification of the full phase recovery method using the integer analysis.

The modification consists of the fact that the measured object is consecutively illuminated by a series of phase images with a multiple of the phase period. The phase transition is sought only within one period. Then, in the presence of a set of phase images with multiple periods and images where the phase shift does not transit through the period (this is determined by the depth of the measuring setting), it is possible to restore the value of the phase shift in the phase images with the smallest period.

Let the phase images be measured and the phase values are decoded for five fields that have multiple periods N 1N 5 of a probing sinusoid:

$$ {N}_2=2{N}_1,{N}_3=2{N}_2,{N}_4=2{N}_3,{N}_5=2{N}_4. $$
(21.53)

Let φ 1φ 5 be phase values at one point in five fields corresponding to different periods of the probing sinusoid N 1N 5. Then the value of the resulting phase ϕ res can be calculated by the following algorithm:

$$ {\phi}_2={\varphi}_2+2\pi \cdot \mathrm{INT}\left(\frac{\left(2\cdot {\varphi}_1\right)-{\varphi}_2}{2\pi}\right), $$
(21.54)
$$ {\phi}_3={\varphi}_3+2\pi \cdot \mathrm{INT}\left(\frac{\left(2\cdot {\phi}_2\right)-{\varphi}_3}{2\pi}\right), $$
(21.55)
$$ {\phi}_4={\varphi}_4+2\pi \cdot \mathrm{INT}\left(\frac{\left(2\cdot {\phi}_3\right)-{\varphi}_4}{2\pi}\right), $$
(21.56)
$$ {\phi}_{\mathrm{res}}={\varphi}_5+2\pi \cdot \mathrm{INT}\left(\frac{\left(2\cdot {\phi}_4\right)-{\varphi}_5}{2\pi}\right), $$
(21.57)

where function INT(х) takes the following values:

$$ \left\{\begin{array}{l}\mathrm{INT}(x)=1,0.5\le x<1\\ {}\mathrm{INT}(x)=0,-0.5<x<0.5\\ {}\mathrm{INT}(x)=1,-0.5>x\ge -1\end{array}\right.. $$
(21.58)

The obtained phase field ϕ res provides a measurement range to correspond to the period of the probing sinusoid N 5 and the sensitivity to correspond to the period N 1.

The proposed method of expanding the dynamic range of phase measurements provides an increase in the dynamic range to the limits due to the resolution of the source and receiver of spatially modulated optical radiation.

6 Method for Estimating the Optimal Frequency of Spatial Modulation in Phase Triangulation Measurements

In the phase triangulation method, the phase error depends on the number of phase images N and the relative error of the photodetector ΔI/I. The measurement error of Z coordinate (setting depth), according to [24], can be estimated as follows:

$$ \Delta z=\frac{\Delta \varphi \cdot p}{2\pi \cdot \tan\;\theta }=\frac{\Delta I\cdot p}{2\pi \cdot I\cdot \sqrt{N}\cdot \tan\;\theta }, $$
(21.59)

where p is the spatial modulation period of radiation, and θ is the angle of triangulation.

It follows from expression (21.59) that the error in determining the z coordinate is proportional to spatial modulation period of radiation. To minimize the measurement error by the phase triangulation method, it is necessary to minimize the spatial modulation period of optical radiation.

It is obvious that as the spatial modulation period of radiation decreases, the range of the setting depth measurement decreases as well. Over the image, the phase values can be unambiguously restored only within one period. To increase the measurement range by the phase triangulation method, various methods of phase field expansion are actively used in interferometry. There are known algorithms for phase field expansion, using a priori data on the object under study to determine the full phase, that is, the number of full periods [18]. There are also some known algorithms for restoring the full phase using integer analysis when the object is illuminated by phase image series with different multiples of the spatial modulation of radiation [19]. The most coming triangulation methods for 3D measurements using structured light illumination are the methods of expanding the measurement range using phase steps and the method of binary coding of pixels [25, 26]. These approaches provide the best measurement accuracy when projecting the least number of structured illuminations.

There are fundamental limitations on the resolution of the image formed by the optical elements of the measuring system. Due to the nonlinear distortion of the optical elements of the measuring system, the limited depth of field of the optical elements of the system, it is impossible to obtain an absolutely sharp image. Therefore, it is necessary to choose the frequency of spatial modulation of radiation based on the following considerations. First, the maximum frequency of spatial modulation in the received image must be less than the frequency of the equivalent low-pass filter, which is the optical system of the meter. Second, in order to achieve the minimum measurement error, the frequency should be maximized.

This chapter presents a method for estimating the optimal frequency of spatial modulation of radiation for three-dimensional measurements based on phase triangulation, which provides the smallest error in measuring a given depth z.

The dependence of the image on the photodetector on the intensity distribution formed on the object surface by the radiation source can be represented as a convolution of the pulse response function of the system and the intensity distribution function of the image formed on the surface of the measured object by the radiation source:

$$ g\left(x,y\right)=\iint h\left(x-{x}_1,y-{y}_1\right)f\left({x}_1,{y}_1\right){dx}_1{dy}_1+n\left(x,y\right)\!, $$
(21.60)

where g is the image formed on the photodetector, h is the pulse response of the optical system or the scattering function of the point source, f is the distribution function of the intensity of the image formed on the surface of the measured object by the radiation source, and n is the noise in the image. The noise function n in the image in addition to the noise of the photodetector includes the background brightness distribution of the measured object. Since the intensity of the generated illumination is significantly higher than the background brightness of the measured object and, especially, than the noise of the photodetector, the inequality is performed:

$$ \iint \iint h\left(x-{x}_1,y-{y}_1\right)f\left({x}_1,{y}_1\right){dx}_1{dy}_1 dxdy\gg \iint n\left(x,y\right) dxdy, $$
(21.61)

where integration is done throughout the image. In the frequency space, expression (1.19) takes the form:

$$ G\left(u,v\right)=H\left(u,v\right)F\left(u,v\right)+N\left(u,v\right). $$
(21.62)

Since the formed structured illumination has a pronounced modulation direction (the radiation intensity is modulated along the selected, as a rule, horizontal coordinate), then we limit ourselves to considering the one-dimensional case.

A standard approach can be used to experimentally determine the pulsed response function of the optical system. Spatial low-frequency binary grid in the form of several wide white light lines is projected on the surface of the object. The photodetector detects the brightness distribution G 0(u). The function F 0(u) characterizes the intensity distribution on the surface of the measured object in the absence of noise and any optical distortion. The value of the function F 0(u) is obtained from a priori information about the illumination formed on the surface of the measured object using the obtained functionG 0(u).

For example, the function F 0(u) can be obtained as follows:

$$ {F}_0(u)=\mathit{\operatorname{sign}}\left({\phi}_{\mathrm{Low}}\left({G}_0(u)\right)\right), $$
(21.63)

where the function sign gives 1, if the value is positive, and −1 if it is not positive. The function ϕ Low is the linear low-frequency filter whose cutoff frequency is obviously higher than the spatial frequency of the observed binary grid, projected onto the surface of the measured object.

Then the function H can be defined as:

$$ H(u)=\frac{G_0(u)-N(u)}{F_0(u)}. $$
(21.64)

According to expression (21.59), the optimal spatial period of radiation modulation will be at the minimum value (p/I) or (1/wI), where w is the frequency of spatial modulation of radiation, and I is the amplitude of the signal in the received images. Since the ideal infinite harmonic signal in the frequency representation is expressed by the delta-function, then

$$ {G}_w(u)=H(u){\delta}_w(u)=H(w), $$
(21.65)

δ w(u) is the delta function equal to 1 at point w, and G w(u) is the intensity dependence formed on the photodetector at illumination in the form of a harmonic signal with frequency w. Then the amplitude of the harmonic signal with frequency w, observed in the images, will be proportional to the value of H(w). The problem of determining the optimal spatial frequency of radiation modulation is reduced to determining the frequency w, at whichH(w) ⋅ w → max.

Since the noise frequency distribution N(w) is unknown, it is impossible to calculate the function H(w) using expression (21.64). Ignoring the noise in this case is impossible, because high-frequency components will inevitably increase when divided into high-frequency component of the “ideal” signal F 0(u).

The following approach is used to estimate the function H(w). The point blur function, which describes the dependence H(w), has to sufficiently accurately repeat the normal distribution:

$$ H(u)={Ae}^{-\frac{u^2}{\sigma^2}}. $$
(21.66)

Then expression H(w) ⋅ w → max at

$$ w=\frac{\sigma }{\sqrt{2}}. $$
(21.67)

From (21.64), we obtain:

$$ \frac{G_0(u)}{F_0(u)}={Ae}^{-\frac{u^2}{\sigma^2}}+\frac{N(u)}{F_0(u)}. $$
(21.68)

We further assume that the noise distribution N(u) has a substantially smaller amplitude than H(u). Then the expression \( \frac{N(u)}{F_0(u)} \) in the low-frequency region will be significantly less than H(w). Therefore, in the low-frequency domain, a function \( \frac{G_0(u)}{F_0(u)} \) can be used to estimate H(u).

Based on the assumption that the parameter A in expression (21.66) is equal to H(0), and using the least squares method, we obtain:

$$ \sigma =\frac{\int \sqrt{\log \left(\frac{G_0(0)}{F_0(0)}\right)-\log \left(\frac{G_0(u)}{F_0(u)}\right)}\cdot du}{\int u\cdot du}. $$
(21.69)

Here integration is carried out only over the low-frequency part of the spectrum. On the basis of expressions (21.67) and (21.69), we can obtain an estimate of the optimum frequency of the harmonic signal.

The practical implementation and verification of the proposed adaptive phase triangulation method for 3D measurements based on structured lighting were performed experimentally. NEC VT570 digital projector with a spatial resolution of 1024 × 768 was used as a source of spatially modulated radiation. Digital camera Logitech C910 with a resolution of 1920 × 1080 was used as a receiver of optical radiation. The projector formed illumination on the surface of the measured object in the form of a set of several light lines equidistant on the flat surface. The aim of the experiment was to determine the optimal spatial frequency of the projected signal for this measurement scheme based on the adaptive phase triangulation method.

As a result of the analysis of the recorded images on the surface of the measured object, the function G(u)/F(u) has been obtained and the point blur function H(u) has been found (Fig. 21.30). The optimal period of the probing signal for this measuring configuration has been found to be 38 pixels in our experiments.

Fig. 21.30
figure 30

Dependence G(u)/F(u) in the frequency representation (solid line) and the found blur function of the system point (dotted line)

Then a similar experiment was carried out, but with especially decreased sharpness of the optical recording system. The analyzed signals in the first and second experiments are shown in Fig. 21.31. It can be seen that the brightness signal fronts along the horizontal direction in the images in the second experiment are substantially tumbled down. The optimal period of the harmonic signal for this configuration of the optical measuring circuit should be significantly longer than in the first case.

Fig. 21.31
figure 31

Fragments of the analyzed intensity dependences in the case of a well-focused system (solid line) and in the case of a defocused system (dotted line)

The obtained function G(u)/F(u) and the found point blur function H(u) are presented in Fig. 21.32. The optimal period of the harmonic signal observed by the photodetector for this configuration of the optical system was 105 pixels.

Fig. 21.32
figure 32

Dependence G(u)/F(u) in the frequency representation (solid line) and the found blur function of the system point (dotted line) for the case of defocused optical system

The results shown prove the usefulness and availability of the proposed method for estimation of the best radiation modulation frequency for measuring three-dimensional geometry using phase triangulation and structured radiation. In the case of defocusing the optical elements of the measuring system, the optimal spatial modulation frequency of the radiation will be significantly lower than in the case of a well-coordinated and focused optical system of the meter.

7 Conclusion

This section presents the methods of phase triangulation, providing higher metrological characteristics of measuring systems, as well as expansion of the functionality and range of applications of optoelectronic systems for geometric control in production conditions. The use of a steady method of phase image decoding will minimize the measurement error of three-dimensional geometry by phase triangulation using structured lighting. The method of nonlinearity compensation reduces the error several times and significantly increases the reliability of the results of 3D measurements based on phase triangulation and allows using modern inexpensive household devices, including those equipped with non-switchable hardware and software adaptation machines, as sources and receivers. The proposed method of expanding the dynamic range of phase measurements provides an increase in the dynamic range to the limits conditioned by the resolution of the source and receiver of spatially modulated optical radiation. The proposed method for estimating the optimal frequency of spatial radiation modulation for 3D measurements based on phase triangulation and structured lighting minimizes the error of phase determination for the used optoelectronic elements.