Multi-layer multi-frequency radial stripe coding and decoding method and device

Through the multi-layer multi-frequency radial stripe encoding and decoding method, the stripe encoding pattern is generated and back-zero calibration is performed, which solves the problem of high cost of traditional single-direction modulation stripe encoding and decoding, and realizes efficient three-dimensional information measurement.

CN120489008AActive Publication Date: 2025-08-15GUANGDONG UNIV OF TECH
View PDF 9 Cites 0 Cited by

Patent Information

Application Number
CN202510760760.0
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-06-09
Publication Date
2025-08-15
Estimated Expiration
2045-06-09

AI Technical Summary

Technical Problem

Most of the existing stripe codec technology adopts traditional one-direction modulation stripe codec, resulting in high projection cost.

Method used

The multi-layer multi-frequency radial fringe encoding and decoding method is used to obtain the basic parameters of the stripe image and the preset frequency band range, generate multi-band fringe geometric parameters, build a fringe coded pattern, and use the zero signal for back-zero calibration, and finally output three-dimensional information through the depth phase mapping model.

Benefits of technology

It reduces projection costs, avoids dependence on high-precision DLP projectors, and realizes efficient three-dimensional information measurement.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120489008A_ABST
    Figure CN120489008A_ABST
Patent Text Reader

Abstract

The invention discloses a multilayer multi-frequency radial fringe coding and decoding method and device, which are used for solving the technical problem of high projection cost caused by the fact that the conventional fringe coding and decoding mostly adopt the traditional unidirectional modulation fringe coding and decoding technology. The method comprises the following steps: acquiring a fringe image basic parameter and a preset frequency band range, and generating a multi-frequency-band fringe geometric parameter; after a stripe coding pattern is constructed based on a preset radius and an angle condition, a signal code and a phase shift zero point signal are extracted respectively, and the zero point signal is used to carry out zeroing calibration on a main pattern. And projecting the processed pattern to a measured object, acquiring a plurality of stripe images, and decoding according to the stripe frequency of each frequency band to obtain a target absolute phase. And finally outputting three-dimensional information through the depth phase mapping model.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of structured light three-dimensional measurement technology, and in particular to a multi-layer multi-frequency radial fringe encoding and decoding method and device. Background Art

[0002] Fringe projection profilometry is widely used in surface structured light measurement devices. Surface structured light measurement devices are of great significance to optical three-dimensional measurement systems. They can provide accurate three-dimensional information for precision manufacturing, medical testing, cultural relics protection and other fields.

[0003] Fringe projection profilometry, as a core method in surface structured light measurement, has seen its encoding and decoding technology evolve inextricably, driven by the demands of optical 3D measurement. Fringe encoding and decoding technology, originating in the 1970s and 1980s, is primarily based on periodic fringe patterns modulated in a single direction (horizontally or vertically). Sinusoidal or rectangular wave fringes are projected via a projector, and then a camera captures the deformed fringe image after it is modulated by the surface topography of the object being measured. Early implementations employed temporal phase demodulation algorithms (such as the four-step / three-step phase shift method), requiring the sequential projection of multiple phase-shifted fringes and the use of pixel-level phase calculations for 3D reconstruction.

[0004] Most existing fringe encoding and decoding methods use traditional unidirectional modulation fringe encoding and decoding technology. This technology uses a DLP (Digital Light Processing) projector to sequentially project a series of sinusoidal fringe patterns with preset phase differences (such as π / 2 intervals). Simultaneously, a CCD (Charge-Coupled Device) camera captures the deformed fringe images modulated by the object surface. However, the fringe sequence output by this method relies on the expensive micromirrors of the high-precision DLP (Digital Light Processing) projector, resulting in high projection costs. Summary of the Invention

[0005] The present invention provides a multi-layer multi-frequency radial fringe encoding and decoding method and device, which are used to solve the technical problem that most existing fringe encoding and decoding adopt traditional unidirectional modulation fringe encoding and decoding technology, resulting in high projection cost.

[0006] A first aspect of the present invention provides a multi-layer multi-frequency radial stripe encoding and decoding method, comprising:

[0007] Obtaining basic parameters of the fringe image, and generating multiple frequency parts and fringe geometric parameters corresponding to each frequency part according to the basic parameters of the fringe image and preset maximum and minimum frequencies of the fringe;

[0008] Generate a stripe coding pattern based on a preset coding area radius range and a preset angle condition, each of the frequency parts and the stripe geometric parameters corresponding to each of the frequency parts;

[0009] performing signal extraction on the signal coding pattern and the peripheral phase-shift zero-point coding pattern in the stripe coding pattern to generate a phase coding region signal and a zero-point signal, and performing a return-to-zero operation on the main stripe coding pattern in the stripe coding pattern using the zero-point signal to generate a return-to-zero main stripe coding pattern;

[0010] Based on the effective number of the phase encoding region signals, the return-to-zero main fringe coding pattern is projected onto the object to be measured to obtain a plurality of fringe images, and the plurality of fringe images are decoded according to the fringe frequencies in the fringe geometric parameters corresponding to the frequency portions to generate the target absolute phase;

[0011] The target absolute phase is used as the input of a preset depth phase mapping model to output three-dimensional information of the object under test.

[0012] Optionally, the fringe geometric parameters further include a starting polar angle, a radial distance, and a polar angle; the preset fringe maximum and minimum frequencies include a fringe maximum frequency and a fringe minimum frequency; and generating, based on the fringe image basic parameters and the preset fringe maximum and minimum frequencies, a plurality of frequency portions and fringe geometric parameters corresponding to each of the frequency portions includes:

[0013] Based on the basic parameters of the fringe image, a fringe image and an arc center point are generated;

[0014] dividing the fringe image to generate a plurality of frequency parts;

[0015] Calculating the image angle range corresponding to each frequency portion according to the number of fringe strokes corresponding to each frequency portion;

[0016] Calculating the polar angle corresponding to each frequency portion according to the image pixel coordinates corresponding to each frequency portion;

[0017] Calculating the angle parameter corresponding to each frequency portion using the polar angle corresponding to each frequency portion and the image angle range;

[0018] Determining a starting polar angle corresponding to each frequency portion based on an angle parameter corresponding to each frequency portion;

[0019] Calculating the fringe frequency corresponding to each frequency portion according to the highest frequency of the fringe, the lowest frequency of the fringe, the number of fringe strokes corresponding to each frequency portion, and the angle parameter;

[0020] Based on the arc center point and the image pixel coordinates corresponding to each of the frequency parts, a radial distance corresponding to each of the frequency parts is determined.

[0021] Optionally, the preset coding area radius range includes a main stripe coding area radius range, a signal coding area radius range, and a peripheral phase shift zero point coding area radius range; generating a stripe coding pattern based on the preset coding area radius range and the preset angle condition, each of the frequency parts and the stripe geometric parameters corresponding to each of the frequency parts, includes:

[0022] respectively determining whether the radial distance corresponding to each of the frequency parts is within the radius range of the main fringe coding area, the radius range of the signal coding area, or the radius range of the peripheral phase shift zero point coding area;

[0023] Taking any frequency portion corresponding to a radial distance within the radius of the main stripe coding region as a target main stripe frequency portion, and generating a main stripe coding pattern according to the stripe frequency, polar angle, and starting polar angle corresponding to each target main stripe frequency portion;

[0024] Taking any frequency portion corresponding to a radial distance within the radius of the signal encoding region as an initial signal frequency portion, and based on the preset angle condition, screening each of the initial signal frequency portions according to the fringe frequency, polar angle, starting polar angle, and phase shift step number corresponding to each of the initial signal frequency portions to determine a plurality of target signal frequency portions;

[0025] generating a signal coding pattern according to a starting polar angle corresponding to each of the target signal frequency parts;

[0026] Taking any frequency portion corresponding to a radial distance within the radius range of the peripheral phase shift zero point encoding region as an initial peripheral phase shift zero point frequency portion;

[0027] Setting a polar angle range based on a starting polar angle corresponding to each of the frequency parts;

[0028] respectively determining whether the polar angle of each of the initial peripheral phase shift zero-point frequency parts is within the polar angle range;

