Efficient stripe coding and decoding method and device, electronic equipment and storage medium

By embedding the cyclic empty phase shift method in three-dimensional measurement, using the reference phase to expand the intermediate and high-frequency phases, the problem of excessive phase magnification in traditional methods is solved, and efficient and accurate three-dimensional measurement is achieved.

CN119417916APending Publication Date: 2025-02-11SUPER ROBOT RESEARCH INSTITUTE (HUANGPU) +1
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411338721.3
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-09-25
Publication Date
2025-02-11

AI Technical Summary

Technical Problem

In the existing three-dimensional measurement technology, the phase magnification is too high during high-frequency stripe analysis, resulting in unstable phase expansion, making it difficult to meet the requirements of high precision, high efficiency and high measurement range at the same time.

Method used

By embedding cyclic empty phase shifts in the stripe encoding, the medium-frequency wrap phase is expanded using a pre-calculated reference phase plane and further expanding the high-frequency wrap phase, achieving efficient three-dimensional measurements.

Benefits of technology

This method does not require additional stripe pictures or complex post-processing calculations, effectively improving the accuracy and speed of three-dimensional measurements, and solves the problems of noise amplification and inefficiency in traditional methods.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119417916A_ABST
    Figure CN119417916A_ABST
Patent Text Reader

Abstract

The invention discloses a high-efficiency stripe coding and decoding method and device, electronic equipment and a storage medium. The method comprises the following steps: generating a coding stripe sequence according to stripe parameters; generating a reference phase for intermediate-frequency phase unwrapping according to the calibration parameters; acquiring image information with a coded stripe sequence, and calculating a wrapped phase and a space-variant phase shift according to the image information; recovering the space-variant phase shift into an intermediate-frequency wrapped phase according to the reference phase; and performing phase unwrapping on the intermediate frequency wrapped phase according to the reference phase, and obtaining a final unwrapped phase for three-dimensional calculation. According to the invention, the intermediate-frequency phase is embedded into stripe coding in the form of cyclic space-variant phase shift, the high-frequency phase and the intermediate-frequency phase can be obtained at the same time without using additional stripes, the intermediate-frequency wrapped phase is unwrapped by using the pre-calculated reference phase plane, the high-frequency wrapped phase is further unwrapped, and the high-frequency wrapped phase is further unwrapped. The problem that when a traditional method is used for high-frequency fringe analysis, the phase amplification factor is too high, and consequently phase unwrapping is unstable is effectively solved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of three-dimensional measurement, and in particular to an efficient fringe encoding and decoding method, device, electronic equipment and storage medium. Background Art

[0002] Fringe projection profilometry is a 3D measurement method commonly used in high-precision industrial measurement scenarios such as industrial inspection, intelligent manufacturing and reverse engineering. The basic process is: a series of sinusoidal fringe patterns are projected onto the surface of the object to be measured by a projector, the deformed fringe patterns are photographed by a camera and the phase information is extracted, and the pixel matching between the camera and the projector is established based on the extracted phase to calculate the 3D coordinates. However, since the fringe decoding calculation requires the use of the inverse tangent function, only the wrapped phase truncated between (-π,π) can be obtained. The process of recovering the absolute phase through the truncated wrapped phase is called phase unwrapping (or phase unwrapping, phase unwrapping). Increasing the frequency of the coded fringe is an important factor in improving the accuracy of 3D measurement. The extracted phase is highly wrapped. Therefore, phase unwrapping is the core step of fringe projection 3D measurement.

[0003] Existing phase unwrapping methods mainly include spatial phase unwrapping methods, temporal phase unwrapping methods, composite fringe-based methods, and geometric constraint-based methods. However, these existing methods are difficult to simultaneously meet the requirements of high precision, high efficiency, and high measurement range. Figure 1 The temporal phase unwrapping method based on multi-frequency phase shift fringes is one of the most widely used methods. The core idea is to use the additional low-frequency phase to calculate the phase order of the high-frequency wrapped phase, and then unwrap it. Taking dual-frequency phase unwrapping as an example, a sinusoidal fringe sequence with different frequencies is projected, and the high frequency and low frequency are denoted as f respectively. h and f l , the high-frequency and low-frequency phases directly extracted from the fringe sequence are denoted as φ h and φ l , and the corresponding absolute phase is denoted as Φ h and Φ l , then the following holds:

