Background phase rapid removal method, system and device based on linear fitting, and medium

By selecting two regions in the expanded phase matrix for linear fitting to construct the reference phase, the problem of low background phase removal efficiency in optical three-dimensional measurement is solved, and fast and stable background phase removal is achieved, suitable for real-time and dynamic background environments, improving image quality and measurement accuracy.

CN120506906APending Publication Date: 2025-08-19XIAN TECH UNIV
View PDF 4 Cites 0 Cited by

Patent Information

Application Number
CN202510739000.1
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-06-04
Publication Date
2025-08-19

AI Technical Summary

Technical Problem

The background phase removal method in existing optical three-dimensional measurements is inefficient, especially in real-time processing and dynamically changing background environments, and is susceptible to noise and interference.

Method used

Using a fast background phase removal method based on linear fitting, the two rectangular areas above and below are selected in the unfolded phase matrix, the phase and average values ​​of the central coordinate points are calculated, and the reference phase is constructed using two-dimensional linear fitting, and subtracting it from the unfolded phase to remove the background phase.

Benefits of technology

Simplifies operation steps, improves processing speed and efficiency, generates stable and reliable reference phases, suitable for real-time processing and dynamic background environments, and improves image quality and measurement accuracy.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120506906A_ABST
    Figure CN120506906A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of optical three-dimensional measurement, in particular to a background phase rapid removal method, system, equipment and medium based on linear fitting, and the method comprises the following steps: 1, selecting an upper end region Region1 and a lower end region Region2 along the phase monotonic change direction in an unwrapped phase matrix # imgabs0 #; 2, selecting a center coordinate point from the upper end region Region1 and the lower end region Region2, and constructing a reference phase in a two-dimensional linear fitting mode; and step 3, background phase removal is carried out according to the reference phase, and a final result is obtained. According to the method, the background phase can be removed only by fitting the reference phase through two points, the fitting process is simple and efficient, noise interference is not likely to happen, and the method is suitable for real-time processing and dynamically changing background environments.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the technical field of optical three-dimensional measurement, and in particular relates to a method, system, device and medium for quickly removing background phase based on linear fitting. Background Art

[0002] In the field of optical 3D measurement, fringe projection profilometry reconstructs object topography by analyzing the carrier phase distribution. Existing background phase removal methods are mainly divided into traditional methods based on reference images and nonlinear carrier phase removal methods.

[0003] Traditional methods based on reference images usually rely on taking a set of reference images to generate a reference phase, ensuring that the reference image can cover the background information in the image to be processed, and requiring the reference image to have similar lighting conditions and geometric structures as the image to be processed. Then, by aligning and comparing the reference image with the image to be processed, a reference phase is generated and subtracted from the unfolded phase to achieve the purpose of background information removal. However, this traditional method has some problems. First, obtaining a set of reference images requires a lot of time and resources, especially when it is necessary to consider lighting changes or scene complexity. Second, the alignment and comparison process requires complex algorithms and calculations, and is easily affected by noise and interference, resulting in unsatisfactory removal effects. In addition, traditional methods may not meet the requirements for some special application scenarios, such as real-time processing or dynamically changing background environments.

[0004] The nonlinear carrier phase removal method (Lujie Chen[1] and Cho Jui Tay[1]. Carrier phase component removal: a generalized least-squares approach[J]. Journal of the Optical Society of America A, 2006, 23(2): 435-443) uses a high-order expansion to address the nonlinear carrier generated by non-parallel illumination, followed by least squares coefficient estimation. Although this method can handle complex lighting conditions, it has the limitations of large single-point phase calculations and the need to calibrate the system geometric parameters in advance.

[0005] CN113192206A uses the trained target detection neural network model MobileNetSSD to detect the object area from the color image, remove the color information of the remaining areas, and correspondingly remove the depth information of irrelevant areas in the depth image to achieve background removal. CN119152132A uses the least squares method to extract the wrapped phase from the stripe image after removing the background noise. CN116320280A performs asymmetric expansion on the mask image after noise reduction to expand the area of the mask image to achieve occlusion of the dynamic background in the video. CN119540450A discloses a real-time 3D reconstruction system for moving objects based on fringe projection. It uses a series of phase-shift code patterns with gradually changing phase differences to project onto the surface of the target object and accurately calculate its depth information based on the changing pattern.

[0006] In the above methods, the background phase removal method uses a complex algorithm to remove the background of the real-time image. Although the complex algorithm can improve the accuracy, the real-time performance is limited by computationally intensive operations (such as Fourier transform, iterative optimization) and hardware resource constraints. Summary of the Invention

