CN114812438B - Time multiplexing structured light coding and decoding method - Google Patents

Time multiplexing structured light coding and decoding method Download PDF

Info

Publication number
CN114812438B
CN114812438B CN202210360564.0A CN202210360564A CN114812438B CN 114812438 B CN114812438 B CN 114812438B CN 202210360564 A CN202210360564 A CN 202210360564A CN 114812438 B CN114812438 B CN 114812438B
Authority
CN
China
Prior art keywords
phase
pattern
patterns
structured light
coding
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202210360564.0A
Other languages
Chinese (zh)
Other versions
CN114812438A (en
Inventor
吴周杰
王浩然
张启灿
郭文博
陈正东
李训仁
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Sichuan University
Original Assignee
Sichuan University
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Sichuan University filed Critical Sichuan University
Priority to CN202210360564.0A priority Critical patent/CN114812438B/en
Publication of CN114812438A publication Critical patent/CN114812438A/en
Application granted granted Critical
Publication of CN114812438B publication Critical patent/CN114812438B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G01MEASURING; TESTING
    • G01BMEASURING LENGTH, THICKNESS OR SIMILAR LINEAR DIMENSIONS; MEASURING ANGLES; MEASURING AREAS; MEASURING IRREGULARITIES OF SURFACES OR CONTOURS
    • G01B11/00Measuring arrangements characterised by the use of optical techniques
    • G01B11/24Measuring arrangements characterised by the use of optical techniques for measuring contours or curvatures
    • G01B11/25Measuring arrangements characterised by the use of optical techniques for measuring contours or curvatures by projecting a pattern, e.g. one or more lines, moiré fringes on the object
    • G01B11/254Projection of a pattern, viewing through a pattern, e.g. moiré
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/50Depth or shape recovery
    • G06T7/521Depth or shape recovery from laser ranging, e.g. using interferometry; from the projection of structured light

Landscapes

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

Abstract

The invention relates to the field of computer vision three-dimensional measurement and calculation, in particular to a time multiplexing structured light coding and decoding method which comprises the step S1 of circularly projecting a sequence chart to an object to be detected, wherein the sequence chart comprises a four-step phase-shift fringe chart and M structured light coding charts, so that in the sequence of patterns generated after circular projection, two phase-shift fringe charts in the four-step phase-shift fringe chart are separately arranged in a structured light coding chart EP m The phase difference of the front phase-shift fringe pattern and the rear phase-shift fringe pattern is pi, and the other two phase-shift fringe patterns are separately arranged on the structured light coding pattern EP m+1 Before and after; wherein m is more than or equal to 1<M; s2, calculating the background light intensity by using two phase shift fringe patterns before and after the structured light coding pattern; s3, calculating a truncation phase by using the background light intensity; s4, using the structured light coding pattern EP m And multiplexing M-1 structured light coding patterns closest to the M-1 structured light coding patterns to calculate the order, and unfolding the truncation phase into a continuous phase. The invention reduces the number of the projection structure optical coding patterns and greatly improves the coding and decoding efficiency.

Description

Time multiplexing structured light coding and decoding method
Technical Field
The invention relates to the field of computer vision three-dimensional measurement and calculation, in particular to a time multiplexing structured light coding and decoding method.
Background
In recent years, the phase shift fringe measurement technology is beginning to be widely applied in the field of computer vision measurement and calculation with the advantages of cost, high precision, good real-time performance, strong anti-interference capability and the like. The general method of measurement is: projecting the phase-shift stripe pattern and one or more coding patterns onto the surface of an object to be measured, and shooting by a camera at a position forming a certain angle with the projection direction to obtain a projection image; calculating a truncation phase through a phase shift algorithm, marking each period of the truncation phase by a coding pattern, unfolding the truncation phase into a continuous phase in an auxiliary manner, and finally converting phase information into three-dimensional shape information through calibration.
With the rapid development of computer technology, projection and imaging devices are continuously updated, a phase shift fringe measurement technology is extended to a high-speed dynamic three-dimensional scene, in the high-speed three-dimensional measurement, in order to reduce phase errors caused by motion, a projection and shooting speed is usually set to be much higher than an object motion speed (exceeding several kilohertz), and there is a high requirement on a speed for calculating morphology, whereas the existing measurement technology based on a phase shift method is generally low in coding efficiency in dynamic measurement, for example, in a traditional static scene, taking a gray code combined with a phase shift technology as an example, when a coding cycle number is 16, at least three phase shift patterns and four gray code patterns are required to complete one measurement of an object to be measured, so in an application scene of the high-speed three-dimensional measurement, a large number of images need to be processed. Therefore, there is a need for an encoding and decoding method capable of increasing the processing speed for recovering the object phase in a high-speed dynamic scene.
Disclosure of Invention
The invention aims to solve the problem of large image processing capacity in a high-speed three-dimensional measurement scene in the prior art and provides a time-multiplexed structured light coding and decoding method.
In order to achieve the above object, the present invention provides the following technical solutions:
a time-multiplexed structured light coding and decoding method comprises the following steps:
s1, circularly projecting a sequence diagram to an object to be measured, wherein the sequence diagram comprises four phase-shift fringe patterns and M structural optical coding patterns, and in the sequence of patterns generated after circular projection, two phase-shift fringe patterns in the four phase-shift fringe patterns are separately arranged on the M structural optical coding pattern EP m The phase difference between the front and the back phase-shift fringe patterns is pi, and the other two phase-shift fringe patterns in the four-step phase-shift fringe pattern are separately arranged in the m +1 th structural optical code pattern EP m+1 Before and after; wherein m is more than or equal to 1<M;
S2, calculating the background light intensity by using two phase-shift fringe patterns in front of and behind the structured light coding pattern;
s3, calculating a truncation phase by using the background light intensity;
s4, using the mth structured light coding pattern EP m And multiplexing M-1 structural light coding patterns closest to the M-1 structural light coding patterns to calculate the order, and unfolding the truncation phase into a continuous phase.
Further, the four-step phase-shift fringe pattern includes I 1 、I 2 、I 3 And I 4 Each fringe pattern is expressed by the following formula:
I 1 (x,y)=A(x,y)+B(x,y)cosφ(x,y)
Figure GDA0003996736470000021
I 3 (x,y)=A(x,y)+B(x,y)cos[φ(x,y)+π]
Figure GDA0003996736470000022
where A (x, y) is background light intensity, B (x, y)/A (x, y) represents fringe contrast, and φ (x, y) represents initial phase of the fringe.
Further, the mth structured light code pattern EP m The phase shift fringe patterns arranged in tandem are respectively I 4 And I 2 M +1 th structural optical code pattern EP m+1 The phase shift fringe patterns arranged in tandem are respectively I 1 And I 3 And m satisfies the condition mod (m, 2) =0, where mod denotes taking the remainder for 2 with m.
Further, the specific method in step S2 is to calculate and extract the background light intensity a (x, y, n) at the position by using two adjacent phase-shift fringe patterns before and after the nth structured light encoding pattern in the pattern arrangement generated after the circular projection, as shown in the following formula:
Figure GDA0003996736470000031
where mod denotes the remainder of n vs. 2, and when n is an even number, I 2 (x, y, n) represents the phase-shifted fringe pattern I before the nth structured-light encoded pattern 2 ,I 4 (x, y, n) represents the phase-shift fringe pattern I after the nth structural optical code pattern 4 (ii) a When n is an odd number, I 1 (x, y, n) represents the phase-shifted fringe pattern I before the nth structured-light encoded pattern 1 ,I 3 (x, y, n) represents the phase-shift fringe pattern I after the nth structural optical code pattern 3
Further, the formula for calculating the truncation phase Φ (x, y, n) using the background light intensity in step S3 is as follows:
Figure GDA0003996736470000032
further, the formula for expanding the truncated phase Φ (x, y, n) into the continuous phase Φ (x, y, n) in step S4 is as follows:
Φ(x,y,n)=φ(x,y,n)+2π*k(EP m (n)),m=1,2,3...M
wherein k represents the nth structured light code pattern EP multiplexed in the pattern arrangement generated after the cyclic projection 1 (n) and M-1 structured light patterns EP closest thereto 2 (n)、EP 3 (n)、EP 4 (n)...EP M (n) decoding the computational order.
Furthermore, the period of the four-step phase-shift fringe pattern is 16, the structured light coding pattern adopts 4 Gray code patterns, and the patterns are GC respectively 1 、GC 2 、GC 3 And GC 4 The sequence of the sequence chart is GCI 2 I 1 GC 2 I 3 I 4 GC 3 I 2 I 1 GC 4 I 3 I 4
Further, the formula of the decoding calculation order k is as follows:
Figure GDA0003996736470000041
where the LUT represents a known mapping relationship between lookup decimal code words and the level of striping.
Further, the period of the four-step phase-shift fringe pattern is 32, the structured light coding pattern adopts gray code patterns, the total number of the patterns is 5, and the patterns are respectively GC 1 、GC 2 、GC 3 、GC 4 And GC 5 The sequence chart is in the sequence of GC 1 I 2 I 1 GC 2 I 3 I 4 GC 3 I 2 I 1 GC 4 I 3 I 4 GC 5 I 2 I 1
Further, the formula of the decoding calculation order k is as follows:
Figure GDA0003996736470000042
where the LUT represents a known mapping relationship between lookup decimal code words and striping orders.
Compared with the prior art, the invention has the beneficial effects that:
the invention distributes two phase-shift fringe patterns with phase values different by pi in the four-step phase-shift fringe pattern on the mth structured light coding pattern EP m Before and after, another two phase-shift stripe patterns with phase value difference of pi are distributed on the m +1 th structural optical coding pattern EP m+1 Front and back, firstly using m-th structured light coding pattern EP m Calculating the background light intensity of two front and back phase-shift fringe patterns, calculating the truncation phase by using the background light intensity, and then using the m-th structured light coding pattern EP m Multiplexing M-1 structural light coding patterns closest to the structural light coding patterns (instead of re-projecting M-1 new structural light coding patterns each time) to calculate the level, and expanding the truncated phase into a continuous phase for converting the phase information into three-dimensional shape information; by the time multiplexing structured light coding method, only a new structured light coding pattern and two new phase shift fringe patterns before and after the new structured light coding pattern are needed to be read, other structured light coding patterns are multiplexed, one expansion phase can be calculated, each structured light coding pattern can be multiplexed for multiple times until the same next structured light coding pattern is replaced, the effectiveness of the original structured light coding method is ensured, and the structured light coding method multiplexes the structured light coding patterns on a time sequence at the same timeThe number of the projection structure optical coding patterns is reduced, the coding and decoding efficiency is greatly improved, and the method has important significance for application scenes of high-speed dynamic three-dimensional measurement.
Drawings
Fig. 1 is a flowchart of a time-multiplexed structured light coding and decoding method.
Fig. 2 is a diagram illustrating a conventional binary gray code sequence and a time-multiplexed binary gray code sequence according to the present invention.
Fig. 3 is a diagram illustrating a conventional binary gray code sequence and a time-multiplexed quad gray code according to the present invention.
FIG. 4 is a schematic flow chart of phase unwrapping using the conventional 3+4 method (three-step phase-shifted fringe pattern plus four structured-light-coded patterns).
Fig. 5 is a schematic flow chart of phase unwrapping by using the time-multiplexed binary gray code according to the present invention.
Detailed Description
The present invention will be described in further detail with reference to test examples and specific embodiments. It should be understood that the scope of the above-described subject matter of the present invention is not limited to the following examples, and any technique realized based on the contents of the present invention is within the scope of the present invention.
Example 1
A time-multiplexed structured light coding and decoding method, as shown in fig. 1, includes the following steps:
s1, circularly projecting a sequence diagram to an object to be measured, wherein the sequence diagram comprises four phase-shift fringe patterns and M structural optical coding patterns, and in the sequence of patterns generated after circular projection, two phase-shift fringe patterns in the four phase-shift fringe patterns are separately arranged on the M structural optical coding pattern EP m The phase difference between the front and the back phase-shift fringe patterns is pi, and the other two phase-shift fringe patterns in the four-step phase-shift fringe pattern are separately arranged in the m +1 th structural optical code pattern EP m+1 Before and after; wherein m is more than or equal to 1<M;
Specifically, the four-step phase shift stripe pattern comprises I 1 、I 2 、I 3 And I 4 Each fringe pattern is expressed by the following formula:
I 1 (x,y)=A(x,y)+B(x,y)cosφ(x,y)
Figure GDA0003996736470000061
I 3 (x,y)=A(x,y)+B(x,y)cos[φ(x,y)+π]
Figure GDA0003996736470000062
where A (x, y) is background light intensity, B (x, y)/A (x, y) represents fringe contrast, and φ (x, y) represents initial phase of the fringe.
M structured light coding pattern EP m The phase shift fringe patterns arranged in tandem are respectively I 4 And I 2 M +1 th structural optical code pattern EP m+1 The phase shift fringe patterns arranged in tandem are respectively I 1 And I 3 And m satisfies the condition mod (m, 2) =0, where mod represents the remainder for 2 with m;
in order to make the above arrangement more easily understood, the following can also be described:
according to I 2 、I 1 、I 3 、I 4 The phase-shift fringe patterns are circularly arranged in the sequence, and then the structured light code patterns are sequentially inserted into the sequence according to the interval of every two phase-shift fringe patterns. With M structured light-coding patterns (EP's respectively) 1 、EP 2 、…EP m …、EP M Expressed), the generated sequence S is:
Figure GDA0003996736470000071
where mod (M, 2) denotes the remainder for 2 with M. With two structured light-coding patterns (using EP respectively) 1 、EP 2 Expressed) for example, the last generated sequence is the EP 1 I 2 I 1 ;EP 2 I 3 I 4 ;EP 1 I 2 I 1 In subsequent calculations, each code pattern is compared with two phase shift patterns (e.g., EP) 1 I 2 I 1 ) Referred to as a sequence unit, each sequence unit has a corresponding number n on the time axis.
S2, calculating the background light intensity by using two phase shift fringe patterns before and after the structured light coding pattern;
specifically, the projected sequence is modulated by the object to be measured to be deformed, and the deformed fringe pattern is synchronously shot by a high-speed camera. For the sequence unit with the number of n, calculating and extracting the background light intensity A (x, y, n) by using two adjacent stripe patterns at the left and the right of the coding pattern:
Figure GDA0003996736470000072
where mod denotes the remainder of n vs. 2, and when n is an even number, I 2 (x, y, n) represents a phase-shifted fringe pattern I before the nth structured-light encoded pattern 2 ,I 4 (x, y, n) represents the phase shift fringe pattern I after the nth structured light code pattern 4 (ii) a When n is an odd number, I 1 (x, y, n) represents the phase-shifted fringe pattern I before the nth structured-light encoded pattern 1 ,I 3 (x, y, n) represents the phase-shift fringe pattern I after the nth structural optical code pattern 3
S3, calculating a truncation phase by using the background light intensity;
specifically, for sequence unit with number n, the calculation formula for calculating truncation phase phi (x, y, n) is:
Figure GDA0003996736470000081
s4, using the mth structured light coding pattern EP m Multiplexing M-1 structural optical coding patterns closest to the M-1 structural optical coding patterns to calculate the level, and unfolding the truncation phase into a continuous phase;
specifically, for the sequence unit with the number n, the formula for calculating the unwrapped phase Φ (x, y, n) is as follows:
Φ(x,y,n)=φ(x,y,n)+2π*k(EP m (n)),m=1,2,3...M
wherein k represents multiplexing of pattern lines generated after the cyclic projectionThe nth structured light code pattern EP in the column 1 (n) and M-1 structured light patterns EP closest thereto 2 (n)、EP 3 (n)、EP 4 (n)...EP M (n) decoding the computational order.
In the present invention, reference is made to "use the m-th structured light-coding pattern EP m And multiplexing M-1 structured light code patterns closest to the structured light code patterns, wherein "closest" means that the nth structured light code pattern EP (n) and the M-1 structured light code patterns selected for multiplexing are M structured light code patterns with consecutive serial numbers in the pattern arrangement generated after the circular projection, for example, when the nth structured light code pattern EP (n) and the M-1 structured light code patterns are used, the nth 1, n-2, n-3 structured light code patterns EP (n-1), EP (n-2), and EP (n-3) read before multiplexing can be selected, the nth 1, n-2, n +1 structured light code patterns EP (n-1), EP (n-2), and EP (n + 1) can also be selected, and the nth +1, n +2 structured light code patterns EP (n-1), EP (n + 1), and EP (n + 2) can also be selected, the nth +1, n +2 can also be selected, and the EP (n + 1) can be replaced by the first structured light code patterns EP (n + 1), EP (n + 2), and EP (n + 3) or the next multiplexed structure (n + 3) can also be selected.
In another embodiment, black and white binary gray codes can be used as the structured light coding pattern of the present invention. The specific process is as follows.
Generating a time-multiplexed sequence chart as shown in FIG. 2, projecting the sequence chart onto the surface of the measured object cyclically, when the fringe cycle number is 16, the number M of the projected Gray code patterns is 4 (GC) 1 、GC 2 、GC 3 And GC 4 ) The sequence chart has the sequence of GCI 2 I 1 GC 2 I 3 I 4 GC 3 I 2 I 1 GC 4 I 3 I 4 (ii) a When the number of fringe periods is 32, the number M of projected Gray code patterns is 5 (GC) 1 、GC 2 、GC 3 、GC 4 And GC 5 ) Sequence chart is in sequence of GC 1 I 2 I 1 GC 2 I 3 I 4 GC 3 I 2 I 1 GC 4 I 3 I 4 GC 5 I 2 I 1
If the sequence unit is n on the time axis (that is, the gray code pattern in the sequence unit is the nth gray code pattern in the pattern arrangement generated after the cyclic projection), the specific steps of recovering the measured object phase Φ (x, y, n) are as follows:
the first step is as follows: and acquiring the truncated phase of the measured object according to the phase shift fringe pattern projected to the surface of the measured object. Since the phase shift fringe pattern has four phase shift steps, the four corresponding phase shift fringe patterns are obtained as I 1 、I 2 、I 3 And I 4 Each fringe pattern is expressed by the following formula:
I 1 (x,y)=A(x,y)+B(x,y)cosφ(x,y)
Figure GDA0003996736470000091
I 3 (x,y)=A(x,y)+B(x,y)cos[φ(x,y)+π]
Figure GDA0003996736470000092
where A (x, y) is background light intensity, B (x, y)/A (x, y) represents fringe contrast, and φ (x, y) represents initial phase of the fringes. I is 1 And I 3 ,I 2 And I 4 The phase sign of the sequence unit is different by pi, and the background light intensity A (x, y, n) of the nth sequence unit can be directly obtained by adding and averaging:
Figure GDA0003996736470000101
where mod denotes the remainder of n vs. 2, and when n is an even number, I 2 (x, y, n) represents a phase shift fringe pattern I before the nth Gray code pattern 2 ,I 4 (x, y, n) represents the phase shift fringe pattern I after the nth Gray code pattern 4 (ii) a When n is an odd number, I 1 (x, y, n) denotes the nth Gray code patternPrevious phase shifted fringe pattern I 1 ,I 3 (x, y, n) represents the phase shift fringe pattern I after the nth Gray code pattern 3
And calculating a truncation phase phi (x, y, n) by using a formula:
Figure GDA0003996736470000102
where A (x, y, n) is the background light intensity of the nth sequence unit, B (x, y, n)/A (x, y, n) represents the fringe contrast of the nth sequence unit, φ (x, y, n) represents the phase-shifted fringe initial phase of the nth sequence unit, φ (x, y, n) is the truncation phase.
The second step is that: the phase order is calculated using the assistance of a gray code pattern. The traditional calculation formula is:
Figure GDA0003996736470000103
wherein, GC i (x, y) represents the ith gray code pattern of the M gray code patterns required to develop the phase for sequence unit n, V (x, y) is the decimal decoded codeword, and LUT (·) represents the known mapping relationship between the lookup decimal codeword and the phase shift stripe order. For this embodiment, when M =4, the specific formula for calculating the phase shift fringe order k is:
Figure GDA0003996736470000111
where the LUT represents a known mapping relationship between lookup decimal code words and the level of striping.
Under the same image resolution, increasing the fringe period (or Gray code) divides the test area by more levels, reconstructs the expansion phase of the test object by using higher resolution, and finally improves the measurement accuracy. Similarly, by extending the fringe period number to 32, the required gray code becomes 5, i.e., M =5, and the formula for calculating the fringe order k by decoding is:
Figure GDA0003996736470000112
the third step: unwrapping truncated phases to continuous phases
Φ(x,y,n)=φ(x,y,n)+2πk(x,y,n)
Wherein phi (x, y, n) is the final expansion phase of the measured object.
The encoding and decoding method of the prior art with three-step phase-shift fringe pattern and 4 gray code patterns is shown in fig. 3, and the method of the present embodiment is shown in fig. 4, and 4 gray code patterns are multiplexed by using a four-step phase-shift fringe pattern; in the two methods, the phase-shift stripe patterns are 16 periods, the corresponding gray codes are four in number, and the shot object is a gypsum portrait. The original images of the phase shift fringe pattern and the gray code pattern are shown in fig. 2, and the phase shift fringe pattern and the gray code pattern can generate deformation as shown in corresponding parts in fig. 3 and fig. 4 after being modulated by the fluctuating surface of an object; in the time-multiplexed binary gray code of the present embodiment, as shown in fig. 4, each time two phase-shifted fringe patterns are read, one gray code pattern GC 4 I.e. three new projected/read patterns, and multiplexing the GC existing on the time axis 1 ,GC 2 ,GC 3 Equivalent to reading three images each time, calculating the unwrapped phase once, and the GC of the current new reading 4 It can also be multiplexed in later calculations until it is reached by the same next GC 4 And (6) replacing.
The invention distributes two phase-shift fringe patterns with phase value difference pi in the four-step phase-shift fringe pattern on the mth structured light coding pattern EP m Two phase-shift fringe patterns with phase value difference of pi are distributed on the structured light code pattern EP m+1 Before and after, the m-th structured light coding pattern EP is firstly utilized m Calculating the background light intensity by the two phase-shift fringe patterns, calculating the truncation phase by using the background light intensity, and using the m-th structural light coding pattern EP m And multiplexing the M-1 structured light-coded patterns closest thereto (instead of re-projecting M-1 new structures at a time)A light coding pattern), and unfolding the truncated phase into a continuous phase for converting phase information into three-dimensional shape information; by the time multiplexing structured light coding method, only one new structured light coding pattern and two new phase shift fringe patterns before and after the new structured light coding pattern are needed to be read, other structured light coding patterns are multiplexed, one expansion phase can be calculated, each structured light coding pattern can be multiplexed for multiple times until the same next structured light coding pattern is replaced, the invention ensures the effectiveness of the original structured light coding method, and simultaneously multiplexes the structured light coding patterns on a time sequence, reduces the number of projection structured light coding patterns, greatly improves the coding and decoding efficiency, and has important significance for application scenes of high-speed dynamic three-dimensional measurement.
Example 2
In the embodiment, a multi-gray code method is combined with a four-step phase shift technology, and a four-gray code is adopted, so that a corresponding time multiplexing sequence is generated through four gray levels, namely bright gray, light gray, dark gray and dark gray, and is circularly projected to the surface of a measured object, as shown in fig. 5. Fringe period number 16, number of projected Gray codes 2 (GL) 1 ,GL 2 ) The specific steps for recovering the phase of the measured object are as follows:
first, the truncated phase φ (x, y, n) is computed, in accordance with the correlation procedure of embodiment 1.
And secondly, using a four-gray code method for assistance, and calculating the phase level:
for M gray code patterns with N gray levels, the calculation formula of the phase level k (x, y) calculated by decoding is as follows:
Figure GDA0003996736470000131
wherein V (x, y) represents a decimal decoded codeword converted from an N-ary code codeword, LUT [ ·]Representing a known mapping between the looked-up decimal code word and the level of the stripe, GL i The code word represents a multi-gray code, a bright area corresponds to a code value 3, a light gray area corresponds to a code value 2, a dark gray area corresponds to a code value 1, a dark area corresponds to a code value 0, and mod () represents a remainder function.
The third step: expanding the truncated phase phi (x, y, n) into a continuous phase phi (x, y, n)
Φ(x,y,n)=φ(x,y,n)+2πk(x,y,n)
Phi (x, y, n) is the final unwrapped phase of the measured object.
The above description is only for the purpose of illustrating the preferred embodiments of the present invention and is not to be construed as limiting the invention, and any modifications, equivalents and improvements made within the spirit and principle of the present invention are intended to be included within the scope of the present invention.

