Digital holographic focusing method and system based on region segmentation and dichotomy
Through the digital holographic focusing method based on region segmentation and dichotomy, the search area is narrowed and combined with the improved evaluation function, the problems of slow automatic focusing speed and low accuracy in the prior art are solved, and more efficient automatic focusing efficiency and accuracy are achieved.
Patent Information
- Application Number
- CN202410988067.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-07-23
- Publication Date
- 2024-11-22
- Estimated Expiration
- 2044-07-23
AI Technical Summary
The search range of the automatic focusing method in existing digital holographic imaging technology is too large and the step length is fixed, resulting in slow detection speed, low sensitivity, and overfitting or underfitting problems in curve fitting, which affects the optimal reconstruction distance. Detection accuracy.
Using a digital holographic focusing method based on region segmentation and dichotomy, the search area is narrowed by solving the inequality equation system, and combined with improved evaluation functions and dichotomy, the search range is gradually narrowed, the calculation sensitivity is improved, the number of searches is reduced, and the optimal reconstruction distance is found. .
It improves the efficiency and accuracy of automatic focusing, is suitable for amplitude and phase objects, and does not require changes to the existing device structure and is easy to use.
Smart Images

Figure CN119002212A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of digital holographic imaging, 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 transmits the digitized hologram to the computer, realizing the fast and accurate recording of the hologram. Only when the reconstruction distance of the digital hologram is equal to the recording distance during recording, can an accurate image of the object be obtained. If the reconstruction distance is not equal to the recording distance, the edge of the reconstructed image will vibrate, the edge will become blurred, and the clarity of the reconstructed image will be greatly reduced. In order to ensure the accuracy of holographic reconstruction, autofocus technology is applied to digital holography.
[0003] In order to ensure that the optimal reconstruction distance is covered, the current autofocusing method usually sets a large search range and performs reconstruction continuously at fixed step intervals, which seriously limits the speed of detecting the optimal reconstruction distance. In addition, in the process of finding the optimal reconstruction distance, the step size is a fixed value and the value is small, resulting in little difference in the function value near the peak or trough on the focusing curve, low sensitivity, and low 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 a method to improve the traditional hill climbing search method by using variable step search and curve fitting. Although this method effectively improves the detection speed of the optimal distance, overfitting or underfitting of the curve will affect the detection accuracy of the optimal reconstruction distance. Summary of the invention
[0004] The purpose of the present invention is to overcome the defects of the above-mentioned prior art and to 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, comprising the following steps:
[0007] S1: Obtaining the off-axis digital hologram to be processed and the recording distance of the object under test;
[0008] S2: The recorded distance is the midpoint of the original search area;
[0009] S3: according to the possible error size, the corresponding reduced search area is obtained by solving the corresponding relationship formula of the possible error size, and the reduced search areas are sorted in order from small to large based on the ratio of the error to the original search area;
[0010] S4: Use the improved evaluation function in combination with the binary search method to calculate and evaluate the zero position of the function value in the narrowed search area according to the sorting;
[0011] S5: The obtained zero point position is the optimal reconstruction distance and is the focus.
[0012] Furthermore, the calculation expression of the improved evaluation function is:
[0013]
[0014] Where 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 sizes include an original search area greater than or equal to six times the error size, an original search area greater than four times and less than or equal to six times the error size, and an original search area greater than two times and less than or equal to four times the error size.
[0016] Furthermore, when the original search area is greater than or equal to six times the error size, the inequality equation group of the error size can be expressed as:
[0017]
[0018] The corresponding first group of narrowed search areas is
[0019] Where ε is the possible error size, 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 and less than or equal to six times the error size, the inequality equation group of the error size can be expressed as:
[0021]
[0022] The corresponding second group of narrowed search areas is and
[0023] Where ε is the possible error size, 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 two times and less than or equal to four times the error size, the inequality equation group of the error size can be expressed as:
[0025]
[0026] The corresponding third group of narrowed search areas is and
[0027] Where ε is the possible error size, 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] According to a second aspect of the present invention, an off-axis digital holographic system comprises a light source, a beam expander collimator, a first beam splitter, a first reflector, a second reflector, an object to be imaged, a second beam splitter, a CCD camera and a computer. The light beam emitted by the light source passes through the beam expander collimator and the first beam splitter in sequence and is divided into a first beam of light and a second beam of light. The first beam of light passes through the second reflector and irradiates the object to be imaged. The second beam of light passes through the first reflector and is combined with the first beam of light on the second beam splitter to obtain a combined beam of light. The combined beam of light 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. When the programs are run, a digital holographic focusing method based on regional segmentation and dichotomy as claimed in any one of claims 1 to 6 is executed.
[0029] Furthermore, the light source is a helium-neon laser.
[0030] Furthermore, the first reflector and the second reflector are both rotatable structures.
[0031] Furthermore, the pixel size of the CCD camera is 4.65 μm×4.65 μm.
[0032] Compared with the prior art, the present invention has the following beneficial effects:
[0033] 1) The present invention obtains a new search area after searching by dividing the original area and solving the inequality equation group, improves the calculation sensitivity by improving the focus evaluation function, and combines the function with the dichotomy method. In the case of unknown errors, the calculation is performed progressively, and the discrimination minimum value of the evaluation function is converted into the detection of the zero crossing position, thereby reducing the number of searches required by the automatic focusing method, improving the automatic focusing efficiency, and having a larger search range.
[0034] 2) The automatic focusing method provided by the present invention is applicable to off-axis digital holographic optical paths of amplitude-type objects and phase-type objects, and does not require changing the existing device structure and is easy to use. BRIEF DESCRIPTION OF THE DRAWINGS
[0035] Figure 1It is a schematic diagram of the structure of a digital holographic system in a specific embodiment.
[0036] Figure 2 It is a flow chart of an automatic focusing method for digital holographic imaging provided in an embodiment of the present invention.
[0037] Figure 3a Focus curves obtained by testing the 1951-USAF resolution plate for five autofocus methods: AMP, VAR, SPED, EIG, and CS.
[0038] Figure 3b Focus curves obtained by testing the 1951-USAF resolution plate using the DIF and IDIF autofocus methods.
[0039] Figure 3c is the focusing curve of the difference function.
[0040] Figure 3d This is the reconstructed amplitude map at the optimal reconstruction distance.
[0041] Figure 4a The focusing curves obtained by detecting the crystal using five autofocus methods: AMP, VAR, SPED, EIG, and CS.
[0042] Figure 4b The focusing curves obtained by detecting the crystal using the two autofocus methods, DIF and IDIF.
[0043] Figure 4c is the focusing curve of the difference function.
[0044] Figure 4d is the phase image reconstructed at the optimal reconstruction distance.
[0045] Explanation of the marks in the figure: 1. parallel laser beam, 2. beam expansion 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 is described in detail below in conjunction with the accompanying drawings and specific embodiments. This embodiment is implemented based on the technical solution of the present invention, and provides a detailed implementation method and specific operation process, but the protection scope of the present invention is not limited to the following embodiments.
[0047] The present invention is a digital holographic focusing method and system based on region segmentation and dichotomy, such as Figure 2 As shown, the method comprises the following steps:
[0048] S1: Obtaining the off-axis digital hologram to be processed and the recording distance of the object under test;
[0049] After setting up the off-axis digital holographic optical system, use a soft ruler to roughly measure the distance from the object to the CCD, and obtain the approximate recording distance z. Then carry out the experiment to obtain the off-axis digital hologram to be processed.
[0050] S2: Taking the recorded distance as the midpoint of the search area, the search area is divided into two search areas of equal size and with overlapping parts using the search area segmentation method;
[0051] The measured approximate recorded distance z is set as the midpoint of the search area [z1, z2].
[0052] S3: according to the possible error size, the corresponding reduced search area is obtained by solving the corresponding relationship formula of the possible error size, and the reduced search areas are sorted in order from small to large based on the ratio of the error to the original search area;
[0053] Since the actual error is an unknown quantity, different search intervals are applied in turn for calculation. Possible error sizes include the original search area being greater than or equal to six times the error size, the original search area being greater than four times and less than or equal to six times the error size, and the original search area being greater than two times and less than or equal to four times the error size.
[0054] When the original search area is greater than or equal to six times the error size, the inequality equation group of 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 and less than or equal to six times the error size, the inequality equation group of the error size can be expressed as:
[0058]
[0059] The corresponding second group of narrowed search areas is and
[0060] Where ε is the possible error size, 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 area is greater than two times and less than or equal to four times the error size, the inequality equation group of the error size can be expressed as:
[0062]
[0063] The corresponding third group of narrowed search areas is and
[0064] Where ε is the possible error size, 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 search area sorting results are:
[0066] S4: Use the improved evaluation function in combination with the binary search method to calculate and evaluate the zero position of the function value in sequence within the narrowed search area according to the sorting;
[0067] The expression of the improved evaluation function is:
[0068]
[0069] Where 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] According to the sorting results of the search area, the calculations are performed in the narrowed search interval, the evaluation function is combined with the dichotomy method, and reconstruction is performed at each reconstruction distance calculated by the dichotomy method to obtain the corresponding function value and detect whether there is a zero point. If there is a zero point, the search is stopped.
[0071] S5: The obtained zero point position is the optimal reconstruction distance, which is the focus point. The reconstructed image output here is the optimal reconstructed image.
[0072] Example 1
[0073] like Figure 1 As shown, it is a system structure diagram of the present invention. Light source 1 is a helium-neon laser with a wavelength λ equal to 632.8nm. The light beam emitted by 1 passes through a beam expander collimator 2 and is split into two beams by a first beam splitter 3. One beam is the object light, which is reflected by a second reflector 5 and then illuminates an object 6 to be imaged. One beam is the reference light, which is reflected by a first reflector 4 and then combined with the object light on a second beam splitter 7. The interference angle is adjusted by rotating the first reflector 4 or the second reflector 5. Finally, the object light and the reference light interfere on a CCD camera 8 to form an off-axis hologram, wherein the pixel size of the CCD camera is 4.65μm×4.65μm. The digitized hologram is input into a 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 is roughly measured with a soft ruler, which is 93.1 mm. Then the search range is set to 83.2-103 mm according to the distance, and the measured distance is the midpoint of the search range. First, the optimal reconstruction distance is detected in the search area of 89.8-96.4 mm in the first case after the search. The evaluation function is combined with the dichotomy method to perform reconstruction at each variable step length reconstruction distance, and the corresponding function value is calculated to detect whether there is a zero point. If there is a zero point, the search is stopped.
[0075] like Figure 3a and Figure 3b As shown in FIG. 1 , 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 autofocus methods (integrated amplitude modulus (AMP), square of amplitude difference (DIF), weighted spectrum (SPEC), gray value distribution variance (VAR), matrix eigenvalue (EIG), cosine value (CS)) and IDIF method. Figure 3c As shown in , the function value curve of the differential function in the narrowed search area is displayed. Figure 3d , the reconstructed amplitude image at the optimal reconstruction distance is shown.
[0076] Table 1 shows the focusing detection results of amplitude type objects by this method and other six commonly used methods (based on integrated amplitude modulus, based on the square of amplitude difference, weighted spectrum, gray value distribution variance, matrix eigenvalue, cosine value). It can be seen that under the same conditions, the present invention has the highest calculation efficiency.
[0077] Table 1 Focus detection results of amplitude type objects
[0078]
[0079] Example 2
[0080] The same as in Example 1 is used. Figure 1 The off-axis digital holographic device structure shown. The distance from the amplitude type object to the CCD camera is roughly measured with a soft ruler as 4.3 mm, and then the search range is set to 0-8.6 mm according to the distance, and the measured distance is the midpoint of the search range. First, the optimal reconstruction distance detection is performed in the search area 2.87-5.73 mm of the first case after the search. The evaluation function is combined with the dichotomy method, and reconstruction is performed at each variable step reconstruction distance, and the corresponding function value is calculated to detect whether there is a zero point. If there is a zero point, the search is stopped.
[0081] Figure 4a and 4b It shows 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 curve of the difference function within the reduced search area is shown. Figure 4d The reconstructed phase image at the optimal reconstruction distance is shown.
[0082] Table 2 shows the focusing detection results of the present method and six other commonly used methods (based on integrated amplitude modulus, based on the square of amplitude difference, weighted spectrum, gray value distribution variance, matrix eigenvalue, cosine value) for phase-type objects. It can be seen that the present invention has the highest calculation efficiency under the same conditions.
[0083] Table 2 Focus detection results of phase type objects
[0084]
[0085] The preferred specific embodiments of the present invention are described in detail above. It should be understood that a person skilled in the art can make many modifications and changes based on the concept of the present invention without creative work. Therefore, any technical solution that can be obtained by a person skilled in the art through logical analysis, reasoning or limited experiments based on the concept of the present invention on the basis of the prior art should be within the scope of protection determined 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: Obtaining the off-axis digital hologram to be processed and the recording distance of the object under test; S2: The recorded distance is the midpoint of the original search area; S3: according to the possible error size, the corresponding reduced search area is obtained by solving the corresponding relationship formula of the possible error size, and the reduced search areas are sorted in order from small to large based on the ratio of the error to the original search area; S4: Use the improved evaluation function in combination with the binary search method to calculate and evaluate the zero position of the function value in sequence within the narrowed search area according to the sorting; S5: The obtained zero point position is the optimal reconstruction distance and is the focus.
2. The digital holographic focusing method based on region segmentation and dichotomy according to claim 1, characterized in that: The calculation expression of the improved evaluation function is: Where 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.
3. The digital holographic focusing method based on region segmentation and dichotomy according to claim 1, characterized in that: The possible error sizes include the original search area being greater than or equal to six times the error size, the original search area being greater than four times and less than or equal to six times the error size, and the original search area being greater than two times and less than or equal to four times the error size.
4. The digital holographic focusing method based on region segmentation and dichotomy according to claim 3, characterized in that: When the original search area is greater than or equal to six times the error size, the inequality equation group of the error size can be expressed as: The corresponding first group of narrowed search areas is Where ε is the possible error size, z1 is the lower limit of the search area, z is the recording distance, and z2 is the upper limit of the search area.
5. The digital holographic focusing method based on region segmentation and dichotomy according to claim 3, characterized in that: When the original search area is greater than four times and less than or equal to six times the error size, the inequality equation group of the error size can be expressed as: The corresponding second group of narrowed search areas is and Where ε is the possible error size, z1 is the lower limit of the search area, z is the recording distance, and z2 is the upper limit of the search area.
6. The digital holographic focusing method based on region segmentation and dichotomy according to claim 3, characterized in that: When the original search area is greater than two times and less than or equal to four times the error size, the inequality equation group of the error size can be expressed as: The corresponding third group of narrowed search areas is and Where ε is the possible error size, z1 is the lower limit of the search area, z is the recording distance, and z2 is the upper limit of the search area.
7. An off-axis digital holographic system, characterized in that: The invention comprises a light source (1), a beam expander 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 collimator (2) and the first beam splitter (3) in sequence and is then divided into a first beam of light and a second beam of light. The first beam of light passes through the second reflector (5) and irradiates the object to be imaged (6). The second beam of light passes through the first reflector (4) and is combined with the first beam of light on the second beam splitter (7) to obtain a combined beam of light. The combined beam of light 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 programs are run, a digital holographic focusing method based on area segmentation and dichotomy as claimed in any one of claims 1 to 6 is executed.
8. An off-axis digital holographic system as claimed in claim 7, characterized in that: The light source (1) is a helium-neon laser.
9. The off-axis digital holographic system according to claim 7, characterized in that: The first reflector (4) and the second reflector (5) are both rotatable structures.
10. The off-axis digital holographic system according to claim 7, characterized in that: The pixel size of the CCD camera (8) is 4.65 μm×4.65 μm.
Citation Information
Patent Citations
Off-axis digital holographic image reconstruction device and method and microscopic imaging system
CN110095968A
Method for quickly identifying and focusing target object with interferents in digital holography
CN110675383A
Coaxial digital holographic automatic focusing method and system
CN111273533A
Automatic focusing method for digital holographic imaging, electronic equipment and medium
CN116719147A
Light wave measurement device and light wave measurement method
JP2019179233A