[0004] Φ h =φ h +2πk h (1)

[0005] Φ l =φ l +2πk l (2)

[0006] where k h and k lare the phase orders of the high-frequency and low-frequency wrapped phases, respectively. In practical applications, the frequency of the low-frequency fringe is 1, and the phase is within the range of 2π, so there is no ambiguity. Therefore, the fringe order of the high-frequency wrapped phase can be calculated using the low-frequency phase:

[0007]

[0008] Then substitute the calculated result into equation (1) to get the final high-frequency unfolded phase, which is used for the subsequent three-dimensional shape calculation. Therefore, whether the high-frequency fringe order can be correctly calculated is the decisive factor for the measurement accuracy. However, in practical applications, due to the influence of factors such as sensor noise and vibration, noise is inevitably present in the solved high-frequency and low-frequency phases. It can be seen from equation (3) that in the process of calculating the phase order, the noise in the low-frequency phase is amplified, and the amplification factor is f h / f l When the frequency of high-frequency fringes is high, the noise amplification factor is high, which leads to errors in the calculation of the fringe order and thus produces erroneous measurement results.

[0009] To solve this problem, traditional time phase unwrapping methods usually add extra frequency fringe sequences. In addition to the original high-frequency and low-frequency fringes, additional intermediate-frequency fringes are added, and the intermediate-frequency phase is unwrapped by the low-frequency phase. The high-frequency fringes are further unwrapped with the unwrapped result, thereby reducing the noise amplification factor. However, the extra fringes further reduce the measurement efficiency. The problem of excessive noise amplification factor also exists in phase unwrapping methods based on composite fringes. These methods usually embed additional low-frequency signals into the original fringes and unwrap the high-frequency wrapped phase by extracting the low-frequency signals. However, the frequency ratio of the embedded low-frequency signal and the high-frequency wrapped phase is too high, resulting in unstable phase unwrapping. Summary of the invention

[0010] In order to solve at least one of the technical problems existing in the prior art to a certain extent, the object of the present invention is to provide an efficient fringe encoding and decoding method, device, electronic device and storage medium for precise three-dimensional measurement.

[0011] The first technical solution adopted by the present invention is:

[0012] An efficient stripe encoding and decoding method comprises the following steps:

[0013] Generate a coded stripe sequence according to stripe parameters;

[0014] generating a reference phase for intermediate frequency phase unwrapping according to calibration parameters;

[0015] Acquire image information with a coded fringe sequence, and calculate the wrapped phase and space-varying phase shift according to the image information;

[0016] The space-variant phase shift is restored to the intermediate frequency wrapped phase according to the reference phase;

[0017] The intermediate frequency wrapped phase is phase unwrapped according to the reference phase, and the final unwrapped phase is obtained for three-dimensional calculation.

[0018] Furthermore, the fringe parameters include: fringe mean, fringe amplitude, coding phase and cyclic space-varying phase shift.

[0019] The expression of the coding stripe sequence is:

[0020] I0(u,v)=I′+I″cos[Φ(u,v)-α(u,v)]

[0021] I1(u,v)=I′+I″cos[Φ(u,v)-α(u,v)+π / 2]

[0022] I2(u,v)=I′+I″cos[Φ(u,v)+α(u,v)+π]

[0023] I3(u,v)=I′+I″cos[Φ(u,v)+α(u,v)+3π / 2]

[0024] Where I′ and I″ are the fringe mean and fringe amplitude, respectively; I0(u,v), I1(u,v), I2(u,v) and I3(u,v) are the intensity values ​​of the (u,v) pixel in the 1st, 2nd, 3rd and 4th pictures taken, respectively; Φ(u,v) is the encoding phase; (u,v) is the cyclic space-variable phase shift.

[0025] Furthermore, the expression of the coding phase Φ(u,v) is:

[0026] Φ(u,v)=2πu / λ h

[0027] In the formula, λ h is the wavelength of the high frequency encoding phase;

[0028] The cyclic space-variable phase shift α(u,v) is converted from the intermediate frequency phase:

[0029] Assume that the equivalent wavelength of the intermediate frequency phase is λ m , then the intermediate frequency phase can be expressed as:

[0030] Φ m (u,v)=2πu / λ m

[0031] The expression of the cyclic empty phase shift is:

[0032]

[0033] wrap(Φ m (u,v))=Φ m (u,v)mod 2π