Claims (7)

1. A time multiplexing structured light coding and decoding method is characterized by comprising the following steps:
s1, circularly projecting a sequence diagram to an object to be detected, wherein the sequence diagram comprises four-step phase-shift fringe patterns and M structured light code patterns, so that in a pattern sequence generated after circular projection, two phase-shift fringe patterns in the four-step phase-shift fringe patterns are separately arranged in a structured light code pattern EP m The phase difference between the front and the back phase-shift fringe patterns is pi, and the other two phase-shift fringe patterns in the four-step phase-shift fringe pattern are separately arranged in the m +1 th structure optical coding pattern EP m+1 Before and after; wherein m is more than or equal to 1<M; the four-step phase-shift fringe pattern comprises I 1 、I 2 、I 3 And I 4 Each fringe pattern is expressed by the following formula:
I 1 (x,y)=A(x,y)+B(x,y)cosφ(x,y)
Figure FDA0003996736460000011
I 3 (x,y)=A(x,y)+B(x,y)cos[φ(x,y)+π]
Figure FDA0003996736460000012
wherein A (x, y) is background light intensity, B (x, y)/A (x, y) represents fringe contrast, and phi (x, y) represents initial phase of the fringe; m thAmplitude structured light-coding pattern EP m The phase shift fringe patterns arranged in tandem are respectively I 4 And I 2 M +1 th structural optical code pattern EP m+1 The phase shift fringe patterns arranged in tandem are respectively I 1 And I 3 And m satisfies the condition mod (m, 2) =0, where mod represents the remainder for 2 with m;
s2, calculating the background light intensity by using two phase shift fringe patterns before and after the structured light coding pattern;
in the pattern arrangement generated after the circular projection, the background light intensity A (x, y, n) at the position is calculated and extracted by using two adjacent phase-shift fringe patterns in front of and behind the nth structured light code pattern, and the following formula is shown as follows:
Figure FDA0003996736460000021
where mod denotes the remainder of n vs. 2, and when n is an even number, I 2 (x, y, n) represents the phase-shifted fringe pattern I before the nth structured-light encoded pattern 2 ,I 4 (x, y, n) represents the phase shift fringe pattern I after the nth structured light code pattern 4 (ii) a When n is an odd number, I 1 (x, y, n) represents a phase-shifted fringe pattern I before the nth structured-light encoded pattern 1 ,I 3 (x, y, n) represents the phase-shift fringe pattern I after the nth structural optical code pattern 3
S3, calculating a truncation phase by using the background light intensity;
s4, using the mth structured light coding pattern EP m And multiplexing M-1 structural optical coding patterns closest to the M-1 structural optical coding patterns to calculate the order, and unfolding the truncation phase into a continuous phase.
2. The method as claimed in claim 1, wherein the formula of calculating the truncation phase Φ (x, y, n) using the background light intensity in step S3 is as follows:
Figure FDA0003996736460000022
3. the method as claimed in claim 2, wherein the truncated phase Φ (x, y, n) is expanded into successive phases Φ (x, y, n) in step S4 according to the following formula:
Φ(x,y,n)=φ(x,y,n)+2π*k(EP m (n)),m=1,2,3...M
wherein k represents the nth structured light pattern EP multiplexed in the pattern arrangement generated after the cyclic projection 1 (n) and M-1 structured light patterns EP closest thereto 2 (n)、EP 3 (n)、EP 4 (n)...EP M (n) decoding the computational order.
4. A time-multiplexed structured light coding and decoding method according to any one of claims 1 to 3, wherein the period of the four-step phase-shifted fringe pattern is 16, and the structured light coding pattern adopts 4 gray code patterns, which are GC respectively 1 、GC 2 、GC 3 And GC 4 The sequence chart is in the sequence of GC 1 I 2 I 1 GC 2 I 3 I 4 GC 3 I 2 I 1 GC 4 I 3 I 4
5. The method as claimed in claim 4, wherein the formula of the decoding calculation order k is as follows:
Figure FDA0003996736460000031
where the LUT represents a known mapping relationship between lookup decimal code words and striping orders.
6. A time-multiplexed structured light coding and decoding method according to any one of claims 1 to 3, wherein the period of the four-step phase-shifted fringe pattern is 32, and the structured light coding pattern adopts 5 gray code patterns, which are respectively GC 1 、GC 2 、GC 3 、GC 4 And GC 5 The sequence chart is in the sequence of GC 1 I 2 I 1 GC 2 I 3 I 4 GC 3 I 2 I 1 GC 4 I 3 I 4 GC 5 I 2 I 1
7. The method as claimed in claim 6, wherein the formula of the decoding calculation order k is as follows:
Figure FDA0003996736460000032
where the LUT represents a known mapping relationship between lookup decimal code words and striping orders.
CN202210360564.0A 2022-04-07 2022-04-07 Time multiplexing structured light coding and decoding method Active CN114812438B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202210360564.0A CN114812438B (en) 2022-04-07 2022-04-07 Time multiplexing structured light coding and decoding method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210360564.0A CN114812438B (en) 2022-04-07 2022-04-07 Time multiplexing structured light coding and decoding method

