Self-adaptive high dynamic range measurement algorithm and device based on time domain stacking
By adopting an adaptive measurement algorithm based on time domain stacking in high dynamic range scenarios, the problem of difficult to accurately predict measurement results in the prior art is solved, and higher measurement accuracy and signal-to-noise ratio are achieved, ensuring the accuracy of measurement results. Sex and reliability.
Patent Information
- Application Number
- CN202411432616.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-10-14
- Publication Date
- 2025-02-07
- Estimated Expiration
- 2044-10-14
AI Technical Summary
The prior art is difficult to accurately predict measurement results in high dynamic range scenarios, which often leads to overexposure in bright areas or insufficient exposure in dark areas, affecting the accuracy and reliability of measurement results.
Adaptive high dynamic range measurement algorithm based on time domain stacking is adopted, and the signal-to-noise ratio of the low reflectance area is improved by introducing phase error prediction formulas and adaptive parameter selection methods, ensuring that the entire scene is not overexposed, and achieving predictable accuracy Three-dimensional reconstruction.
Significantly improves the dynamic range and signal-to-noise ratio of measurements, especially in low reflectivity areas, improves signal quality, ensures comprehensiveness and accuracy of measurement results, and provides higher predictability of measurement results.
Smart Images

Figure CN119399259A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of machine vision three-dimensional measurement and calculation, and in particular to an adaptive high dynamic range measurement algorithm and device based on time domain stacking. Background Art
[0002] In recent years, non-contact measurement methods have been increasingly valued in the fields of industry and scientific research. Among them, fringe projection technology is particularly prominent in the field of optical 3D measurement due to its high precision, fast response and flexible adaptability. This technology uses a projector to project a specific fringe pattern onto the surface of the object being measured. The fringe pattern deforms with the geometry of the object. These deformed fringe patterns are captured by a high-precision camera, and after fine phase demodulation and system calibration, the 3D shape of the object can be accurately reconstructed.
[0003] Fringe Projection Profilometry (FPP) usually involves projecting one or more sets of sinusoidal light fringes onto the surface of an object, and then calculating the three-dimensional morphology information of the object by analyzing the deformed fringe pattern captured by the camera. As the scope of application gradually expands, more and more application scenarios have emerged, such as high dynamic range (HDR) scenes. Due to the large reflectivity changes in high dynamic scenes, the brightness of the deformed fringes captured will be large. In traditional fringe projection applications, an 8-bit (256 grayscale levels) image format is used, which means that the brightness range that the image can represent is limited. For those areas with high reflectivity, conventional camera exposure settings may cause overexposure, resulting in loss of details in the image; on the contrary, for areas with low reflectivity, underexposure may make these areas almost invisible in the image. When measuring HDR scenes, different reflectivity areas require different exposure times to adapt to their brightness, which is difficult to achieve in the FPP method using traditional fixed parameter settings, often resulting in loss of details in dark areas or overexposure in bright areas, thus affecting the accuracy and reliability of the final measurement results. Summary of the invention
[0004] The purpose of the present invention is to overcome the defect that the existing phase shift profilometry HDR method in the prior art is difficult to accurately predict the final measurement result, and provide an adaptive high dynamic range measurement algorithm based on time domain stacking. The algorithm is based on the time domain stacking method and introduces a phase error prediction formula, which can predict in advance the phase accuracy that the measurement system can achieve. By improving the signal-to-noise ratio in the low reflectivity area, the entire field is reconstructed with predictable accuracy in three dimensions without overexposure of the entire field.
[0005] In order to achieve the above-mentioned object of the invention, the present invention provides the following technical solutions:
[0006] An adaptive high dynamic range measurement algorithm based on time domain stacking includes the following steps:
[0007] S1, obtaining a phase shift fringe pattern of a measurement scene, and obtaining an average white field pattern of the measurement scene; and obtaining a proportionality coefficient according to the modulation degree and intensity of the average white field pattern;
[0008] S2. Selecting a region of interest of the measurement scene according to the average white field map;
[0009] S3, setting a desired accuracy for the region of interest, and obtaining optimal parameters for measuring the region of interest through an adaptive parameter selection method;
[0010] S4. Reconstruct the measurement scene according to the optimal parameters to obtain an actual measurement result with the same expected accuracy.
[0011] Preferably, a set of phase-shift fringe patterns are captured at different exposure times for a HDR scene to be tested, and the average white field pattern is obtained according to the following formula:
[0012]
[0013] Among them, I w (x, y) represents the intensity of the pixel coordinate point (x, y) in the white field image, I n (x, y) represents the intensity of the pixel coordinate point (x, y) at the nth phase shift, n represents the number of stacking times in the time domain stacking method, and N represents the number of phase shift steps in the phase shift method.
[0014] Preferably, step S1 includes obtaining the modulation degree,
[0015]
[0016] Wherein, B(x, y) represents the modulation degree of the pixel coordinate point (x, y); the proportional coefficient i is obtained according to the modulation degree and intensity of the average white field image, where
[0017] Preferably, step S2 of selecting the region of interest involves drawing a grayscale histogram of the average white field image, and selecting the cluster with the lowest grayscale value as the region of interest.
[0018] Preferably, the adaptive parameter selection method further comprises obtaining the intrinsic parameters of the measurement system, and substituting the intrinsic parameters into the parameter selection formula as follows:
[0019]
[0020] Obtain the optimal fringe projection intensity I under the measurement scenario opt ; Where K is the gain parameter of the camera, C is the intrinsic parameter related to the internal noise of the camera, is the desired accuracy of the setting; the optimal fringe projection intensity I opt Substitute into the following formula to find the optimal exposure time t opt :
[0021]
[0022] Among them, I w , t w They respectively represent the intensity of the pre-shot fringe pattern and the exposure time used for shooting; the optimal parameters include the optimal fringe pattern projection intensity and the optimal exposure time.
[0023] Preferably, in step S4, the measurement scene is reconstructed using the optimal parameters by adopting phase shift profilometry, and a phase unwrapping method is used to perform three-dimensional morphology reconstruction.
[0024] Preferably, the phase unwrapping method is a three-frequency phase unwrapping method, in which the low-frequency and medium-frequency parts are used to guide the phase unwrapping, and the high-frequency part is used to obtain fine three-dimensional morphological information.
[0025] The present invention also provides an adaptive high dynamic range measurement device based on time domain stacking, characterized in that it includes:
[0026] A projection module, used for projecting a phase-shifted fringe pattern onto a measurement scene;
[0027] An image acquisition module, used for acquiring a phase-shifted fringe image of the measurement scene with an arbitrary exposure time;
[0028] The processing module is used to execute the adaptive high dynamic range measurement algorithm based on time domain stacking described in the above technical solution, and calculate and obtain high dynamic range three-dimensional morphology data of the measurement scene.
[0029] Preferably, the processing module comprises:
[0030] A data preprocessing unit, used to calculate the average white field diagram and the proportionality coefficient between modulation and intensity;
[0031] A parameter calculation unit, used for calculating the optimal parameters according to the set expected accuracy and the inherent parameters of the measurement system;
[0032] The reconstruction unit is used to perform three-dimensional reconstruction of the measurement scene according to the optimal parameters.
[0033] The present invention also provides a computer-readable storage medium storing a computer program, which, when executed by a processor, implements an adaptive high dynamic range measurement algorithm based on time domain stacking.
[0034] Compared with the prior art, the present invention has the following beneficial effects:
[0035] The present invention can avoid measurement errors caused by improper exposure time settings while ensuring the measurement accuracy of the entire scene by referring to an adaptive parameter selection formula. The method can automatically adjust the exposure time and the number of stacking times according to specific measurement requirements, thereby adapting to different measurement environments and target objects, and achieving higher measurement accuracy and flexibility. In addition, the present invention significantly improves the dynamic range and signal-to-noise ratio of the measurement through the combination of time domain stacking and phase error prediction formulas, especially in low reflectivity areas, significantly improving the signal quality. This method not only overcomes the problem of overexposure of bright areas or underexposure of dark areas that may occur in traditional technologies in high dynamic range scenes, ensuring the comprehensiveness and accuracy of the measurement results, but also can predict the accuracy that the system may achieve without actual measurement, thereby providing higher predictability of measurement results.
[0036] The preferred embodiment of the present invention has the following beneficial effects:
[0037] By shooting a set of phase-shifted fringe patterns using different exposure times and calculating the intensity of the average white field pattern, we can effectively address the challenges brought by brightness changes in high dynamic range scenes and ensure that the average brightness of the entire scene is accurately measured, thereby providing an accurate data basis for subsequent adaptive parameter selection and three-dimensional reconstruction.
[0038] By calculating the modulation and intensity ratio coefficient of the fringe pattern, the brightness distribution of the scene can be further accurately characterized, especially in low reflectivity areas. The implementation of this step ensures that the measurement system can still maintain high measurement accuracy under complex lighting conditions.
[0039] Selecting a region of interest (ROI) and making adaptive parameter choices based on it can significantly improve measurement accuracy in low reflectivity areas, optimize the use of system resources, reduce unnecessary measurement complexity, and improve overall system efficiency and effectiveness.
[0040] Obtaining the inherent parameters of the measurement system and combining them with the adaptive parameter selection formula can ensure that the system dynamically adjusts the measurement parameters according to the specific scenario, minimizes errors and improves the consistency and stability of the measurement results.
[0041] By using the three-frequency phase unwrapping method for three-dimensional morphology reconstruction, the ability to capture complex structures can be improved while ensuring the overall reconstruction effect, especially when processing low-frequency and high-frequency information, achieving high-precision morphology reconstruction.
[0042] The preferred solution of the present invention also significantly optimizes the utilization of measurement resources, reduces resource waste, and ensures optimal performance in the measurement process under a variety of dynamic range scenarios through fringe multiplexing technology and precise parameter selection. BRIEF DESCRIPTION OF THE DRAWINGS
[0043] Figure 1 This is an algorithm flow chart of Embodiment 2 of the present invention;
[0044] Figure 2 The pre-shot sinusoidal fringes of Example 2 of the present invention Figure 3 Step phase shift diagram;
[0045] Figure 3 This is the pre-shot average white field image of Example 2 of the present invention;
[0046] Figure 4 The grayscale distribution histogram and the selection of the region of interest (ROI) in Example 2 of the present invention;
[0047] Figure 5 This is a real-object picture of the HDR scene according to Embodiment 2 of the present invention;
[0048] Figure 6 HDR scene reconstruction images and two sets of comparison result images according to Example 2 of the present invention;
[0049] Figure 7 Schematic diagram of a stripe multiplexing deployment method according to Embodiment 2 of the present invention;
[0050] Figure 8 This is a standard plane physical diagram of Example 3 of the present invention;
[0051] Fig. 9 is a line graph of theoretical phase error and actual phase error at different exposure times in Example 3 of the present invention;
[0052] Fig.10 It is a line graph of theoretical phase error and actual phase error at different stacking times of Example 3 of the present invention. DETAILED DESCRIPTION
[0053] The present invention is further described in detail below in conjunction with test examples and specific implementation methods. However, this should not be understood as the scope of the above subject matter of the present invention being limited to the following embodiments, and all technologies realized based on the content of the present invention belong to the scope of the present invention.
[0054] Example 1
[0055] This embodiment provides an adaptive high dynamic range measurement algorithm based on time domain stacking, including the following steps:
[0056] S1, obtaining a phase shift fringe pattern of a measurement scene, and obtaining an average white field pattern of the measurement scene; and obtaining a proportionality coefficient according to the modulation degree and intensity of the average white field pattern;
[0057] S2. Selecting a region of interest of the measurement scene according to the average white field map;
[0058] S3, setting a desired accuracy for the region of interest, and obtaining optimal parameters for measuring the region of interest through an adaptive parameter selection method;
[0059] S4. Reconstruct the measurement scene according to the optimal parameters to obtain an actual measurement result with the same expected accuracy.
[0060] Preferably, a set of phase-shift fringe patterns are captured at different exposure times for a HDR scene to be tested, according to
[0061]
[0062] Obtain the average white field image; where I w (x, y) represents the intensity of the pixel coordinate point (x, y) in the white field image, I n (x, y) represents the intensity of the pixel coordinate point (x, y) at the nth phase shift, n represents the number of stacking times in the time domain stacking method, and N represents the number of phase shift steps in the phase shift method.
[0063] Preferably, step S1 includes obtaining the modulation degree,
[0064]
[0065] Wherein, B(x, y) represents the modulation degree of the pixel coordinate point (x, y); the proportional coefficient i is obtained according to the modulation degree and intensity of the average white field image, where
[0066] Preferably, step S2 of selecting the region of interest involves drawing a grayscale histogram of the average white field image, and selecting the cluster with the lowest grayscale value as the region of interest.
[0067] Preferably, the adaptive parameter selection method further comprises obtaining the intrinsic parameters of the measurement system, and substituting the intrinsic parameters into the parameter selection formula as follows:
[0068]
[0069] Obtain the optimal fringe projection intensity I under the measurement scenario opt ; Where K is the gain parameter of the camera, C is the intrinsic parameter related to the internal noise of the camera, is the desired accuracy of the setting; the optimal fringe projection intensity I opt Substitute into the following formula to find the optimal exposure time t opt :
[0070]
[0071] Among them, I w , t wThey respectively represent the intensity of the pre-shot fringe pattern and the exposure time used for shooting; the optimal parameters include the optimal fringe pattern projection intensity and the optimal exposure time.
[0072] Preferably, step S4 uses the optimal parameters to reconstruct the scene using phase shift profilometry, and uses a phase unwrapping method to reconstruct the three-dimensional morphology.
[0073] Preferably, the phase unwrapping method is a three-frequency phase unwrapping method, in which the low-frequency and medium-frequency parts are used to guide the phase unwrapping, and the high-frequency part is used to obtain fine three-dimensional morphological information.
[0074] This embodiment further provides an adaptive high dynamic range measurement device based on time domain stacking, characterized by comprising:
[0075] A projection module, used for projecting a phase-shifted fringe pattern onto a measurement scene;
[0076] An image acquisition module, used for acquiring a phase-shifted fringe image of the measurement scene with an arbitrary exposure time;
[0077] The processing module is used to execute the adaptive high dynamic range measurement algorithm based on time domain stacking described in the above technical solution, and calculate and obtain high dynamic range three-dimensional morphology data of the measurement scene.
[0078] Preferably, the processing module comprises:
[0079] A data preprocessing unit, used to calculate the average white field diagram and the proportionality coefficient between modulation and intensity;
[0080] A parameter calculation unit, used for calculating the optimal parameters according to the set expected accuracy and the inherent parameters of the measurement system;
[0081] The reconstruction unit is used to perform three-dimensional reconstruction of the measurement scene according to the optimal parameters.
[0082] This embodiment further provides a computer-readable storage medium storing a computer program, which, when executed by a processor, implements an adaptive high dynamic range measurement algorithm based on time domain stacking.
[0083] Example 2
[0084] This embodiment provides a specific implementation of an adaptive high dynamic range measurement algorithm based on time domain stacking, such as Figure 1 As shown, the following steps are included:
[0085] S1: Take a set of phase-shift fringe patterns with any exposure time for the measurement scene, obtain the average white field pattern, and calculate the proportionality coefficient between modulation and intensity;
[0086] Step S1 includes: shooting a set of phase-shift fringe patterns for an HDR scene to be measured with an arbitrary exposure time, and obtaining the intensity of the average white field pattern of the measured scene by the following formula:
[0087]
[0088] Among them I w (x, y) represents the intensity of the pixel coordinate point (x, y) in the average white field image, I n (x, y) represents the intensity of the pixel coordinate point (x, y) at the nth phase shift, n represents the number of stacking times in the time domain stacking method, and N represents the number of phase shifting steps in the phase shifting method;
[0089] The modulation degree of the fringe pattern is obtained by the following formula:
[0090]
[0091] Where B(x,y) represents the modulation degree B of the pixel coordinate point (x,y); and the modulation degree B(x,y) of the fringe image and the intensity I of the average white field image are obtained. w The proportionality factor i of (x,y) is
[0092]
[0093] Specifically, a set of three-step phase shift images with 64 frequencies is captured with an exposure time of t=40000ms, such as Figure 2 As shown, and obtained as Figure 3 The average white field image is shown. Then the proportionality coefficient i is calculated based on the intensity of the average white field image and the modulation degree of the fringe image.
[0094] In step S1, by calculating the modulation, intensity and proportional coefficient of the average white field image, the brightness distribution of the scene can be accurately characterized under different exposure conditions. This provides accurate basic data for subsequent adaptive parameter selection, avoiding subsequent measurement errors caused by inaccurate initial data. It also provides reliable basic data for subsequent high-precision 3D reconstruction, thereby ensuring the accuracy, stability and efficiency of the entire measurement process.
[0095] S2: Draw a grayscale distribution map based on the white field map, and select the area with the minimum grayscale value distribution as the region of interest (ROI)
[0096] In high dynamic range scenes, it is usually difficult to capture details in low reflectivity areas, but by focusing on these areas and performing special processing, the measurement accuracy of these areas can be significantly improved. Therefore, by selecting the area with the minimum grayscale value distribution (the lowest reflectivity area) as the region of interest (ROI), we can focus on processing the areas that are most prone to measurement errors. Specifically, the grayscale distribution histogram is drawn for the above HDR scene with the x-axis as the grayscale value size (DN) and the y-axis as the number of grayscale value intensity points, as shown in Figure 4 As shown; the number of points in each gray value cluster is counted, the gray value size is divided into four categories, and the gray value minimum distribution area, that is, the lowest gray value cluster, is set as the region of interest (ROI), as shown Figure 4 As shown. Then, the scale factor of the region of interest (ROI) is selected as the final scale factor i. In fringe projection technology, the lowest gray value cluster usually refers to the darkest part of the image, which corresponds to the lowest reflectivity area on the surface of the object because they reflect the least light onto the camera sensor. Therefore, the lowest gray value cluster is directly related to the lowest reflectivity area on the surface of the object, reflecting the object's weak ability to reflect light. All subsequent operations are based on the region of interest (ROI). When the lowest gray value cluster (ROI) improves the phase accuracy to the desired accuracy through time domain stacking, the phase accuracy of the remaining high reflectivity areas can also be guaranteed. Focusing resources and computing power on the most challenging areas with the lowest gray values can also optimize the use of measurement resources, reduce unnecessary measurement complexity, and improve the efficiency and effectiveness of the overall system.
[0097] S3: Set the expected accuracy for the region of interest, obtain the inherent parameters of the measurement system, substitute them into the parameter selection formula, and use the adaptive parameter selection method to select the exposure time and number of stacking times
[0098] Step S3 includes: first setting the phase shift step number N, then finding the intrinsic parameters of the camera used, substituting the intrinsic coefficients into the adaptive parameter selection formula of the following formula, and calculating the appropriate stacking number n and the intensity I of the optimal fringe projection in the measurement scene: opt .
[0099]
[0100] Among them, I opt is the intensity of the optimal fringe projection (DN), K is the gain parameter of the CCD camera, C is the intrinsic parameter related to the internal noise of the camera, n is the number of stacking times of the time domain stacking method, N is the number of phase shift steps of the phase shift method, Indicates the expected accuracy.
[0101] After obtaining the best fringe projection intensity, the best exposure time is obtained by substituting the pre-shot phase shift image intensity, exposure time and the best fringe projection intensity into the following formula.
[0102]
[0103] Among them, I w , t w Respectively represent the intensity of the pre-shot fringe pattern and the exposure time used for shooting, I opt , t opt They represent the optimal fringe projection intensity and the optimal exposure time, respectively, which are also the fringe intensity and exposure time that meet the expected accuracy.
[0104] Specifically, the phase shift step number N=3 is selected, and the intrinsic parameters of the camera K=0.0075 and C=0.1 are obtained by searching. Then all coefficients are substituted into the adaptive parameter selection formula to calculate the appropriate number of stacking times n=7 and the intensity of fringe projection I=50DN in this scene. Then the intensity and exposure time of the pre-shot phase shift image and the intensity of the optimal fringe projection are brought in to obtain the optimal exposure time of 3.5ms.
[0105] Step S3 uses an adaptive parameter selection method to combine the characteristics of the region of interest and the inherent parameters of the measurement system to accurately control the measurement accuracy and dynamically adjust the exposure time and the number of stacking times according to the specific scene. This not only improves the adaptability of the measurement system and the stability of the measurement results, but also reduces the resource loss of the measurement time, enhances the robustness and consistency of the system in complex measurement scenes, and ultimately ensures the efficiency and accuracy of high dynamic range measurement tasks.
[0106] S4: Reconstruct the scene using the optimal parameters to obtain actual measurement results with the same accuracy as the expected accuracy.
[0107] Specifically, the optimal exposure time and the optimal number of stacking are selected according to the adaptive parameters to reconstruct the entire scene, and the original scene is stacked as follows Figure 5 The final reconstruction result is shown in Figure 6 (a) shown.
[0108] The stacking method is:
[0109] After taking pictures of the deformed fringes with a camera, the deformed fringes can be expressed as:
[0110] I n (x,y)=A(x,y)+B(x,y)cos[Φ(x,y)-2πn / N]
[0111] Where n represents the phase shift step, (x, y) represents the pixel coordinates of the point, Φ represents the phase value to be obtained, A and B represent the intensity and modulation degree of the fringe background respectively. The size of Φ can be obtained using the phase shift algorithm:
[0112]
[0113] By introducing the time domain superposition method, the intensity of the pixel point at the same phase shift is superimposed each time, and the expression of the intensity of the point can be obtained as follows:
[0114]
[0115] Among them I kn represents the intensity value of the point at the nth step of the kth measurement. Similarly, equation (2) is updated as:
[0116]
[0117] Through this stacking method, the Gaussian noise of the image can be suppressed, thereby significantly improving the signal-to-noise ratio of the image. In addition, in the three-frequency phase unwrapping method, the low-frequency and medium-frequency parts only guide the phase unwrapping, and the high-frequency part is used to obtain fine three-dimensional morphological information. Therefore, the low-frequency and medium-frequency parts only need to be shot once. In the final phase unwrapping link, the phase can be normally unwrapped by multiplying n times, such as Figure 7 shown.
[0118] At the same time, two situations that would occur when there is no adaptive parameter selection method are simulated: First, the reconstruction result that would occur when the exposure time is too short is simulated: one of the five groups of phase-shifted fringes is selected for reconstruction, and the reconstruction result is as follows Figure 6 (b) as shown.
[0119] Specifically, in the reconstruction results, although the normal dynamic range is sufficient to ensure that the entire three-dimensional morphology is successfully reconstructed, the phase accuracy of the region of interest (ROI) does not reach the expected accuracy, so the reconstruction result is poor. It can be seen that the cross-sectional line diagram is quite different from the result obtained by the adaptive parameter selection method. It is believed that the reconstruction result cannot meet the measurement requirements.
[0120] Then simulate the reconstruction result that will appear when the exposure time is too long. According to the phase accuracy selection formula, the phase shift diagram with 7 stacks of 3.5ms exposure time is selected. According to the calculation method of phase accuracy, the reconstruction result with a single 24ms exposure time should have the same phase accuracy. Therefore, this embodiment measures the scene with a 24ms exposure time. The measurement results are as follows: Figure 6 (c) as shown.
[0121] Specifically, it can be seen from the reconstruction results that the phase accuracy in the low reflectivity area has reached the expected accuracy, so the reconstruction results of the details of the portable hard disk are good, and its profile fluctuations are consistent with the Figure 6 (a) is similar, but due to the long exposure time, both the puppy doll and the white standard plate are overexposed, which is caused by insufficient dynamic range.
[0122] Comparing the results of the three groups of experiments, the following conclusions can be drawn: This method overcomes the defect that most traditional HDR methods are based on qualitative judgment of measurement parameters and cannot quantitatively determine the final measurement parameters. This method is based on the time domain stacking method and uses an adaptive parameter selection formula to increase the measurement dynamic range while obtaining the phase accuracy that can be achieved in the final measurement. This method avoids the problem of overexposure of the scene due to too long exposure time and insufficient final measurement accuracy due to insufficient exposure time when measuring HDR scenes. Compared with other methods, this method has the following advantages:
[0123] Compared with other HDR methods, this method can predict the achievable phase accuracy level before measurement, which can maximize the use of time and space costs, and at the same time make quantitative predictions on the measurement results. In certain specific scenarios, it will not cause waste of time and accuracy, and is of guiding significance.
[0124] Compared with similar HDR methods such as multi-exposure, this method can adaptively select the best exposure time and number of stacking times without having to rely on experience or multiple attempts. At the same time, the fringe multiplexing method is used to expand the phase, and the time cost is much lower than other HDR methods.
[0125] Example 3
[0126] As an optimization of Example 2, this example is a verification test for solving the phase accuracy of adaptive parameter selection, using a three-frequency phase unwrapping method combined with a three-step phase shifting technique to reconstruct the unwrapped phase of the standard plane. Figure 8 shown.
[0127] In order to verify the correctness of the theoretical formula, the phase of the standard ceramic plane was reconstructed, and the average of 300 measurement results was used as the true value to compare the theoretical phase error obtained by the theoretical formula with the actual phase error obtained by actual measurement. First, the effect of exposure time on the phase error was compared, and the difference between the theoretical error under different stacking times and the measured result and the true value was used as the phase error for comparison. The results are shown in Figure 2. Fig. 9 The difference between the theoretical error and the actual error under different exposure times is compared, as shown in Fig.10 As shown, the comparison method is the same as above.
[0128] Specifically, the size and change trend of the theoretical and actual values based on the number of times and exposure time curves are basically consistent, and the maximum difference is <0.0002rad, which can be considered to be caused by system error, thus proving the correctness of the theoretical formula. This experiment shows that the phase error predicted by theory can be used to directly replace the phase error of the experimental results, which plays a guiding role in the prediction of measurement accuracy. At the same time, this group of experiments also proves that when the relevant parameters of the measurement system are known in advance, the proposed method can be used to predict the phase accuracy that the system can measure in advance, without the need to use experience for judgment.
[0129] Example 4
[0130] This embodiment provides an adaptive high dynamic range measurement device based on time domain stacking, which is suitable for three-dimensional shape measurement of high dynamic range scenes in industrial and scientific research fields.
[0131] 1. The device includes the following modules:
[0132] Projection module: used to project a phase-shifted fringe pattern onto the measurement scene. This module usually includes a high-precision digital projector that can generate sinusoidal fringe patterns with different frequencies and phase shifts and project them onto the measurement scene.
[0133] Image acquisition module: used to acquire the phase-shifted fringe image of the measurement scene at any exposure time. This module is usually composed of a high dynamic range (HDR) camera, which can adjust the exposure time according to the reflectivity of the scene to capture the details of the fringe pattern.
[0134] Processing module: used to execute the adaptive high dynamic range measurement algorithm based on time domain stacking. The processing module includes the following sub-modules:
[0135] (1) Data preprocessing unit: used to calculate the average white field map and the ratio coefficient of modulation and intensity. This unit receives image data from the image acquisition module and performs the preprocessing steps of the algorithm.
[0136] (2) Parameter calculation unit: used to calculate the optimal parameters based on the desired accuracy and the inherent parameters of the measurement system. Through the adaptive parameter selection formula, the parameter calculation unit can dynamically adjust the exposure time and the number of stacking times to optimize the measurement results.
[0137] (3) A reconstruction unit: used to perform three-dimensional reconstruction of the measurement scene according to the optimal parameters. The unit generates high dynamic range three-dimensional morphological data of the measurement scene using phase shift profilometry and phase unwrapping methods.
[0138] 2. Workflow
[0139] First, the projection module projects the fringe pattern onto the surface of the object to be measured, and the image acquisition module captures the deformed fringe image according to different exposure times. The data preprocessing unit receives these images and calculates the average white field map and the proportional coefficient of modulation and intensity. The parameter calculation unit uses these calculation results, combined with the set expected accuracy and the inherent parameters of the measurement system, to determine the optimal exposure time and number of stacking. Finally, the reconstruction unit performs three-dimensional reconstruction of the measurement data based on the calculated optimal parameters to generate a high dynamic range three-dimensional morphology of the scene.
[0140] Example 5
[0141] This embodiment provides a computer-readable storage medium storing a computer program, which, when executed by a processor, can implement an adaptive high dynamic range measurement algorithm based on time domain stacking.
[0142] 1. Computer readable storage medium
[0143] The storage medium may be a hard disk, a solid state drive (SSD), an optical disk, a flash drive or any other device capable of storing digital information. The computer program stored in the storage medium may be executed in a standard computer, an embedded system or a dedicated measuring device.
[0144] 2. Program functions
[0145] Data input module: This module receives the phase-shift fringe image data from the measuring device and performs necessary preprocessing on it.
[0146] Parameter calculation module: This module implements the adaptive parameter selection formula and calculates the optimal exposure time and number of stacking times through the input measurement data and system parameters.
[0147] 3D Reconstruction Module: This module performs phase unwrapping algorithm and phase shift profilometry to reconstruct the processed fringe image data into a high dynamic range 3D topography image.
[0148] Result output module: This module is responsible for outputting the final 3D reconstruction results. The results can be saved to storage media or output to other analysis tools through interfaces.
[0149] 3. Usage scenarios
[0150] When the computer program is loaded onto a measuring device or computing equipment and executed by a processor, the entire measurement process from data acquisition to final 3D reconstruction can be automatically completed. The program can significantly improve the measurement accuracy in high dynamic range scenes and reduce the time and resources required for measurement.
[0151] The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. Any modifications, equivalent substitutions and improvements made within the spirit and principles of the present invention should be included in the protection scope of the present invention.
Claims
1. An adaptive high dynamic range measurement algorithm based on time domain stacking, characterized in that: The following steps are involved: S1, obtaining a phase shift fringe pattern of a measurement scene, and obtaining an average white field pattern of the measurement scene; S2. Selecting a region of interest of the measurement scene according to the average white field map; S3, setting a desired accuracy for the region of interest, and obtaining optimal parameters for measuring the region of interest through an adaptive parameter selection method; S4. Reconstruct the measurement scene according to the optimal parameters to obtain an actual measurement result with the same expected accuracy.
2. The adaptive high dynamic range measurement algorithm based on time domain stacking according to claim 1, characterized in that: Step S1 includes shooting a set of phase-shift fringe patterns with different exposure times for an HDR scene to be tested, and obtaining an average white field pattern according to the following formula: Among them, I w (x, y) represents the intensity of the pixel coordinate point (x, y) in the white field image, I n (x, y) represents the intensity of the pixel coordinate point (x, y) at the nth phase shift, n represents the number of stacking times in the time domain stacking method, and N represents the number of phase shift steps in the phase shift method.
3. The adaptive high dynamic range measurement algorithm based on time domain stacking according to claim 2, characterized in that: Step S1 includes obtaining the modulation degree, Wherein, B(x, y) represents the modulation degree of the pixel coordinate point (x, y); the proportional coefficient i is obtained according to the modulation degree and intensity of the average white field image, where 4. The adaptive high dynamic range measurement algorithm based on time domain stacking according to claim 3, characterized in that: Step S2 of selecting the region of interest involves drawing a grayscale histogram of the average white field image and selecting the lowest grayscale value cluster as the region of interest.
5. The adaptive high dynamic range measurement algorithm based on time domain stacking according to claim 4, characterized in that: The adaptive parameter selection method in step S3 further includes obtaining the inherent parameters of the measurement system, and substituting the inherent parameters into the parameter selection formula as follows: Obtain the optimal fringe projection intensity I under the measurement scenario opt ; Where K is the gain parameter of the camera, C is the intrinsic parameter related to the internal noise of the camera, The desired accuracy for the setting; The optimal fringe projection intensity I opt Substitute into the following formula to find the optimal exposure time t opt : Among them, I w , t w They respectively represent the intensity of the pre-shot fringe pattern and the exposure time used for shooting; the optimal parameters include the optimal fringe pattern projection intensity and the optimal exposure time.
6. The adaptive high dynamic range measurement algorithm based on time domain stacking according to claim 5, characterized in that: In step S4, the measurement scene is reconstructed using the optimal parameters by adopting phase shift profilometry, and a phase unwrapping method is used to perform three-dimensional morphology reconstruction.
7. The adaptive high dynamic range measurement algorithm based on time domain stacking according to claim 6, characterized in that: The phase unwrapping method is a three-frequency phase unwrapping method, in which the low-frequency and medium-frequency parts are used to guide the phase unwrapping, and the high-frequency part is used to obtain fine three-dimensional morphological information.
8. An adaptive high dynamic range measurement device based on time domain stacking, characterized in that: include: A projection module, used for projecting a phase-shifted fringe pattern onto a measurement scene; An image acquisition module, used for acquiring a phase-shifted fringe image of the measurement scene with an arbitrary exposure time; A processing module is used to execute the measurement algorithm described in any one of claims 1 to 7 to calculate and obtain high dynamic range three-dimensional shape data of the measurement scene.
9. The adaptive high dynamic range measurement device based on time domain stacking according to claim 8, characterized in that: The processing module comprises: A data preprocessing unit, used to calculate the average white field diagram and the proportionality coefficient between modulation and intensity; A parameter calculation unit, used for calculating the optimal parameters according to the set expected accuracy and the inherent parameters of the measurement system; The reconstruction unit is used to perform three-dimensional reconstruction of the measurement scene according to the optimal parameters.
10. A computer-readable storage medium storing a computer program, wherein when the computer program is executed by a processor, the computer program implements the adaptive high dynamic range measurement algorithm based on time domain stacking according to any one of claims 1 to 9.
Citation Information
Patent Citations
Error correction method of grating projection three-dimensional measurement system
CN106595522A
Self-adaptive multiple exposure method for three-dimensional topography measurement
CN116614713A
Adaptive three-dimensional measurement method and system based on multiple exposure algorithms
CN118089593A
Super-rapid three-dimensional topography measurement method and system based on improved fourier transform contour technique
US20210102801A1
Automatic exposure selection method for high dynamic range 3D optical measurements
WO2022147670A1