[0029] An initial peripheral phase shift zero frequency portion corresponding to any polar angle within the polar angle range is used as a target peripheral phase shift zero frequency portion, and a peripheral phase shift zero coding pattern is generated according to the starting polar angle corresponding to each target peripheral phase shift zero frequency portion.

[0030] Optionally, generating a main stripe coding pattern according to the stripe frequency, polar angle, and starting polar angle corresponding to each target main stripe frequency portion includes:

[0031] Calculating the phase corresponding to each target main fringe frequency portion by using the fringe frequency, polar angle, and starting polar angle corresponding to each target main fringe frequency portion;

[0032] Calculate the regional grayscale value corresponding to each target main stripe frequency portion using the phase corresponding to each target main stripe frequency portion;

[0033] generating a main stripe code based on a starting polar angle corresponding to each target main stripe frequency portion;

[0034] A main stripe coding pattern is generated according to the main stripe coding and the regional grayscale values corresponding to each of the target main stripe frequency parts.

[0035] Optionally, based on the preset angle condition, screening each of the initial signal frequency parts according to the fringe frequency, polar angle, starting polar angle, and phase shift step number corresponding to each of the initial signal frequency parts to determine multiple target signal frequency parts includes:

[0036] Calculating the phase shift angle corresponding to each of the initial signal frequency parts according to the phase shift step number corresponding to each of the initial signal frequency parts;

[0037] Calculating the phase corresponding to each of the initial signal frequency parts by using the fringe frequency, polar angle, and starting polar angle corresponding to each of the initial signal frequency parts;

[0038] Performing a modulo operation on the phase corresponding to each of the initial signal frequency parts to determine a standard phase corresponding to each of the initial signal frequency parts;

[0039] Calculating the absolute value of the difference between the standard phase and the phase shift angle corresponding to each frequency portion of the initial signal, and comparing it with a preset error limit;

[0040] Taking any initial signal frequency portion corresponding to the absolute value of the difference between the standard phase and the phase shift angle that is smaller than the preset error limit as the intermediate signal frequency portion;

[0041] determining, based on the polar angle corresponding to each of the intermediate signal frequency portions, a start and end angle corresponding to each of the intermediate signal frequency portions;

[0042] Determining whether the start and end angles and polar angles corresponding to the intermediate signal frequency parts all meet the preset angle conditions;

[0043] The intermediate signal frequency portion corresponding to any starting and ending angles and polar angles that both meet the preset angle condition is used as the target signal frequency portion.

[0044] Optionally, generating a signal coding pattern according to a starting polar angle corresponding to each of the target signal frequency portions includes:

[0045] Setting a regional grayscale value for each of the target signal frequency parts based on a preset constant;

[0046] generating a signal code according to a starting polar angle corresponding to each of the target signal frequency parts;

[0047] A signal coding pattern is generated according to the signal coding and the regional grayscale value corresponding to each target signal frequency portion.

[0048] Optionally, generating a peripheral phase shift zero point coding pattern according to a starting polar angle corresponding to each target peripheral phase shift zero point frequency portion includes:

[0049] Setting a regional grayscale value for each of the target peripheral phase shift zero-point frequency parts based on a preset constant;

[0050] generating a peripheral phase shift zero point code according to a starting polar angle corresponding to each target peripheral phase shift zero point frequency portion;

[0051] A peripheral phase-shift zero-point coding pattern is generated according to the peripheral phase-shift zero-point coding and the regional grayscale values corresponding to each of the target peripheral phase-shift zero-point frequency parts.

[0052] Optionally, decoding the plurality of fringe images according to the fringe frequencies in the fringe geometric parameters corresponding to the frequency portions to generate a target absolute phase includes:

[0053] Grouping the plurality of stripe images to determine a plurality of stripe image groups;

[0054] Calculating the wrapping phase of each fringe image group according to the light intensity of each fringe image in each fringe image group;

[0055] Selecting a zero-bit wrapping phase and a minimum fringe frequency from the wrapping phases of each fringe image group and the fringe frequencies corresponding to each frequency portion, respectively, and calculating an initial absolute phase based on the zero-bit wrapping phase and the minimum fringe frequency;

[0056] Selecting a target wrapping phase and a target fringe frequency from the wrapping phase of each fringe image group and the fringe frequency corresponding to each frequency portion, respectively, and calculating a phase difference using the target fringe frequency, the target wrapping phase, and the initial absolute phase;

[0057] determining an equivalent frequency based on the lowest fringe frequency;

[0058] Calculating an equivalent phase according to the equivalent frequency, the target fringe frequency, and the phase difference;

[0059] Calculating the number of whole cycles based on the equivalent phase and the target wrapped phase;

[0060] updating the initial absolute phase using the target fringe frequency, the target wrapping phase, and the number of full cycles, determining an intermediate absolute phase, and counting the number of updates in real time;

[0061] Determining whether the update number reaches a preset update number;

[0062] If so, the intermediate absolute phase is used as the target absolute phase.

[0063] Optionally, it also includes:

[0064] If the update number does not reach the preset update number, the equivalent frequency is updated using the target fringe frequency to determine a new equivalent frequency;

[0065] Selecting a new target wrapping phase and a new target fringe frequency from the wrapping phase of each fringe image group and the fringe frequency corresponding to each frequency portion respectively;

[0066] Using the intermediate absolute phase as a new initial absolute phase, and using the new target wrapped phase and the new initial absolute phase to calculate a new phase difference;

[0067] Jumping to the step of calculating the equivalent phase according to the equivalent frequency, the target fringe frequency and the phase difference until the number of updates reaches the preset number of updates;

[0068] The intermediate absolute phase determined when the number of updates reaches the preset number of updates is used as the target absolute phase.

[0069] A second aspect of the present invention provides a multi-layer, multi-frequency, radial stripe encoding and decoding device, comprising:

[0070] An acquisition module is used to acquire basic parameters of the fringe image and generate multiple frequency parts and fringe geometric parameters corresponding to each frequency part according to the basic parameters of the fringe image and the preset maximum and minimum frequencies of the fringe;

[0071] a stripe pattern generating module, configured to generate a stripe coding pattern based on a preset coding area radius range and a preset angle condition, each of the frequency parts and the stripe geometric parameters corresponding to each of the frequency parts;

[0072] a return-to-zero module, configured to extract signals from the signal coding pattern and the peripheral phase-shift zero-point coding pattern in the stripe coding pattern, respectively, to generate a phase coding region signal and a zero-point signal, and to perform a return-to-zero operation on the main stripe coding pattern in the stripe coding pattern using the zero-point signal, to generate a return-to-zero main stripe coding pattern;

[0073] a phase output module, configured to project the return-to-zero main fringe coding pattern onto the object under test based on the effective number of the phase coding region signals to obtain a plurality of fringe images, and decode the plurality of fringe images according to the fringe frequencies in the fringe geometric parameters corresponding to the respective frequency portions to generate a target absolute phase;

[0074] The three-dimensional information output module is used to use the target absolute phase as the input of a preset depth phase mapping model to output the three-dimensional information of the object under test.

[0075] It can be seen from the above technical solutions that the present invention has the following advantages:

[0076] The above technical solution of the present invention provides a multi-layer multi-frequency radial fringe encoding and decoding method. First, the basic parameters of the fringe image are obtained, and according to the basic parameters of the fringe image and the preset highest and lowest frequencies of the fringe, multiple frequency parts and fringe geometric parameters corresponding to each frequency part are generated; then, based on the preset coding area radius range and preset angle conditions, each frequency part and the fringe geometric parameters corresponding to each frequency part are generated, a fringe coding pattern is generated; the signal coding pattern and the peripheral phase shift zero point coding pattern in the fringe coding pattern are respectively extracted to generate a phase coding area signal and a zero point signal, and the zero point signal is used to perform a return-to-zero operation on the main fringe coding pattern in the fringe coding pattern to generate a return-to-zero main fringe coding pattern; based on Under the effective number of phase coding area signals, the return-to-zero main stripe coding pattern is projected onto the object to be measured to obtain multiple stripe images, and the multiple stripe images are decoded according to the stripe frequency in the stripe geometric parameters corresponding to each frequency part to generate the target absolute phase; finally, the target absolute phase is used as the input of the preset depth phase mapping model to output the three-dimensional information of the object to be measured; based on the above scheme, the present invention is based on the preset coding area radius range and preset angle conditions, according to each frequency part and the stripe geometric parameters corresponding to each frequency part, the coding style of the generated stripe coding pattern can be printed on a self-made grating code disk, without relying on the expensive micromirror of the high-precision DLP projector, which can effectively reduce the projection cost. BRIEF DESCRIPTION OF THE DRAWINGS

[0077] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the following briefly introduces the drawings required for use in the embodiments or the description of the prior art. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.

[0078] Figure 1 A flowchart of the steps of a multi-layer multi-frequency radial stripe encoding and decoding method provided in Example 1 of the present invention;

[0079] Figure 2 A schematic diagram of a stripe coding pattern provided in Example 1 of the present invention;

[0080] Figure 3 A schematic flow chart of a multi-layer, multi-frequency radial stripe encoding and decoding method provided in Example 1 of the present invention;

[0081] Figure 4 This is a structural block diagram of a multi-layer multi-frequency radial stripe encoding and decoding device provided in Example 2 of the present invention. DETAILED DESCRIPTION

[0082] The embodiments of the present invention provide a multi-layer multi-frequency radial fringe encoding and decoding method and apparatus, which are used to solve the technical problem that most existing fringe encoding and decoding adopt traditional unidirectional modulation fringe encoding and decoding technology, resulting in high projection cost.

[0083] In order to make the purpose, features, and advantages of the present invention more obvious and easy to understand, the technical solutions in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the embodiments described below are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without making creative work are within the scope of protection of the present invention.

[0084] See also Figure 1 , Figure 1 This is a flowchart of the steps of a multi-layer multi-frequency radial stripe encoding and decoding method provided in Example 1 of the present invention.

[0085] The present invention provides a multi-layer multi-frequency radial stripe encoding and decoding method, comprising:

[0086] Step 101: Obtain basic parameters of the fringe image, and generate multiple frequency parts and fringe geometric parameters corresponding to each frequency part according to the basic parameters of the fringe image and preset maximum and minimum frequencies of the fringe.

[0087] Fringe geometric parameters include fringe frequency, starting polar angle, radial distance, and polar angle.

[0088] The preset stripe highest and lowest frequencies include the stripe highest frequency and the stripe lowest frequency.

[0089] The basic parameters of the fringe image include the pixel width and pixel height of the fringe image.

[0090] Specifically, step 101 may include the following sub-steps S11-S18:

[0091] Step S11: generating a fringe image and an arc center point based on basic fringe image parameters;

[0092] It should be noted that the pixel width and pixel height of the fringe image are used to calculate the arc center point. for: ;W and H are the pixel width and pixel height of the fringe image respectively, are the horizontal and vertical coordinates of the arc center point respectively.

[0093] Step S12: dividing the fringe image to generate multiple frequency parts;

[0094] Step S13, calculating the image angle range corresponding to each frequency portion according to the number of fringe strokes corresponding to each frequency portion;

[0095] It should be noted that the image angle range of each frequency part is calculated by dividing the fringe frequency. The fringe frequency is an integer not less than 1. The fringe frequency corresponding to each frequency part can be set as needed. The image angle range corresponding to the frequency part is:

[0096] ;

[0097] in, is the image angle range; n is the fringe frequency.

[0098] Step S14: Calculate the polar angle corresponding to each frequency component according to the image pixel coordinates corresponding to each frequency component;

[0099] Step S15: Calculate the angle parameter corresponding to each frequency portion using the polar angle corresponding to each frequency portion and the image angle range;

[0100] Step S16: determining the starting polar angle corresponding to each frequency portion based on the angle parameter corresponding to each frequency portion;

[0101] Step S17, calculating the fringe frequency corresponding to each frequency part according to the highest fringe frequency, the lowest fringe frequency, the number of fringe strokes corresponding to each frequency part, and the angle parameter;

[0102] Step S18: Determine the radial distance corresponding to each frequency component based on the arc center point and the image pixel coordinates corresponding to each frequency component.

[0103] It should be noted that the lowest frequency f L (the lowest frequency of the stripes) and the highest frequency f H (the highest frequency of the stripes), and the stripe division frequency to calculate the stripe frequency f in each area (frequency part) k Specifically, the lowest frequency f L With the highest frequency f H Both must strictly meet: f H >f L ; and fH Generally take f L 2-3 times the fringe frequency f of each frequency part k is the kth frequency in a set of n fringe frequencies (fringe frequency set F), where F is: F={f0, f1, f2, , f k , , f k-1};n≥1.

[0104] Furthermore, f k The specific value is determined by the lowest frequency f L With the highest frequency f H The frequency range [f L , f H ] OK, yes [f L , f H ] performs linear interpolation to calculate:

[0105] ;

[0106] in, is the fringe frequency corresponding to the kth frequency part; is the angle parameter.

[0107] Furthermore, the angle parameter is an integer not less than 0, and its specific calculation method is: ;in, Express The value of is rounded down, is the pixel coordinate in the fringe image (i.e. the image pixel coordinates corresponding to the frequency part) are mapped to the polar angle in the polar coordinate system (i.e. the polar angle corresponding to the frequency part): , x, y are the horizontal and vertical coordinates of the image pixel coordinates corresponding to the frequency part respectively.

[0108] Furthermore, the pixel coordinates in the image To the center of the arc Radial distance , that is, the radial distance corresponding to the frequency part Determined as: ;

[0109] Step 102: Generate a stripe coding pattern based on a preset coding area radius range and a preset angle condition, each frequency portion and the stripe geometric parameters corresponding to each frequency portion.

[0110] The preset coding area radius range includes the main stripe coding area radius range , Signal coding area radius , Radius range of peripheral phase shift zero point coding area ,in, are the lower and upper limits of the radius range of the main stripe coding area, respectively. are the lower and upper limits of the signal coding area radius, respectively. They are the lower and upper limits of the radius range of the peripheral phase shift zero point encoding area respectively.

[0111] It should be noted that according to the preset radius range and angle conditions, combined with each frequency component and its corresponding geometric parameters, the generated fringe coding pattern is as follows Figure 2 shown.

[0112] Specifically, step 102 may include the following sub-steps S21-S28:

[0113] Step S21, respectively determining whether the radial distance corresponding to each frequency portion is within the radius range of the main fringe coding region, the radius range of the signal coding region, or the radius range of the peripheral phase shift zero point coding region;

[0114] Step S22: taking any frequency portion corresponding to a radial distance within the radius of the main stripe coding region as a target main stripe frequency portion, and generating a main stripe coding pattern according to the stripe frequency, polar angle, and starting polar angle corresponding to each target main stripe frequency portion;

[0115] Specifically, step S22 may include the following sub-steps S221-S224:

[0116] Step S221, using the fringe frequency, polar angle, and starting polar angle corresponding to each target main fringe frequency portion, calculate the phase corresponding to each target main fringe frequency portion;

[0117] Step S222: Calculate the regional grayscale value corresponding to each target main fringe frequency portion using the phase corresponding to each target main fringe frequency portion;

[0118] Step S223: generating a main stripe code based on the starting polar angle corresponding to each target main stripe frequency portion;

[0119] Step S224: Generate a main stripe coding pattern according to the main stripe coding and the regional grayscale values corresponding to each target main stripe frequency portion.

[0120] It should be noted that when the radial distance corresponding to a certain frequency part Within the radius of the main stripe coding area When the pixel coordinates are located in the main stripe coding area, its gray value (Regional grayscale value corresponding to the target main stripe frequency part) is:

[0121] ;

[0122] in, The current pixel coordinates The corresponding phase (i.e. the phase corresponding to the target main fringe frequency part) has the following specific value:

[0123] ;

[0124] in, is the cumulative phase offset caused by multi-frequency coding, , is the fringe frequency corresponding to the target main fringe frequency part; is the starting polar angle corresponding to the current frequency (i.e. the starting polar angle corresponding to the target main stripe frequency part), .

[0125] Step S23: taking any frequency portion corresponding to a radial distance within the radius of the signal encoding region as an initial signal frequency portion, and screening each initial signal frequency portion based on the fringe frequency, polar angle, starting polar angle, and phase shift step number corresponding to each initial signal frequency portion based on a preset angle condition to determine a plurality of target signal frequency portions;

[0126] Specifically, step S23 may include the following sub-steps:

[0127] Step S231, calculating the phase shift angle corresponding to each initial signal frequency portion according to the phase shift step number corresponding to each initial signal frequency portion;

[0128] Step S232: Calculate the phase corresponding to each initial signal frequency portion using the fringe frequency, polar angle, and starting polar angle corresponding to each initial signal frequency portion;

[0129] Step S233: performing a modulo operation on the phase corresponding to each frequency portion of the initial signal to determine a standard phase corresponding to each frequency portion of the initial signal;

[0130] Step S234: Calculate the absolute value of the difference between the standard phase and the phase shift angle corresponding to each frequency portion of the initial signal, and compare it with a preset error limit;

[0131] Step S235: taking any initial signal frequency portion corresponding to the absolute value of the difference between the standard phase and the phase shift angle that is smaller than a preset error limit as the intermediate signal frequency portion;

[0132] Step S236: Determine the start and end angles corresponding to each intermediate signal frequency portion based on the polar angle corresponding to each intermediate signal frequency portion;

[0133] Step S237: Determine whether the start and end angles and polar angles corresponding to the frequency parts of each intermediate signal meet the preset angle conditions;

[0134] Step S238: Use any intermediate signal frequency portion corresponding to the start and end angles and polar angles that satisfy the preset angle conditions as the target signal frequency portion.

[0135] The start and end angles include the start angle and the end angle.

[0136] It should be noted that the number of phase shift steps and the radius range required to identify the coding area by phase shift and minimum interval , calculate the phase shift angle set The starting angle set of the first layer coding area outside the main stripe of each frequency and end angle set .

[0137] Furthermore, when the pixel coordinates The radial distance r, that is, the radial distance corresponding to the frequency part is within the radius range of the signal encoding area When , the frequency portion corresponding to the radial distance within the radius of the signal encoding area is used as the initial signal frequency portion.

[0138] Furthermore, the number of phase shift steps corresponding to each frequency portion (i.e., the number of phase shift steps required for phase shift identification coding area) can be set as needed, and the phase shift angle set for: ; For the collection The i-th item in , the specific calculation method is: , is the number of phase shift steps corresponding to the frequency part of the i-th initial signal, is the phase shift angle corresponding to the frequency portion of the i-th initial signal.

[0139] Furthermore, in order to facilitate the external phase shift identification coding area operation, Perform modulo operation and map to the interval [0, ], calculate the standard phase :

[0140] ;

[0141] in, for right Perform modulo operation, the specific calculation method is: , is the phase corresponding to the frequency part of the initial signal.

[0142] Furthermore, when the pixel coordinates Corresponding standard phase satisfy: , that is, the initial signal frequency portion corresponding to the absolute value of the difference between any standard phase and phase shift angle that is less than the preset error limit is used as the intermediate signal frequency portion, where, is the absolute value of the difference between the standard phase and the phase shift angle corresponding to the frequency part of the initial signal, is the preset error limit, usually to .

[0143] Furthermore, the starting angle corresponding to the intermediate signal frequency part is the polar angle corresponding to the intermediate signal frequency part , the end angle corresponding to the intermediate signal frequency part for: ;Preset angle conditions include (Right now The secondary encoding starting angle Need to meet: )and , when the end angle and polar angle corresponding to the intermediate signal frequency part both meet and , then the intermediate signal frequency part is used as the target signal frequency part.

[0144] Step S24: generating a signal coding pattern according to the starting polar angle corresponding to each target signal frequency portion;

[0145] Specifically, step S24 may include the following sub-steps S241-S243:

[0146] Step S241, setting a regional grayscale value for each target signal frequency portion based on a preset constant;

[0147] Step S242: Generate a signal code according to the starting polar angle corresponding to each target signal frequency portion;

[0148] Step S243: Generate a signal coding pattern according to the signal coding and the regional grayscale value corresponding to each target signal frequency portion.

[0149] It should be noted that the preset constants include 1 and 0, and the preset constants are used to set the regional grayscale value for the target signal frequency part, that is, the regional grayscale value corresponding to the target signal frequency part Otherwise, the grayscale value of the region corresponding to the intermediate signal frequency part that does not meet the preset angle condition .

[0150] It is worth mentioning that the start and end angles corresponding to all target signal frequency parts can constitute the starting angle set of the phase shift identification coding area of the main frequency stripe and end angle set , which are:

[0151] ;

[0152] ;

[0153] Step S25: taking any frequency portion corresponding to a radial distance within the radius range of the peripheral phase shift zero point coding region as an initial peripheral phase shift zero point frequency portion;

[0154] Step S26: setting a polar angle range based on the starting polar angle corresponding to each frequency part;

[0155] Step S27, respectively determining whether the polar angle of each initial peripheral phase shift zero-point frequency portion is within the polar angle range;

[0156] Step S28: taking any initial peripheral phase shift zero frequency portion corresponding to a polar angle within the polar angle range as a target peripheral phase shift zero frequency portion, and generating a peripheral phase shift zero coding pattern according to the starting polar angle corresponding to each target peripheral phase shift zero frequency portion.

[0157] It should be noted that the peripheral phase shift zero point code and its radius range are determined by the number of stripe divisions n. , to determine the phase shift zero point of the main stripe encoding area , when n=1, this step can be ignored.

[0158] Specifically, step S28 may include the following sub-steps S281-S283:

[0159] Step S281, setting a regional grayscale value for each target peripheral phase shift zero frequency portion based on a preset constant;

[0160] Step S282: Generate a peripheral phase shift zero point code according to the starting polar angle corresponding to each target peripheral phase shift zero point frequency portion;

[0161] Step S283: Generate a peripheral phase-shift zero-point coding pattern according to the peripheral phase-shift zero-point coding and the regional grayscale values corresponding to each target peripheral phase-shift zero-point frequency portion.

[0162] It should be noted that the radius range of the peripheral phase shift zero point coding area is , when the pixel coordinates The radial distance, that is, the radial distance corresponding to the frequency part is within the radius range of the peripheral phase shift zero point coding area When the frequency part is used as the initial peripheral phase shift zero point frequency part, based on the starting polar angle corresponding to each frequency part and , set the polar angle range , when the polar angle corresponding to the zero-point frequency part of the initial peripheral phase shift satisfy: , then the initial peripheral phase shift zero point frequency portion is used as the target peripheral phase shift zero point frequency portion; wherein and The values corresponding to k=0 and k=1 are respectively. At this time, the grayscale value of the area corresponding to the zero-point frequency part of the target peripheral phase shift is set to , set the grayscale value of the region of the initial peripheral phase shift zero frequency part that does not meet the polar angle range to .

[0163] It is worth mentioning that when the stripe division frequency n=1, this step can be ignored.

[0164] Step 103: extract signals from the signal coding pattern and the peripheral phase-shift zero-point coding pattern in the stripe coding pattern respectively to generate a phase coding region signal and a zero-point signal, and use the zero-point signal to perform a return-to-zero operation on the main stripe coding pattern in the stripe coding pattern to generate a return-to-zero main stripe coding pattern.

[0165] It should be noted that the photoelectric sensor detects the zero point signal in the peripheral phase shift zero point coding pattern. for:

[0166] ;

[0167] Among them, t is the time independent variable corresponding to the signal, and different t corresponds to different The value of f represents The frequency of this rectangular wave signal is , The period of this signal depends on the maximum radius of the main stripe coding area. , the two satisfy the following relationship: ; The phase offset of this signal indicates the duty cycle is When the signal changes from high level to low level, it means that the grating disk returns to the phase shift starting point of the main stripe area. For the phase encoding area of each frequency from the beginning to the end of the signal, the phase encoding area signal for:

[0168] ;

[0169] in, is the period of the signal; it is the same as the minimum interval Related, both meet: .

[0170] Step 104: Based on the effective number of phase coding region signals, the return-to-zero main fringe coding pattern is projected onto the object to be measured to obtain multiple fringe images, and the multiple fringe images are decoded according to the fringe frequencies in the fringe geometric parameters corresponding to each frequency part to generate the target absolute phase.

[0171] It should be noted that the stripe coding pattern generated by the above steps, as well as the zero point code and zero point signal (i.e., the photoelectric sensor signal) The camera receives the signal detected by the photoelectric sensor. , capture the deformed fringes generated by the light source projected onto the surface of the object under test when the grating disk rotates at high speed to solve its corresponding phase and restore the three-dimensional information of the object under test.

[0172] Specifically, step 104 may include the following sub-steps:

[0173] Step S41: grouping multiple stripe images to determine multiple stripe image groups;

[0174] Step S42: Calculate the wrapping phase of each fringe image group according to the light intensity of each fringe image in each fringe image group;

[0175] Step S43: selecting a zero-bit wrapping phase and a minimum fringe frequency from the wrapping phases of each fringe image group and the fringe frequencies corresponding to each frequency portion, and calculating an initial absolute phase based on the zero-bit wrapping phase and the minimum fringe frequency;

[0176] Step S44: selecting a target wrapping phase and a target fringe frequency from the wrapping phase of each fringe image group and the fringe frequency corresponding to each frequency portion, and calculating a phase difference using the target fringe frequency, the target wrapping phase, and the initial absolute phase;

[0177] Step S45: determining an equivalent frequency based on the lowest fringe frequency;

[0178] Step S46, calculating the equivalent phase according to the equivalent frequency, the target fringe frequency and the phase difference;

[0179] Step S47: Calculate the number of whole cycles based on the equivalent phase and the target wrapped phase;

[0180] Step S48: Update the initial absolute phase using the target fringe frequency, target wrapping phase, and number of full cycles, determine the intermediate absolute phase, and count the number of updates in real time;

[0181] Step S49: determine whether the update times have reached the preset update times;

[0182] Step S410: If yes, the intermediate absolute phase is used as the target absolute phase.

[0183] It should be noted that the n×N fringe images captured by the camera (n×N is the effective number of phase encoding area signals, n is the fringe frequency, and N is the number of phase shift steps corresponding to each group of different frequency fringes) are used to calculate the wrapped phase of each fringe image group using the light intensity of each fringe image. :

[0184] ;

[0185] in, is the wrapped phase of the i-th fringe image group; is the jth stripe picture in the i-th stripe picture group N is the number of phase shift steps corresponding to each group of stripes with different frequencies, that is, the total number of stripe image groups with different frequencies; n is the stripe frequency.

[0186] Furthermore, the lowest frequency f0, i.e. the lowest fringe frequency, is selected from the fringe frequency set F, and the zero-position wrapping phase is selected from the wrapping phases of all fringe image groups. , and the initial absolute phase is calculated as: .

[0187] Furthermore, when i≥1, there is a phase difference , that is, select the target wrapping phase from the wrapping phases of all fringe image groups , and select the target fringe frequency from the fringe frequencies corresponding to all frequency parts , and thus calculate the phase difference: ; For example, if the current iteration is the first (update number is 1), the target wrapping phase is , the target fringe frequency is The phase difference is , if the current iteration is the second, the target wrapping phase is , the target fringe frequency is The phase difference is .

[0188] Furthermore, the equivalent phase can be calculated from the phase difference and target fringe frequency It is:

[0189] ;

[0190] in, , especially, ; On this basis, the number of full cycles needs to be calculated , the specific calculation method is:

[0191] ;

[0192] Then calculate the intermediate absolute phase :

[0193] ;

[0194] Furthermore, when the number of updates reaches a preset number of updates, the intermediate absolute phase is used as the target absolute phase.

[0195] Optionally, it also includes:

[0196] If the update number does not reach the preset update number, the target fringe frequency is used to update the equivalent frequency to determine a new equivalent frequency;

[0197] Selecting a new target wrapping phase and a new target fringe frequency from the wrapping phase of each fringe image group and the fringe frequency corresponding to each frequency part respectively;

[0198] The intermediate absolute phase is used as the new initial absolute phase, and the new target wrapped phase and the new initial absolute phase are used to calculate the new phase difference;

[0199] Jumping to the step of calculating the equivalent phase according to the equivalent frequency, the target fringe frequency and the phase difference until the number of updates reaches the preset number of updates;

[0200] The intermediate absolute phase determined when the number of updates reaches the preset number of updates is used as the target absolute phase.

[0201] It should be noted that if the number of updates does not reach the preset number of updates, the equivalent frequency is updated using the target fringe frequency to determine a new equivalent frequency. This process can be expressed as:

[0202] ;

[0203] in, is the equivalent frequency when the number of updates is i-1; is the equivalent frequency when the number of updates is i (i.e., the new equivalent frequency); is the target fringe frequency when the number of updates is i.

[0204] Furthermore, a new target wrapping phase and a new target fringe frequency are selected from the wrapping phase of each fringe image group and the fringe frequency corresponding to each frequency part. For example, if the target wrapping phase is , then the new target package phase is Similarly, a new target fringe frequency can be obtained, and the intermediate absolute phase is used as the new initial absolute phase. The new target wrapped phase and the new initial absolute phase are used to calculate the new phase difference; the process jumps to step S46 until the number of updates reaches the preset number of updates; the intermediate absolute phase determined when the number of updates reaches the preset number of updates is used as the target absolute phase.

[0205] Finally, after n-1 iterations, the target absolute phase can be obtained : .

[0206] Step 105: Use the target absolute phase as input to a preset depth phase mapping model to output three-dimensional information of the object under test.

[0207] It should be noted that the target absolute phase is used as the input of a preset depth phase mapping model, which outputs the three-dimensional information of the object being measured. From this, the absolute phase and the camera's internal and external parameters can be used to calculate the three-dimensional information of the object being measured. Among them, the preset depth phase mapping model is an existing depth phase mapping model.

[0208] For comparison purposes, existing technologies can be used as a reference. Fringe projection profilometry is widely used in surface structured light measurement devices. Surface structured light measurement devices are of great significance to optical 3D measurement systems, providing accurate 3D information for applications such as precision manufacturing, medical testing, and cultural relic preservation. The projectors required for classic surface structured light imaging systems suffer from high costs and limited projection speeds due to the critical micromirror components. This limits the imaging speed and widespread application of 3D structured light systems. Therefore, it is necessary to develop a flexibly encoded grating disk that, when rotating at high speed, projects a fringe sequence that meets the required accuracy.

[0209] To address the above problems, the present invention provides a multi-layer multi-frequency radial stripe encoding and decoding method, which produces stripe encoding on a grating code disk, which can effectively reduce projection costs and achieve high-speed projection driven by a motor. Figure 3 In the encoding method, after determining the basic parameters W and H of the stripe image, the required frequency n of the stripes and its corresponding minimum frequency f are determined. L (the lowest frequency of the stripes) and the highest frequency f H(The highest frequency of the stripes); using the radius size as the identification parameter, the coding area is divided into three layers, namely the main stripe coding area, the phase shift identification coding area and the phase shift zero point coding area. The main stripe area is encoded by calculating its grayscale value by the stripe frequency and the frequency value; the phase shift identification coding area is encoded by the coding angle and the phase shift step number of the main stripe coding area; the phase shift zero point coding area is encoded by the starting angle of the main stripe coding area. In the decoding method, the camera receives the coding signal and the phase shift signal detected by the photoelectric sensor. The camera shoots the stripe sequence projected onto the surface of the object to be measured through the grating disk according to the signal type, and solves its absolute phase from these stripe sequences and restores its three-dimensional information. The present invention uses a polar coordinate system to convert the traditional unidirectional modulated stripe code into a radial stripe code, and the present invention can realize multi-layer and multi-frequency stripe encoding and decoding, providing a simple and effective solution for stripe sequence projection with low cost and high-speed projection.

[0210] In summary, the present invention calculates the corresponding grayscale and phase in a polar coordinate system based on the image width, height, and fringe frequency. The angle values of the phase shift identification coding area and the phase shift zero point identification coding area can be calculated based on the required number of phase shift steps. The present invention implements multi-layer, multi-frequency fringe encoding and decoding. The coding pattern can be printed on a custom-made grating code disk, significantly reducing costs compared to the expensive micromirrors used in traditional projectors to achieve fringe sequence projection. The decoding method is flexible and reliable, and the grating disk using the coding pattern of the present invention can rotate at high speed, allowing the projected fringe sequence to meet high-speed projection requirements. Therefore, the present invention provides a simple and effective solution for fringe sequence projection that achieves low-cost, high-speed projection.

[0211] In an embodiment of the present invention, the present invention provides a multi-layer multi-frequency radial fringe encoding and decoding method. First, basic parameters of a fringe image are obtained, and according to the basic parameters of the fringe image and the preset highest and lowest frequencies of the fringe, multiple frequency parts and fringe geometric parameters corresponding to each frequency part are generated; then, based on a preset coding area radius range and a preset angle condition, each frequency part and the fringe geometric parameters corresponding to each frequency part are generated to generate a fringe coding pattern; the signal coding pattern and the peripheral phase shift zero point coding pattern in the fringe coding pattern are respectively extracted to generate a phase coding area signal and a zero point signal, and the zero point signal is used to perform a return-to-zero operation on the main fringe coding pattern in the fringe coding pattern to generate a return-to-zero main fringe coding pattern; based on the preset coding area radius range and the preset angle condition, each frequency part and the fringe geometric parameters corresponding to each frequency part are generated to generate a ... Under the effective number of phase coding area signals, the return-to-zero main stripe coding pattern is projected onto the object to be measured to obtain multiple stripe images, and the multiple stripe images are decoded according to the stripe frequency in the stripe geometric parameters corresponding to each frequency part to generate the target absolute phase; finally, the target absolute phase is used as the input of the preset depth phase mapping model to output the three-dimensional information of the object to be measured; based on the above scheme, the present invention is based on the preset coding area radius range and preset angle conditions, according to each frequency part and the stripe geometric parameters corresponding to each frequency part, the coding style of the generated stripe coding pattern can be printed on a self-made grating code disk, without relying on the expensive micromirrors of the high-precision DLP projector, which can effectively reduce the projection cost.

[0212] See also Figure 4 , Figure 4 This is a structural block diagram of a multi-layer multi-frequency radial stripe encoding and decoding device provided in Example 2 of the present invention.

[0213] The present invention provides a multi-layer multi-frequency radial stripe encoding and decoding device, comprising:

[0214] An acquisition module 401 is used to acquire basic parameters of the fringe image and generate multiple frequency parts and fringe geometric parameters corresponding to each frequency part based on the basic parameters of the fringe image and the preset maximum and minimum frequencies of the fringe;

[0215] The stripe pattern generating module 402 is configured to generate a stripe coding pattern based on a preset coding region radius range and a preset angle condition, each frequency portion and the stripe geometric parameters corresponding to each frequency portion;

[0216] The return-to-zero module 403 is configured to extract signals from the signal coding pattern and the peripheral phase-shift zero-point coding pattern in the fringe coding pattern, generate a phase coding region signal and a zero-point signal, and perform a return-to-zero operation on the main fringe coding pattern in the fringe coding pattern using the zero-point signal to generate a return-to-zero main fringe coding pattern.

[0217] Phase output module 404 is configured to project the return-to-zero main fringe coding pattern onto the object under test based on the effective number of phase coding region signals to obtain multiple fringe images, and decode the multiple fringe images according to the fringe frequencies in the fringe geometric parameters corresponding to each frequency portion to generate the target absolute phase;

[0218] The three-dimensional information output module 405 is configured to use the target absolute phase as an input of a preset depth phase mapping model to output three-dimensional information of the object under test.

[0219] Furthermore, the acquisition module 401 is specifically configured to:

[0220] Based on the basic parameters of the fringe image, a fringe image and an arc center point are generated;

[0221] Divide the fringe image to generate multiple frequency parts;

[0222] Calculate the image angle range corresponding to each frequency part according to the number of fringe frequencies corresponding to each frequency part;

[0223] Calculate the polar angle corresponding to each frequency part according to the image pixel coordinates corresponding to each frequency part;

[0224] Calculate the angle parameters corresponding to each frequency part by using the polar angle corresponding to each frequency part and the image angle range;

[0225] Determine the starting polar angle corresponding to each frequency part based on the angle parameter corresponding to each frequency part;

[0226] Calculate the fringe frequency corresponding to each frequency part according to the highest frequency of the fringe, the lowest frequency of the fringe, the number of fringe strokes corresponding to each frequency part, and the angle parameters;

[0227] Based on the arc center point and the image pixel coordinates corresponding to each frequency portion, the radial distance corresponding to each frequency portion is determined.

[0228] Furthermore, the preset coding area radius range includes the main stripe coding area radius range, the signal coding area radius range, and the peripheral phase shift zero point coding area radius range; the stripe pattern generating module 402 includes:

[0229] The first submodule is used to determine whether the radial distance corresponding to each frequency part is within the radius range of the main fringe coding area, the radius range of the signal coding area or the radius range of the peripheral phase shift zero point coding area;

[0230] The second submodule is used to use any frequency portion corresponding to a radial distance within the radius of the main stripe coding area as a target main stripe frequency portion, and generate a main stripe coding pattern according to the stripe frequency, polar angle, and starting polar angle corresponding to each target main stripe frequency portion;

[0231] The third submodule is configured to use any frequency portion corresponding to a radial distance within the radius of the signal encoding region as the initial signal frequency portion, and based on a preset angle condition, screen each initial signal frequency portion according to the fringe frequency, polar angle, starting polar angle, and phase shift step number corresponding to each initial signal frequency portion to determine multiple target signal frequency portions;

[0232] A fourth submodule is configured to generate a signal coding pattern according to a starting polar angle corresponding to each target signal frequency portion;

[0233] A fifth submodule is configured to use any frequency portion corresponding to a radial distance within a radius range of the peripheral phase shift zero point coding region as an initial peripheral phase shift zero point frequency portion;

[0234] A sixth submodule is configured to set a polar angle range based on a starting polar angle corresponding to each frequency portion;

[0235] A seventh submodule is used to determine whether the polar angle of each initial peripheral phase shift zero frequency part is within the polar angle range;

[0236] The eighth submodule is configured to use the initial peripheral phase shift zero frequency portion corresponding to any polar angle within the polar angle range as the target peripheral phase shift zero frequency portion, and generate a peripheral phase shift zero coding pattern according to the starting polar angle corresponding to each target peripheral phase shift zero frequency portion.

[0237] Furthermore, the second submodule is specifically configured to:

[0238] The phase corresponding to the main fringe frequency part of each target is calculated by using the fringe frequency, polar angle, and starting polar angle corresponding to the main fringe frequency part of each target;

[0239] The phase corresponding to the main fringe frequency part of each target is used to calculate the regional grayscale value corresponding to the main fringe frequency part of each target;

[0240] Generate main fringe codes based on the starting polar angle corresponding to the main fringe frequency portion of each target;

[0241] A main stripe coding pattern is generated according to the main stripe coding and the regional grayscale values corresponding to each target main stripe frequency part.

[0242] Furthermore, the third submodule is specifically used to:

[0243] Calculating the phase shift angle corresponding to each frequency portion of the initial signal according to the number of phase shift steps corresponding to each frequency portion of the initial signal;

[0244] The phase corresponding to each frequency portion of the initial signal is calculated using the fringe frequency, polar angle, and starting polar angle corresponding to each frequency portion of the initial signal;

[0245] Performing a modulo operation on the phase corresponding to each frequency portion of the initial signal to determine a standard phase corresponding to each frequency portion of the initial signal;

[0246] Calculate the absolute value of the difference between the standard phase and the phase shift angle corresponding to each frequency part of the initial signal, and compare it with the preset error limit;

[0247] The frequency portion of the initial signal corresponding to the absolute value of the difference between any standard phase and the phase shift angle that is smaller than a preset error limit is used as the frequency portion of the intermediate signal;

[0248] Determining the start and end angles corresponding to the respective intermediate signal frequency portions based on the polar angles corresponding to the respective intermediate signal frequency portions;

[0249] Determine whether the start and end angles and polar angles corresponding to each intermediate signal frequency portion meet preset angle conditions;

[0250] The intermediate signal frequency portion corresponding to any starting and ending angles and polar angles that satisfy the preset angle conditions is used as the target signal frequency portion.

[0251] Furthermore, the fourth submodule is specifically configured to:

[0252] Setting a regional grayscale value for each target signal frequency portion based on a preset constant;

[0253] Generate signal codes according to the starting polar angles corresponding to the frequency parts of each target signal;

[0254] A signal coding pattern is generated according to the signal coding and the regional grayscale value corresponding to each target signal frequency portion.

[0255] Furthermore, the eighth submodule is specifically configured to:

[0256] Setting a regional grayscale value for the peripheral phase shift zero frequency portion of each target based on a preset constant;

[0257] Generate a peripheral phase shift zero point code according to the starting polar angle corresponding to the peripheral phase shift zero point frequency part of each target;

[0258] A peripheral phase-shift zero-point coding pattern is generated according to the peripheral phase-shift zero-point coding and the regional grayscale values corresponding to each target peripheral phase-shift zero-point frequency portion.

[0259] Furthermore, the phase output module 404 is specifically configured to:

[0260] Grouping the plurality of stripe images to determine a plurality of stripe image groups;

[0261] Calculating the wrapping phase of each fringe image group according to the light intensity of each fringe image in each fringe image group;

[0262] Selecting a zero-bit wrapping phase and a minimum fringe frequency from the wrapping phase of each fringe image group and the fringe frequency corresponding to each frequency portion, respectively, and calculating an initial absolute phase based on the zero-bit wrapping phase and the minimum fringe frequency;

[0263] Selecting a target wrapping phase and a target fringe frequency from the wrapping phase of each fringe image group and the fringe frequency corresponding to each frequency part, respectively, and calculating a phase difference using the target fringe frequency, the target wrapping phase and the initial absolute phase;

[0264] Based on the lowest fringe frequency, determine the equivalent frequency;

[0265] Calculate the equivalent phase based on the equivalent frequency, target fringe frequency and phase difference;

[0266] Calculate the number of whole cycles based on the equivalent phase and the target wrapped phase;

[0267] The target fringe frequency, target wrapping phase and number of full cycles are used to update the initial absolute phase, determine the intermediate absolute phase, and count the number of updates in real time;

[0268] Determine whether the number of updates reaches the preset number of updates;

[0269] If so, the intermediate absolute phase is used as the target absolute phase.

[0270] In an optional embodiment of the device, the device further comprises:

[0271] The first module is configured to update the equivalent frequency using the target fringe frequency to determine a new equivalent frequency if the number of updates does not reach the preset number of updates;

[0272] The second module is used to select a new target wrapping phase and a new target fringe frequency from the wrapping phase of each fringe image group and the fringe frequency corresponding to each frequency part respectively;

[0273] The third module is configured to use the intermediate absolute phase as a new initial absolute phase and calculate a new phase difference using the new target wrapped phase and the new initial absolute phase;

[0274] The fourth module is used to jump to the step of calculating the equivalent phase according to the equivalent frequency, the target fringe frequency and the phase difference until the number of updates reaches the preset number of updates;

[0275] The fifth module is configured to use the intermediate absolute phase determined when the number of updates reaches the preset number of updates as the target absolute phase.

[0276] Those skilled in the art will clearly understand that, for the convenience and brevity of description, the specific working processes of the above-described devices, modules and sub-modules can refer to the corresponding processes in the aforementioned method embodiments and will not be repeated here.

[0277] In the several embodiments provided in this application, it should be understood that the disclosed devices and methods can be implemented in other ways. For example, the device embodiments described above are merely schematic. For example, the division of units is only a logical function division. In actual implementation, there may be other division methods, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of devices or units, which can be electrical, mechanical or other forms.

[0278] The units described as separate components may or may not be physically separate, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed across multiple network units. Some or all of these units may be selected to achieve the purpose of this embodiment according to actual needs.

[0279] As described above, the above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit the same. Although the present invention has been described in detail with reference to the above embodiments, those skilled in the art should understand that the technical solutions described in the above embodiments can still be modified, or some of the technical features thereof can be replaced by equivalents. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present invention.

Claims

1. A multi-layer multi-frequency radial stripe encoding and decoding method, characterized in that: include: Obtaining basic parameters of the fringe image, and generating multiple frequency parts and fringe geometric parameters corresponding to each frequency part according to the basic parameters of the fringe image and preset maximum and minimum frequencies of the fringe; Generate a stripe coding pattern based on a preset coding area radius range and a preset angle condition, each of the frequency parts and the stripe geometric parameters corresponding to each of the frequency parts; performing signal extraction on the signal coding pattern and the peripheral phase-shift zero-point coding pattern in the stripe coding pattern to generate a phase coding region signal and a zero-point signal, and performing a return-to-zero operation on the main stripe coding pattern in the stripe coding pattern using the zero-point signal to generate a return-to-zero main stripe coding pattern; Based on the effective number of the phase encoding region signals, the return-to-zero main fringe coding pattern is projected onto the object to be measured to obtain a plurality of fringe images, and the plurality of fringe images are decoded according to the fringe frequencies in the fringe geometric parameters corresponding to the frequency portions to generate the target absolute phase; The target absolute phase is used as the input of a preset depth phase mapping model to output three-dimensional information of the object under test.

2. The multi-layer multi-frequency radial stripe encoding and decoding method according to claim 1, characterized in that: The fringe geometric parameters further include a starting polar angle, a radial distance, and a polar angle; the preset fringe maximum and minimum frequencies include the fringe maximum frequency and the fringe minimum frequency; and the generating of multiple frequency parts and fringe geometric parameters corresponding to each frequency part according to the fringe image basic parameters and the preset fringe maximum and minimum frequencies includes: Based on the basic parameters of the fringe image, a fringe image and an arc center point are generated; dividing the fringe image to generate a plurality of frequency parts; Calculating the image angle range corresponding to each frequency portion according to the number of fringe strokes corresponding to each frequency portion; Calculating the polar angle corresponding to each frequency portion according to the image pixel coordinates corresponding to each frequency portion; Calculating the angle parameter corresponding to each frequency portion using the polar angle corresponding to each frequency portion and the image angle range; Determining a starting polar angle corresponding to each frequency portion based on an angle parameter corresponding to each frequency portion; Calculating the fringe frequency corresponding to each frequency portion according to the highest frequency of the fringe, the lowest frequency of the fringe, the number of fringe strokes corresponding to each frequency portion, and the angle parameter; Based on the arc center point and the image pixel coordinates corresponding to each of the frequency parts, a radial distance corresponding to each of the frequency parts is determined.

3. The multi-layer multi-frequency radial stripe encoding and decoding method according to claim 2, characterized in that: The preset coding area radius range includes the main stripe coding area radius range, the signal coding area radius range, and the peripheral phase shift zero point coding area radius range; the generating of the stripe coding pattern based on the preset coding area radius range and the preset angle condition, each of the frequency parts and the stripe geometric parameters corresponding to each of the frequency parts, includes: respectively determining whether the radial distance corresponding to each of the frequency parts is within the radius range of the main fringe coding area, the radius range of the signal coding area, or the radius range of the peripheral phase shift zero point coding area; Taking any frequency portion corresponding to a radial distance within the radius of the main stripe coding region as a target main stripe frequency portion, and generating a main stripe coding pattern according to the stripe frequency, polar angle, and starting polar angle corresponding to each target main stripe frequency portion; Taking any frequency portion corresponding to a radial distance within the radius of the signal encoding region as an initial signal frequency portion, and based on the preset angle condition, screening each of the initial signal frequency portions according to the fringe frequency, polar angle, starting polar angle, and phase shift step number corresponding to each of the initial signal frequency portions to determine a plurality of target signal frequency portions; generating a signal coding pattern according to a starting polar angle corresponding to each of the target signal frequency parts; Taking any frequency portion corresponding to a radial distance within the radius range of the peripheral phase shift zero point encoding region as an initial peripheral phase shift zero point frequency portion; Setting a polar angle range based on a starting polar angle corresponding to each of the frequency parts; respectively determining whether the polar angle of each of the initial peripheral phase shift zero-point frequency parts is within the polar angle range; An initial peripheral phase shift zero frequency portion corresponding to any polar angle within the polar angle range is used as a target peripheral phase shift zero frequency portion, and a peripheral phase shift zero coding pattern is generated according to the starting polar angle corresponding to each target peripheral phase shift zero frequency portion.

4. The multi-layer multi-frequency radial stripe encoding and decoding method according to claim 3, characterized in that: Generating a main stripe coding pattern according to the stripe frequency, polar angle, and starting polar angle corresponding to each target main stripe frequency portion includes: Calculating the phase corresponding to each target main fringe frequency portion by using the fringe frequency, polar angle, and starting polar angle corresponding to each target main fringe frequency portion; Calculate the regional grayscale value corresponding to each target main stripe frequency portion using the phase corresponding to each target main stripe frequency portion; generating a main stripe code based on a starting polar angle corresponding to each target main stripe frequency portion; A main stripe coding pattern is generated according to the main stripe coding and the regional grayscale values corresponding to each of the target main stripe frequency parts.

5. The multi-layer multi-frequency radial stripe encoding and decoding method according to claim 3, characterized in that: The method of screening each of the initial signal frequency parts based on the preset angle condition according to the fringe frequency, polar angle, starting polar angle, and phase shift step number corresponding to each of the initial signal frequency parts to determine multiple target signal frequency parts includes: Calculating the phase shift angle corresponding to each of the initial signal frequency parts according to the phase shift step number corresponding to each of the initial signal frequency parts; Calculating the phase corresponding to each of the initial signal frequency parts by using the fringe frequency, polar angle, and starting polar angle corresponding to each of the initial signal frequency parts; Performing a modulo operation on the phase corresponding to each of the initial signal frequency parts to determine a standard phase corresponding to each of the initial signal frequency parts; Calculating the absolute value of the difference between the standard phase and the phase shift angle corresponding to each frequency portion of the initial signal, and comparing it with a preset error limit; Taking any initial signal frequency portion corresponding to the absolute value of the difference between the standard phase and the phase shift angle that is smaller than the preset error limit as the intermediate signal frequency portion; determining, based on the polar angle corresponding to each of the intermediate signal frequency portions, a start and end angle corresponding to each of the intermediate signal frequency portions; Determining whether the start and end angles and polar angles corresponding to the intermediate signal frequency parts all meet the preset angle conditions; The intermediate signal frequency portion corresponding to any starting and ending angles and polar angles that both meet the preset angle condition is used as the target signal frequency portion.

6. The multi-layer multi-frequency radial stripe encoding and decoding method according to claim 3, characterized in that: Generating a signal coding pattern according to the starting polar angle corresponding to each target signal frequency portion includes: Setting a regional grayscale value for each of the target signal frequency parts based on a preset constant; generating a signal code according to a starting polar angle corresponding to each of the target signal frequency parts; A signal coding pattern is generated according to the signal coding and the regional grayscale value corresponding to each target signal frequency portion.

7. The multi-layer multi-frequency radial stripe encoding and decoding method according to claim 3, characterized in that: Generating a peripheral phase shift zero point coding pattern according to the starting polar angle corresponding to each target peripheral phase shift zero point frequency portion includes: Setting a regional grayscale value for each of the target peripheral phase shift zero-point frequency parts based on a preset constant; generating a peripheral phase shift zero point code according to a starting polar angle corresponding to each target peripheral phase shift zero point frequency portion; A peripheral phase-shift zero-point coding pattern is generated according to the peripheral phase-shift zero-point coding and the regional grayscale values corresponding to each of the target peripheral phase-shift zero-point frequency parts.

8. The multi-layer multi-frequency radial stripe encoding and decoding method according to claim 3, characterized in that: Decoding the plurality of fringe images according to the fringe frequencies in the fringe geometric parameters corresponding to the frequency portions to generate a target absolute phase includes: Grouping the plurality of stripe images to determine a plurality of stripe image groups; Calculating the wrapping phase of each fringe image group according to the light intensity of each fringe image in each fringe image group; Selecting a zero-bit wrapping phase and a minimum fringe frequency from the wrapping phases of each fringe image group and the fringe frequencies corresponding to each frequency portion, respectively, and calculating an initial absolute phase based on the zero-bit wrapping phase and the minimum fringe frequency; Selecting a target wrapping phase and a target fringe frequency from the wrapping phase of each fringe image group and the fringe frequency corresponding to each frequency portion, respectively, and calculating a phase difference using the target fringe frequency, the target wrapping phase, and the initial absolute phase; determining an equivalent frequency based on the lowest fringe frequency; Calculating an equivalent phase according to the equivalent frequency, the target fringe frequency, and the phase difference; Calculating the number of whole cycles based on the equivalent phase and the target wrapped phase; updating the initial absolute phase using the target fringe frequency, the target wrapping phase, and the number of full cycles, determining an intermediate absolute phase, and counting the number of updates in real time; Determining whether the update number reaches a preset update number; If so, the intermediate absolute phase is used as the target absolute phase.

9. The multi-layer multi-frequency radial stripe encoding and decoding method according to claim 8, characterized in that: Also includes: If the update number does not reach the preset update number, the equivalent frequency is updated using the target fringe frequency to determine a new equivalent frequency; Selecting a new target wrapping phase and a new target fringe frequency from the wrapping phase of each fringe image group and the fringe frequency corresponding to each frequency portion respectively; Using the intermediate absolute phase as a new initial absolute phase, and using the new target wrapped phase and the new initial absolute phase to calculate a new phase difference; Jumping to the step of calculating the equivalent phase according to the equivalent frequency, the target fringe frequency and the phase difference until the number of updates reaches the preset number of updates; The intermediate absolute phase determined when the number of updates reaches the preset number of updates is used as the target absolute phase.

10. A multi-layer multi-frequency radial stripe encoding and decoding device, characterized in that: include: An acquisition module is used to acquire basic parameters of the fringe image and generate multiple frequency parts and fringe geometric parameters corresponding to each frequency part according to the basic parameters of the fringe image and the preset maximum and minimum frequencies of the fringe; a stripe pattern generating module, configured to generate a stripe coding pattern based on a preset coding area radius range and a preset angle condition, each of the frequency parts and the stripe geometric parameters corresponding to each of the frequency parts; a return-to-zero module, configured to extract signals from the signal coding pattern and the peripheral phase-shift zero-point coding pattern in the stripe coding pattern, respectively, to generate a phase coding region signal and a zero-point signal, and to perform a return-to-zero operation on the main stripe coding pattern in the stripe coding pattern using the zero-point signal, to generate a return-to-zero main stripe coding pattern; a phase output module, configured to project the return-to-zero main fringe coding pattern onto the object under test based on the effective number of the phase coding region signals to obtain a plurality of fringe images, and decode the plurality of fringe images according to the fringe frequencies in the fringe geometric parameters corresponding to the respective frequency portions to generate a target absolute phase; The three-dimensional information output module is used to use the target absolute phase as the input of a preset depth phase mapping model to output the three-dimensional information of the object under test.

Citation Information

Patent Citations

  • Optical three-dimensional measurement method and system based on pixel coding

    CN114812437A

  • Concentric circle and spiral phase shift stripe-based structured light coding and decoding method and system

    CN118129640A

  • Optical encoder

    JP1984224514A

  • Method for restoring shape using spatio-temporal image of real object, method for processing image and shape restoring system

    JP2001059715A

  • Method for generating reference pattern of 3D shape measuring device

    KR1020170027892A