Publications (2)

Publication Number Publication Date
CN114812438A CN114812438A (en) 2022-07-29
CN114812438B true CN114812438B (en) 2023-03-14

Family

ID=82534458

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210360564.0A Active CN114812438B (en) 2022-04-07 2022-04-07 Time multiplexing structured light coding and decoding method

Country Status (1)

Country Link
CN (1) CN114812438B (en)

Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1701603A (en) * 2003-08-06 2005-11-23 三菱电机株式会社 Method and system for determining correspondence between locations on display surface having arbitrary shape and pixels in output image of projector
CN102322823A (en) * 2011-09-13 2012-01-18 四川大学 Phase grade self-coding-based optical three-dimensional measurement method
CN102564348A (en) * 2012-01-03 2012-07-11 四川大学 Systematic geometric demarcation method for reflection three-dimensional measurement of stripe
CN105890546A (en) * 2016-04-22 2016-08-24 无锡信捷电气股份有限公司 Structured light three-dimensional measurement method based on orthogonal Gray code and line shift combination
CN106595523A (en) * 2016-12-23 2017-04-26 四川大学 Portable three-dimensional morphology measurement system and portable three-dimensional morphology measurement system based on smart phone
CN109540039A (en) * 2018-12-28 2019-03-29 四川大学 A kind of three dimension profile measurement method based on the complementary Gray code of circulation
CN111174730A (en) * 2020-01-07 2020-05-19 南昌航空大学 Rapid phase unwrapping method based on phase encoding
CN111307066A (en) * 2020-03-09 2020-06-19 四川大学 Phase unwrapping method for interval processing
CN111998800A (en) * 2020-08-20 2020-11-27 四川大学 Three-dimensional surface shape measuring method and system based on speckle embedded stripe

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP4883517B2 (en) * 2004-11-19 2012-02-22 学校法人福岡工業大学 Three-dimensional measuring apparatus, three-dimensional measuring method, and three-dimensional measuring program