[0034] In the formula, k u Indicates the equivalent fringe order of the intermediate frequency phase.

[0035] Further, generating a reference phase for intermediate frequency phase unwrapping according to the calibration parameters includes:

[0036] According to the structured light imaging model, the following formula holds true:

[0037] s c [u c ,v c ,1] T =P c [x w ,y w ,z w ,1] T

[0038] s p [u p ,v p ,1] T =P p [x w ,y w ,z w ,1] T

[0039] In the formula, s c and p is the scaling factor, u c ,v c is the camera pixel coordinate, u p ,v p is the projected pixel coordinate, x w ,y w ,z w is the three-dimensional space coordinate, P c ,P p are the calibration parameters of the camera and projector;

[0040] The distance from the camera center is z ref The plane of z is taken as the reference plane. ref Substitute into the above formula and determine the reference phase in combination with the space-variable phase shift equivalent wavelength.

[0041] Further, the calculating of the wrapped phase and the space-variant phase shift according to the image information comprises:

[0042] For any camera pixel (u c ,v c ), the wrapping phase is calculated by:

[0043]

[0044] The space-variable phase shift is calculated by the following formula:

[0045]

[0046] Further, the method of restoring the wrapped phase to the intermediate frequency wrapped phase according to the fringe parameters and the space-variant phase shift includes:

[0047] Based on the space-variable phase shift, the fringe order k of the reference phase ref (u) All the same values ​​form a set

[0048] For each set, the phase maximum coordinates are determined according to the parity of the fringe order of the reference phase. or minimum value

[0049] According to the collection The relationship between each element and the maximum value coordinate or the minimum value coordinate divides the set into two subsets L(k ref ) and R(k ref );

[0050] The subset is processed according to the parity of the fringe order of the reference phase to obtain the intermediate frequency wrapped phase.

[0051] Further, performing phase unwrapping on the intermediate frequency wrapped phase according to the reference phase and obtaining the final unwrapped phase includes:

[0052] Calculate the fringe order of the intermediate frequency wrapped phase using the reference phase;

[0053] The intermediate frequency wrapped phase is expanded according to the calculated fringe order, and the high frequency wrapped phase is further expanded according to the expanded intermediate frequency phase to obtain the final expanded phase.

[0054] The second technical solution adopted by the present invention is:

[0055] An efficient stripe encoding and decoding device, comprising:

[0056] A coding stripe module, used for generating a coding stripe sequence according to stripe parameters;

[0057] A reference calibration module, used for generating a reference phase for intermediate frequency phase unwrapping according to calibration parameters;

[0058] An image calculation module is used to obtain image information with a coded fringe sequence and calculate the wrapped phase and space-variant phase shift according to the image information;

[0059] An intermediate frequency calculation module, used for restoring the space-variable phase shift to an intermediate frequency wrapped phase according to a reference phase;

[0060] The phase unwrapping module is used to perform phase unwrapping on the intermediate frequency wrapped phase according to the reference phase and obtain the final unwrapped phase for three-dimensional calculation.

[0061] The third technical solution adopted by the present invention is:

[0062] An electronic device comprises a processor and a memory, wherein the memory stores at least one instruction, at least one program, a code set or an instruction set, and the at least one instruction, the at least one program, the code set or the instruction set is loaded and executed by the processor to implement the method as described above.

[0063] The fourth technical solution adopted by the present invention is:

[0064] A computer-readable storage medium stores at least one instruction, at least one program, a code set or an instruction set, wherein the at least one instruction, the at least one program, the code set or the instruction set is loaded and executed by a processor to implement the method as described above.

[0065] The fifth technical solution adopted by the present invention is:

[0066] A computer program product or a computer program includes computer instructions stored in a computer-readable storage medium. A processor of a computer device can read the computer instructions from the computer-readable storage medium, and the processor executes the computer instructions, so that the computer device executes the above method.

[0067] The beneficial effects of the present invention are as follows: the present invention embeds the intermediate frequency phase into the fringe code in the form of a cyclic space-varying phase shift, and can simultaneously obtain the high-frequency and intermediate frequency phases without using additional fringes. The intermediate frequency wrapped phase is unfolded by using a pre-calculated reference phase plane, and the high-frequency wrapped phase is further unfolded, which effectively solves the problem of unstable phase unfolding caused by excessive phase magnification when the traditional method is used for high-frequency fringe analysis. BRIEF DESCRIPTION OF THE DRAWINGS

