Method and device for fast focusing by directly detecting target moments

Through single-pixel imaging technology combined with target moment direct detection method, the traditional focus method has solved the shortcomings in fastness and real-time performance, and achieved efficient and accurate image focusing. It is suitable for a variety of lighting conditions and complex backgrounds, and has real-time focus capabilities.

WO2025156387A1PCT designated stage expired Publication Date: 2025-07-31HEFEI INSTITUTE OF PHYSICAL SCIENCE CHINESE ACADEMY OF SCIENCES
View PDF 6 Cites 0 Cited by

Patent Information

Application Number
PCT/CN2024/082856
Authority / Receiving Office
WO · WO
Patent Type
Applications
Current Assignee / Owner
Priority Date
2024-01-22
Filing Date
2024-03-21
Publication Date
2025-07-31

AI Technical Summary

Technical Problem

Traditional autofocus methods have shortcomings in terms of speed, accuracy and real-time performance, and are difficult to achieve efficient image acquisition under the limitations of optical systems and imaging equipment.

Method used

Single-pixel imaging technology combined with target moment direct detection method is used to modulate the optical signal by generating a set modulation matrix, calculate the geometric moment value and central moment, and determine the optimal focus position.

Benefits of technology

It realizes a high-speed and accurate focusing process, reduces equipment cost and complexity, is robust and adaptable, and can achieve real-time focusing under various lighting conditions and complex backgrounds.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN2024082856_31072025_PF_FP_ABST
    Figure CN2024082856_31072025_PF_FP_ABST
Patent Text Reader

Abstract

A method and device for fast focusing by directly detecting target moments. The method comprises: generating a preset modulation matrix and loading the modulation matrix into an optical modulator, receiving an optical signal emitted by or transmitted through a target object at a current focusing position, and modulating, by the modulation matrix, the optical signal; on the basis of the modulated optical signal, obtaining a geometric moment value of the target object at the current focusing position; on the basis of the geometric moment value, calculating a central moment corresponding to the target object at the current focusing position; and using a focusing position obtained by refocusing as the current focusing position, returning to the step of receiving an optical signal emitted by or transmitted through the target object at the current focusing position, until central moments corresponding to the target object at all focusing positions are obtained, comparing the central moments corresponding to the target object at all focusing positions, and determining a focusing position corresponding to the minimum central moment as the focusing position. The advantage of the present invention lies in that fast real-time focusing can be achieved by means of a single-pixel detector using a minimal number of detection values.
Need to check novelty before this filing date? Find Prior Art

Description

A method and device for direct detection of target moment and rapid focusing Technical Field

[0001] The present invention belongs to the technical field of single-pixel imaging, and in particular relates to a method and device for direct detection and rapid focusing of a target moment. Background Art

[0002] With the rapid development of computer vision and image processing technologies in recent years, the demand for high-quality images has increased significantly. In many fields, such as medical imaging, industrial inspection, and security monitoring, fast and accurate focusing to obtain clear images is crucial. However, in some cases, achieving fast focusing remains challenging due to limitations in the optical system, imaging equipment, or other factors.

[0003] Traditional autofocus methods are typically based on focus metrics from the image acquisition device, such as image clarity evaluation functions. These methods determine the optimal focus position by analyzing specific features in the image or using pixel-level focus information. Furthermore, traditional methods typically require significant time and computing resources for image analysis and processing, reducing the ability to achieve real-time focusing.

[0004] Summary of the Invention

[0005] In order to achieve fast focusing, the present invention proposes a method and device for fast focusing by directly detecting target moment. The specific technical solution is as follows:

[0006] A method for direct detection of target moment and rapid focusing, comprising:

[0007] Generate a set modulation matrix and load it into the optical modulator, receive the light signal emitted or transmitted by the target object at the current focus position, and modulate the light signal with the modulation matrix;

[0008] Obtaining a geometric moment value of the target object at the current focus position according to the modulated light signal;

[0009] Calculating the central moment corresponding to the target object at the current focus position according to the geometric moment value;

[0010] The focus position obtained by refocusing is used as the current focus position, and the light signal emitted by or transmitted through the target object at the current focus position is returned until the center moments corresponding to the target objects at all focus positions are obtained. The center moments corresponding to the target objects at all focus positions are compared, and the focus position corresponding to the minimum center distance is determined as the focus position.

[0011] In one embodiment, obtaining a geometric moment value of a target object at a current focus position according to the modulated light signal includes:

[0012] A single-pixel detector is used to obtain the geometric moment value of the target object at the current focus position based on the modulated light signal.

[0013] In one embodiment, obtaining a geometric moment value of the target object at a current focus position according to the modulated light signal includes:

[0014] Determine the two-dimensional function S corresponding to the i modulation matrix i (x, y);

[0015] According to the two-dimensional function S i( x, y) modulates the optical signal to obtain i corresponding optical information intensity values ​​I i , which is equivalent to i corresponding geometric moment values.

[0016] In one embodiment, the modulation matrix is ​​configured to include:

[0017] The modulation matrix M1 is a two-dimensional matrix in which the value of each element is 1;

[0018] The modulation matrix M2 is a two-dimensional matrix in which the value of each row element is equal to its row number;

[0019] The modulation matrix M3 is a two-dimensional matrix in which the value of each row element is equal to the square of its row number.

[0020] In one embodiment, the two-dimensional function S corresponding to the i modulation matrices is determined. i (x, y); including:

[0021] Determine that the modulation matrix M1, modulation matrix M2, and modulation matrix M3 correspond to the two-dimensional functions S1(x, y), S2(x, y), and S3(x, y), and respectively satisfy: S1(x, y) = 1 S2(x, y) = x S3(x, y) = x 2

[0022] The horizontal coordinates and vertical coordinates of the coordinate systems of the two-dimensional functions S1(x, y), S2(x, y), and S3(x, y) correspond to the row directions and column directions of the modulation matrix M1, the modulation matrix M2, and the modulation matrix M3, respectively;

[0023] According to the two-dimensional function S i (x, y) modulates the optical signal to obtain i corresponding optical information intensity values ​​I i , which is equivalent to i corresponding geometric moment values, including:

[0024] The optical signal is modulated according to the two-dimensional functions S1(x, y), S2(x, y), and S3(x, y) to obtain the corresponding optical information intensity value I i , expressed as: I i =∑x,y f(x,y)S i (x,y)

[0025] Where i takes the value of 1, 2, or 3, and f(x, y) is the two-dimensional distribution function of the target object image at the current focus position; the detection light intensity values ​​I1, I2, and I3 are equivalent to the geometric moment values ​​m 00 、m 10 、m 20 .

[0026] A device for directly detecting target moment and quickly focusing, comprising:

[0027] A modulation module is used to generate a set modulation matrix, receive light signals emitted or transmitted by the target object at different focus positions, and modulate the light signals by the modulation matrix;

[0028] A geometric moment value acquisition module is used to obtain geometric moment values ​​of the target object at different focus positions based on the detected modulated light signal;

[0029] A central moment value acquisition module is used to receive the geometric moment value output by the geometric moment value acquisition module and calculate the central moment corresponding to the target object at different focus positions;

[0030] The focus position determination module is used to compare the center moments corresponding to the target object at all focus positions and determine the focus position corresponding to the minimum center distance as the focus position.

[0031] In one embodiment, the modulation module includes a two-dimensional matrix generation unit and an optical modulator, wherein the two-dimensional matrix generation unit generates a plurality of modulation matrices, and the optical modulator sequentially and periodically uses different modulation matrices to modulate the optical signal.

[0032] In one embodiment, the light modulator includes a plurality of micromirrors distributed in an array, and each element value in the modulation matrix corresponds to a unique micromirror.

[0033] A computer-readable storage medium stores a computer program, which executes the above-mentioned method for direct detection and rapid focusing of a target moment after being run.

[0034] A computer device includes a processor and a storage medium. The storage medium stores a computer program. The processor reads and runs the computer program from the storage medium to execute the above-mentioned method for direct detection and rapid focusing of a target moment.

[0035] The advantages of the present invention are:

[0036] Moment detection fast focus technology for single-pixel imaging has many beneficial effects in the field of image acquisition and analysis. The following are some of the important aspects:

[0037] 1. High-speed and accurate focusing: Traditional autofocus methods are subject to interference from factors such as noise, light variations, and motion blur, making it difficult to achieve fast and accurate focusing. Moment detection fast focusing technology for single-pixel imaging combines single-pixel imaging with moment calculation methods to efficiently evaluate image features in a short period of time, thereby achieving a fast and accurate focusing process.

[0038] 2. Reduced cost and complexity: Traditional image acquisition devices typically use pixel arrays, which require a large number of pixels to capture image information, increasing cost and complexity. In contrast, a single-pixel detector can be used to acquire the image's light intensity information, eliminating the need for additional hardware devices and reducing the requirements and cost of the imaging device. This simplified design can result in more portable and flexible focusing devices, providing greater convenience for a variety of applications.

[0039] 3. Robust and Adaptable: Single-pixel moment detection fast focus technology maintains good performance in poor lighting conditions or against complex backgrounds. By using direct moment detection for image quality assessment, this technology comprehensively considers multiple image features and rates of change to provide accurate focus metrics. This enables high-quality and efficient focus in low-light environments, complex backgrounds, and other challenging scenarios.

[0040] 4. Real-time Focus Capability: Utilizing an efficient and optimized moment calculation method, moment detection rapid focus technology enables real-time focusing. Whether in real-time monitoring, autonomous driving, or virtual / augmented reality, this technology meets the need for timely acquisition, analysis, and processing of image data, improving system response speed and real-time performance.

[0041] In summary, single-pixel moment detection fast focusing technology has many beneficial effects in the field of image acquisition and analysis. By combining single-pixel imaging and moment detection algorithms, this technology can achieve high-speed and accurate focusing while reducing cost and complexity. It is robust and adaptable, and performs well in various lighting conditions and scenarios. Furthermore, this technology has real-time focusing capabilities, meeting the needs of real-time monitoring and image acquisition. Most importantly, single-pixel moment detection fast focusing technology has significant application prospects in a wide range of applications, including medical imaging, industrial inspection, and security monitoring, bringing many opportunities and innovations to the development and progress of these fields. BRIEF DESCRIPTION OF THE DRAWINGS

[0042] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the following is a brief introduction to the drawings required for use in the embodiments or the description of the prior art. Obviously, the drawings described below are some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.

[0043] FIG1 shows a flowchart of fast focusing for single-pixel moment detection according to an embodiment of the present invention;

[0044] FIG2 shows a schematic structural diagram of a fast focusing device for single-pixel moment detection according to an embodiment of the present invention;

[0045] FIG3 shows a schematic structural diagram of an optical modulator according to an embodiment of the present invention;

[0046] In the figure: 1. Light source; 2. Target object; 3. Imaging lens group; 4. Modulation module; 41. Two-dimensional matrix generation unit; 42. Light modulator; 5. Geometric moment value acquisition module; 51. Single-pixel detector; 52. Geometric moment value acquisition unit; 521. Two-dimensional function generation part; 522. Light information intensity value acquisition part; 6. Center moment value acquisition module; 7. Focus position determination module. DETAILED DESCRIPTION

[0047] Traditional autofocus methods determine the optimal focus position by analyzing specific features in the image or using pixel-level focus information. Traditional focusing requires a long time and a lot of calculations for image analysis and processing, so traditional focusing methods have low real-time performance.

[0048] The moment detection algorithm is a highly efficient image quality assessment method that determines image clarity and focus quality by analyzing the rate of change of image moments. The algorithm calculates the image's central moment features to assess image clarity and provide focus metrics. Compared to traditional focus methods, the moment detection algorithm offers greater robustness and speed, enabling rapid and accurate assessment of image focus quality in complex scenes.

[0049] Based on the above analysis, in order to quickly determine the optimal focus position, as shown in FIG1 , the present application discloses a method for rapid focusing by direct detection of target moment, comprising:

[0050] S1. Generate a set modulation matrix and load it into the optical modulator, receive the optical signal emitted or transmitted by the target object at the current focus position, and modulate the optical signal with the modulation matrix;

[0051] S2. Obtaining a geometric moment value of the target object at the current focus position according to the modulated light signal;

[0052] S3, calculating the central moment corresponding to the target object at the current focus position according to the geometric moment value;

[0053] S4. The refocused focus position is used as the current focus position, and the light signal emitted by or transmitted through the target object at the current focus position is returned and received until the center moments corresponding to the target object at all focus positions are obtained. The center moments corresponding to the target object at all focus positions are compared, and the focus position corresponding to the minimum center distance is determined as the focus position.

[0054] In one embodiment, in the process of focusing the target object into a target image, in order to more accurately determine the optimal focus position, multiple features and change rates of the target image are comprehensively considered. In this solution, the modulation matrix set in step S1 includes:

[0055] The modulation matrix M1 is a two-dimensional matrix in which the value of each element is 1;

[0056] The modulation matrix M2 is a two-dimensional matrix in which the value of each row element is equal to its row number;

[0057] The modulation matrix M3 is a two-dimensional matrix in which the value of each row element is equal to the square of its row number.

[0058] In step S1, the value of each element in the two-dimensional matrix M1 is 1. The fact that the value of each row element in the two-dimensional matrix M2 is equal to its row number means that the element values ​​in the first row of the matrix are all 1, the element values ​​in the second row are all 2, the element values ​​in the third row are all 3, and so on. In the two-dimensional matrix M3, the element values ​​in the first row are all 1, the element values ​​in the second row are all 4, the element values ​​in the third row are all 9, and so on. A total of three modulation matrices are used to modulate the optical signal. The optical modulator includes a plurality of micromirrors distributed in an array. Each element value in the modulation matrix corresponds to a unique micromirror, and each micromirror can rotate back and forth between positive and negative angles, corresponding to the "0" and "1" states of the optical modulator microelement. The micromirror corresponding to the element value is set to a clockwise angle; when the element value in the second row and third column is "0", the micromirror is set to a counterclockwise angle.

[0059] Specifically, in step S2, the geometric moment values ​​of the target object at the current focus position are obtained based on the modulated light signal. Moments are a very important feature in image analysis and recognition. Geometric moments are the simplest and most important moments in moment functions and are commonly used in techniques for deriving, translating, scaling, and rotating variable quantities. Methods for obtaining the geometric moment values ​​of the target object include the delta method, Green's formula method, methods based on polygons and triangles, and methods based on image changes.

[0060] Single-pixel imaging technology is an advanced computational imaging method that utilizes optical modulation principles and advanced computational algorithms to acquire image information. Unlike traditional pixel array cameras, single-pixel imaging uses a single light detection unit to collect light intensity data in an image. This technology offers strong adaptability, low cost, and excellent robustness, reducing optical system requirements and the complexity and cost of imaging equipment.

[0061] In one embodiment, obtaining a geometric moment value of the target object at the current focus position based on the modulated light signal includes: obtaining the geometric moment value of the target object at the current focus position based on the modulated light signal using a single-pixel detector. Specifically, obtaining the modulated light signal using the single-pixel detector and collecting a light signal intensity value corresponding to the modulated light signal to determine the geometric moment value of the target object at the current focus position; specifically, including:

[0062] S21, determine the two-dimensional function S corresponding to the i modulation matrix i (x, y), in this embodiment, the modulation matrix M1, the modulation matrix M2, and the modulation matrix M3 correspond to the two-dimensional functions S1(x, y), S2(x, y), and S3(x, y), and they respectively satisfy: S1(x, y) = 1 S2(x, y) = x S3(x, y) = x 2

[0063] The horizontal and vertical coordinates of the coordinate system of the two-dimensional functions S1(x, y), S2(x, y), and S3(x, y) correspond to the row and column directions of the modulation matrix M1, modulation matrix M2, and modulation matrix M3, respectively, and the two-dimensional function values ​​correspond to the element values ​​of the corresponding modulation matrices; for example, S1(6, 2) = 1 means that in the two-dimensional matrix, the element value of the sixth row and second column is 1, and S2(3, 4) = 3 means that in the two-dimensional matrix, the element value of the third row and fourth column is 3.

[0064] S22, according to the two-dimensional function S i (x, y) modulates the optical signal to obtain the corresponding optical information intensity value Ii, which is equivalent to i corresponding geometric moment values; in this scheme, the optical signal is modulated according to the two-dimensional function S1(x, y), S2(x, y), S3(x, y) to obtain the corresponding optical information intensity value I i , expressed as: I i =∑ x,y f(x,y)S i (x,y)

[0065] Where i takes the value of 1, 2, or 3, and f(x, y) is the two-dimensional distribution function of the target object image at the current focus position.

[0066] The light information intensity values ​​I1, I2, and I3 are equivalent to the corresponding geometric moment values ​​m 00 、m 10 、m 20 This application obtains the light information intensity values ​​corresponding to three different matrices, thereby comprehensively considering multiple features and change rates of the image, and can more accurately determine the optimal focus position.

[0067] This invention combines single-pixel imaging technology with a moment detection algorithm, providing an innovative and efficient solution for fast focusing. This technology uses light intensity data collected by a single-pixel detector directly as characteristic moment values, enabling rapid focusing with extremely low data volumes. This method not only enables fast focusing of high-quality images under various lighting conditions, but also reduces computing resource consumption, achieving real-time focusing.

[0068] In step S3, the geometric moment m 00 、m 10 、m 20 Calculate the central moment using the formula:

[0069] Where (g) represents the current focus position.

[0070] This solution can be achieved by calculating the three geometric moment values ​​m of the target object at the current focus position. 00 、m 10 、m 20 To quickly calculate the second-order central moment u 20 , and then measure the degree of image blur. In step S4, the central moments corresponding to the target object at all focus positions are obtained. Then, the central moments corresponding to the target object at all focus positions are compared, and the focus position corresponding to the minimum center distance is determined as the focus position. This achieves the purpose of rapid focusing using the direct moment detection method. Using the direct moment detection method for rapid focusing can quickly evaluate image clarity and focus quality.

[0071] In summary, this application uses single-pixel imaging technology. The flexibility and robustness of single-pixel imaging technology make it suitable for various lighting conditions and scenes, including low-light environments and complex backgrounds. The light intensity data collected by single-pixel imaging technology is directly used as the characteristic moment value, achieving fast focusing with extremely low data volume. This method can not only achieve fast focusing of high-quality images under various lighting conditions, but also reduce the consumption of computing resources, achieve real-time focusing requirements, and does not require additional hardware equipment.

[0072] Single-pixel direct moment detection fast focusing technology provides an innovative solution for fast and accurate focusing by combining single-pixel imaging and moment detection algorithms. This technology has broad application prospects in the fields of image acquisition and analysis, can meet the requirements of high-quality image acquisition, and promote the development and progress of related fields.

[0073] In another embodiment, as shown in FIG2 , the present application further discloses a device for direct detection of target moment and rapid focusing, comprising:

[0074] The modulation module 4 is configured to generate a set modulation matrix, receive light signals emitted or transmitted by the target object 2 at different focus positions, and modulate the light signals by the modulation matrix;

[0075] A geometric moment value acquisition module 5 is used to acquire geometric moment values ​​of the target object 2 at different focus positions according to the modulated light signal;

[0076] a central moment acquisition module 6, configured to receive the geometric moment values ​​output by the geometric moment acquisition module 5 and calculate the central moments corresponding to the target object 2 at different focus positions;

[0077] The focus position determination module 7 is used to compare the central moments corresponding to the target object 2 at all focus positions, and determine the focus position corresponding to the minimum central moment as the focus position.

[0078] Specifically, the modulation module 4 includes a two-dimensional matrix generation unit 41 and an optical modulator 42. The two-dimensional matrix generation unit 41 generates multiple modulation matrices, and the optical modulator 42 periodically modulates the optical signal using different modulation matrices in sequence. The two-dimensional matrix generation unit 41 is used to generate modulation matrices M1, M2, and M3. Modulation matrix M1 is a two-dimensional matrix in which the value of each element at each position is 1; modulation matrix M2 is a two-dimensional matrix in which the value of each row element is equal to its row number; and modulation matrix M3 is a two-dimensional matrix in which the value of each row element is equal to the square of its row number. As shown in Figure 3, the optical modulator 42 includes a plurality of micromirrors distributed in an array. Each element value in the modulation matrix corresponds to a unique micromirror. Each micromirror can rotate back and forth between positive and negative angles, corresponding to the "0" and "1" states of the micromirror of the optical modulator 42. Exemplarily, when the value of the element in the second row and third column of the two-dimensional modulation matrix is ​​"1," the micromirror corresponding to that element is set to a clockwise angle; whereas, when the value of the element in the second row and third column is "0," the micromirror is set to a counterclockwise angle. Exemplarily, the optical modulator 42 is a DLP7000 model and consists of 768 x 1024 micromirrors.

[0079] In this embodiment, the geometric moment acquisition module 5 includes a single-pixel detector 51 and a geometric moment value calculation unit 52. The single-pixel detector 51 is arranged in the direction of the modulated reflected light from the optical modulator 42 DMD and is used to receive the modulated optical signal from the modulated reflected light from the optical modulator 42. The geometric moment value calculation unit 52 obtains the output signal of the single-pixel detector 51 and calculates different geometric moment values ​​of the target object 2 at different focus positions based on the different modulation matrices generated by the modulation module 4. The geometric moment value calculation unit 52 includes a two-dimensional function generation unit 521 and a light information intensity value acquisition unit 522, which are connected in sequence.

[0080] The two-dimensional function generating part 521 is used to determine the modulation matrix M1, the modulation matrix M2, and the modulation matrix M3 corresponding to the two-dimensional functions S1(x, y), S2(x, y), and S3(x, y), and respectively satisfy: S1(x, y) = 1 S2(x, y) = X S3(x, y) = x 2

[0081] The horizontal and vertical coordinates of the coordinate system where the two-dimensional functions S1(x, y), S2(x, y), and S3(x, y) are located correspond to the row and column directions of the modulation matrix M1, modulation matrix M2, and modulation matrix M3, respectively, and the two-dimensional function values ​​correspond to the element values ​​of the corresponding modulation matrices.

[0082] The light information intensity value acquisition part 522 is used to obtain the light signal intensity values ​​I1, I2, and I3 obtained by the light signal through the modulation matrix M1, modulation matrix M2, and modulation matrix M3 according to the two-dimensional function and the two-dimensional distribution function of the target object 2 image.

[0083] The central moment value acquisition module 6 is based on the geometric moment value m 00 、m 10 、m 20 The center distance is calculated to measure the image blur, and finally, combined with the focus position determination module 7, the purpose of using the moment method for fast focusing is achieved. Using the moment direct detection algorithm for fast focusing can quickly evaluate image clarity and focus quality.

[0084] In another embodiment, the apparatus further comprises a light source 1 for illuminating a target object 2;

[0085] In another embodiment, an imaging lens group 3 is further provided between the target object 2 and the modulation module 4, which is used to project the light signal reflected or transmitted by the target object 2 to the modulation module 4. During this process, the imaging lens group 3 changes the focusing position and finally obtains the central moment corresponding to different focusing positions.

[0086] Compared with traditional devices, devices using single-pixel direct moment detection fast focusing technology have the following advantages:

[0087] High-speed performance: The geometric moment acquisition module 5, the center moment acquisition module 6, and the focus position determination module 7 are used for fast focusing, and image clarity and focus quality can be evaluated in a short time.

[0088] Accuracy: By comprehensively considering multiple image features and rates of change, the optimal focus position can be determined more accurately.

[0089] Adaptability: The flexibility and robustness of the single-pixel imaging technology used in the geometric moment acquisition module 5 make it applicable to various lighting conditions and scenes, including low-light environments and complex backgrounds.

[0090] Real-time performance: By reducing the demand for computing resources and optimizing algorithms, real-time focusing requirements can be achieved, meeting the needs of real-time monitoring and image acquisition without the need for additional hardware equipment.

[0091] An embodiment of the present invention further discloses a computer-readable storage medium having a computer program stored thereon. When the computer program is run, the method for direct detection and rapid focusing of a target moment as described in the above embodiment is executed.

[0092] In an embodiment of the present invention, a computer program is stored on a medium. When the computer program is run, a method for direct detection and rapid focusing of a target moment as described in the above embodiment is executed.

[0093] The above are only preferred embodiments of the present invention and are 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 scope of protection of the present invention.

Claims

1. A method for direct detection of target moment and rapid focusing, characterized in that: include: Generate a set modulation matrix and load it into the optical modulator, receive the light signal emitted or transmitted by the target object at the current focus position, and modulate the light signal with the modulation matrix; Obtaining a geometric moment value of the target object at the current focus position according to the modulated light signal; Calculating the central moment corresponding to the target object at the current focus position according to the geometric moment value; The focus position obtained by refocusing is used as the current focus position, and the light signal emitted by or transmitted through the target object at the current focus position is returned until the center moments corresponding to the target objects at all focus positions are obtained. The center moments corresponding to the target objects at all focus positions are compared, and the focus position corresponding to the minimum center distance is determined as the focus position.