Patent Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1701603A (en) * 2003-08-06 2005-11-23 三菱电机株式会社 Method and system for determining correspondence between locations on display surface having arbitrary shape and pixels in output image of projector
CN102322823A (en) * 2011-09-13 2012-01-18 四川大学 Phase grade self-coding-based optical three-dimensional measurement method
CN102564348A (en) * 2012-01-03 2012-07-11 四川大学 Systematic geometric demarcation method for reflection three-dimensional measurement of stripe
CN105890546A (en) * 2016-04-22 2016-08-24 无锡信捷电气股份有限公司 Structured light three-dimensional measurement method based on orthogonal Gray code and line shift combination
CN106595523A (en) * 2016-12-23 2017-04-26 四川大学 Portable three-dimensional morphology measurement system and portable three-dimensional morphology measurement system based on smart phone
CN109540039A (en) * 2018-12-28 2019-03-29 四川大学 A kind of three dimension profile measurement method based on the complementary Gray code of circulation
CN111174730A (en) * 2020-01-07 2020-05-19 南昌航空大学 Rapid phase unwrapping method based on phase encoding
CN111307066A (en) * 2020-03-09 2020-06-19 四川大学 Phase unwrapping method for interval processing
CN111998800A (en) * 2020-08-20 2020-11-27 四川大学 Three-dimensional surface shape measuring method and system based on speckle embedded stripe

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
结构光时间编码技术进展;于晓洋等;《哈尔滨理工大学学报》;20100215;第15卷(第01期);98-102 *