[0068] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the embodiments of the present invention or the drawings of related technical solutions in the prior art are introduced below. It should be understood that the drawings introduced below are only for the convenience of clearly describing some embodiments of the technical solutions of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative work.

[0069] Figure 1 It is a schematic diagram of using low-frequency absolute phase to unwrap high-frequency wrapped phase;

[0070] Figure 2 Schematic diagram of the relationship between the cyclic space-variable phase shift and the equivalent intermediate frequency phase in an embodiment of the present invention;

[0071] Figure 3 is a schematic diagram of restoring the intermediate frequency wrapped phase by cyclic space-variable phase shifting in an embodiment of the present invention;

[0072] Figure 4 It is a flowchart of the steps of an efficient stripe encoding and decoding method in an embodiment of the present invention. DETAILED DESCRIPTION

[0073] The embodiments of the present invention are described in detail below, and examples of the embodiments are shown in the accompanying drawings, wherein the same or similar reference numerals throughout represent the same or similar elements or elements having the same or similar functions. The embodiments described below with reference to the accompanying drawings are exemplary and are only used to explain the present invention, and are not to be construed as limitations of the present invention. For the step numbers in the following embodiments, they are only provided for the convenience of explanation, and the order between the steps is not limited in any way, and the execution order of each step in the embodiment can be adaptively adjusted according to the understanding of those skilled in the art.

[0074] In the description of the present invention, it should be understood that descriptions involving orientations, such as up, down, front, back, left, right, etc., and orientations or positional relationships indicated are based on the orientations or positional relationships shown in the accompanying drawings, and are only for the convenience of describing the present invention and simplifying the description, and do not indicate or imply that the device or element referred to must have a specific orientation, be constructed and operated in a specific orientation, and therefore should not be understood as a limitation on the present invention.

[0075] In the description of the present invention, "several" means one or more, "more" means more than two, "greater than", "less than", "exceed" etc. are understood as not including the number itself, and "above", "below", "within" etc. are understood as including the number itself. If there is a description of "first" or "second", it is only used for the purpose of distinguishing the technical features, and cannot be understood as indicating or implying the relative importance or implicitly indicating the number of the indicated technical features or implicitly indicating the order of the indicated technical features.

[0076] In the description of the present invention, unless otherwise clearly defined, terms such as setting, installing, connecting, etc. should be understood in a broad sense, and technicians in the relevant technical field can reasonably determine the specific meanings of the above terms in the present invention based on the specific content of the technical solution.

[0077] Example 1

[0078] like Figure 4As shown, this embodiment provides an efficient fringe encoding and decoding method, which can be applied to precise three-dimensional measurement. The method specifically includes the following steps:

[0079] S1. Generate a coded stripe sequence according to stripe parameters.

[0080] Steps S1 and S2 belong to the fringe encoding link, which mainly generates a coded fringe sequence and determines a reference phase for subsequent phase unwrapping.

[0081] In some embodiments, the fringe parameters mainly include the fringe mean and fringe amplitude, the coding phase frequency and the space-variable phase shift frequency. Specifically, the fringe can be expressed as:

[0082] I0(u,v)=I′+I″cos[Φ(u,v)-α(u,v)]

[0083] I1(u,v)=I′+I″cos[Φ(u,v)-α(u,v)+π / 2]

[0084] I2(u,v)=I′+I″cos[Φ(u,v)+α(u,v)+π]

[0085] I3(u,v)=I′+I″cos[Φ(u,v)+α(u,v)+3π / 2]

[0086] Where I′ and I″ are the fringe mean and fringe amplitude, respectively; Φ(u,v) is the coding phase; (u,v) is the cyclic space-variable phase shift. The expression of the coding phase Φ(u,v) is:

[0087] Φ(u,v)=2πu / λ h

[0088] In the formula, λ h is the wavelength of the high frequency encoded phase.

[0089] The cyclic phase shift α(u,v) is converted from the intermediate frequency phase:

[0090] Assume that the equivalent wavelength of the intermediate frequency phase is λ m , then the intermediate frequency phase can be expressed as:

[0091] Φ m (u,v)=2πu / λ m

[0092] The expression of the cyclic empty phase shift is:

[0093]

[0094] in:

[0095] wrap(Φ m(u,v))=Φ m (u,v)mod 2π

[0096] k u =floor(u / λ m )

[0097] In the formula, k u The relationship between the cyclic space-variable phase shift and the equivalent intermediate frequency phase is as follows: Figure 2 As shown. The normalized cyclic space-variable phase shift can be obtained by the following formula:

[0098]

[0099] S2. Generate a reference phase for intermediate frequency phase unwrapping according to the calibration parameters.

[0100] The calibration parameters can be obtained through system calibration. The calibration process of the structured light system is relatively mature and will not be expanded here. According to the structured light imaging model, the following formula is established:

[0101] s c [u c ,v c ,1] T =P c [x w ,y w ,z w ,1] T

[0102] s p [u p ,v p ,1] T =P p [x w ,y w ,z w ,1] T

[0103] In the formula, s c and p is the scaling factor, u c ,v c is the camera pixel coordinate, u p ,v p is the projected pixel coordinate, x w ,y w ,z w is the three-dimensional space coordinate, P c ,P p are the calibration parameters of the camera and projector, both are 3x4 matrices.

[0104] The reference phase is calculated by first specifying a plane in space as a virtual reference plane, which can be a plane with a distance z from the camera center. ref The plane of z is taken as the reference plane. ref Substituting into the above formula, we can calculate (u c ,v c ), the corresponding projector pixel (u p ,v p ), combined with the space-variable phase shift equivalent wavelength, the reference phase can be determined.

[0105] As some optional implementations, taking U-direction encoding as an example, the reference phase of any camera pixel is calculated as:

[0106] Φ ref (u c ,v c )=2πu / λ l

[0107] The fringe order of the reference phase is calculated as:

[0108]

[0109] S3. Obtain image information with a coded fringe sequence, and calculate the wrapped phase and space-varying phase shift according to the image information.

[0110] Steps S3-S5 belong to the fringe decoding link, which mainly calculates the phase information through the photographed deformation fringes.

[0111] After obtaining the image information with the coded fringe sequence, the wrapped phase and space-varying phase shift calculations are performed. c ,v c ), the wrapping phase can be calculated by the following formula:

[0112]

[0113] At the same time, the space-variable phase shift is calculated by the following formula:

[0114]

[0115] S4. Restore the space-variant phase shift to the intermediate frequency wrapped phase according to the reference phase.

[0116] See also Figure 3 The space-time phase shift obtained in the step is as follows Figure 3 As shown by the blue solid line, Figure 3 The reference phase shown by the black solid line in the middle is restored to the intermediate frequency wrapped phase. First, the reference phase fringe level k ref (u) All the same values ​​form a set For each set, the phase maximum coordinates are determined according to the parity of the reference phase fringe order. or minimum value Then, the set is further divided into two subsets L(k ref ) and R(k ref ). The above process can be described by the following formula:

[0117]

[0118] Finally, the subsets are processed according to the parity of the reference phase fringe order. Figure 3 Medium k ref = 2, keep the subset L(2) unchanged, and reverse the subset R(2); and for k ref =3, invert the subset L(3) while keeping the subset R(3) unchanged. The above process can be expressed as:

[0119]

[0120] The intermediate frequency wrapping phase can be restored through the above formula.

[0121] S5. Perform phase unwrapping on the intermediate frequency wrapped phase according to the reference phase, and obtain the final unwrapped phase for three-dimensional calculation.

[0122] In some embodiments, the fringe order of the intermediate frequency wrapped phase is first calculated using the reference phase:

[0123]

[0124] Unwrap the intermediate frequency wrapped phase according to the calculated fringe order:

[0125] Φ m (u,v)=φ m (u,v)+2πk m (u,v)

[0126] Similarly, the high-frequency wrapped phase is further expanded according to the expanded intermediate-frequency phase to obtain the final expanded phase, and three-dimensional calculation can be performed.

[0127] Specifically, after obtaining the absolute phase, the phase of each camera pixel (u c ,v c ) corresponds to the projector pixel (u p ,v p ), as well as the calculation of three-dimensional coordinates and the solution of multivariate linear equations will not be repeated here.

[0128] In general, traditional phase unwrapping methods usually rely on projecting additional fringe images or complex calculations. Especially when processing high-frequency fringes to achieve higher measurement accuracy, traditional methods rely on a large number of additional images to reduce the noise amplification factor. Therefore, traditional methods have bottlenecks in efficiency and accuracy. The fringe encoding method proposed in the scheme of the present invention does not need to rely on additional fringe images or complex post-processing calculations, effectively improving the three-dimensional measurement accuracy and speed. Specifically, the scheme of the present invention simultaneously extracts the high-frequency wrapped phase and the intermediate-frequency space-variant phase shift through only four images, and uses geometric constraints to expand the intermediate-frequency space-variant phase shift, thereby further expanding the high-frequency wrapped phase and obtaining the absolute phase.

[0129] In summary, compared with the prior art, the present invention has at least the following advantages and beneficial effects:

[0130] (1) Traditional methods usually rely on projecting additional fringe images to obtain absolute phase information. However, the projection, acquisition, and decoding calculation of additional fringe images will increase the time cost, resulting in low measurement efficiency. The solution of the present invention only uses four fringe coding images to obtain absolute phase, does not rely on additional fringe image projection or complex calculation process, and therefore has significant advantages in efficiency.

[0131] (2) Increasing the fringe frequency is an important way to optimize the three-dimensional measurement accuracy. However, the traditional method is limited by the noise amplification problem and is difficult to effectively process high-frequency fringes, so there is an accuracy bottleneck. The proposed method can obtain the high-frequency absolute phase using only four fringe images without increasing the number of coded fringes, so it has a significant advantage in measurement accuracy.

[0132] Example 2

[0133] This embodiment provides an efficient stripe encoding and decoding device, including:

[0134] A coding stripe module, used for generating a coding stripe sequence according to stripe parameters;

[0135] A reference calibration module, used for generating a reference phase for intermediate frequency phase unwrapping according to calibration parameters;

[0136] An image calculation module is used to obtain image information with a coded fringe sequence and calculate the wrapped phase and space-variant phase shift according to the image information;

[0137] An intermediate frequency calculation module, used for restoring the space-variable phase shift to an intermediate frequency wrapped phase according to a reference phase;

[0138] The phase unwrapping module is used to perform phase unwrapping on the intermediate frequency wrapped phase according to the reference phase and obtain the final unwrapped phase for three-dimensional calculation.

[0139] Since the device is an efficient stripe encoding and decoding device of an embodiment of the present invention, and the principle of solving the problem by the device is similar to that of the method, the implementation of the device can refer to the implementation process of the above method embodiment, and the repeated parts will not be repeated.

[0140] Example 3

[0141] An embodiment of the present invention further provides an electronic device, the electronic device comprising a processor and a memory, the memory storing at least one instruction, at least one program, a code set or an instruction set, the at least one instruction, the at least one program, the code set or the instruction set being loaded and executed by the processor to implement the following Figure 1 An efficient stripe encoding and decoding method is shown.

[0142] It is understood that the memory may include a random access memory (RAM) or a read-only memory (ROM). Optionally, the memory includes a non-transitory computer-readable storage medium. The memory may be used to store instructions, programs, codes, code sets, or instruction sets. The memory may include a program storage area and a data storage area, wherein the program storage area may store instructions for implementing an operating system, instructions for at least one function, instructions for implementing the above-mentioned various method embodiments, etc.; the data storage area may store data created according to the use of the server, etc.

[0143] The processor may include one or more processing cores. The processor uses various interfaces and lines to connect the various parts of the entire server, and executes various functions of the server and processes data by running or executing instructions, programs, code sets or instruction sets stored in the memory, and calling data stored in the memory. Optionally, the processor can be implemented in at least one hardware form of digital signal processing (DSP), field programmable gate array (FPGA), and programmable logic array (PLA). The processor can integrate one or a combination of a central processing unit (CPU) and a modem. Among them, the CPU mainly processes the operating system and application programs; the modem is used to process wireless communications. It can be understood that the above-mentioned modem may not be integrated into the processor, but implemented separately through a chip.

[0144] Since the electronic device is an electronic device corresponding to an efficient stripe encoding and decoding method of an embodiment of the present invention, and the principle of solving the problem by the electronic device is similar to that of the method, the implementation of the electronic device can refer to the implementation process of the above-mentioned method embodiment, and the repeated parts will not be repeated.

[0145] Example 4

