Scattering medium simulation method and system based on matrix multiplication
Through a simulation method based on matrix multiplication, the problems of slow calculation speed and imprecise results in scattering medium imaging are solved, and efficient and accurate light field simulation is achieved. It is suitable for systems with inconsistent sizes of the incident and exit surfaces.
Patent Information
- Application Number
- CN202510731112.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-06-03
- Publication Date
- 2025-09-19
AI Technical Summary
The existing technology has slow calculation speed and insufficient precision in scattering medium imaging, especially in systems with a large difference in the size of the incident surface and the exit surface, where the amount of calculation data is large and it is difficult to obtain a fine light field distribution.
A simulation method based on matrix multiplication is adopted. The input light field pixels are rearranged into column vectors and multiplied with the scattering medium transmission matrix. The auxiliary matrix is constructed using the Fresnel diffraction formula for calculation to improve the resolution and simulation speed.
The resolution of the output light field is improved, the amount of calculation is reduced, the simulation speed is enhanced, while the accuracy of the results is maintained and the requirements for computer configuration are reduced.
Smart Images

Figure CN120670718A_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the technical field of scattering medium imaging, and in particular to a scattering medium simulation method and system based on matrix multiplication. Background Art
[0002] Due to the imaging characteristics of the scattering medium system itself, the experimental process is time-consuming and computationally intensive. Therefore, in order to accelerate the experimental process using computer simulation, a series of calculations are required for the entire optical system, including the transmission of light in free space.
[0003] The propagation of light in free space typically follows the laws of diffraction, which has led to the development of numerous related algorithms, with Fresnel diffraction being a very traditional method. Calculations of light field propagation based on the Fresnel formula can be divided into two main categories.
[0004] The most direct algorithm is based on the discretized summation of the Fresnel diffraction integral formula, which is called the integral algorithm. Although this algorithm has the advantages of being intuitive, easy to implement and accurate in calculation results, it has a slow calculation speed, especially in the two-dimensional case, and has high requirements on computer configuration.
[0005] Another algorithm, the Fast Fourier Transform (FFT), offers fast computational speed, but is limited by the algorithm's requirements. The sampling interval of the exit surface is determined by the total size of the incident surface, making it difficult to obtain a detailed light field distribution in the region of interest. To obtain a very detailed distribution of the exit surface, the incident surface size and the number of sampling points must be large, which significantly increases the amount of computational data. Furthermore, the FFT algorithm uses the same number of sampling points on the incident and exit surfaces, making it unsuitable for simulating systems with a large difference in size between the incident and exit surfaces, such as diffraction-type laser beam expansion systems. Summary of the Invention
[0006] The purpose of the present invention is to address the problems existing in the above-mentioned prior art and provide a scattering medium simulation method based on matrix multiplication, which can greatly enhance the speed of simulation experiments on the existing basis while maintaining the accuracy of the results as much as possible.
[0007] The technical solution for achieving the purpose of the present invention is as follows: On the one hand, a scattering medium simulation method based on matrix multiplication is provided, the method comprising the following steps:
[0008] Step 1: rearrange all pixels of the original input light field into a column, where the number of rows is equal to the number of columns of the scattering medium transmission matrix;
[0009] Step 2: multiply the scattering medium transmission matrix by the column vector obtained in step 1 to obtain a column vector with the same number of rows as the transmission matrix, and rearrange it into a two-dimensional output light field;
[0010] Step 3: Use the Fresnel diffraction formula to construct the auxiliary matrix M according to the distance and resolution of the receiving plane. x ,M y , use the two-dimensional output light field obtained in step 2 to construct the matrix M, and calculate M x ×M×M y The output light field on the receiving plane is obtained.
[0011] Furthermore, in step 1, before pixel rearrangement, the input light field is discretized, and the resolution after processing is equal to the number of columns of the transmission matrix.
[0012] Furthermore, the order of rearranging the input light field in step 1 is consistent with the order of measuring the scattering medium transmission matrix.
[0013] Furthermore, the order of rearranging the output light fields in step 2 is consistent with the order of measuring the scattering medium transmission matrix.
[0014] Furthermore, the auxiliary matrix M in step 3 x ,M y for:
[0015]
[0016] Where (x0, y0) is the discretized coordinate of the incident plane, (x, y) is the discretized coordinate of the incident plane, the superscript T indicates the transpose, d is the distance from the output plane to the input plane, and k is the wave vector.
[0017] Furthermore, the matrix M in step 3 is:
[0018]
[0019] Among them, u0 is the light field of the input plane, x ′ 0,y ′ 0 is obtained by copying several rows of x0 and several columns of y0 to form a square matrix.
[0020] In another aspect, a scattering medium simulation system based on matrix multiplication is provided, the system comprising:
[0021] The first module is used to rearrange all pixels of the original input light field into a column, the number of rows of which is equal to the number of columns of the scattering medium transmission matrix;
[0022] The second module is used to multiply the scattering medium transmission matrix by the column vector obtained by the first module to obtain a column vector with the same number of rows as the transmission matrix, and rearrange it into a two-dimensional output light field;
[0023] The third module is used to construct the auxiliary matrix M according to the distance and resolution of the receiving plane using the Fresnel diffraction formula. x ,M y , construct the matrix M using the two-dimensional output light field, and calculate M x ×M×M y The output light field on the receiving plane is obtained.
[0024] On the other hand, a computer device is provided, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the matrix multiplication-based scattering medium simulation method when executing the computer program.
[0025] On the other hand, a computer-readable storage medium is provided, on which a computer program is stored. When the computer program is executed by a processor, the matrix multiplication-based scattering medium simulation method is implemented.
[0026] Compared with the prior art, the present invention has the following significant advantages:
[0027] (1) The output light field resolution is determined by the transmission matrix, which greatly improves the resolution.
[0028] (2) The Fresnel approximation is used to calculate the light field that propagates freely from the scattering medium to the receiving plane.
[0029] (3) By constructing an auxiliary matrix and using matrix multiplication to perform discrete integral operations, the simulation speed is improved while ensuring accuracy.
[0030] (4) The final output does not have to be completely consistent with the resolution of the transmission matrix, which reduces experimental limitations.
[0031] The present invention is further described in detail below with reference to the accompanying drawings. BRIEF DESCRIPTION OF THE DRAWINGS
[0032] Figure 1 It is a flow chart of the scattering medium simulation method based on matrix multiplication of the present invention.
[0033] Figure 2 The figure is a schematic diagram of a square aperture Fresnel diffraction pattern obtained by matrix multiplication calculation in an embodiment.
[0034] Figure 3 FIG. 1 is an effect diagram of a randomly generated transmission matrix produced by the method of the present invention in one embodiment, wherein Figure 3 (a) is the image amplitude; Figure 3 (b) in the figure is the image phase. DETAILED DESCRIPTION
[0035] In order to make the purpose, technical solutions and advantages of this application more clear, the following further describes this application in detail with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain this application and are not intended to limit this application.
[0036] It should be noted that if the embodiments of the present invention involve directional indications (such as up, down, left, right, front, back, etc.), the directional indications are only used to explain the relative position relationship, movement status, etc. between the various components under a certain specific posture (as shown in the accompanying drawings). If the specific posture changes, the directional indications will also change accordingly.
[0037] In addition, if there are descriptions involving "first", "second", etc. in the embodiments of the present invention, the descriptions of "first", "second", etc. are only for descriptive purposes and cannot be understood as indicating or implying their relative importance or implicitly indicating the number of the indicated technical features. Therefore, the features specified as "first" and "second" may explicitly or implicitly include at least one of such features. In addition, the technical solutions between the various embodiments can be combined with each other, but this must be based on the fact that ordinary technicians in this field can implement them. When the combination of technical solutions is contradictory or cannot be implemented, it should be deemed that such a combination of technical solutions does not exist and is not within the scope of protection required by the present invention.
[0038] In one embodiment, combined Figure 1 , provides a scattering medium simulation method based on matrix multiplication, the method comprising the following steps:
[0039] Step 1: rearrange all pixels of the original input light field into a column, where the number of rows is equal to the number of columns of the scattering medium transmission matrix;
[0040] Step 2: multiply the scattering medium transmission matrix by the column vector obtained in step 1 to obtain a column vector with the same number of rows as the transmission matrix, and rearrange it into a two-dimensional output light field;
[0041] Step 3: Use the Fresnel diffraction formula to construct the auxiliary matrix M according to the distance and resolution of the receiving plane. x ,M y , use the two-dimensional output light field obtained in step 2 to construct the matrix M, and calculate M x ×M×M y The output light field on the receiving plane is obtained.
[0042] Furthermore, in one embodiment, in step 1, before pixel rearrangement, the input light field is discretized, and the resolution after the processing is equal to the number of columns of the transmission matrix.
[0043] Furthermore, in one embodiment, the order of rearranging the input light field in step 1 is consistent with the order of measuring the scattering medium transmission matrix.
[0044] Furthermore, in one embodiment, the order of rearranging the output light fields in step 2 is consistent with the order of measuring the scattering medium transmission matrix.
[0045] Furthermore, in one embodiment, the auxiliary matrix M in step 3 is x ,M y for:
[0046]
[0047] Where (x0, y0) is the discretized coordinate of the incident plane, (x, y) is the discretized coordinate of the incident plane, the superscript T indicates the transpose, d is the distance from the output plane to the input plane, and k is the wave vector.
[0048] Furthermore, in one embodiment, the matrix M in step 3 is:
[0049]
[0050] Among them, u0 is the light field of the input plane, x ′ 0,y ′ 0 is obtained by copying several rows of x0 and several columns of y0 to form a square matrix.
[0051] In one embodiment, a scattering medium simulation system based on matrix multiplication is provided, the system comprising:
[0052] The first module is used to rearrange all pixels of the original input light field into a column, the number of rows of which is equal to the number of columns of the scattering medium transmission matrix;
[0053] The second module is used to multiply the scattering medium transmission matrix by the column vector obtained by the first module to obtain a column vector with the same number of rows as the transmission matrix, and rearrange it into a two-dimensional output light field;
[0054] The third module is used to construct the auxiliary matrix M according to the distance and resolution of the receiving plane using the Fresnel diffraction formula. x ,M y , construct the matrix M using the two-dimensional output light field, and calculate M x ×M×M y The output light field on the receiving plane is obtained.
[0055] The specific definitions of the matrix multiplication-based scattering medium simulation system can be found in the definitions of the matrix multiplication-based scattering medium simulation method described above and will not be further elaborated here. Each module in the matrix multiplication-based scattering medium simulation system described above can be implemented in whole or in part via software, hardware, or a combination thereof. Each of the modules described above can be embedded in or independent of a processor in a computer device in hardware form, or can be stored in a computer device memory in software form, so that the processor can call and execute the corresponding operations of each module.
[0056] In one embodiment, a computer device is provided, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the computer program, the following is achieved:
[0057] Step 1: rearrange all pixels of the original input light field into a column, where the number of rows is equal to the number of columns of the scattering medium transmission matrix;
[0058] Step 2: multiply the scattering medium transmission matrix by the column vector obtained in step 1 to obtain a column vector with the same number of rows as the transmission matrix, and rearrange it into a two-dimensional output light field;
[0059] Step 3: Use the Fresnel diffraction formula to construct the auxiliary matrix M according to the distance and resolution of the receiving plane. x ,M y , use the two-dimensional output light field obtained in step 2 to construct the matrix M, and calculate M x ×M×M y The output light field on the receiving plane is obtained.
[0060] For the specific limitations of each step, please refer to the limitations of the scattering medium simulation method based on matrix multiplication above, which will not be repeated here.
[0061] In one embodiment, a computer-readable storage medium is provided, on which a computer program is stored, which, when executed by a processor, implements:
[0062] Step 1: rearrange all pixels of the original input light field into a column, where the number of rows is equal to the number of columns of the scattering medium transmission matrix;
[0063] Step 2: multiply the scattering medium transmission matrix by the column vector obtained in step 1 to obtain a column vector with the same number of rows as the transmission matrix, and rearrange it into a two-dimensional output light field;
[0064] Step 3: Use the Fresnel diffraction formula to construct the auxiliary matrix M according to the distance and resolution of the receiving plane. x ,M y , use the two-dimensional output light field obtained in step 2 to construct the matrix M, and calculate Mx ×M×M y The output light field on the receiving plane is obtained.
[0065] For the specific limitations of each step, please refer to the limitations of the scattering medium simulation method based on matrix multiplication above, which will not be repeated here.
[0066] As a specific example, the present invention is further described in one of the embodiments.
[0067] The present invention proposes a scattering medium simulation method based on matrix multiplication, comprising the following steps:
[0068] Step 1: rearrange all pixels of the original input plane wave with a resolution of 64*64 into a column with 4096 rows, which is equal to the number of columns of the scattering medium transmission matrix.
[0069] Step 2: Multiply the scattering medium transmission matrix of size 4096*4096 by the column vector in step 1 to obtain a column vector with 4096 rows, which is rearranged into a 64*64 output light field.
[0070] Step 3: Construct an auxiliary matrix M of size 64*64 based on the resolution of the receiving plane 64*64 and the distance 5*10^5 x ,M y , use the light field obtained in step 2 to construct a matrix M of size 64*64, and calculate M x ×M×M y The actual output light field on the receiving plane is obtained.
[0071] The diffraction pattern produced by the above process in the absence of a scattering medium is as follows Figure 2 As shown in the figure, the final output pattern produced when there is a scattering medium has an amplitude and phase as shown in the figure. Figure 3 As shown, it is an obvious speckle pattern of scattering medium.
[0072] The above shows and describes the basic principles, main features and advantages of the present invention. Those skilled in the art should understand that the present invention is not limited to the above embodiments. The above embodiments and descriptions are only illustrative of the principles of the present invention. Without departing from the spirit and scope of the present invention, any modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of the present invention shall be included in the scope of protection of the present invention.
Claims
1. A scattering medium simulation method based on matrix multiplication, characterized in that: The method comprises the following steps: Step 1: rearrange all pixels of the original input light field into a column, where the number of rows is equal to the number of columns of the scattering medium transmission matrix; Step 2: multiply the scattering medium transmission matrix by the column vector obtained in step 1 to obtain a column vector with the same number of rows as the transmission matrix, and rearrange it into a two-dimensional output light field; Step 3: Use the Fresnel diffraction formula to construct the auxiliary matrix M according to the distance and resolution of the receiving plane. x ,M y , use the two-dimensional output light field obtained in step 2 to construct the matrix M, and calculate M x ×M×M y The output light field on the receiving plane is obtained.
2. The scattering medium simulation method based on matrix multiplication according to claim 1, characterized in that: In step 1, before pixel rearrangement, the input light field is discretized, and the resolution after processing is equal to the number of columns in the transfer matrix.
3. The scattering medium simulation method based on matrix multiplication according to claim 1, characterized in that: The order of rearranging the input light field in step 1 is consistent with the measurement order of the scattering medium transmission matrix.
4. The scattering medium simulation method based on matrix multiplication according to claim 1, characterized in that: The order of rearranging the output light fields in step 2 is consistent with the order of measuring the scattering medium transmission matrix.
5. The scattering medium simulation method based on matrix multiplication according to claim 1, characterized in that: The auxiliary matrix M in step 3 x ,M y for: Where (x0, y0) is the discretized coordinate of the incident plane, (x, y) is the discretized coordinate of the incident plane, the superscript T indicates the transpose, d is the distance from the output plane to the input plane, and k is the wave vector.
6. The scattering medium simulation method based on matrix multiplication according to claim 5, characterized in that: In step 3, the matrix M is: Among them, u0 is the light field of the input plane, and x′0 and y′0 are respectively obtained by copying several rows of x0 and several columns of y0 into square matrices.
7. A scattering medium simulation system based on matrix multiplication according to the method of any one of claims 1 to 6, characterized in that: The system comprises: The first module is used to rearrange all pixels of the original input light field into a column, the number of rows of which is equal to the number of columns of the scattering medium transmission matrix; The second module is used to multiply the scattering medium transmission matrix by the column vector obtained by the first module to obtain a column vector with the same number of rows as the transmission matrix, and rearrange it into a two-dimensional output light field; The third module is used to construct the auxiliary matrix M according to the distance and resolution of the receiving plane using the Fresnel diffraction formula. x ,M y , construct the matrix M using the two-dimensional output light field, and calculate M x ×M×M y The output light field on the receiving plane is obtained.
8. A computer device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein: When the processor executes the computer program, the method according to any one of claims 1 to 6 is implemented.
9. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the method according to any one of claims 1 to 6 is implemented.