Also Published As

Publication number Publication date
CN114812438A (en) 2022-07-29

Similar Documents

Publication Publication Date Title
CN102322823B (en) Phase grade self-coding-based optical three-dimensional measurement method
CN109242897B (en) Binary pattern defocused projection method of structured light measurement system
CN108955574B (en) Three-dimensional measurement method and system
CN108592823B (en) Decoding method based on binocular vision color stripe coding
CN113514009B (en) Asymmetric combination three-dimensional measurement method for shift step phase code and phase shift fringe
CN111307066B (en) Phase unwrapping method for interval processing
CN109540039B (en) A kind of three dimension profile measurement method based on the complementary Gray code of circulation
CN115451860A (en) Phase shift three-dimensional measurement method based on gray level multiplexing Gray code
CN111174730B (en) Rapid phase unwrapping method based on phase encoding
CN110174079B (en) Three-dimensional reconstruction method based on four-step phase-shift coding type surface structured light
CN114812438B (en) Time multiplexing structured light coding and decoding method
CN115546255B (en) SIFT stream-based single-frame fringe projection high dynamic range error compensation method
Deng et al. High-speed and high-accuracy fringe projection profilometry without phase unwrapping
CN110428459B (en) Digital sequential coding-based phase unwrapping method
CN101483765A (en) Image processing method, method and apparatus for encoding and decoding
An et al. High-speed 3-D reconstruction based on phase shift coding and interleaved projection
CN114252026B (en) Three-dimensional measurement method and system for modulating three-dimensional code on periodic edge
CN112001959A (en) Real-time three-dimensional surface shape measuring method and system for cyclic phase shift
CN113008163A (en) Encoding and decoding method based on frequency shift stripes in structured light three-dimensional reconstruction system
CN115830154B (en) Unwrapping method based on double-angle phase encoding
CN111947601A (en) Projection resolving method for gray-scale pseudo-random coding structure light striations
CN116977560A (en) Three-dimensional reconstruction method, device, equipment and storage medium based on structured light
CN115950378A (en) Quick measuring method based on binary stripes
JP4388577B2 (en) Digital watermark embedding device and digital watermark detection device
CN114279356A (en) Gray scale stripe pattern design method for three-dimensional measurement

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant