A hadamard matrix multiscale ordering method and system

The encoding matrix generated by the Hadamard matrix multi-scale sorting method resolves the contradiction between fast imaging and high signal-to-noise ratio imaging in existing technologies, and realizes fast and efficient imaging and noise suppression in computational imaging technology.

CN108287807BActive Publication Date: 2026-04-21BEIJING INST OF AEROSPACE CONTROL DEVICES
View PDF 2 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
BEIJING INST OF AEROSPACE CONTROL DEVICES
Filing Date
2017-12-20
Publication Date
2026-04-21

AI Technical Summary

Technical Problem

Existing coding matrices are difficult to simultaneously achieve fast imaging and high signal-to-noise ratio imaging in computational imaging techniques.

Method used

The Hadamard matrix multi-scale sorting method is adopted. The multi-scale coding matrix is ​​generated by initialization, normalization, Haar wavelet decomposition, sorting and rearrangement. The generated coding matrix is ​​arranged in order from low to high resolution scale.

Benefits of technology

It achieves a balance between fast imaging and high signal-to-noise ratio imaging in computational imaging, suppresses the influence of environmental noise, is applicable to a variety of imaging techniques, and is easy to implement in engineering.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN108287807B_ABST
    Figure CN108287807B_ABST
Patent Text Reader

Abstract

The application discloses a Hadamard matrix multi-scale sequencing method and system, wherein the method comprises the following steps: initializing parameters, and constructing an M-row and M-column Hadamard matrix; extracting each row or column vector of the Hadamard matrix and then performing normalization, rearranging the elements of each row or column vector to form a 2 n Row 2 n Column square matrix H i ; performing n-layer two-dimensional Haar wavelet decomposition on the square matrix H i , obtaining a coefficient matrix H a , taking the absolute value |H a | of the coefficient matrix H a , summing up |H a |, and recording i into a sequence number value I(i); storing the values of Sa(i) and I(i) into a vector Sa and a vector I respectively; taking i=i+1, and judging whether i is greater than M; arranging the elements in the vector Sa in ascending order to obtain a new sequence R; extracting each row or column vector of the Hadamard matrix after normalization according to the new sequence R, and traversing M times to obtain M two-dimensional 2 n ×2 n square matrices RH i . The application solves the problem that the existing coding cannot simultaneously consider fast imaging and high signal-to-noise ratio imaging.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention belongs to the field of image technology, and particularly relates to a Hadamard matrix multi-scale sorting method and system. Background Technology

[0002] In technologies such as computational correlation imaging, computational ghost imaging, computational quantum imaging, single-pixel cameras, structured light illumination imaging, and 3D single-pixel LiDAR imaging, the selection and optimization of the encoding matrix determines the image reconstruction speed and the image signal-to-noise ratio, making it a core and key technology in these fields. The choice of the encoding matrix directly affects the execution efficiency of the reconstruction algorithm and the image reconstruction effect, and the optimization of the algorithm also needs to consider the properties of the encoding matrix. Summary of the Invention

[0003] The technical problem solved by this invention is to overcome the shortcomings of the prior art and provide a Hadamard matrix multi-scale sorting method and system to solve the problem that existing coding cannot simultaneously achieve fast imaging and high signal-to-noise ratio imaging.

[0004] To address the aforementioned technical problems, this invention discloses a multi-scale sorting method for the Hadamard matrix, comprising:

[0005] Step S1: Initialize parameters, set i = 1, M = 2 2n Given n = 4, 5, 6, ..., where n is a positive integer, construct an M-row, M-column Hadamard matrix;

[0006] Step S2: Extract each row or column vector from the Hadamard matrix, normalize it, and rearrange the elements of each row or column vector to form a 2... n Line 2 n The square matrix H of columns i ;

[0007] Step S3, convert the square matrix H i Perform n-level two-dimensional Haar wavelet decomposition to obtain the coefficient matrix H a Take the coefficient matrix H a Absolute value | H a | and sum ∑|H a |, recorded as: Sa(i)=∑|H a |; Record i in the sequence number value I(i); where both vector Sa and vector I are M×1 dimensional vectors;

[0008] Step S4: Store the values ​​of Sa(i) and I(i) into vectors Sa and I, respectively;

[0009] Step S5: Set i = i + 1 and determine whether i is greater than M;

[0010] Step S6: If i ≤ M, then repeat steps S2 to S4 until i > M.

[0011] Step S7: Arrange the elements in vector Sa in ascending order to obtain a new sequence R;

[0012] Step S8: After re-extracting the vectors of each row or column of the Hadamard matrix according to the new sequence R, normalize them, and traverse M times to obtain M two-dimensional vectors. n ×2 n RH Array i RH i Let be the i-th multi-scale coding matrix generated in the order of the new sequence R.

[0013] In the above-mentioned multi-scale sorting method for the Hadamard matrix, after extracting each row or column vector of the Hadamard matrix and normalizing it, the elements of each row or column vector are rearranged to form a 2 n Line 2 n The square matrix H of columns i ,include:

[0014] Read the i-th row of the Hadamard matrix and normalize it to the interval [0, 1] to obtain vector A. i ;

[0015] Read A sequentially i 1 to 2 n Each element is used as a square matrix H. i The first line, the second n +1 to 2 n+1 Each element is used as a square matrix H. i The second line, until reading line (2) n -1)×2 n +1 to 2 2n Each element is used as a square matrix H. i The 2nd n Line, traverse M vectors A i Then we get two-dimensional 2 n ×2 n Square H i , where i = 1, 2, 3…M.

[0016] In the above Hadamard matrix multi-scale sorting method, the elements of vector Sa are arranged in ascending order to obtain a new sequence R, including:

[0017] Read the M×1 dimensional vector Sa and the M×1 dimensional vector I stored in step S4;

[0018] Sort the values ​​of vector Sa in ascending order, and adjust the order of the values ​​of I(i) in vector I corresponding to Sa(i) according to the initial order, maintaining the initial correspondence; where, if the value of Sa(i) is equal to the value of Sa(i-1) or Sa(i+1), then the values ​​of Sa(i), Sa(i-1) or Sa(i+1) remain unchanged in the initial order, and a new sequence R is obtained after sorting;

[0019] By setting different values ​​of M and n, sequence values ​​of new sequences R of different lengths can be obtained.

[0020] Accordingly, the present invention also discloses a Hadamard matrix multi-scale sorting system, comprising:

[0021] The initialization module is used to initialize parameters, setting i=1 and M=2. 2n Given n = 4, 5, 6, ..., where n is a positive integer, construct an M-row, M-column Hadamard matrix;

[0022] The normalization module is used to extract each row or column vector of the Hadamard matrix and then normalize it, rearranging the elements of each row or column vector to form a 2x2 matrix. n Line 2 n The square matrix H of columns i ;

[0023] The wavelet decomposition module is used to decompose the square matrix H i Perform n-level two-dimensional Haar wavelet decomposition to obtain the coefficient matrix H a Take the coefficient matrix H a Absolute value | H a | and sum ∑|H a |, recorded as: Sa(i)=∑|H a |; Record i in the sequence number value I(i); where both vector Sa and vector I are M×1 dimensional vectors;

[0024] The storage module is used to store the values ​​of Sa(i) and I(i) into vectors Sa and I, respectively;

[0025] The counting module is used to take i = i + 1 and determine whether i is greater than M;

[0026] The selection module is used to return to the normalization module for execution when i ≤ M, until i > M;

[0027] The permutation module is used to arrange the elements in vector Sa in ascending order to obtain a new sequence R;

[0028] The traversal module is used to re-extract each row or column vector of the Hadamard matrix according to the new sequence R, and then normalize it, traversing M times to obtain M two-dimensional 2n×2 vectors. n RH Arrayi RH i Let be the i-th multi-scale coding matrix generated in the order of the new sequence R.

[0029] The present invention has the following advantages:

[0030] (1) In this invention, the generated coding matrix pattern is arranged in order from low to high resolution scale. This can obtain images with resolution from low to high during the imaging process of an object. In practical applications, the measurement can be terminated at any time after obtaining an image that meets the requirements.

[0031] (2) In this invention, the multi-scale sorting encoding only includes two types of matrix elements, 0 and 1, and the number of matrix elements 0 and 1 is equal. It can be used for optical differential measurement, effectively suppressing the influence of environmental noise, and has strong robustness. It is easy to implement in engineering. For example, a DMD (Digital Micro-mirror Device) device has millions of micromirrors with micron-sized micromirrors. It can switch in two directions of ±12° with a switching speed of up to 32kHz, realizing the "on" and "off" control of the light field. Physically, it can be equivalent to "on" corresponding to matrix element 1 and "off" corresponding to matrix element 0.

[0032] (3) In this invention, when multi-scale coding is applied to technologies such as computational correlation imaging, computational ghost imaging, computational quantum imaging, single-pixel camera, structured light illumination imaging or three-dimensional single-pixel lidar imaging, there is no need to store the coding matrix. Fast imaging can be achieved through fast Hadamard transformation, correlation iteration or compressed sensing algorithms. Attached Figure Description

[0033] Figure 1 This is a flowchart illustrating the steps of a multi-scale sorting method for the Hadamard matrix in an embodiment of the present invention.

[0034] Figure 2 This is a 16×16 encoded pattern generated by a 256-row Hadamard matrix in an embodiment of the present invention;

[0035] Figure 3 This is a method of plotting data values ​​of vector Sa in an embodiment of the present invention;

[0036] Figure 4 This is a plot of data values ​​for a new sequence R in an embodiment of the present invention;

[0037] Figure 5 This is a 16×16 multi-scale coding matrix generated based on a new sequence R in an embodiment of the present invention;

[0038] Figure 6 This is a display image corresponding to a square matrix H2 data in an embodiment of the present invention. Detailed Implementation

[0039] To make the objectives, technical solutions, and advantages of the present invention clearer, the common embodiments of the present invention will be described in further detail below with reference to the accompanying drawings.

[0040] This invention discloses a Hadamard matrix multi-scale sorting method and system, which can generate multi-scale modulation coding matrices for computational correlation imaging, computational ghost imaging, computational quantum imaging, single-pixel cameras, structured light illumination imaging, or three-dimensional single-pixel lidar imaging, thereby improving the image reconstruction speed and imaging signal-to-noise ratio of the aforementioned computational imaging systems.

[0041] Reference Figure 1 This document illustrates a flowchart of a multi-scale sorting method for the Hadamard matrix according to an embodiment of the present invention. In this embodiment, the multi-scale sorting method for the Hadamard matrix includes:

[0042] Step S1: Initialize parameters, set i = 1, M = 2 2n Given n = 4, 5, 6, ..., where n is a positive integer, construct an M-row, M-column Hadamard matrix.

[0043] Step S2: Extract each row or column vector from the Hadamard matrix, normalize it, and rearrange the elements of each row or column vector to form a 2... n Line 2 n The square matrix H of columns i .

[0044] Step S3, convert the square matrix H i Perform n-level two-dimensional Haar wavelet decomposition to obtain the coefficient matrix H a Take the coefficient matrix H a Absolute value | H a | and sum ∑|H a |, recorded as: Sa(i)=∑|H a |; Record i in the sequence number value I(i); where both vector Sa and vector I are M×1 dimensional vectors.

[0045] Step S4: Store the values ​​of Sa(i) and I(i) into vectors Sa and I, respectively.

[0046] Step S5: Set i = i + 1 and determine whether i is greater than M.

[0047] Step S6: If i ≤ M, then repeat steps S2 to S4 until i > M.

[0048] Step S7: Arrange the elements in vector Sa in ascending order to obtain a new sequence R.

[0049] Step S8: After re-extracting the vectors of each row or column of the Hadamard matrix according to the new sequence R, normalize them, and traverse M times to obtain M two-dimensional vectors. n ×2 n RH Array i RH i Let be the i-th multi-scale coding matrix generated in the order of the new sequence R.

[0050] In a preferred embodiment of the present invention, after extracting each row or column vector of the Hadamard matrix, normalization is performed, and the elements of each row or column vector are rearranged to form 2. n Line 2 n The square matrix H of columns i Specifically, this can include: reading the i-th row of the Hadamard matrix and normalizing it to the interval [0, 1] to obtain vector A. i Read A sequentially i 1 to 2 n Each element is used as a square matrix H. i The first line, the second n +1 to 2 n+1 Each element is used as a square matrix H. i The second line, until reading line (2) n -1)×2 n +1 to 2 2n Each element is used as a square matrix H. i The 2nd n Line, traverse M vectors A i Then we get two-dimensional 2 n ×2 n Square H i , where i = 1, 2, 3…M.

[0051] In a preferred embodiment of the present invention, the elements in vector Sa are arranged in ascending order to obtain a new sequence R. Specifically, this may include: reading the M×1 dimensional vector Sa and the M×1 dimensional vector I stored in step S4; sorting the values ​​of vector Sa in ascending order; and adjusting the order of the values ​​of I(i) in vector I corresponding to Sa(i) according to the initial order, maintaining the initial correspondence; wherein, if the value of Sa(i) is equal to the value of Sa(i-1) or Sa(i+1), then the values ​​of Sa(i), Sa(i-1) or Sa(i+1) remain unchanged in the initial order, and a new sequence R is obtained after sorting; and setting different values ​​of M and n to obtain sequence values ​​of new sequences R of different lengths.

[0052] Based on the above embodiments, the Hadamard matrix multi-scale sorting method will be described in detail below with reference to a specific example.

[0053] Figure 2This illustrates a 16×16 encoded pattern generated by a 256-row Hadamard matrix in an embodiment of the present invention. Figure 3 The diagram illustrates a plot of data values ​​for a vector Sa according to an embodiment of the present invention. Figure 4 The diagram illustrates a plot of data values ​​for a novel sequence R according to an embodiment of the present invention. Figure 5 This illustrates a 16×16 multi-scale coding matrix generated based on a new sequence R in an embodiment of the present invention.

[0054] (1.1) Initialize parameters, set i=1, M=2 2n n = 4, 5, 6..., where n is a positive integer. For example, if i = 1 and n = 4, then M = 256.

[0055] In this embodiment, the specific implementation process of constructing an M-row, M-column Hadamard matrix can be simply illustrated with an example, such as generating a 2×2 Hadamard matrix K2, as shown in formula (1):

[0056]

[0057] To generate a Hadamard matrix with M=4, formula (2) is required:

[0058]

[0059] Generate a Hadamard matrix K4 with M=4, according to formula (2), n=2,

[0060]

[0061] It should be noted that in practical applications, n is greater than or equal to 4. Setting M = 4 here is merely for illustrative purposes. To generate a larger Hadamard matrix, one can follow formula (2) to obtain any 2... n An n-order Hadamard matrix. Where n is any integer from 4, 5, 6...

[0062] (1.2) Read the i-th row of the Hadamard matrix generated in step (1.1), where i is an integer; and normalize it to the interval [0 1] to obtain M vectors A. i Read A sequentially i 1 to 2 n Each element is used as a square matrix H. i The first line, the second n +1 to 2 n+1 Each element is used as a square matrix H. i The second line, and so on, until the second line is read. n -1)×2 n +1 to 22n Each element is used as a square matrix H. i The 2nd n Line, traverse M vectors A i Then we get two-dimensional 2 4 ×2 4 Square H i .

[0063] For example, if M = 256 and n = 4, corresponding to the second row of a 256×256 Hadamard matrix, after normalization, we get A2 = [1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0]

[0076] Convert to a 2D 16×16 square matrix H2 = [1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0; 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0; 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0; 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0; 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0; 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0; 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0; 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0; 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0; 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0; 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0; 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0; 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0; 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0; 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0; 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0]

[0093] The above square matrix H2 data is displayed in an image format (e.g., Figure 6 This illustrates a display image corresponding to a square matrix H2 data in an embodiment of the present invention. Figure 6 In the image, the grayscale value of white is 1, and the grayscale value of black is 0.

[0094] (1.3) The square matrix H i Perform n-level two-dimensional Haar wavelet decomposition to obtain the coefficient matrix H a Take the coefficient matrix H a Absolute value | H a | and sum ∑|H a |, recorded as: Sa(i)=∑|H a |, record i in the sequence number value I(i);.

[0095] In this embodiment, both vector Sa and vector I are M×1 dimensional vectors; for example, if n=4, then a 4-level Haar wavelet decomposition is performed, and matrix H...a Corresponding to 2 4 ×2 4 The matrix is ​​a square matrix. The absolute value of each element is taken, and the summation is performed on each element. There are a total of 256 elements.

[0096] (1.4) Store the values ​​of Sa(i) and I(i) into vectors Sa and I respectively, denoted as {Sa(i), I(i)}. For example, when n = 4, vectors Sa and I each have M = 2. 8 = 256 element values;

[0097] (1.5) i = i + 1, determine if i is greater than M. For example, in step (1.4), i = 1, then after this step is completed, i = 2, and determine if i = 2 > M = 2. 8 ,2>2 8 The result was no.

[0098] (1.6) If the result of step (1.5) is negative, then repeat steps (1.2), (1.3), and (1.4) until the condition in step (1.5) is met, i.e., i > M. For example, taking a 256×256 Hadamard matrix as an example, when i = 256 + 1, i > M = 256 is met. At this time, step (1.6) has been executed 256 times, and the result will be as follows. Figure 2 The pattern shown is generated in the order of the initial (original) Hadamard columns.

[0099] (1.7) Read the M×1 vector Sa and M×1 vector I stored in step (1.4), sort the values ​​of vector Sa in ascending order, and at the same time adjust the order of I(i) values ​​corresponding to Sa(i) in the one-dimensional vector I according to the initial (original) order, keeping the initial (original) correspondence unchanged; if the value of Sa(i) is equal to the value of Sa(i-1) or Sa(i+1), then the values ​​of Sa(i), Sa(i-1) or Sa(i+1) remain unchanged according to the initial (original) order. After sorting, a new sequence R will be obtained and output, which is the Hadamard matrix multi-scale sorting sequence number.

[0100] In this embodiment, (1.7) in the specific implementation process, for example, for a 256×256 Hadamard matrix, Sa(i) and I(i) are taken to traverse the values ​​of i = 1, 2, 3, ..., 256. After sorting the values ​​in the vector Sa by size, a plot is drawn with i = [1, 2, 3, ..., 256] as the variable, as shown below. Figure 3 The result is shown. At this point, the corresponding vector I is sorted, from I(i)=i, i=[1,2,3,…,256], to a new sequence R.

[0101] Where R = [1 9 129 137 5 13 65 69 73 77 133 141 193 197 201 205 3 7 11 15 33 3537 39 41 43 45 47 67 71 75 79 97 99 101 103 105 107 109 111 131 135 139 143 161 163 165 167 169 171 173 175 195 199 203 207 225 227 229 231 233 235 237 239 2 4 6 8 10 12 14 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 34 36 38 40 42 44 46 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 66 68 70 72 74 76 78 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 98 100 102 104 106 108 110 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 130 132 134 136 138 140 142 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 162 164 166 168 170 172 174 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 194 196 198 200 202 204 206 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 226 228 230 232 234 236 238 240 241 242 243 244 245 246 247 248 249 250 251

[0118] 252 253 254 255 256).

[0119] Plotting the new sequence R with i = [1, 2, 3, ..., 256] as variables, we can obtain the graph of the new sequence R, as shown below. Figure 4 As shown.

[0120] (1.8) Following (1.1) to (1.7), setting different values ​​for M and n will yield sequence values ​​of new sequences R of different lengths. Based on these sequence values, (1.1) to (1.2) can be used to generate multi-level, multi-scale coding patterns. For example, for a 256×256 Hadamard matrix, the codes can be reordered according to the order of the new sequence R to generate RH. i The sequence, the result is as follows Figure 5 As shown, comparison Figure 2 and Figure 5 It can be found Figure 5 Encoded patterns and Figure 2 different, Figure 5 The pattern has been formed into multi-scale resolution encoded features according to the new sequence R.

[0121] Based on the above embodiments, the present invention also discloses a Hadamard matrix multi-scale sorting system, comprising:

[0122] The initialization module is used to initialize parameters, setting i=1 and M=2. 2n Given n = 4, 5, 6, ..., where n is a positive integer, construct an M-row, M-column Hadamard matrix.

[0123] The normalization module is used to extract each row or column vector of the Hadamard matrix and then normalize it, rearranging the elements of each row or column vector to form a 2x2 matrix. n Line 2 n The square matrix H of columns i .

[0124] The wavelet decomposition module is used to decompose the square matrix H i Perform n-level two-dimensional Haar wavelet decomposition to obtain the coefficient matrix H a Take the coefficient matrix H a Absolute value | H a | and sum ∑|H a |, recorded as: Sa(i)=∑|H a|; Record i in the sequence number value I(i); where both vector Sa and vector I are M×1 dimensional vectors.

[0125] The storage module is used to store the values ​​of Sa(i) and I(i) into vectors Sa and I, respectively.

[0126] The counting module is used to take i = i + 1 and determine whether i is greater than M.

[0127] The selection module is used to return to the normalization module for execution when i ≤ M, until i > M.

[0128] The permutation module is used to arrange the elements in vector Sa in ascending order to obtain a new sequence R.

[0129] The traversal module is used to re-extract each row or column vector of the Hadamard matrix according to the new sequence R, and then normalize it, traversing M times to obtain M two-dimensional vectors. n ×2 n RH Array i RH i Let be the i-th multi-scale coding matrix generated in the order of the new sequence R.

[0130] As the system implementation is in contrast to the method implementation, it is described in a simpler way. For relevant details, please refer to the description in the method implementation section.

[0131] In summary, in this invention, the generated encoding matrix pattern is arranged sequentially from low to high resolution scales. This allows for the acquisition of images with resolutions ranging from low to high during object imaging, and measurement can be terminated at any time once a satisfactory image is obtained in practical applications. Secondly, the multi-scale sorting encoding only includes two types of matrix elements: 0 and 1, with an equal number of 0 and 1 elements. This allows for optical differential measurement, effectively suppressing environmental noise, exhibiting strong robustness, and being easy to implement in engineering. For example, a DMD (Digital Micro-mirror Device) has millions of micromirrors, with micromirror sizes on the order of micrometers. These micromirrors can switch between ±12° directions at a speed of up to 32kHz, enabling "on" and "off" control of the light field. Physically, "on" corresponds to matrix element 1, and "off" corresponds to matrix element 0. Furthermore, when multi-scale coding is applied to technologies such as computational correlation imaging, computational ghost imaging, computational quantum imaging, single-pixel cameras, structured light illumination imaging, or 3D single-pixel lidar imaging, it eliminates the need to store the coding matrix and enables rapid imaging through fast Hadamard transform, correlation iteration, or compressed sensing algorithms.

[0132] The various embodiments in this description are described in a progressive manner, with each embodiment focusing on the differences from other embodiments. The same or similar parts between the various embodiments can be referred to each other.

[0133] The above description is only the best specific embodiment of the present invention, but the protection scope of the present invention is not limited thereto. Any changes or substitutions that can be easily conceived by those skilled in the art within the technical scope disclosed in the present invention should be included within the protection scope of the present invention.

[0134] The contents not described in detail in this specification are common knowledge to those skilled in the art.

Claims

1. A multi-scale sorting method for Hadamard matrices, characterized in that, include: Step S1: Initialize parameters, set i = 1, M = 2 2n Given n = 4, 5, 6, ..., where n is a positive integer, construct an M-row, M-column Hadamard matrix; Step S2: Read the i-th row of the Hadamard matrix generated in step S1, where i is an integer; and normalize it to the interval [0, 1] to obtain M vectors A. i Read A sequentially i 1 to 2 n Each element is used as a square matrix H. i The first line, the second n +1 to 2 n+1 Each element is used as a square matrix H. i The second line, and so on, until the second line is read. n -1)×2 n +1 to 2 2n Each element is used as a square matrix H. i The 2nd n Line, traverse M vectors A i Then we get two-dimensional 2 4 ×2 4 Square H i Among them, the square matrix H i Data is displayed in image format; Step S3, convert the square matrix H i Perform n-level two-dimensional Haar wavelet decomposition to obtain the coefficient matrix H a Take the coefficient matrix H a Absolute value | H a | and sum ∑|H a |, recorded as: Sa(i)=∑|H a |; Record i in the sequence number I(i); where vector Sa and vector I are both M×1 dimensional vectors; where n=4, then perform 4-level Haar wavelet decomposition, matrix H a Corresponding to 2 4 ×2 4 The matrix is ​​a square matrix. The absolute value of each element is taken, and the sum is iterated over each element. There are a total of 256 elements. Step S4: Store the values ​​of Sa(i) and I(i) into vectors Sa and I respectively; where, when n = 4, vectors Sa and I each have M = 2. 8 = 256 element values; Step S5: Set i = i + 1 and determine whether i is greater than M; Step S6: If i ≤ M, then repeat steps S2 to S4 until i > M; where i = 256 + 1, i > M = 256 holds true, at which point step S6 has been repeated 256 times, and the pattern generated according to the initial Hadamard column order is obtained, denoted as pattern 2. Step S7: Read the M×1 dimensional vector Sa and M×1 dimensional vector I stored in step S4. Sort the values ​​of vector Sa in ascending order, and simultaneously adjust the order of I(i) values ​​in one-dimensional vector I corresponding to Sa(i) according to the initial order, keeping the initial correspondence unchanged. If the value of Sa(i) is equal to the value of Sa(i-1) or Sa(i+1), then the values ​​of Sa(i), Sa(i-1), or Sa(i+1) remain unchanged according to the initial order. After sorting, a new sequence R will be obtained and output, which is the multi-scale sorting sequence number of the Hadamard matrix. After sorting each value in vector Sa in ascending order, plot the graph with i = [1, 2, 3, ..., 256] as the variable. At this time, the corresponding vector I is sorted from I(i) = i, i = [1, 2, 3, ..., 256] to the new sequence R. Plot the graph of the new sequence R with i = [1, 2, 3, ..., 256] as the variable. Step S8: Following steps S1 to S7, set different values ​​for M and n to obtain sequence values ​​of new sequences R of different lengths. Based on the sequence values ​​of different lengths, steps S1 to S2 can be used to generate multi-level, multi-scale coded patterns. These coded patterns are arranged sequentially from low to high resolution scales and are used to obtain images with resolutions from low to high during object imaging. The coded patterns contain only two types of matrix elements: 0 and 1, and the number of 0 and 1 matrix elements is equal. Physically, "on" corresponds to matrix element 1, and "off" corresponds to matrix element 0. In practical applications, the process ends once a satisfactory image is obtained. This method can be applied to computational correlation imaging, computational ghost imaging, computational quantum imaging, single-pixel camera, structured light illumination imaging, or 3D single-pixel lidar imaging. It does not require storing the encoding matrix and achieves imaging through fast Hadamard transform, correlation iteration, or compressed sensing algorithms, thereby improving image reconstruction speed and imaging signal-to-noise ratio.

Citation Information

Patent Citations

  • High-signal-to-noise ratio quick intensity correlated imaging method

    CN104714258A

  • Method utilizing spatial light modulator to improve photoacoustic imaging limited view angle

    CN105785566A