Underwater high-speed three-dimensional measurement method based on stripe structured light
By projecting three-step phase-shift sinusoidal fringes and Gray code patterns, and combining underwater light transmission model analysis, a hybrid Gray code pattern was designed, which solved the problems of jump error and low coding efficiency in underwater 3D measurement, and realized high-precision 3D reconstruction in high-speed dynamic scenes.
Patent Information
- Application Number
- CN202511282170.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-09-09
- Publication Date
- 2025-11-07
- Estimated Expiration
- 2045-09-09
AI Technical Summary
Existing underwater 3D measurement methods suffer from frequent jump errors and low coding efficiency in dynamic scenarios or high-turbidity water bodies, making it difficult to meet the needs of high-speed dynamic scenarios.
A high-speed underwater 3D measurement method based on striped structured light is adopted. By projecting three-step phase-shifting sinusoidal stripes and Gray code patterns, combined with underwater light transmission model to analyze light intensity information, identify and correct noise blocks, design hybrid Gray code patterns, and perform absolute phase reconstruction and 3D point cloud recovery.
It improves the stability and coding robustness of underwater 3D measurement, shortens the acquisition time, meets the measurement requirements of high-speed dynamic scenes, and ensures the accuracy and reliability of 3D reconstruction.
Smart Images

Figure CN120760636B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of underwater optical three-dimensional imaging, in particular to an underwater high-speed three-dimensional measurement method based on a stripe structured light. BACKGROUND
[0002] Underwater optical three-dimensional imaging is one of the important technologies for underwater three-dimensional reconstruction due to its high precision. In complex underwater environments, it is difficult for ROV (Remote Operated Vehicle) and other devices equipped with three-dimensional imaging equipment to stabilize their own poses during operation. The data reliability of traditional attitude sensors is low, so the dual vision and face structured light imaging technology with lower attitude requirements gradually become the mainstream scheme for underwater three-dimensional reconstruction. Among them, the stripe projection profilometry (PSP) can realize high-precision three-dimensional reconstruction by projecting a sinusoidally coded light pattern and capturing deformation information. Phase unwrapping is a key step in the PSP system, and the time phase unwrapping (TPU) method performs better in underwater scenes due to its stability and adaptability. Gray code coding, as a common means of TPU, has been widely used in underwater strong scattering environments due to its anti-interference performance, providing important technical support for underwater three-dimensional reconstruction of targets.
[0003] In actual underwater operation scenarios, although the Gray code coding has strong anti-interference ability in underwater environments, it still faces two main technical bottlenecks: one is frequent jump error, and the other is low coding efficiency. The jump error is mainly caused by the discontinuity of the wrapped phase in the jump error area and the blurring of the Gray code image caused by water scattering. Especially in dynamic scenes or high-turbidity water bodies, the error area will further expand, seriously affecting the reconstruction quality. Existing solutions (such as post-optimization, deep learning, or active compensation) have limited effect in dynamic underwater scenes, or sacrifice measurement efficiency. In addition, the coding efficiency of Gray code is low, and multiple pattern markers are needed to mark the phase period, resulting in prolonged acquisition time, making it difficult to meet the needs of high-speed dynamic scenes. Therefore, how to improve the coding efficiency while enhancing the robustness of Gray code has become a key problem to be solved in current underwater three-dimensional measurement. Therefore, the present application proposes an underwater high-speed three-dimensional measurement method based on a stripe structured light. SUMMARY
[0004] The present application aims to provide an underwater high-speed three-dimensional measurement method based on a stripe structured light to solve the problems raised in the background art.
[0005] To solve the above technical problems, the technical solution adopted by the present application is:
[0006] The underwater high-speed three-dimensional measurement method based on a stripe structured light comprises the following steps:
[0007] S1, in the underwater operation scene of the FPP system, a three-step phase shift sinusoidal fringe and a Gray code pattern are projected to the object to be measured, and a wrapped phase 1, a wrapped phase 2 and an auxiliary order phase are calculated respectively to ensure that the phase information is complementary;
[0008] S2, the light intensity information received by the camera is analyzed, the direct attenuation light, the forward scattering light and the backscattering light are quantified in combination with the underwater light transmission model, and the water body influence analysis is performed;
[0009] S3, based on the initial wrapped phase, the order phase is divided into a stable region and a non-stable region, the stable region is combined with the wrapped phase 1 to calculate the preliminary absolute phase, and for the non-stable region, the non-stable region order information is aligned with the wrapped phase 2 by using the wrapped phase 1;
[0010] S4, the island region of the non-stable region in the order phase is analyzed, and noise blocks are identified and corrected;
[0011] S5, the order phase after optimization is fused with the wrapped phase, the continuous absolute phase is calculated, the absolute phase reconstruction is completed, and the periodic error is eliminated;
[0012] S6, a mixed three-value and binary Gray code pattern is designed and projected, the order phase is generated by decoding, and the fringe period is marked to eliminate the phase ambiguity;
[0013] S7, the underwater structured light measurement system of the FPP system is calibrated, the three-dimensional point cloud information of the object to be measured is recovered in combination with the system calibration parameters and the reconstructed absolute phase, and the high-precision reconstruction of the underwater target is completed.
[0014] The further improvement of the technical scheme of the application is that the S1 comprises:
[0015] In the underwater FPP system operation scene, according to the size of the object to be measured and the measurement accuracy requirement, a DLP4710 projection system is used to project a set of three-step phase shift sinusoidal fringe patterns and a set of Gray code patterns to the object to be measured, the phase step is , a three-step phase shift sinusoidal fringe is used, two wrapped phases, a wrapped phase 1 and a wrapped phase 2, are constructed by different solving methods, the two wrapped phases have a phase difference design of , and a Hikvision industrial camera is used to synchronously collect the fringe images modulated by the object surface;
[0016] The collected fringe images are respectively subjected to three-step phase shift solving to obtain two initial wrapped phases, and the Gray code pattern is decoded to obtain an auxiliary order phase;
[0017] The phase difference distribution between the initial wrapping phase and the auxiliary order phase is analyzed to verify their spatial complementarity. In the gradient abrupt change region, if one set of phases has a jump error, the other set of phases can provide a reliable reference, thus preliminarily identifying potential error regions.
[0018] A further improvement to the technical solution of this invention lies in the following: In step S2, the process of analyzing the impact on water bodies using an underwater light transmission model is as follows:
[0019] When the FPP system operates underwater, the light intensity information received by the actual industrial camera is quite complex due to the absorption and scattering effects of the water. Considering only the changes in the light emitted by the light source during its propagation in the water, it can be divided into three components: directly attenuated light... Forward scattered light and backscattered light ;
[0020] The expression for the total light intensity information received by the industrial camera is:
[0021] ;
[0022] Direct attenuation of light is the main cause of dark images, and its expression is:
[0023] ;
[0024] in, Indicates the first The intensity of the emitted light in the phase-shifted image. The volume decay coefficient, The distance between the system and the target object;
[0025] Forward-scattered light is light that is scattered forward during its propagation in water, reducing the modulation of the projected pattern and causing the image to blur. Its expression is:
[0026] ;
[0027] in, Represents the width and height of an industrial camera image; conv convolution operation; Let be the underwater point spread function, i.e., the scattering kernel function, representing the distance from position . Departure Arrival The fuzzy weights caused by scattering during the process are represented by the kernel function as follows:
[0028] ;
[0029] In the formula, The scaling factor representing the forward scattering component. , The transmittance of direct light. is the transmittance of the scattered light; denotes the inverse Fourier transform; is an empirical damping factor; denotes the depth value at the point; denotes the corresponding frequency component at the point;
[0030] Backscattered light is the light that is scattered back into the industrial camera before reaching the target object, and is the main source of background noise, and its expression is:
[0031] ;
[0032] wherein denotes white noise with mean 0 and variance .
[0033] Further improvement of the technical scheme of the present application is that the S3 comprises:
[0034] Based on the initial wrapped phase, the order phase is divided into a stable region (continuous amplitude and less noise) and a non-stable region (amplitude jump and more noise) by a wrapped phase 1 threshold value, since in the non-stable region, the wrapped phase and the Gray code order are easily misaligned due to water scattering or phase jump, therefore the stable region and the non-stable region are extracted from the order phase respectively, the stable region is reserved for preliminary absolute phase calculation, and the non-stable region is used for subsequent processing.
[0035] According to the analysis result, for the non-stable region, the initial wrapped phase 1 is used to make the order information of the non-stable region consistent with the wrapped phase 2, and an optimized non-stable region order matrix is output.
[0036] Further improvement of the technical scheme of the present application is that the S4 comprises:
[0037] The non-stable region order phase matrix is subjected to connected domain analysis, all island regions, i.e. independent regions not connected with surrounding orders, are identified, then in each island, according to the order value, the island is further segmented into a sub-island region, i.e. a connected sub-block composed of the same order value in the island.
[0038] The area (pixel number), the number and proportion of boundary pixels and surrounding contact pixels of each sub-island are calculated, if the proportion or number of contact pixels of the sub-island and adjacent sub-islands exceeds a set threshold value, the sub-island is marked as a noise block.
[0039] For the sub-block determined as noise, the order value of the adjacent stable region with the most contact pixels is used to replace the order value of the sub-block, and in the repair process, smoothing processing is performed according to the boundary adaptive principle to ensure that the repaired region and the surrounding phase field are spatially continuous and have no obvious mutation.
[0040] The further improvement of the technical scheme of the present application is that the bit-by-bit complementary decoding strategy specifically comprises:
[0041] In the underwater application scenario, due to the absorption and scattering characteristics of the water body, a large amount of noise is introduced into the actually collected image, especially for the Gray code pattern, the black and white stripe edges are blurred and unclear, thereby causing decoding errors;
[0042] Based on the phase bit-by-bit complementary decoding strategy, three frames of phase-shifted sinusoidal images are used to solve the wrapped phase, in order to realize the two equal divisions of the wrapped phase, a three-step phase shift design with a phase shift step of is adopted, and the expression of the sinusoidal pattern is:
[0043] ;
[0044] According to the above formula, the wrapped phases of the formulas and are solved, and two wrapped phase values and are obtained:
[0045] ;
[0046] Since and are phase-difference in the x direction, therefore and are also phase-difference in the x direction;
[0047] The order phase is calculated, for , the phase is aligned with the order phase , but due to the instability of the Gray code at the jump, the phase obtained by directly expanding at this point is not reliable;
[0048] The phase is divided into two parts for processing, the high-quality absolute phase is constructed, the order phase is extracted in the most stable interval, and the absolute phase is calculated:
[0049] ;
[0050] ;
[0051] The order phase is extracted from the unreliable information phase interval and is aligned:
[0052] ;
[0053] At this time For a plurality of island regions, including order jump error regions and a large amount of noise, which cannot be directly used for restoring absolute phase;
[0054] Further, the noise identification processing is performed on the islands in the order phase matrix. For the first island, there are a plurality of sub-regions with the same value and connectivity If the following conditions are met, it is identified as a noise block.
[0055] ;
[0056] In the formula, The number of pixels of the sub-region adjacent to different sub-regions , is The number of pixels of the sub-region perimeter, is the identification threshold of noise. After the connected region is judged as a noise block, the following rules are followed for processing:
[0057] ; In the formula,
[0058] represents the pixel value set of all different value sub-islands adjacent to ; is the pixel value of the candidate adjacent sub-island; , is the pixel value of position and in order phase k, wherein represents any pixel inside the current noise block, represents the pixel on the boundary of the noise sub-island. Finally, the noise of the entire island is corrected, and is calculated. It should be noted that this method is also effective for order phase ;
[0059] ; The order phase
[0060] corrected for noise is combined with and the absolute phase is calculated, and the complete absolute phase is finally obtained as follows:
[0061] . The further improvement of the technical scheme of the present application is that the S5 comprises:
[0062]
[0063] The optimized order phase is spatially aligned with the wrapped phase;
[0064] An absolute phase is calculated based on the spatially aligned order phase and the wrapped phase to establish a preliminary continuous phase field.
[0065] The further improvement of the technical scheme of the present application is that the S6 comprises:
[0066] A hybrid encoding pattern of two frames of three-value Gray codes and one frame of two-value Gray codes is designed, wherein the three-value Gray codes have a small spatial frequency and adopt an asymmetric gray scale distribution strategy to reduce scattering interference, and the two-value Gray codes have a large spatial frequency, so the traditional encoding structure is maintained to ensure edge stability; the hybrid encoding pattern is synchronously projected through a projection system, and a deformed encoding image is collected by an industrial camera to provide basic data for order phase decoding;
[0067] The collected Gray code image is binarized or trinized, and a binary encoding sequence is generated through pixel-by-pixel decoding; through XOR operation and bit splicing, the encoding value is converted into an order phase, and the absolute order of each fringe period is accurately marked; by using the high information density characteristics of the hybrid encoding, the number of projection frames is reduced while the accuracy and anti-interference ability of the order information are ensured;
[0068] The decoded order phase is aligned with the wrapped phase to eliminate phase periodicity ambiguity, and at the same time, combined with spatial consistency inspection, local jump error caused by scattering or decoding error is corrected to output absolute phase information for providing accurate input for three-dimensional reconstruction.
[0069] The further improvement of the technical scheme of the present application is that the S7 comprises:
[0070] In the underwater operation environment of the FPP system, the underwater structured light measurement system is calibrated, including the internal and external parameter calibration of the industrial camera and the projection system;
[0071] A refraction correction strategy based on a ray model is adopted, according to the parameters obtained by calibration in the air, the underwater imaging ray equation corresponding to the image pixel is derived through geometric modeling and Snell's law to compensate for the geometric distortion caused by multi-interface refraction, so that the mapping relationship between the image pixel and the space ray is more accurate;
[0072] According to the system calibration parameters, a mapping model of the absolute phase and the spatial coordinates is established, the absolute phase information obtained by reconstruction is substituted into the mapping model, and the three-dimensional coordinates of each point on the surface of the measured object in the industrial camera coordinate system are calculated through the principle of triangulation to preliminarily generate a sparse three-dimensional point cloud of the measured object.
[0073] The primary generated point cloud is subjected to optimization processing such as denoising and filtering, outliers and noise interference are removed, point cloud registration and fusion algorithms are used, point cloud data under different perspectives are integrated, the integrity and density of the point cloud are improved, and finally high-precision and high-quality three-dimensional point cloud of the measured object is output, and high-precision reconstruction of the underwater target is completed.
[0074] Due to the adoption of the above technical solutions, the present application has achieved the following technical progress compared with the prior art:
[0075] 1. The underwater high-speed three-dimensional measurement method based on stripe structured light provided by the present application adopts a phase two-division complementary decoding strategy, effectively identifies and corrects the jump error area in the order phase by constructing complementary wrapped phase information, and corrects the incorrect order phase by using a noise correction algorithm, thereby significantly improving the measurement stability in a dynamic scene and ensuring the accuracy and reliability of three-dimensional reconstruction.
[0076] 2. The underwater high-speed three-dimensional measurement method based on stripe structured light provided by the present application proposes an asymmetric gray scale distribution strategy, redesigns the gray scale mapping mode of the three-value Gray code, improves the distinguishability of the stripe edge in underwater propagation, effectively suppresses the misjudgment caused by edge blur, enhances the robustness of the Gray code encoding, and enables it to maintain high decoding accuracy in underwater complex environments.
[0077] 3. The underwater high-speed three-dimensional measurement method based on stripe structured light provided by the present application adopts a three-value and two-value hybrid Gray code encoding strategy combined with asymmetric gray scale distribution, significantly reduces the number of projection patterns, while maintaining high spatial resolution, greatly improves the encoding efficiency, shortens the image acquisition time, and meets the three-dimensional measurement requirements in high-speed dynamic scenes. BRIEF DESCRIPTION OF DRAWINGS
[0078] In order to more clearly illustrate the technical solutions in the embodiments of the present application or the prior art, the drawings needed in the embodiments will be briefly introduced as follows. Obviously, the drawings in the following description are only some embodiments described in the present application, and other drawings can also be obtained by those skilled in the art based on these drawings.
[0079] Fig. 1 It is a mathematical model diagram of the light propagation of the FPP system of the present application under water;
[0080] Fig. 2 It is a diagram of decoding error reasons, (a) the phase shift wrapped phase truncation is not aligned with the order phase, (b) the phase shift wrapped arctangent function is susceptible to noise at the truncation point;
[0081] Fig. 3 It is a three-value and two-value hybrid Gray code pattern of the present application. DETAILED DESCRIPTION
[0082] In order to make the purposes, technical solutions and advantages of the embodiments of the present application clearer, the technical solutions in the embodiments of the present application will be described clearly and completely below with reference to the drawings in the embodiments of the present application. Obviously, the described embodiments are some but not all of the embodiments of the present application. Based on the embodiments in the present application, all other embodiments obtained by a person of ordinary skill in the art without creative work fall within the protection scope of the present application.
[0083] Embodiment 1, as shown in the present application provides an underwater high-speed three-dimensional measurement method based on fringe structured light, comprising the following steps: Figs. 1-3
[0084] S1, in the underwater operation scene of the FPP system, a three-step phase shift sinusoidal fringe and a Gray code pattern are projected to the object to be measured, wrapped phase 1, wrapped phase 2 and an auxiliary order phase are calculated respectively, and the phase information is complementary, in the underwater FPP (FPP is fringe projection profilometry) system operation scene, according to the size of the object to be measured and the measurement accuracy requirement, a set of three-step phase shift sinusoidal fringe patterns and a set of Gray code patterns are projected to the object to be measured by using DLP4710 projection system, the phase step is , using the same set of three-step phase shift sinusoidal fringe, two wrapped phases: wrapped phase 1 and wrapped phase 2 are constructed by different solving methods, the two wrapped phases have a phase difference design of , which ensures that their deformation information is complementary in spatial distribution, the object surface modulated fringe images are synchronously collected by using Hikvision industrial camera, the collected fringe images are respectively subjected to three-step phase shift calculation, two initial wrapped phases are obtained, at the same time, the Gray code pattern is decoded to obtain an auxiliary order phase, since the phase exists π offset, the jump error area presents complementary characteristics, the phase difference distribution of the initial wrapped phase and the auxiliary order phase is analyzed, the spatial complementary characteristics are verified, in the gradient mutation area, if one set of phases has jump error, the other set of phases can provide reliable reference, and then the potential error area is preliminarily identified;
[0085] S2, the light intensity information received by the camera is analyzed, the direct attenuation light, the forward scattering light and the backward scattering light are quantified in combination with the underwater light transmission model, and the water body influence analysis is performed;
[0086] The encoding and decoding principles of the phase shift method and the Gray code are as follows:
[0087] The three-dimensional reconstruction of the object is performed in combination with the phase shift method and the Gray code method, the three-dimensional information of the object is measured by using the phase shift method, the order information is measured by using the Gray code, and high-precision three-dimensional reconstruction is realized, wherein the expression of the sinusoidal mode of the phase shift method is:
[0088] ;
[0089] in, This indicates the background light intensity. The modulation index represents the intensity of the sinusoidal projection. The wrapping phase of the sinusoidal projection pattern, For the number of Gray code patterns, , This is the initial phase, used to align the wrapper phase and Gray code order;
[0090] The wrapping phase is calculated using the least squares method, and its expression is:
[0091] ;
[0092] Simultaneously calculate the adjustment system It is used to filter out some noise, and its expression is:
[0093] ;
[0094] The arctangent calculation in Formula 2 restricts the phase to between −π and π. Furthermore, the periodicity of the sine fringes leads to ambiguity between the enclosing phases, necessitating the use of Gray code to mark each phase interval. Gray code has only two modes: black and white. Therefore, N Gray code patterns can mark at most 2N orders, expressed by the formula:
[0095] ;
[0096] ;
[0097] ;
[0098] In the above formula, Indicates the i-th Gray code pattern in The encoded value at this point takes the value 0 or 1, with the first Gray code serving as the initial encoded bit. Each subsequent bit is composed of the least significant bit of the current encoded value and the current Gray code value. conduct The result is obtained by XOR operation, and then the original encoded value is shifted left by one bit and the result is added to it, finally constructing the complete binary encoded value. ;
[0099] It should be noted that the order phase of the Gray code must be aligned with the wrapped phase of the phase shift. Finally, the wrapped phase of the phase shift is expanded using the order information of the Gray code to obtain the absolute phase.
[0100] ;
[0101] Finally, according to the system calibration parameters, the three-dimensional information of the object is recovered;
[0102] In addition, the process of water body influence analysis combined with the underwater light transmission model is as follows:
[0103] When the FPP system is in the underwater operation scene, the light intensity information received by the industrial camera is complex due to the influence of water absorption and scattering. Only considering the change of the light emitted by the light source in the propagation process in the water body, it is divided into three components: direct attenuation light , forward scattering light and backscattering light .
[0104] The expression of the total light intensity information received by the industrial camera is as follows:
[0105] .
[0106] The direct attenuation light is the main reason for the darkening of the image, and its expression is as follows:
[0107] .
[0108] Wherein, represents the exit light intensity of the phase-shifted image at the th step, is the volume attenuation coefficient, is the distance between the system and the target object;
[0109] The forward scattering light is the forward scattering of light in the propagation process in the water body, which reduces the modulation of the projection pattern and causes image blur, and its expression is as follows:
[0110] .
[0111] Wherein, represents the width and height of the industrial camera image; conv convolution operation; is the underwater point spread function, i.e. scattering kernel function, which represents the blur weight caused by scattering in the process of reaching from position , and the kernel function is expressed as:
[0112] .
[0113] In the formula, represents the proportion factor of the forward scattering part, , is the transmittance of direct light, is the transmittance of scattered light; represents the inverse Fourier transform; is an empirical damping factor; represents a depth value at the position; represents a corresponding frequency component at the position;
[0114] Backscattered light is the light scattered back into the industrial camera before reaching the target object, which is the main source of background noise, and its expression is:
[0115] ;
[0116] wherein represents white noise with mean 0 and variance ;
[0117] Under low turbidity water, the image quality is mainly affected by backscattering, which is random noise conforming to Gaussian distribution, while when the water turbidity increases, the forward scattering increases, leading to further decline in image clarity and reduction in modulation, especially for the gray code pattern with obvious black and white boundaries, resulting in blurred black and white stripe edges;
[0118] S3, based on the initial wrapped phase, the order phase is divided into stable region and unstable region, the stable region is combined with the wrapped phase 1 to calculate the preliminary absolute phase, for the unstable region, the wrapped phase 1 is used to make the order information of the unstable region consistent with the wrapped phase 2, based on two initial wrapped phases, through the wrapped phase 1 threshold, the order phase is divided into stable region (continuous amplitude and less noise) and unstable region (amplitude jump and more noise), because in the unstable region, the wrapped phase and the gray code order are easy to be misaligned due to water scattering or phase jump, therefore the stable region and the unstable region are extracted from the order phase respectively, the stable region is reserved for preliminary absolute phase calculation, and the unstable region is used for subsequent processing, according to the analysis result, for the unstable region, the initial wrapped phase 1 is used to make the order information of the unstable region consistent with the wrapped phase 2, and the optimized unstable region order matrix is output;
[0119] S4, analyze the island region of the unstable region in the order phase, identify and correct the noise block, ensure the continuity of the phase data, perform connected component analysis on the order phase matrix of the unstable region, identify all island regions, i.e. independent regions not connected with the surrounding orders, then in each island, further segment the island into sub-island regions according to the order value, i.e. connected sub-blocks in the island composed of the same order value, calculate the area (pixel number), the number and proportion of boundary pixels and surrounding contact pixels of each sub-island, if the proportion or number of contact pixels of the sub-island and the adjacent sub-island exceeds the set threshold, mark it as a noise block, for the sub-block judged as noise, correct it using the order value of the adjacent stable region with the most contact pixels, and perform smoothing processing according to the boundary adaptive principle during the correction process to ensure that the repaired region is spatially continuous with the surrounding phase field and has no obvious mutation;
[0120] In addition, the bit binary complementary decoding strategy specifically includes:
[0121] In the underwater application scenario, due to the absorption and scattering characteristics of the water body, a large amount of noise is introduced into the actually collected image, especially for the Gray code pattern, the black and white stripe edges are blurred and unclear, thereby causing decoding errors;
[0122] Based on the phase binary complementary decoding strategy, according to formula 1, there are three unknowns in the sinusoidal projection pattern, three frames of phase-shifted sinusoidal images are used to solve the wrapped phase, in order to realize the bisection of the wrapped phase, a three-step phase shift design with a phase shift step of is adopted, and the expression of the sinusoidal pattern is:
[0123] ;
[0124] According to the above formula, the wrapped phase of formula and is solved, and two wrapped phase values and are obtained:
[0125] ;
[0126] Since and are π out of phase in the x direction, therefore and are also π out of phase in the x direction;
[0127] The order phase is calculated using formulas (4), (5), and (6). For , the phase is aligned with the order phase , but due to the instability of the Gray code at the jump, the phase obtained by directly expanding at this point is not reliable;
[0128] The phase is processed in two parts to construct a high-quality absolute phase and extract the order phase. Find the most stable interval and calculate the absolute phase. :
[0129] ;
[0130] ;
[0131] For unreliable information phase intervals from Extract the order phase and perform consistent alignment:
[0132] ;
[0133] at this time It consists of multiple isolated regions, which contain order jump error regions and a lot of noise, and cannot be directly used to recover the absolute phase;
[0134] Then, noise identification processing is performed on the islands in the phase matrix of the first order. An isolated island contains multiple interconnected sub-regions with identical values. If the following conditions are met, it is identified as a noise block;
[0135] ;
[0136] In the formula, for With different sub-regions Number of adjacent pixels, for Number of pixels per perimeter of the sub-region The threshold for noise identification is set. Once a connected region is identified as a noise block, it is processed according to the following rules:
[0137] ;
[0138] In the formula, Indicates all with The set of pixel values of adjacent sub-islands with different numerical values; The pixel values of the candidate adjacent sub-islands; , Position in order phase k and The pixel values, where This represents any pixel within the current noise block. This represents the pixels on the boundary of the noisy sub-island. The noise of the entire island is ultimately corrected, and the result is calculated. It should be noted that this method applies to order phase. Equally effective;
[0139] ;
[0140] Corrected order phase And Combined and calculated to get its absolute phase , Finally get the complete absolute phase For:
[0141] ;
[0142] S5, fusion optimization order phase and wrapped phase, calculate continuous absolute phase, complete the reconstruction of absolute phase, eliminate periodic error;
[0143] S6, design and project mixed three-value and binary gray code pattern, decode to generate order phase, mark the period of the fringe to eliminate phase ambiguity;
[0144] S7, calibrate the underwater structured light measurement system for the FPP system, combine the system calibration parameters and the reconstructed absolute phase, restore the three-dimensional point cloud information of the object to be measured, and complete the high-precision reconstruction of the underwater target.
[0145] Embodiment 2, as Figs. 1-3 shown, on the basis of embodiment 1, the application provides a technical scheme: preferably, S5 includes:
[0146] The optimized order phase and the wrapped phase are spatially aligned, and the absolute phase is calculated based on the spatially aligned order phase and the wrapped phase to establish a preliminary continuous phase field, providing high-precision input for three-dimensional coordinate calculation;
[0147] S6 includes:
[0148] A hybrid encoding pattern of two frames of three-value Gray codes and one frame of binary Gray codes is designed, wherein the three-value Gray codes have a small spatial frequency and adopt an asymmetric gray scale distribution strategy to reduce scattering interference, and the binary Gray codes have a large spatial frequency and thus maintain a traditional encoding structure to ensure edge stability. The hybrid encoding pattern is projected synchronously by a projection system, and a deformed encoding image is collected by an industrial camera to provide basic data for order phase decoding. The collected Gray code image is binarized or trinarized, and a binary encoding sequence is generated by pixel-by-pixel decoding. The encoding value is converted into an order phase by means of exclusive OR operation and bit splicing, and the absolute order of each fringe period is accurately marked. The high information density of the hybrid encoding ensures the accuracy and anti-interference ability of the order information while reducing the number of projection frames. The decoded order phase is aligned with the wrapped phase to eliminate the periodic ambiguity of the phase, and the local jump error caused by scattering or decoding error is corrected by combining spatial consistency checking, and the absolute phase information is output to provide accurate input for three-dimensional reconstruction.
[0149] The phase two-division complementary decoding strategy can enhance the robustness of the image without increasing additional projection patterns, and the fault tolerance rate can reach According to the transmission characteristics of spatial frequency light under water, a three-value and binary hybrid encoding strategy is designed for underwater scenes to improve the three-dimensional measurement efficiency in dynamic underwater scenes.
[0150] Two frames of three-value Gray codes can be divided into phase intervals at most, which have a low frequency but limited accuracy. Three frames of three-value Gray codes can achieve intervals, and the frequency is significantly improved, but they face greater scattering error risks in underwater environments. According to the underwater light propagation model in formula (10), the main reason for the blurring of the projection pattern under water is forward scattering. According to formula (11), it is equivalent to a low-pass filter. Combined with the sine expression (13) of the projection, the phase error caused by forward scattering is
[0151]
[0152] And , then
[0153] From formula (24), it can be seen that the phase error increases with the increase of the spatial frequency, which means that the light with high spatial frequency is more easily scattered by the water body, resulting in an increase in the phase error.
[0154] Therefore, combined with the scattering theory and the encoding efficiency requirement, a hybrid design scheme of two frames of three-value Gray codes and one frame of binary Gray codes is adopted to construct The phase interval can maintain high spatial resolution and avoid phase jump error diffusion caused by high frequency bandwidth being too high.
[0155] Meanwhile, the gray value mapping mode of the traditional ternary encoding pattern is redesigned to further reduce the bit error rate caused by jump error, and an asymmetric gray distribution strategy is proposed, in which the encoding value 0 is set as the medium gray value (128), the encoding value 1 is set as the darkest gray value (0), and the encoding value 2 is set as the brightest gray value (255). In the design, the bright stripe corresponding to the gray value 255 is always sandwiched between two darkest stripes and does not border the medium gray value of the encoding value 0, so as to prevent the mutual interference of light in forward scattering, improve the distinguishability of the stripe edge in underwater propagation, suppress the misjudgment caused by edge blur, and thus improve the stability and precision of the overall decoding.
[0156] S7 comprises:
[0157] In the underwater operation environment of the FPP system, the underwater structured light measurement system is calibrated, including the internal and external parameter calibration of the industrial camera and the projection system. The 12*9 single grid with a 45mm grid length is used to calibrate the internal parameters of the industrial camera, and the internal parameters of the projection system are obtained by the structured light method based on Gray code combined with local homography estimation. Finally, the external parameter transformation matrix between the industrial camera and the projection system is obtained through the joint stereo calibration of the industrial camera and the projection system. The underwater structured light measurement system includes a DLP4710 projection system and a Hikvision industrial camera MV-CS016-10UM. The resolution of the projector of the projection system is 1920*1080, and the projection ratio is 1:1. The resolution of the industrial camera is 1440*1080, the lens focal length is 6mm, and the aperture is F / 2.4. It should be noted that the projection uses green light with a wavelength of 532nm, because the light of this wavelength has stronger penetration in water. Due to the volume limitation of the underwater body, and considering the performance of the embedded computer and the adaptability to the underwater carrying platform, the maximum frame rate of the system is 140hz. The sealed underwater pressure cabin has a diameter of 120mm and 130mm, and a length of 250mm. Considering the requirements of system frame rate and underwater stability, the system uses 8bit, 18-period sinusoidal image projection and Gray code projection. The projection system triggers the camera to perform synchronous acquisition. After decoding the acquired images, the three-dimensional information of the underwater object is obtained through the calibration parameters. The refraction correction strategy based on the ray model is adopted. According to the parameters obtained by the calibration in the air, the underwater imaging ray equation corresponding to the image pixel is derived through geometric modeling and Snell's law, the geometric distortion caused by multi-interface refraction is compensated, and the mapping relationship between the image pixel and the space ray is more accurate. According to the system calibration parameters, the mapping model of the absolute phase and the spatial coordinates is established. The absolute phase information obtained by reconstruction is substituted into the mapping model. Through the principle of triangulation, the three-dimensional coordinates of each point on the surface of the measured object in the industrial camera coordinate system are calculated, and the sparse three-dimensional point cloud of the measured object is initially generated. The initially generated point cloud is optimized by denoising, filtering and other processing to remove outliers and noise interference. The point cloud registration and fusion algorithm is used to integrate the point cloud data under different viewing angles, improve the integrity and density of the point cloud, and finally output the high-precision and high-quality three-dimensional point cloud of the measured object to complete the high-precision reconstruction of the underwater target.
[0158] Unlike three-dimensional imaging in air, the imaging system is sealed in a pressure-resistant cabin, and the light rays need to pass through air, quartz glass and water, which causes multi-interface refraction effect. In order to effectively compensate for the nonlinear imaging error under water, a refraction correction strategy based on the ray model is adopted, and according to the parameters obtained by the calibration in the air, the underwater imaging ray equation corresponding to the image pixel is derived through geometric modeling and Snell's law.
[0159] Ray equation corresponding to pixel coordinate is expressed as:
[0160] ;
[0161] wherein is the virtual focal length in the ray model is the virtual focal length in the ray model is the virtual focal length in the ray model is the virtual focal length in the ray model
[0162] ;
[0163] wherein represents the offset distance in the direction of the principal axis; is the unit direction matrix of the optical axis of the industrial camera, and based on the propagation path of the light and the refraction law, the expression of the virtual focal length and the virtual focal length is as follows:
[0164] ;
[0165] ;
[0166] wherein is the distance from the optical center of the industrial camera to the inner surface of the quartz glass, which is obtained by experimental fitting; represents the radial distance from the pixel point to the principal point of the optical axis, which is calculated by the pixel coordinates; represents the system principal distance, which is obtained by calibration; represents the thickness of the quartz glass, which is 10 mm in the system; is the refractive index of the quartz glass, which is 1.458; is the refractive index of the water body, which is 1.334.
[0167] The above merely provides a specific implementation of the present application, but the protection scope of the present application is not limited thereto, and any person skilled in the art can easily think of changes or replacements within the technical range disclosed by the present application, which should be covered in the protection scope of the present application. Therefore, the protection scope of the present application should be subject to the protection scope of the claims.
Claims
1. A method for underwater high-speed three-dimensional measurement based on stripe structured light, characterized in that, The method comprises the following steps: S1. In the underwater working scene of the FPP system, a three-step phase shift sinusoidal fringe and a Gray code pattern are projected to the object to be measured, and the collected fringe images are calculated by three-step phase shift to obtain two initial wrapped phases, i.e. initial wrapped phase 1 and initial wrapped phase 2, and the Gray code pattern is decoded to obtain an auxiliary order phase; S2. The light intensity information received by the camera is analyzed, and water body influence analysis is performed in combination with an underwater light transmission model; S3. The auxiliary order phase is divided into a stable region and a non-stable region based on the initial wrapped phase, the stable region is combined with the initial wrapped phase 1 to calculate a preliminary absolute phase, and for the non-stable region, the initial wrapped phase 1 is used to align the order information of the non-stable region with the initial wrapped phase 2; S4. The island region of the non-stable region in the auxiliary order phase is analyzed, and noise blocks are identified and corrected; S5. The continuous absolute phase is calculated by fusing the optimized auxiliary order phase and the initial wrapped phase, and the reconstruction of the absolute phase is completed; S6. A mixed three-value and binary Gray code pattern is designed and projected, the auxiliary order phase is generated by decoding, and the fringe period is marked to eliminate phase ambiguity; S7. The underwater structured light measurement system of the FPP system is calibrated, the three-dimensional point cloud information of the object to be measured is recovered in combination with the system calibration parameters and the reconstructed absolute phase, and the high-precision reconstruction of the underwater target is completed; The phase two-division complementary decoding strategy specifically comprises: Based on the phase dichotomy complementary decoding strategy, the initial wrapped phase is calculated using three phase-shifted sinusoidal images. The three-step phase shift with a phase shift step of is used to achieve the dichotomy of the initial wrapped phase, and the expression of the sinusoidal pattern is as follows: ; According to the above formula, the formula for solving is and The initial wrapped phase of and : ; Because and are π out of phase in the x direction, so and are also π out of phase in the x direction; Computing an auxiliary order phase For whose phase is related to the auxiliary order phase alignment; The phase is divided into two parts to process, construct high-quality absolute phase, and extract auxiliary order phase The most stable interval in the middle, and calculate the absolute phase : ; ; extracting the auxiliary order phases from the phase intervals of the unreliable information and aligning them consistently ; Further, noise recognition processing is performed on islands in the auxiliary order phase matrix. For the first island, there are multiple sub-regions with the same value and connected to each other. If the following conditions are met, the island is determined to be a noise block. If the following conditions are met, the island is determined to be a noise block. ; In the formula, is and different sub-regions the number of pixels of the bordering pixels, is the number of pixels of the perimeter of the sub-region, is a recognition threshold of noise, and after a connected region is judged as a noise block, the following rules are applied: ; wherein represents all the pixel values of the different numerical sub-islands bordering with ; represents the pixel value of the candidate bordering sub-island; , represents the pixel value of the position and in the auxiliary order phase k, wherein represents any pixel inside the current noise block, represents the pixel on the border of the noise sub-island, which finally corrects the noise of the whole island, and is calculated. ; Corrected denoised auxiliary order phase With Combining and calculating the absolute phase Finally, the complete absolute phase Is: ; The S6 comprises: A mixed encoding pattern of two frames of three-value Gray codes and one frame of binary Gray codes is designed, wherein the three-value Gray codes adopt an asymmetric gray scale distribution strategy, the binary Gray codes maintain a traditional encoding structure, the mixed encoding pattern is synchronously projected through a projection system, and an industrial camera collects a deformed encoding image; The collected Gray code image is binarized or trinized, a binary encoding sequence is generated by pixel-by-pixel decoding, the encoding value is converted into an auxiliary order phase through exclusive OR operation and bit splicing, and the absolute order of each fringe period is accurately marked; The auxiliary order phase obtained by decoding is aligned with the initial wrapped phase to eliminate phase periodic ambiguity, and local jump errors caused by scattering or decoding errors are corrected in combination with spatial consistency verification, and absolute phase information is output.
2. The fringe structured light based underwater high speed three-dimensional measurement method according to claim 1, characterized in that: The S1 comprises: In the underwater FPP system operation scene, according to the size of the object to be measured and the measurement accuracy requirement, a set of three-step phase shift sinusoidal fringe patterns and a set of Gray code patterns are projected to the object to be measured by using a DLP4710 projection system, and the phase step is , by using the same set of three-step phase shift sinusoidal fringe, two initial wrapped phases are constructed by different solving methods: initial wrapped phase 1 and initial wrapped phase 2, the two initial wrapped phases have phase difference design, and the object surface modulated fringe images are synchronously collected by using a Hikvision industrial camera. The phase difference distribution of the initial wrapped phase and the auxiliary order phase is analyzed, and the spatial complementary characteristics are verified, in a gradient mutation region, if there is a jump error in one group of phases, the other group of phases can provide a reliable reference, and then a potential error region is preliminarily identified.
3. The fringe structured light based underwater high speed three-dimensional measurement method according to claim 1, characterized in that: In the S2, the process of water body influence analysis in combination with an underwater light transmission model is as follows: When the FPP system is in underwater operating scenarios, the light intensity information received by the actual industrial camera is divided into three component types: direct attenuated light ; forward scattering light ; and backscattering light ; The expression of the total light intensity information received by the industrial camera is as follows: ; The direct attenuation light is the main reason for the darkening of the image, and its expression is as follows: ; wherein, represents the exit light intensity of the n-th step phase-shifted image, is the volume attenuation coefficient, is the distance between the system and the target object; The forward scattering light is the light that is forward scattered in the water body during transmission, and its expression is as follows: ; wherein, represents the width and height of the industrial camera image; conv convolution operation; is the underwater point spread function, i.e. the scattering kernel function, representing the blurring weight caused by scattering during the travel from position to position , the kernel function is represented as: ; wherein represents a proportionality factor for the forward scattering portion, , is the transmittance of the direct light, is the transmittance of the scattered light; denotes the inverse Fourier transform; is an empirical damping factor; denotes the depth value at denotes the corresponding frequency component at The backscattering light is the light that is scattered back to the industrial camera before reaching the target object, and its expression is as follows: ; wherein represents white noise with mean 0 and variance σ2.
4. The fringe structured light based underwater high speed three-dimensional measurement method according to claim 1, wherein: The S3 comprises: Based on the initial wrapped phase, the auxiliary order phase is divided into stable region and unstable region by initial wrapped phase 1 threshold value, since in the unstable region, the initial wrapped phase and the Gray code order are misaligned due to water body scattering or phase jump, the stable region and the unstable region are extracted from the auxiliary order phase respectively, the stable region is reserved for preliminary absolute phase calculation, and the unstable region is used for subsequent processing; According to the analysis result, for the unstable region, the initial wrapped phase 1 is used to align the order information of the unstable region with the initial wrapped phase 2, and an optimized unstable region order matrix is output.
5. The fringe structured light based underwater high speed three-dimensional measurement method according to claim 4, characterized in that: The S4 comprises: The non-stable region auxiliary order phase matrix is subjected to connected domain analysis, all island regions, i.e. independent regions not connected with surrounding orders, are identified, and then in each island, the order value is further segmented into a sub-island region, i.e. a connected sub-block composed of the same order value in the island; The area, boundary pixel and surrounding contact pixel number and proportion of each sub-island are calculated, if the contact pixel proportion or number of the sub-island and the adjacent sub-island exceeds a set threshold value, the sub-island is marked as a noise block; For the sub-block determined as noise, the order value of the adjacent stable region with the most contact pixels is used for correction, and in the correction process, smoothing processing is performed according to the boundary adaptive principle to ensure that the repaired region is spatially continuous and has no obvious mutation with the surrounding phase field.
6. The fringe structured light based underwater high speed three-dimensional measurement method according to claim 5, characterized in that: The S5 comprises: The optimized auxiliary order phase is spatially aligned with the initial wrapped phase; Based on the spatially aligned auxiliary order phase and the initial wrapped phase, the absolute phase is calculated to establish a preliminary continuous phase field.
7. The fringe structured light based underwater high speed three-dimensional measurement method according to claim 1, wherein: The S7 comprises: In the underwater working environment of the FPP system, the underwater structured light measurement system is calibrated, including the internal and external parameter calibration of the industrial camera and the projection system; A refraction correction strategy based on the ray model is adopted, according to the parameters obtained by calibration in the air, the underwater imaging ray equation corresponding to the image pixel is derived through geometric modeling and Snell's law to compensate for the geometric distortion caused by multi-interface refraction; According to the system calibration parameters, a mapping model of absolute phase and spatial coordinates is established, the absolute phase information obtained by reconstruction is substituted into the mapping model, and the three-dimensional coordinates of each point on the surface of the measured object in the industrial camera coordinate system are calculated through the principle of triangulation, and a sparse three-dimensional point cloud of the measured object is initially generated; The initially generated point cloud is subjected to denoising and filtering optimization processing to remove outliers and noise interference, point cloud registration and fusion algorithm is used to integrate point cloud data under different viewing angles, and finally high-precision and high-quality three-dimensional point cloud of the measured object is output, and high-precision reconstruction of the underwater target is completed.
Citation Information
Patent Citations
Three-dimensional measurement method based on quaternary complementary Gray code auxiliary phase unwrapping
CN119309509A
Hybrid method for 3D shape measurement
US20110080471A1