[0146] The embodiment of the present invention further provides a computer-readable storage medium, wherein the storage medium stores at least one instruction, at least one program, code set or instruction set, and the at least one instruction, the at least one program, the code set or instruction set is loaded and executed by a processor to implement the following Figure 4 An efficient stripe encoding and decoding method is shown.

[0147] Those skilled in the art can understand that all or part of the steps in the various methods of the above embodiments can be completed by instructing related hardware through a program, and the program can be stored in a computer-readable storage medium, and the storage medium includes a read-only memory (ROM), a random access memory (RAM), a programmable read-only memory (PROM), an erasable programmable read-only memory (EPROM), a one-time programmable read-only memory (OTPROM), an electronically erasable rewritable read-only memory (EEPROM), a compact disc (CD-ROM) or other optical disc storage, magnetic disk storage, magnetic tape storage, or any other computer-readable medium that can be used to carry or store data.

[0148] Since the storage medium is a storage medium corresponding to an efficient stripe encoding and decoding method of an embodiment of the present invention, and the principle of solving the problem by the storage medium is similar to that of the method, the implementation of the storage medium can refer to the implementation process of the above-mentioned method embodiment, and the repeated parts will not be repeated.

[0149] Example 5

[0150] In some possible implementations, various aspects of the method of the embodiment of the present invention may also be implemented in the form of a program product, which includes a program code. When the program product is run on a computer device, the program code is used to enable the computer device to perform the steps of an efficient stripe encoding and decoding method according to various exemplary embodiments of the present application described above in this specification. Among them, the executable computer program code or "code" for executing each embodiment can be written in a high-level programming language such as C, C++, C#, Smalltalk, Java, JavaScript, Visual Basic, structured query language (e.g., Transact-SQL), Perl, or in various other programming languages.

[0151] It should be understood that the various parts of the present invention can be implemented by hardware, software, firmware or a combination thereof. In the above-mentioned embodiments, a plurality of steps or methods can be implemented by software or firmware stored in a memory and executed by a suitable instruction execution system. For example, if implemented by hardware, as in another embodiment, it can be implemented by any one of the following technologies known in the art or their combination: a discrete logic circuit having a logic gate circuit for implementing a logic function for a data signal, a dedicated integrated circuit having a suitable combination of logic gate circuits, a programmable gate array (PGA), a field programmable gate array (FPGA), etc.

[0152] In the description of this specification, the description with reference to the terms "one embodiment", "some embodiments", "example", "specific example", or "some examples" etc. means that the specific features, structures, materials or characteristics described in conjunction with the embodiment or example are included in at least one embodiment or example of the present invention. In this specification, the schematic representations of the above terms do not necessarily refer to the same embodiment or example. Moreover, the specific features, structures, materials or characteristics described may be combined in any one or more embodiments or examples in a suitable manner. In addition, those skilled in the art may combine and combine the different embodiments or examples described in this specification and the features of the different embodiments or examples, without contradiction.

[0153] The above embodiments are only for illustrating the technical concept and features of the present invention, and their purpose is to enable ordinary technicians in the field to understand the content of the present invention and implement it accordingly, and they cannot be used to limit the protection scope of the present invention. Any equivalent changes or modifications made based on the essence of the content of the present invention should be included in the protection scope of the present invention.

Claims

1. An efficient stripe encoding and decoding method, characterized in that: The following steps are involved: Generate a coded stripe sequence according to stripe parameters; generating a reference phase for intermediate frequency phase unwrapping according to calibration parameters; Acquire image information with a coded fringe sequence, and calculate the wrapped phase and space-varying phase shift according to the image information; The space-variant phase shift is restored to the intermediate frequency wrapped phase according to the reference phase; The intermediate frequency wrapped phase is phase unwrapped according to the reference phase, and the final unwrapped phase is obtained.

2. The efficient stripe encoding and decoding method according to claim 1, characterized in that: The fringe parameters include: fringe mean, fringe amplitude, coding phase and cyclic space-variable phase shift; The expression of the coding stripe sequence is: I0(u,v)=I′+I″cos[Φ(u,v)-α(u,v)] I1(u,v)=I′+I″cos[Φ(u,v)-α(u,v)+π / 2] I2(u,v)=I′+I″cos[Φ(u,v)+α(u,v)+π] I3(u,v)=I′+I″cos[Φ(u,v)+α(u,v)+3π / 2] Where I′ and I″ are the fringe mean and fringe amplitude, respectively; I0(u,v), I1(u,v), I2(u,v) and I3(u,v) are the intensity values ​​of the (u,v) pixel in the 1st, 2nd, 3rd and 4th pictures taken, respectively; Φ(u,v) is the encoding phase; (u,v) is the cyclic space-variable phase shift.

