A digital holographic focusing method and system based on region segmentation and dichotomy
By combining region segmentation and the binary method with an improved evaluation function, the problems of slow autofocus speed and low accuracy in digital holographic imaging are solved, achieving efficient and accurate focus detection.
Patent Information
- Application Number
- CN202410988067.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-07-23
- Publication Date
- 2025-10-28
- Estimated Expiration
- 2044-07-23
AI Technical Summary
In existing digital holographic imaging technology, the autofocus method has a large search range and a fixed step size, which leads to slow detection speed and low sensitivity. In addition, traditional improved methods suffer from curve overfitting or underfitting, which affects detection accuracy.
By combining region segmentation and the bisection method with an improved evaluation function, the search area is narrowed by solving a system of inequality equations. Within the narrowed area, the zero-point position is calculated using the bisection method and the improved evaluation function, thereby improving detection accuracy and efficiency.
Without altering the existing device structure, the computational sensitivity and efficiency of autofocus are improved, the number of searches is reduced, and it is suitable for off-axis digital holographic optical paths of amplitude-type and phase-type objects.
Smart Images

Figure CN119002212B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of digital holographic imaging technology, and in particular to a digital holographic focusing method and system based on region segmentation and dichotomy. Background Art
[0002] Digital holographic imaging uses photoelectric conversion devices to record the hologram of the object being measured and then transmits the digitized hologram to a computer, achieving rapid and accurate recording of the hologram. An accurate image can only be obtained when the reconstruction distance during digital holographic reconstruction equals the recording distance. If the reconstruction distance does not equal the recording distance, it will cause oscillations at the edges of the reconstructed image, making the edges blurry and significantly reducing the clarity of the reconstructed image. To ensure the accuracy of holographic reconstruction, autofocus technology is applied to digital holography.
[0003] Current autofocusing methods typically use large search ranges to ensure coverage of the optimal reconstruction distance, and perform continuous reconstruction at fixed step intervals, severely limiting the speed of optimal reconstruction distance detection. Furthermore, the fixed and small step size during the search for the optimal reconstruction distance results in minimal differences in function values near peaks and troughs on the focusing curve, leading to low sensitivity and measurement accuracy. The paper "Fast Autofocusing Algorithm Based on Variable Step Search and Curve Fitting Applied in the Near-and Far-Field Detection System With a Common Optical Path" proposes an improvement to the traditional hill-climbing search method using variable step size search and curve fitting. While this method effectively increases the detection speed of the optimal distance, curve overfitting or underfitting can still affect the detection accuracy of the optimal reconstruction distance. Summary of the Invention
[0004] The purpose of this invention is to overcome the shortcomings of the existing technology and provide a digital holographic focusing method and system based on region segmentation and dichotomy.
[0005] The purpose of the present invention can be achieved by the following technical solutions:
[0006] A digital holographic focusing method and system based on region segmentation and dichotomy includes the following steps:
[0007] S1: Acquire the off-axis digital hologram of the object under test and record the distance;
[0008] S2: Use the recorded distance as the midpoint of the original search area;
[0009] S3: For possible error magnitudes, the corresponding reduced search regions are obtained by solving the corresponding relationship between possible error magnitudes, and the reduced search regions are sorted in order from small to large based on the ratio of error to the original search region.
[0010] S4: Using the improved evaluation function combined with the bisection method, calculate and evaluate the zero point position of the function value within the narrowed search area according to the sorting.
[0011] S5: The obtained zero point position is the optimal reconstruction distance, which is the focus of the focus.
[0012] Furthermore, the calculation expression of the improved evaluation function is as follows:
[0013]
[0014] In the formula, d is the reconstruction distance, Δ is the step size, U(x,y;z) is the complex amplitude distribution, and U(x,y;z+Δ) is the complex amplitude distribution of the next adjacent frame.
[0015] Furthermore, the possible error size includes the original search area being greater than or equal to six times the error size, the original search area being greater than four times but less than or equal to six times the error size, and the original search area being greater than two times but less than or equal to four times the error size.
[0016] Furthermore, when the original search region is greater than or equal to six times the error size, the system of inequalities relating the error size can be expressed as:
[0017]
[0018] The corresponding first group of narrowed search areas is
[0019] In the formula, ε is the possible error magnitude, z1 is the lower limit of the search area, z is the recording distance, and z2 is the upper limit of the search area.
[0020] Furthermore, when the original search area is greater than four times but less than or equal to six times the error size, the system of inequalities relating the error size can be expressed as:
[0021]
[0022] The corresponding second group of narrowed search areas is and
[0023] In the formula, ε is the possible error magnitude, z1 is the lower limit of the search area, z is the recording distance, and z2 is the upper limit of the search area.
[0024] Furthermore, when the original search area is greater than twice but less than or equal to four times the error size, the system of inequalities relating the error size can be expressed as:
[0025]
[0026] The corresponding third group of narrowed search areas is and
[0027] In the formula, ε is the possible error magnitude, z1 is the lower limit of the search area, z is the recording distance, and z2 is the upper limit of the search area.
[0028] In a second aspect, an off-axis digital holographic system includes a light source, a beam expander and collimator, a first beam splitter, a first reflecting mirror, a second reflecting mirror, an object to be imaged, a second beam splitter, a CCD camera, and a computer. A light beam emitted from the light source passes sequentially through the beam expander and collimator and the first beam splitter, splitting into a first beam and a second beam. The first beam passes through the second reflecting mirror and illuminates the object to be imaged. The second beam passes through the first reflecting mirror and is combined with the first beam on the second beam splitter to obtain a combined beam. The combined beam interferes on the CCD camera to form an off-axis hologram. The off-axis hologram is digitized and input into the computer. The computer stores one or more programs, and when the programs run, they execute a digital holographic focusing method based on region segmentation and dichotomy as described in any one of claims 1-6.
[0029] Furthermore, the light source is a helium-neon laser.
[0030] Furthermore, both the first and second reflecting mirrors are rotatable structures.
[0031] Furthermore, the CCD camera has a pixel size of 4.65μm × 4.65μm.
[0032] Compared with the prior art, the present invention has the following beneficial effects:
[0033] 1) This invention obtains a new search region after minimization by segmenting the original region and solving a system of inequality equations. By improving the focusing evaluation function, the computational sensitivity is enhanced. This function is combined with the bisection method, and the calculation is performed incrementally when the error is unknown. The minimum value of the evaluation function is transformed into the detection of zero-crossing positions, thereby reducing the number of searches required by the automatic focusing method, improving the efficiency of automatic focusing, and having a larger search range.
[0034] 2) The automatic focusing method provided by this invention is applicable to off-axis digital holographic optical paths of amplitude-type objects and phase-type objects, and does not require changes to the existing device structure, making it easy to use. Attached Figure Description
[0035] Figure 1This is a schematic diagram of the digital holographic system structure in a specific embodiment.
[0036] Figure 2 This is a flowchart of an autofocusing method for digital holographic imaging provided in an embodiment of the present invention.
[0037] Figure 3a Focus curves obtained from the 1951-USAF resolution chart were tested for five autofocus methods: AMP, VAR, SPED, EIG, and CS.
[0038] Figure 3b The focus curves obtained from the 1951-USAF resolution chart were tested for both DIF and IDIF autofocus methods.
[0039] Figure 3c This is the focusing curve of the difference function.
[0040] Figure 3d The amplitude diagram is reconstructed at the optimal reconstruction distance.
[0041] Figure 4a Focusing curves obtained from the crystals for five autofocus methods: AMP, VAR, SPED, EIG, and CS.
[0042] Figure 4b Focusing curves obtained from the crystal for both DIF and IDIF autofocus methods.
[0043] Figure 4c This is the focusing curve of the difference function.
[0044] Figure 4d The phase map is reconstructed at the optimal reconstruction distance.
[0045] The markings in the diagram are as follows: 1. Parallel laser beam, 2. Beam expander and collimator, 3. First beam splitter, 4. First reflector, 5. Second reflector, 6. Object to be imaged, 7. Second beam splitter, 8. CCD camera, 9. Computer. DETAILED DESCRIPTION
[0046] The present invention will now be described in detail with reference to the accompanying drawings and specific embodiments. These embodiments are based on the technical solution of the present invention and provide detailed implementation methods and specific operating procedures. However, the scope of protection of the present invention is not limited to the following embodiments.
[0047] This invention relates to a digital holographic focusing method and system based on region segmentation and dichotomy, such as... Figure 2 As shown, the method includes the following steps:
[0048] S1: Acquire the off-axis digital hologram of the object under test and record the distance;
[0049] After setting up the off-axis digital holographic optical path system, the distance from the object to the CCD is roughly measured using a ruler to obtain the approximate recording distance z. Then, experiments are conducted to obtain the off-axis digital hologram to be processed.
[0050] S2: Using the recorded distance as the midpoint of the search area, the search area is divided into two search areas of equal size with overlapping parts using the search area segmentation method;
[0051] The approximate recorded distance z obtained from the measurement is set as the midpoint of the search area [z1, z2].
[0052] S3: For possible error magnitudes, the corresponding reduced search regions are obtained by solving the corresponding relationship between possible error magnitudes, and the reduced search regions are sorted in order from small to large based on the ratio of error to the original search region.
[0053] Since the actual error is unknown, different search intervals are applied sequentially for calculation. Possible error magnitudes include: the original search area being greater than or equal to six times the original error magnitude; the original search area being greater than four times but less than or equal to six times the original error magnitude; and the original search area being greater than two times but less than or equal to four times the original error magnitude.
[0054] When the original search region is greater than or equal to six times the error size, the system of inequalities regarding the error size can be expressed as:
[0055]
[0056] The corresponding first group of narrowed search areas is
[0057] When the original search area is greater than four times but less than or equal to six times the error size, the system of inequalities regarding the error size can be expressed as:
[0058]
[0059] The corresponding second group of narrowed search areas is and
[0060] In the formula, ε is the possible error magnitude, z1 is the lower limit of the search area, z is the recording distance, and z2 is the upper limit of the search area.
[0061] When the original search region is greater than twice and less than or equal to four times the error size, the system of inequalities regarding the error size can be expressed as:
[0062]
[0063] The corresponding third group of narrowed search areas is and
[0064] In the formula, ε is the possible error magnitude, z1 is the lower limit of the search area, z is the recording distance, and z2 is the upper limit of the search area.
[0065] The sorted results of the search regions are as follows:
[0066] S4: Using the improved evaluation function combined with the bisection method, calculate and evaluate the zero point position of the function value in the narrowed search area according to the sorting.
[0067] The expression for the improved evaluation function is:
[0068]
[0069] In the formula, d is the reconstruction distance, Δ is the step size, U(x,y;z) is the complex amplitude distribution, and U(x,y;z+Δ) is the complex amplitude distribution of the next adjacent frame.
[0070] Based on the search region sorting results, the algorithm is calculated sequentially within the narrowed search interval. The evaluation function is combined with the bisection method, and reconstruction is performed at each reconstruction distance calculated by the bisection method to obtain the corresponding function value. The existence of a zero point is then checked. If a zero point exists, the search is stopped.
[0071] S5: The obtained zero-point position is the optimal reconstruction distance, which is the focal point. Outputting the reconstructed image here is the optimal reconstructed image.
[0072] Example 1
[0073] like Figure 1 The diagram shown is a system structure diagram of the present invention. Light source 1 is a helium-neon laser with a wavelength λ equal to 632.8 nm. The beam emitted by 1 is split into two beams by the first beam splitter 3 after passing through the beam expander and collimator 2. One beam is the object beam, which is reflected by the second reflector 5 and illuminates the object 6 to be imaged. The other beam is the reference beam, which is reflected by the first reflector 4 and then combined with the object beam on the second beam splitter 7. The interference angle is adjusted by rotating the first reflector 4 or the second reflector 5. Finally, the object beam and the reference beam interfere on the CCD camera 8 to form an off-axis hologram. The pixel size of the CCD camera is 4.65 μm × 4.65 μm. The digitized hologram is input into the computer 9, and the computer 9 runs a program to execute the method of the present invention.
[0074] The distance from the amplitude-type object to the CCD camera was roughly measured to be 93.1 mm using a flexible ruler. Based on this distance, the search range was set to 83.2-103 mm, with the measured distance serving as the midpoint of the search range. First, the optimal reconstruction distance was detected within the search area of 89.8-96.4 mm for the first scenario after the initial search. This evaluation function was combined with a bisection method, and reconstruction was performed at each variable step size reconstruction distance, calculating the corresponding function value and detecting the presence of a zero point. If a zero point existed, the search was stopped.
[0075] like Figure 3a and Figure 3b As shown, the function value curves obtained after reconstructing the hologram in the range of 83.2-103 mm with a step size of Δ = 0.05 mm using six traditional autofocusing methods (Integral Amplitude Modulus (AMP), Squared Amplitude Difference (DIF), Weighted Spectrum (SPEC), Variation of Gray Value Distribution (VAR), Eigenvalue of Matrix (EIG), and Cosine Value (CS)) and the IDIF method are presented. Figure 3c As shown, the function value curves of the difference function within the narrowed search region are displayed. Figure 3d As shown, the amplitude image reconstructed at the optimal reconstruction distance is displayed.
[0076] Table 1 shows the focusing detection results of this method and six other commonly used methods (based on integral amplitude modulus, based on the square of amplitude difference, weighted spectrum, gray value distribution variance, matrix eigenvalue, and cosine value) for amplitude-type objects. It can be seen that the present invention has the highest computational efficiency under the same conditions.
[0077] Table 1. Focusing detection results of amplitude-type objects
[0078]
[0079] Example 2
[0080] Using the same method as in Example 1 Figure 1 The off-axis digital holographic device structure is shown. The distance from the amplitude-type object to the CCD camera was roughly measured to be 4.3 mm using a ruler. Based on this distance, the search range was set to 0-8.6 mm, with the measured distance as the midpoint of the search range. First, the optimal reconstruction distance was detected within the search area of 2.87-5.73 mm in the first case after the search. This evaluation function was combined with a bisection method, and reconstruction was performed at each variable step size reconstruction distance, calculating the corresponding function value and detecting the presence of a zero point. If a zero point existed, the search was stopped.
[0081] Figure 4a and 4b The results show that 172 hologram reconstructions were performed in the range of 83.2–103 mm with a step size of Δ = 0.05 mm using six conventional autofocus methods and the IDIF method. Figure 4c The function value curves of the difference function within the narrowed search area are displayed. Figure 4d The phase image reconstructed at the optimal reconstruction distance is shown.
[0082] Table 2 shows the focusing detection results of this method and six other commonly used methods (based on integral amplitude modulus, based on the square of amplitude difference, weighted spectrum, gray value distribution variance, matrix eigenvalue, and cosine value) for phase-type objects. It can be seen that, under the same conditions, this invention has the highest computational efficiency.
[0083] Table 2 Focusing detection results for phase-type objects
[0084]
[0085] The preferred embodiments of the present invention have been described in detail above. It should be understood that those skilled in the art can make numerous modifications and variations based on the concept of the present invention without creative effort. Therefore, all technical solutions that can be obtained by those skilled in the art based on the concept of the present invention through logical analysis, reasoning, or limited experimentation on the basis of existing technology should be within the scope of protection defined by the claims.
Claims
1. A digital holographic focusing method based on region segmentation and dichotomy, characterized in that, The following steps are involved: S1: Acquire the off-axis digital hologram of the object under test and record the distance; S2: Use the recorded distance as the midpoint of the original search area; S3: For possible error magnitudes, the corresponding reduced search regions are obtained by solving the corresponding relationship between possible error magnitudes, and the reduced search regions are sorted in order from small to large based on the ratio of error to the original search region. S4: Using the improved evaluation function combined with the bisection method, calculate and evaluate the zero point position of the function value in the narrowed search area according to the sorting. S5: The obtained zero-point position is the optimal reconstruction distance, which is the focus of the focus; The calculation expression for the improved evaluation function is as follows: In the formula, To reconstruct the distance, Step size, For complex amplitude distribution, This represents the complex amplitude distribution of the next adjacent frame.
2. The digital holographic focusing method based on region segmentation and dichotomy according to claim 1, characterized in that, The possible error sizes include those where the original search area is greater than or equal to six times the error size, the original search area is greater than four times but less than or equal to six times the error size, and the original search area is greater than two times but less than or equal to four times the error size.
3. The digital holographic focusing method based on region segmentation and dichotomy according to claim 2, characterized in that, When the original search region is greater than or equal to six times the error size, the system of inequalities regarding the error size can be expressed as: The corresponding first group of narrowed search areas is ; In the formula, To represent the possible error magnitude, This is the lower limit of the search area. To record distance, This represents the upper limit of the search area.
4. The digital holographic focusing method based on region segmentation and dichotomy according to claim 2, characterized in that, When the original search area is greater than four times but less than or equal to six times the error size, the system of inequalities regarding the error size can be expressed as: The corresponding second group of narrowed search areas is and ; In the formula, To represent the possible error magnitude, This is the lower limit of the search area. To record distance, This represents the upper limit of the search area.
5. A digital holographic focusing method based on region segmentation and dichotomy according to claim 2, characterized in that, When the original search region is greater than twice and less than or equal to four times the error size, the system of inequalities regarding the error size can be expressed as: The corresponding third group of narrowed search areas is and ; In the formula, To represent the possible error magnitude, This is the lower limit of the search area. To record distance, This represents the upper limit of the search area.
6. An off-axis digital holographic system, characterized in that, The system includes a light source (1), a beam expander and collimator (2), a first beam splitter (3), a first reflector (4), a second reflector (5), an object to be imaged (6), a second beam splitter (7), a CCD camera (8), and a computer (9). The light beam emitted by the light source (1) passes through the beam expander and collimator (2) and the first beam splitter (3) in sequence, and is divided into a first beam and a second beam. The first beam passes through the second reflector (5) and illuminates the object to be imaged (6). The second beam passes through the first reflector (4) and is combined with the first beam on the second beam splitter (7) to obtain a combined beam. The combined beam interferes on the CCD camera (8) to form an off-axis hologram. The off-axis hologram is digitized and input into the computer (9). The computer (9) stores one or more programs. When the program runs, it executes a digital holographic focusing method based on region segmentation and bisection as described in any one of claims 1-5.
7. An off-axis digital holographic system as described in claim 6, characterized in that, The light source (1) is a helium-neon laser.
8. An off-axis digital holographic system as described in claim 6, characterized in that, Both the first reflector (4) and the second reflector (5) are rotatable structures.
9. An off-axis digital holographic system as described in claim 6, characterized in that, The CCD camera (8) has a pixel size of 4.65μm. 4.65μm.