[0007] In response to the low efficiency of existing background phase removal methods, the present invention aims to propose an efficient background phase removal method, system, equipment, and medium. This method can achieve background phase removal by simply fitting the reference phase at two points. The fitting process is simple and efficient, not easily affected by noise, and is suitable for real-time processing and dynamically changing background environments.

[0008] To achieve the above object, the present invention provides a method for rapidly removing background phase based on linear fitting, comprising the following steps: Step 1: Unfold the phase matrix In the phase monotonically changing direction, the upper region Region1 and the lower region Region2 are selected; Step 2: Select the center coordinate points from the upper region Region 1 and the lower region Region 2, and construct the reference phase using a two-dimensional linear fitting method; Step 3: Remove the background phase according to the reference phase to obtain the final result.

[0009] Preferably, in step 1, the direction of monotonically changing the phase includes a monotonically increasing direction and a monotonically decreasing direction.

[0010] Preferably, in step 1, the upper region Region1 and the lower region Region2 are rectangular, with a region size of n×n pixels, and the corresponding center coordinate points are P1 and P2. and P2 .

[0011] Preferably, in step 2, the method for constructing the reference phase is as follows: first, the corresponding phase sum and average phase value are obtained for the upper region Region1 and the lower region Region2 respectively; then, the central coordinate point P1 is used as the reference phase. and P2 As the reference point, the slope is obtained by linear fitting ; Then obtain the interception by calculation ; Finally, with the expanded phase matrix Index matrices of the same size As a reference, a reference phase plane is constructed; where the index matrix The element values are: , .

[0012] Preferably, the phase of the upper region Region1 and The calculation formula is as follows: ; The calculation formula for the average phase value of the upper region Region1 is as follows:

[0013] The phase sum of the lower region Region2 The calculation formula is as follows: ; The calculation formula for the average phase value of the lower region Region2 is as follows: .

[0014] Preferably, the slope The calculation formula is: ; Where, ; ; 、 are the center coordinates of the upper region Region1 and the lower region Region2 respectively. For the selected column; intercept The calculation formula is: ; The expression of the reference phase plane is:

[0015] in, is the reference phase, is the slope, is the intercept, mm is the index matrix.

[0016] Preferably, in step 3, the calculation formula for background removal is:

[0017] Where, unwrapping is the unfolded phase, unwrap is the phase information after removing the background phase.

[0018] A background phase fast removal system based on linear fitting, including a region selection module, a reference phase construction module and a background phase removal module; the region selection module is used to expand the phase matrix In the method, the upper region Region1 and the lower region Region2 are selected along the direction of monotonic phase change; the reference phase construction module is used to select the center coordinate points from the upper region Region1 and the lower region Region2, and construct the reference phase in a two-dimensional linear fitting manner; the background phase removal module is used to remove the background phase according to the reference phase to obtain the final result.

[0019] An electronic device includes a memory and a processor, wherein the memory stores a computer program, and the processor implements the steps of the method when executing the computer program.

[0020] A storage medium stores a computer program, which implements the steps of the method when executed by a processor.

[0021] Compared with the prior art, the present invention has at least the following beneficial technical effects: Traditional methods typically require the acquisition of a set of reference images and complex calculations and solutions. This new method, however, simply selects two representative points in the unwrapped phase for fitting, avoiding the use of complex algorithms and significantly simplifying the process. Compared to the tedious calculations required by traditional methods, this new method can quickly generate accurate reference phases, reducing the need for additional data acquisition and processing, thereby significantly improving processing speed and efficiency.

[0022] The method of the present invention only needs to select effective points of the unfolded phase for fitting and solving the reference phase, and does not need to collect a set of background fringe images. Therefore, it is relatively less susceptible to noise and interference, and can obtain a more stable and reliable reference phase, making the background removal effect more ideal, and can provide higher image quality and more accurate measurement results, providing a more reliable data basis for subsequent processing and analysis.

[0023] Traditional methods often perform poorly when faced with real-time processing or dynamic background environments. However, this invention, through a simple fitting process, can quickly adapt to background changes, making it particularly suitable for applications requiring high real-time processing. This invention is applicable to a variety of applications, such as optical imaging, interferometry, and phase measurement, improving image quality and measurement accuracy, and has broad application prospects and potential in related fields.

[0024] The method disclosed in this paper provides a new approach for background removal in phase measurement. The method first selects two valid data points for the unwrapped phase, solves the slope and intercept, and obtains a proportional function. A reference phase is then fitted. Finally, the background-free phase information map is obtained by subtracting the fitted reference phase from the unwrapped phase. The method does not require complex image acquisition and processing, making it suitable for applications with high real-time processing requirements.

[0025] Compared with traditional background removal methods, the use of fitted background phase to reduce background information is relatively less susceptible to noise and interference, and can obtain a more stable and reliable reference phase. BRIEF DESCRIPTION OF THE DRAWINGS

[0026] Figure 1 Schematic diagram of a measurement system used in a method for rapid background phase removal based on linear fitting according to the present invention, 1-projection device, 2-photography device, 3-computer, 4-measured object; Figure 2 This is a flowchart of a method for rapid background phase removal based on linear fitting; Figure 3 (a) is the simulated fringe pattern in Example 1; Figure 3 (b) is the simulated deformation fringe image in Example 1; Figure 3 (c) is the simulated wrapped phase diagram in Example 1; Figure 4 (a) is the two-dimensional unfolded phase image simulated in Example 1; Figure 4 (b) is the three-dimensional unfolded phase diagram simulated in Example 1; Figure 4 (c) Figure 4 Phase distribution diagram of the middle column in (a); Figure 5 (a) is the unwrapped phase two-dimensional image after background removal in Example 1; Figure 5 (b) is the unwrapped phase 3D image after background removal in Example 1; Figure 5 (c) Figure 5(a) Phase distribution diagram of the middle column; Figure 6 (a) is the unwrapped phase two-dimensional error map after background removal in Example 1; Figure 6 (b) is the unwrapped phase 3D error map after background removal in Example 1; Figure 6 (c) Figure 6 (a) Phase distribution diagram of the middle column; Figure 7 (a) is the fringe pattern of the experimental projection in Example 2; Figure 7 (b) is the deformation fringe image collected from the experiment in Example 2; Figure 7 (c) is the parcel phase diagram obtained from the experiment in Example 2; Figure 8 (a) is the two-dimensional phase map of the face model obtained in the experiment of Example 2; Figure 8 (b) is the three-dimensional unfolded phase diagram simulated in Example 2; Figure 8 (c) Figure 8 Phase distribution diagram of the middle column in (a); Figure 9 (a) is the unwrapped phase two-dimensional image after background removal in Example 2; Figure 9 (b) is the unwrapped phase 3D image after background removal in Example 2; Figure 9 (c) Figure 9 (a) Phase distribution diagram of the middle column; Figure 10 (a) is the unwrapped phase two-dimensional error map after background removal in Example 2; Figure 10 (b) is the unwrapped phase 3D error map after background removal in Example 2; Figure 10 (c) Figure 10 (a) Phase distribution diagram of the middle column. DETAILED DESCRIPTION

[0027] In order to make the purpose and technical solution of the present invention clearer and easier to understand, the present invention is further described in detail below with reference to the accompanying drawings and embodiments. The specific embodiments described herein are only used to explain the present invention and are not used to limit the present invention.

[0028] In the description of the present invention, it should be understood that the terms "center", "longitudinal", "lateral", "up", "down", "front", "back", "left", "right", "vertical", "horizontal", "top", "bottom", "inside", "outside" and the like indicate orientations or positional relationships based on the orientations or positional relationships shown in the accompanying drawings, and are only for the convenience of describing the present invention and simplifying the description, rather than indicating or implying that the device or element referred to must have a specific orientation, be constructed and operated in a specific orientation, and therefore cannot be understood as limiting the present invention. In addition, the terms "first" and "second" are used for descriptive purposes only, and cannot be understood as indicating or implying relative importance or implicitly indicating the number of the indicated technical features. Therefore, the features defined as "first" and "second" may explicitly or implicitly include one or more of the features. In the description of the present invention, unless otherwise specified, "multiple" means two or more. In the description of the present invention, it should be noted that, unless otherwise expressly specified or limited, the terms "mounted," "connected," and "connected" should be understood in a broad sense. For example, they may refer to fixed, detachable, or integral connections; mechanical or electrical connections; direct or indirect connections through an intermediate medium; and internal communication between two components. Those skilled in the art will understand the specific meanings of the above terms in the present invention based on the specific circumstances.

[0029] The present invention provides a method for rapidly removing background phase based on linear fitting. Figure 1 The measurement system shown in FIG. 1 includes a projection device 1, a photographic device 2, and a computer 3, wherein the computer 3 generates a projection fringe pattern, the projection device 1 projects the fringe pattern generated by the computer 3 onto the object to be measured 4, the photographic device 2 photographs the object to be measured 4 to collect fringe image data, and the photographic device 2 transmits the obtained fringe image to the computer 3 for related fringe image data processing.