3. The efficient stripe encoding and decoding method according to claim 2, characterized in that: The expression of the coding phase Φ(u,v) is: Φ(u,v)=2πu / λ h In the formula, λ h is the wavelength of the high frequency encoding phase; The cyclic space-variable phase shift α(u,v) is converted from the intermediate frequency phase: Assume that the equivalent wavelength of the intermediate frequency phase is λ m , then the intermediate frequency phase can be expressed as: F m (u,v)=2πu / λ m The expression of the cyclic empty phase shift is: wrap(Φ m (u,v))=Φ m (u,v)mod 2π In the formula, k u Indicates the equivalent fringe order of the intermediate frequency phase.

4. The efficient stripe encoding and decoding method according to claim 1, characterized in that: The step of generating a reference phase for intermediate frequency phase unwrapping according to the calibration parameters comprises: According to the structured light imaging model, the following formula holds true: s c [u c ,v c ,1] T =P c [x w ,y w ,z w ,1] T s p [u p ,v p ,1] T =P p [x w ,y w ,z w ,1] T In the formula, s c and p is the scaling factor, u c ,v c is the camera pixel coordinate, u p ,v p is the projected pixel coordinate, x w ,y w ,z w is the three-dimensional space coordinate, P c ,P p are the calibration parameters of the camera and projector; The distance from the camera center is z ref The plane of z is taken as the reference plane. ref Substitute into the above formula and determine the reference phase in combination with the space-variable phase shift equivalent wavelength.

5. The efficient stripe encoding and decoding method according to claim 1, characterized in that: The step of calculating the wrapped phase and the space-variant phase shift according to the image information comprises: For any camera pixel (u c ,v c ), the wrapping phase is calculated by: The space-variable phase shift is calculated by the following formula:

6. The efficient stripe encoding and decoding method according to claim 1, characterized in that: The method of restoring the wrapped phase to the intermediate frequency wrapped phase according to the fringe parameters and the space-variant phase shift comprises: Based on the space-variable phase shift, the fringe order k of the reference phase ref (u) All the same values ​​form a set For each set, the phase maximum coordinates are determined according to the parity of the fringe order of the reference phase. or minimum value According to the collection The relationship between each element and the maximum value coordinate or the minimum value coordinate divides the set into two subsets L(k ref ) and R(k ref ); The subset is processed according to the parity of the fringe order of the reference phase to obtain the intermediate frequency wrapped phase.

7. The efficient stripe encoding and decoding method according to claim 1, characterized in that: The phase unwrapping of the intermediate frequency wrapped phase according to the reference phase and obtaining the final unwrapped phase includes: Calculate the fringe order of the intermediate frequency wrapped phase using the reference phase; The intermediate frequency wrapped phase is expanded according to the calculated fringe order, and the high frequency wrapped phase is further expanded according to the expanded intermediate frequency phase to obtain the final expanded phase.

8. An efficient stripe encoding and decoding device, characterized in that: include: A coding stripe module, used for generating a coding stripe sequence according to stripe parameters; A reference calibration module, used for generating a reference phase for intermediate frequency phase unwrapping according to calibration parameters; An image calculation module is used to obtain image information with a coded fringe sequence and calculate the wrapped phase and space-variant phase shift according to the image information; An intermediate frequency calculation module, used for restoring the space-variable phase shift to an intermediate frequency wrapped phase according to a reference phase; The phase unwrapping module is used to perform phase unwrapping on the intermediate frequency wrapped phase according to the reference phase and obtain the final unwrapped phase.

9. An electronic device, characterized in that: The electronic device includes a processor and a memory, wherein the memory stores at least one instruction, at least one program, a code set or an instruction set, and the at least one instruction, the at least one program, the code set or the instruction set is loaded and executed by the processor to implement the method described in any one of claims 1 to 7.

10. A computer-readable storage medium, characterized in that: The storage medium stores at least one instruction, at least one program, a code set or an instruction set, and the at least one instruction, the at least one program, the code set or the instruction set is loaded and executed by the processor to implement the method according to any one of claims 1 to 7.