2. The method according to claim 1, characterized in that The geometric moment value of the target object at the current focus position is obtained according to the modulated light signal, including: A single-pixel detector is used to obtain the geometric moment value of the target object at the current focus position based on the modulated light signal.

3. The method according to claim 1 or 2, characterized in that The geometric moment value of the target object at the current focus position is obtained according to the modulated light signal, including: Determine the two-dimensional function S corresponding to the i modulation matrix i (x, y); According to the two-dimensional function S i (x, y) modulates the optical signal to obtain i corresponding optical information intensity values I i , which is equivalent to i corresponding geometric moment values.

4. The method according to claim 3, characterized in that The set modulation matrix includes: The modulation matrix M1 is a two-dimensional matrix in which the value of each element is 1; The modulation matrix M2 is a two-dimensional matrix in which the value of each row element is equal to its row number; The modulation matrix M3 is a two-dimensional matrix in which the value of each row element is equal to the square of its row number.

5. The method according to claim 4, characterized in that The two-dimensional function S corresponding to the i modulation matrices is determined i (x, y); include: Determine that the modulation matrix M1, the modulation matrix M2, and the modulation matrix M3 correspond to the two-dimensional functions S1(x, y), S2(x, y), and S3(x, y), and respectively satisfy: The horizontal coordinates and vertical coordinates of the coordinate systems of the two-dimensional functions S1(x, y), S2(x, y), and S3(x, y) correspond to the row directions and column directions of the modulation matrix M1, the modulation matrix M2, and the modulation matrix M3, respectively; According to the two-dimensional function S i (x, y) modulates the optical signal to obtain i corresponding optical information intensity values I i , which is equivalent to i corresponding geometric moment values, including: The optical signal is modulated according to the two-dimensional functions S1(x, y), S2(x, y), and S3(x, y) to obtain the corresponding optical information intensity value I i , expressed as: I i =∑ x,y f(x,y)S i (x,y); Where i takes the value of 1, 2, or 3, and f(x, y) is the two-dimensional distribution function of the target object image at the current focus position; The detected light intensity values I1, I2, and I3 are equivalent to the geometric moment values m 00 、m 10 、m 20 .

6. A device for direct detection of target moment and rapid focusing, characterized in that: include: A modulation module is used to generate a set modulation matrix, receive light signals emitted or transmitted by the target object at different focus positions, and modulate the light signals by the modulation matrix; A geometric moment value acquisition module is used to obtain geometric moment values of the target object at different focus positions based on the detected modulated light signal; A central moment value acquisition module is used to receive the geometric moment value output by the geometric moment value acquisition module and calculate the central moment corresponding to the target object at different focus positions; The focus position determination module is used to compare the center moments corresponding to the target object at all focus positions and determine the focus position corresponding to the minimum center distance as the focus position.

7. The device according to claim 6, characterized in that The modulation module includes a two-dimensional matrix generation unit and an optical modulator. The two-dimensional matrix generation unit generates multiple modulation matrices. The optical modulator periodically uses different modulation matrices to modulate the optical signal in sequence.

8. The device according to claim 7, characterized in that The light modulator includes a plurality of micromirrors distributed in an array, and each element value in the modulation matrix corresponds to a unique micromirror.

9. A computer-readable storage medium, characterized in that A computer program is stored on the medium, and after the computer program is run, a method for direct detection and rapid focusing of a target moment as claimed in any one of claims 1 to 5 is executed.

10. A computer device, characterized in that: The invention comprises a processor and a storage medium, wherein a computer program is stored in the storage medium, and the processor reads and runs the computer program from the storage medium to execute a method for direct detection and rapid focusing of a target moment as claimed in any one of claims 1 to 5.

Citation Information

Patent Citations

  • Light field camera refocusing method

    CN110012196A

  • Focusing light spot scanning endoscopic imaging system and method based on multimode optical fiber coupler

    CN113296258A

  • Moving target real-time capture single-pixel imaging method and device

    CN114859377A

  • Rapid automatic focusing method suitable for laser micro-nano manufacturing

    CN115740735A

  • Method and device for direct detection and rapid focusing of target moment

    CN117615253A