[0030] Reference Figure 2 The present invention discloses a method for rapidly removing background phase based on linear fitting, comprising the following steps: Step 1: Unfold the phase matrix In the figure, two rectangular regions Region1 and Region2 are selected along the direction of monotonically changing phase (increasing or decreasing), and the region size is n×n pixels.

[0031] Step 2: Select center coordinate points from the upper region Region 1 and the lower region Region 2, and construct a reference phase using a two-dimensional linear fitting method.

[0032] Specifically, the method for constructing the reference phase is as follows: first, the corresponding phase sum and average phase value are obtained for the upper region Region1 and the lower region Region2 respectively. For example, the center coordinate of the upper region Region1 is selected as P1 , the center coordinate of the lower region Region2 is P2 .

[0033] Calculate the phase and 、 .

[0034]

[0035]

[0036] Where, , Represents the pixel position of rows and columns; for example, a 3*3 area, =1, 2, 3; =1,2,3.

[0037] Solution and The average phase value.

[0038]

[0039]

[0040] Then take the center coordinate point P1 and P2 As the reference point, the slope is obtained by linear fitting Phase slope Calculation: and As the reference point, its phase values are: and .

[0041] Calculate the slope by linear fitting :

[0042] in, 、 are the center coordinates of the upper region Region1 and the lower region Region2 respectively. For the selected column.

[0043] Then obtain the interception by calculation :

[0044] Finally, the phase matrix is expanded with Index matrices of the same size For reference, construct a reference phase plane. Specifically, the index matrix with the same size as the unfolded phase matrix , whose element values are: , , construct the reference phase plane:

[0045] in, is the reference phase, is the slope, is the intercept, is the index matrix.

[0046] Step 6: Background phase removal.

[0047]

[0048] Unwrapping is the phase expansion, and unwrap is the phase information after removing the background phase.

[0049] Example 1 Taking the three-dimensional measurement of a certain block as an example, the background phase rapid removal method provided by the present invention is used, and the results and process are as follows: Figure 3 、 4 , 5, and 6.

[0050] Simulated fringe image Figure 3 As shown in a, after being modulated by the measured square, the deformed fringe pattern is as follows Figure 3 As shown in b, the wrapped phase obtained by the phase demodulation algorithm Figure 3 c. Unwrapped phase is obtained by unwrapping the wrapped phase Figure 4 a. Using the background phase fast removal method provided by the present invention, the phase information graph after background phase removal is obtained, such as Figure 5 As shown in a. Figure 6 a is the simulated phase error diagram. It can be seen from the figure that the error magnitude of the simulation result is 10 -12 , meeting the requirements of high-precision measurement.

[0051] Example 2 Taking face recognition as an example, the background phase fast removal method provided by the present invention is used, and the results and process are as follows: Figure 7 、 8 , 9, and 10.

[0052] In the experiment Figure 8The projection device 1 in the fringe projection system generates a fringe image and projects it onto the object 4. The photographic device 2 collects the modulated deformed fringe image and then inputs it into the computer 3. The computer performs phase demodulation and phase unwrapping processing on the modulated fringe image to obtain the unwrapped phase. Figure 8 a. Then, the background of the unfolded phase is removed by using the content of the present invention, and finally the background-free phase information is obtained. Figure 9 a. Figure 10 a is the measurement error diagram. After analysis, it can be seen that the error of the experimental results is less than 0.2rad, which meets the requirements of high-precision measurement.

[0053] The method disclosed in this paper provides a new approach for rapid optical 3D measurement. It eliminates the need to collect a set of reference fringe patterns. Instead, it simply fits the solved unwrapped phase to obtain a reference phase, then removes the background phase to obtain the object's accurate topography.

[0054] This paper proposes a new background phase removal method that generates a reference phase by fitting two points in the unwrapped phase. This method assumes that background variations in the processed phase are gradual and smooth, and can be approximated by a straight line. Therefore, by selecting two representative points in the unwrapped phase and using a two-dimensional linear fitting method, a straight line can be obtained that matches the background variation trend of the processed phase. This straight line is the generated reference phase and can be directly subtracted from the unwrapped phase to achieve background removal.

[0055] Compared to the other two methods, the background phase information removal method proposed in this paper has the following advantages: First, this method only requires fitting two points of the unwrapped phase, avoiding the additional capture and registration steps, greatly simplifying the operation process. Second, the fitting process is simple and efficient, not susceptible to noise interference, and can quickly generate an accurate reference phase. Furthermore, this method is applicable to a variety of scenarios and applications, and is particularly well-suited for real-time processing and dynamically changing background environments.

[0056] In summary, the present invention's method for rapid background phase removal based on linear fitting achieves simpler, more efficient, and convenient background removal by fitting only two points of the unwrapped phase to generate a reference phase. This method has broad application prospects in various fields and is particularly suitable for scenarios requiring fast and accurate processing of unwrapped phase data.

[0057] The present invention also discloses a background phase fast removal system based on linear fitting, comprising a region selection module, a reference phase construction module and a background phase removal module; the region selection module is used to expand the phase matrix In the method, the upper region Region1 and the lower region Region2 are selected along the direction of monotonic phase change; the reference phase construction module is used to select the center coordinate points from the upper region Region1 and the lower region Region2, and construct the reference phase in a two-dimensional linear fitting manner; the background phase removal module is used to remove the background phase according to the reference phase to obtain the final result.

[0058] The present invention also discloses an electronic device, comprising a memory and a processor, wherein the memory stores a computer program, and the processor implements the steps of the method when executing the computer program.

[0059] The present invention also discloses a storage medium on which a computer program is stored. When the computer program is executed by a processor, the steps of the method described are implemented.

[0060] The above content is only for explaining the technical idea of the present invention and cannot be used to limit the protection scope of the present invention. Any changes made on the basis of the technical solution in accordance with the technical idea proposed by the present invention shall fall within the protection scope of the claims of the present invention.

Claims

1. A method for rapidly removing background phase based on linear fitting, characterized in that: The following steps are involved: Step 1: Unfold the phase matrix In the phase monotonically changing direction, the upper region Region1 and the lower region Region2 are selected; Step 2: Select the center coordinate points from the upper region Region 1 and the lower region Region 2, and construct the reference phase using a two-dimensional linear fitting method; Step 3: Remove the background phase according to the reference phase to obtain the final result.

2. The method for rapidly removing background phase based on linear fitting according to claim 1, characterized in that: In step 1, the direction of monotonically changing the phase includes a monotonically increasing direction and a monotonically decreasing direction.

3. The method for rapidly removing background phase based on linear fitting according to claim 1, characterized in that: In step 1, the upper region Region1 and the lower region Region2 are rectangular, with a region size of n×n pixels, and the corresponding center coordinate points are P1 and P2. and P2 .

4. The method for rapidly removing background phase based on linear fitting according to claim 3, characterized in that: In step 2, the method of constructing the reference phase is as follows: first, the corresponding phase sum and average phase value are obtained for the upper region Region1 and the lower region Region2 respectively; then, the central coordinate point P1 is used as the reference phase. and P2 As the reference point, the slope is obtained by linear fitting ; Then obtain the interception by calculation ; Finally, with the expanded phase matrix Index matrices of the same size As a reference, a reference phase plane is constructed; where the index matrix The element values are: , .

5. The method for rapidly removing background phase based on linear fitting according to claim 4, characterized in that: The phase sum of the upper region Region1 The calculation formula is as follows: ; The calculation formula for the average phase value of the upper region Region1 is as follows: The phase sum of the lower region Region2 The calculation formula is as follows: ; The calculation formula for the average phase value of the lower region Region2 is as follows: 。 6. The method for rapidly removing background phase based on linear fitting according to claim 4, characterized in that: Slope The calculation formula is: ; Where, ; ; 、 are the center coordinates of the upper region Region1 and the lower region Region2 respectively. For the selected column; intercept The calculation formula is: ; The expression of the reference phase plane is: in, is the reference phase, is the slope, is the intercept, mm is the index matrix.

7. The method for rapidly removing background phase based on linear fitting according to claim 6, characterized in that: In step 3, the background removal calculation formula is: Where, unwrapping is the unfolded phase, unwrap is the phase information after removing the background phase.

8. A background phase rapid removal system based on linear fitting, characterized in that: It includes a region selection module, a reference phase construction module and a background phase removal module; The region selection module is used to expand the phase matrix In the method, the upper region Region1 and the lower region Region2 are selected along the direction of monotonic phase change; the reference phase construction module is used to select the center coordinate points from the upper region Region1 and the lower region Region2, and construct the reference phase in a two-dimensional linear fitting manner; the background phase removal module is used to remove the background phase according to the reference phase to obtain the final result.

9. An electronic device comprising a memory and a processor, wherein the memory stores a computer program, wherein: When the processor executes the computer program, the steps of the method according to any one of claims 1 to 7 are implemented.

10. A storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 7 are implemented.

Citation Information

Patent Citations

  • Three-dimensional model real-time reconstruction method and device based on target detection and background removal

    CN113192206A

  • Monitoring video recommendation method and system based on dynamic background removal

    CN116320280A

  • Single-frame real-time three-dimensional imaging method based on deep learning

    CN119152132A

  • Moving object real-time three-dimensional reconstruction system based on fringe projection

    CN119540450A