Target image rotation angle single-pixel measurement method based on optimal radial moments
By designing a special modulation mode and differential measurement strategy based on the optimal radial moment and Harris Eagle optimization algorithm for single-pixel measurement, the error problem introduced by the binarization modulation mode in single-pixel imaging technology is solved, and efficient and accurate target image rotation angle measurement is achieved.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- BEIJING INST OF TECH
- Filing Date
- 2025-03-27
- Publication Date
- 2026-06-19
AI Technical Summary
Existing single-pixel imaging technology introduces significant errors and limits measurement efficiency when measuring target rotation angles due to the binarization modulation mode. In particular, the error varies significantly for different target images, affecting measurement accuracy and speed.
A single-pixel measurement method based on optimal radial moment is adopted, combined with the Harris Eagle optimization algorithm, a special modulation mode is designed and a differential measurement strategy is introduced. Through a strategy combining global and local search, the parameters are optimized to reduce errors and quickly and accurately measure the rotation angle of the target image.
It achieves smaller angle measurement errors on different target images, improves measurement accuracy and efficiency, can quickly and accurately measure the rotation angle of the target image, and eliminates interference from background ambient light.
Smart Images

Figure CN120411159B_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the field of single-pixel imaging technology, and in particular, it is a single-pixel measurement method for the rotation angle of a target image based on the optimal radial moment. Background Technology
[0002] Single-pixel imaging, as an imaging method, utilizes the correlation between modulation patterns and light intensity values to reconstruct target images or obtain target motion information. Single-pixel imaging has advantages such as high sensitivity and strong resistance to interference, and therefore has received widespread attention in recent years.
[0003] Currently, there are two main methods for measuring target rotation angles using single-pixel imaging technology. The first method involves acquiring a reconstructed image of the target and then using image processing techniques to obtain the rotation angle. However, single-pixel imaging requires a large number of samples to obtain a clear target image, thus limiting the efficiency of target rotation angle measurement to the imaging speed. To improve the speed of target angle measurement, some researchers have proposed a second method that directly uses light intensity values to obtain the target rotation angle without reconstructing the target image. Meng et al. proposed obtaining the second-order geometric moments of the scene and calculating the principal axis of the target to obtain its angle information. Subsequently, Ji et al. proposed using second-order differential central moment modes to address the problem of large measurement errors caused by excessively large gray levels in the second-order geometric moment modulation modes in large scenes. Lai et al. proposed a target rotation angle measurement method based on Zernike moments, which can achieve rapid target angle measurement using only four modulation modes per frame. Currently, the widely used modulation device is the Digital Micromirror Device (DMD), which modulates spatial light by controlling the ±12° flipping of a micromirror array. However, DMD is a binary modulation device, so the grayscale modulation mode needs to be dithered and binarized. The above method using the grayscale modulation mode results in a very small error in measuring the target rotation angle; simulation results show the error is within 0.5°. However, after binarizing the modulation mode, the change in the pixel values of the modulation mode leads to an increase in the target rotation angle measurement error. Furthermore, because different targets have different pixel value distributions, the magnitude of the error introduced after binarizing the same modulation mode also varies, even resulting in very large rotation angle measurement errors for a specific target. Therefore, for targets with different pixel value distributions, it is urgent and necessary to seek a single-pixel measurement method for target image rotation angle based on the optimal radial moment, and to design different modulation modes to reduce the target rotation angle measurement error caused by the binarized modulation mode. Summary of the Invention
[0004] This invention addresses the shortcomings of existing technologies by proposing a single-pixel measurement method for the rotation angle of a target image based on optimal radial moment. The method includes: constructing a single-pixel measurement model for the rotation angle of a target image based on radial moment; determining the number of parameters to be optimized and setting the initial value range for each parameter, and setting an optimization objective function; solving the single-pixel measurement model for the rotation angle of the target image using the Harris Eagle optimization algorithm to obtain the optimal values for the parameters to be optimized; and performing single-pixel detection on the target image based on the rotation angle single-pixel measurement model and the optimal parameters to be optimized to measure the rotation angle of the target image. This invention combines the global search and local search strategies of the Harris Eagle optimization algorithm, and by designing a special modulation mode and introducing a differential measurement method, it can eliminate interference from ambient light and achieve fast and accurate measurement of the rotation angle of the target image, thus possessing practical application value.
[0005] This invention provides a single-pixel measurement method for the rotation angle of a target image based on optimal radial moment, comprising the following steps:
[0006] S1. Based on the radial moment, construct a single-pixel measurement model for the rotation angle of the target image;
[0007] S2. Determine the parameters to be optimized and their initial value range, and set the optimization objective function;
[0008] S3. Use the Harris Eagle optimization algorithm to solve for the optimal parameter values;
[0009] S31. Initialize algorithm variables; set the population size N and maximum number of iterations T for the Harris Eagle optimization algorithm;
[0010] S32. Using the objective function F as the fitness function, calculate the fitness of each Harris Eagle position in the population in each iteration and record the best individual.
[0011] S33. Update the positions of N Harris Eagles in the population, specifically including:
[0012] S331. Calculate the prey's escape energy E:
[0013]
[0014] Where E0 represents the initial escape energy of the prey; t represents the current iteration number;
[0015] S332. If E satisfies |E|≥1, it is the exploration phase, and step S333 is executed; otherwise, it is the development phase, and step S334 is executed.
[0016] S333, The exploration phase includes reference exploration and random exploration update methods, which are selected by random probability p1:
[0017] S334. The development phase includes the first, second, third, and fourth update methods, which are selected by E and the escape probability p2.
[0018] S34. If t < T, then return to step S33; otherwise, output the optimal parameters.
[0019] S4. The rotation angle of the target image is measured using a single-pixel measurement model based on optimal parameters.
[0020] Preferably, the radial moment model of the target image in step S1 is as follows:
[0021] For a target image f(r,θ) defined in unit circular polar coordinates, its nth order m-fold radial moment O nm for:
[0022]
[0023] Among them, R n (r) denotes a radial moment polynomial and is an nth-order polynomial in r; r represents the polar radius; θ represents the polar angle; j represents the imaginary number; d represents the differential; n represents the polynomial order; m represents the multiplicity; e is the natural constant;
[0024] When the rotation angle of the target image f(r,θ) is θ0, the phase angle change of its nth order m-fold radial moment is mθ0. The rotation angle of the target image is calculated by the phase shift of the radial moment.
[0025] Preferably, the construction of the single-pixel measurement model of the target image rotation angle in step S1 specifically includes the following steps:
[0026] Set grayscale modulation mode The first, second, third, and fourth modulation modes are obtained by dithering binarization. Furthermore, the nth order m-fold radial moment O of the target image f(r,θ) nm The first, second, third and fourth modulation modes Corresponding light intensity value To determine:
[0027]
[0028] Preferably, step S2, determining the parameter to be optimized and its initial value range, includes the following sub-steps:
[0029] S211, Set the radial moment polynomial R n (r) is:
[0030] R n (r)=ar 3 +br 2 +cr+d (10)
[0031] Where a, b, c, d represent the first, second, third, and fourth unknown parameters, respectively; [a, b, c, d] are the parameters to be optimized;
[0032] S212. Set the lower and upper limits of the parameters to be optimized [a,b,c,d] as LB=[-40,-40,-40,-40] and UB=[40,40,40,40].
[0033] Preferably, setting the optimization objective function in step S2 specifically includes the following steps:
[0034] For the target image f(r,θ), rotate it in units of a first angle β° (0<β<360), and rotate it a number of times k=360 / β-1 to obtain the first rotation angle vector θ1 of the target image f(r,θ), which has a size of 1×k; under each set of parameters to be optimized [a,b,c,d], modulate the target image f(r,θ) using the binarized modulation mode, measure the radial moment of the target image f(r,θ) and the target image after k rotations, and obtain the second rotation angle vector θ2 of the target image after k rotations; use the root mean square error RMSE between the second rotation angle vector θ2 and the first rotation angle vector θ1 as the optimization objective function F.
[0035] Preferably, step S334 specifically includes the following steps:
[0036] When E satisfies |E|≥0.5 and p2 satisfies p2≥0.5, the first update method is selected; when E satisfies |E|<0.5 and p2 satisfies p2≥0.5, the second update method is selected; when E satisfies |E|≥0.5 and p2 satisfies p2<0.5, the third update method is selected; when E satisfies |E|<0.5 and p2 satisfies p2<0.5, the fourth update method is selected.
[0037] Preferably, in step S333, when p1 satisfies p1 < 0.5, the reference exploration update method is selected; when p1 satisfies p1 ≥ 0.5, the random exploration update method is selected.
[0038] Preferably, in step S31, the position of each Harris Eagle represents a set of values of parameters [a,b,c,d] to be optimized, and the positions of N Harris Eagles in the initial state are randomly generated.
[0039] X l (t)=r1·(UB-LB)+LB, (l=1,2,...,N) (12)
[0040] Here, r1 represents a first random vector of size 1×4 with values between [0,1].
[0041] Preferably, in step S333, the probabilities of the reference exploration update method and the random exploration update method are the same; in step S334, when p2 satisfies p2 < 0.5, it means that the prey can successfully escape.
[0042] Compared with the prior art, the technical effects of the present invention are as follows:
[0043] 1. The single-pixel measurement method for target image rotation angle based on optimal radial moment designed in this invention designs a special modulation mode for different target images, so that the angle measurement error caused by the binarization modulation mode is relatively small; each frame of target image only needs a few modulations to realize the measurement of target image rotation angle; the introduction of differential measurement strategy can eliminate the interference of background ambient light. The proposed method can quickly realize the measurement of target image rotation angle and improve the measurement accuracy.
[0044] 2. The single-pixel measurement method for target image rotation angle based on optimal radial moment designed in this invention uses the Harris Eagle optimization algorithm to find the optimal solution for the parameters to be optimized. By simulating the hunting mode of the Harris Eagle population, and by using a strategy that combines global search and local search, the search is both extensive and in-depth, which can improve the efficiency and accuracy of finding the optimal solution for the parameters to be optimized. Attached Figure Description
[0045] Other features, objects, and advantages of this application will become more apparent from the following detailed description of non-limiting embodiments with reference to the accompanying drawings.
[0046] Figure 1 This is a flowchart of the single-pixel measurement method for target image rotation angle based on optimal radial moment according to the present invention;
[0047] Figure 2 This is a schematic diagram of the Harris Eagle optimization algorithm of the present invention;
[0048] Figure 3 This is the image of test target 1 in the first embodiment of the present invention;
[0049] Figure 4 This is the curve showing the change of the optimal fitness value of the Harris Eagle optimization algorithm with the number of iterations in the first embodiment of the present invention.
[0050] Figure 5 The test objective 1 in the first embodiment of this aspect is the Harris Eagle optimization algorithm, specifically the curve showing the position of one eagle changing with the number of iterations;
[0051] Figure 6 This is the image of test target 2 in the second embodiment of the present invention;
[0052] Figure 7 This is the curve showing the change of the optimal fitness value of the Harris Eagle optimization algorithm with the number of iterations in the second embodiment of the present invention.
[0053] Figure 8 The second embodiment of this aspect is the test target 2 Harris Eagle optimization algorithm, where the position of one eagle changes with the number of iterations;
[0054] Figure 9 The graph shows the rotation angle measurement error results of test target 1 in the first embodiment of the present invention under the differential central moment, Zernike moment and the optimal radial moment method proposed in the present invention.
[0055] Figure 10 The graph shows the rotation angle measurement error results of test target 2 in the second embodiment of the present invention under the differential central moment, Zernike moment and the optimal radial moment method proposed in the present invention. Detailed Implementation
[0056] The present application will now be described in further detail with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative of the invention and not intended to limit it. Furthermore, it should be noted that, for ease of description, only the parts relevant to the invention are shown in the accompanying drawings. It should be noted that, unless otherwise specified, the embodiments and features described in these embodiments can be combined with each other. The present application will now be described in detail with reference to the accompanying drawings and embodiments.
[0057] Figure 1 The present invention provides a single-pixel measurement method for target image rotation angle based on optimal radial moment, comprising the following steps:
[0058] S1. Based on the radial moment, construct a single-pixel measurement model for the rotation angle of the target image.
[0059] S11. Construct the radial moment model of the target image:
[0060] S111. For a target image f(r,θ) defined in unit circular polar coordinates, its nth order m-fold radial moment O nm for:
[0061]
[0062] Among them, R n (r) denotes the radial moment polynomial and is an nth-order polynomial in r; r represents the polar radius; θ represents the polar angle; j represents the imaginary number; d represents the differential; n represents the order of the polynomial; m represents the multiplicity; and e is the natural constant.
[0063] S112. When the rotation angle of the target image f(r,θ) is θ0, the rotated image f'(r,θ) is represented as:
[0064] f'(r,θ)=f(r,θ+θ0) (2).
[0065] S113. Let the rotation variable θ′=θ+θ0, then the nth order m-fold radial moment O' of the rotated image f'(r,θ) nm for:
[0066]
[0067] It can be seen that when the rotation angle of the target image f(r,θ) is θ0, the magnitude of its nth order m-fold radial moment remains unchanged, while the phase angle changes to mθ0, which is proportional to the rotation angle θ0 of the target image f(r,θ). Therefore, the rotation angle of the target image f(r,θ) can be calculated by measuring the radial moment before and after the rotation of the target image f(r,θ) and by the phase shift of the radial moment.
[0068] S12. Construct a single-pixel measurement model for the rotation angle of the target image:
[0069] S121. Light intensity value S of the target image acquired by a single-pixel detector: During the single-pixel detection process, the single-pixel detector acquires the light intensity value S reflected or transmitted from the target image after DMD modulation. The light intensity value S is equivalent to the inner product of the target image f(r,θ) and the modulation mode P(r,θ), that is:
[0070] S=∫∫f(r,θ)P(r,θ)rdrdθ (4).
[0071] S122. Comparing with formula (1), we get that when the modulation mode P(r,θ)=R n (r)e -jmθ At that time, the light intensity value S collected by the single-pixel detector is equal to the nth order m-fold radial moment O of the target image f(r,θ). nm .
[0072] S123, when e -jmθ When performing an Euler expansion, the modulation mode P(r,θ) is represented as:
[0073] P(r,θ)=R n (r)cos(mθ)-jR n (r)sin(mθ) (5)
[0074] Among them, R n (r)cos(mθ) represents the real part mode; R n (r)sin(mθ) represents the imaginary part mode.
[0075] Since DMD can only load binary modes, and the modulation mode P(r,θ) contains both real and imaginary parts, and the pixel values in the real and imaginary parts can be positive or negative, we use the light intensity values S obtained after modulation by four differential modes to solve for the nth order m-fold radial moment O of f(r,θ) of the target image. nm .
[0076] S124. Using differential mode, enable the first, second, third, and fourth grayscale modulation modes. They are represented as follows:
[0077]
[0078] Where max(R) n (r)cos(mθ),0) and |min(R)cos(mθ),0) n (r)cos(mθ),0)| represents the absolute values of the positive and negative pixel parts in the real part mode, respectively, i.e., R n (r)cos(mθ)=P R + (r, θ)-P R - (r, θ); max(R) n (r)sin(mθ),0) and |min(R)sin(mθ),0) n (r)sin(mθ),0)| represents the absolute values of the positive pixel portion and the negative pixel portion in the imaginary mode, respectively, i.e., R n (r)sin(mθ)=P I + (r, θ)-P I - (r, θ).
[0079] S125. Based on the Floyd dithering algorithm, the first, second, third, and fourth grayscale modulation modes are... Binarization is performed to obtain the first, second, third, and fourth modulation modes.
[0080] S126. The nth order m-fold radial moment O of the target image f(r,θ) nm Modulation modes: first, second, third, and fourth The corresponding light intensity value is used to determine this:
[0081]
[0082] in, and These represent the first and second modulation modes, respectively. Modulated light intensity value; and These represent the third and fourth modulation modes, respectively. Modulated light intensity value.
[0083] S126. The nth order m-fold radial moment O of the target image f(r,θ) nm phase angle Represented as:
[0084]
[0085] S127. Assume the target image f(r,θ) rotates from time t1 to the radial moment O corresponding to time t2. nm The first phase angle and the second phase angle are respectively and Then the rotation angle θ0 of the target image f(r,θ) is:
[0086]
[0087] S2. Select parameters to be optimized and set the objective function: Determine the number of parameters to be optimized and set the initial value range for each parameter, and set the objective function.
[0088] S21. Determine the parameters to be optimized and set upper and lower limits:
[0089] S211, when the nth order m-fold radial moment O nm When the polynomial order n is too large, there are too many unknown parameters, and solving for the parameters using optimization algorithms is too slow. Here, we take an nth-order m-fold radial moment O. nm If the polynomial order n = 3 and the multiplicity m = 1, then the radial moment polynomial R n (r) is represented as:
[0090] R n (r)=ar 3 +br 2 +cr+d (10)
[0091] Where a, b, c, d represent the first, second, third, and fourth unknown parameters, respectively; [a, b, c, d] are the parameters to be optimized.
[0092] S212. Set the lower and upper limits of the parameters to be optimized [a,b,c,d] as LB=[-40,-40,-40,-40] and UB=[40,40,40,40].
[0093] S22. Set the optimization function:
[0094] S221. For the target image f(r,θ), rotate it in units of the first angle β° (0<β<360) and rotate it a number of times k=360 / β-1 to obtain the first rotation angle vector θ1 of the target image f(r,θ), which has a size of 1×k.
[0095] S222. Under each set of parameters to be optimized [a,b,c,d], the target image f(r,θ) is modulated using the binarized modulation mode. The radial moments of the target image f(r,θ) and the target image after k rotations are measured, and the second rotation angle vector θ2 of the target image after k rotations is obtained.
[0096] S223. The root mean square error (RMSE) between the second rotation angle vector θ2 and the first rotation angle vector θ1 is used as the optimization objective function F. The smaller the value of the optimization objective function, the better the selected parameters to be optimized. The optimization objective function F is expressed as:
[0097]
[0098] in, and Let θ1 and θ2 represent the i-th components of the first rotation angle vector θ1 and the second rotation angle vector θ2, respectively, where i is a first positive integer.
[0099] S3. Solve the single-pixel measurement model of the target image rotation angle and obtain the optimal parameters to be optimized: Use the Harris Eagle optimization algorithm to solve the single-pixel measurement model of the target image rotation angle and obtain the optimal values of the parameters to be optimized, such as... Figure 2 As shown.
[0100] S31. Initialize algorithm variables: Set the population size N and the maximum number of iterations T for the Harris Eagle optimization algorithm. The position of each Harris Eagle represents a set of values of the parameters to be optimized [a,b,c,d]. Randomly generate the positions of N Harris Eagles in the initial state.
[0101] X l (t)=r1·(UB-LB)+LB, (l=1,2,...,N) (12)
[0102] Where r1 represents a first random vector of size 1×4 with values between [0,1]; X l (t) represents the position of the l-th Harris Eagle in the t-th iteration; t is the second positive integer; l is the third positive integer.
[0103] S32. Using the objective function F as the fitness function, calculate the fitness of each Harris Eagle in the population at each iteration.
[0104] S33. Update the positions of N Harris Eagles in the population. The update phase of the Harris Eagle optimization algorithm includes an exploration phase and a development phase.
[0105] S331. Calculate the prey's escape energy E; during the chase, the prey's escape energy E decreases significantly over time, expressed as:
[0106]
[0107] Here, E0 represents the prey's initial escape energy and is a random number between (-1, 1).
[0108] The Harris Eagle optimization algorithm has two update phases: an exploration phase and a development phase. Which phase is entered depends on the prey's escape energy.
[0109] S332. If the escape energy E of the prey satisfies |E|≥1, it is the exploration stage, and step S333 is executed; otherwise, it is the development stage, and step S334 is executed.
[0110] S333. The exploration phase includes reference exploration and random exploration update methods. The probability of the reference exploration update method and the random exploration update method is the same. The update method is selected by setting a first random probability p1∈[0,1]: when the random probability p1 satisfies p1<0.5, the reference exploration update method is selected; when the random probability p1 satisfies p1≥0.5, the random exploration update method is selected, specifically:
[0111]
[0112] Where r2, r3, r4, r5 represent the second, third, fourth, and fifth random numbers between (0, 1), and are updated in each iteration; X l (t+1) represents the position of the l-th Harris Eagle in the (t+1)-th iteration; X rabbit (t) represents the position of the prey in the t-th iteration; X rand (t) represents the position of a Harris Eagle randomly selected in the t-th iteration; X m (t) represents the average position of all Harris eagles in the population during the t-th iteration, expressed as:
[0113]
[0114] S334. The development phase includes the first, second, third and fourth update methods. The selection of the update method depends on the prey's escape energy E and the escape probability p2∈[0,1]. When the escape probability p2 satisfies p2<0.5, it means that the prey can successfully escape.
[0115] S3341. When the prey's escape energy E satisfies |E|≥0.5 and the escape probability p2 satisfies p2≥0.5, select the first update method and execute step S3342; when the prey's escape energy E satisfies |E|<0.5 and the escape probability p2 satisfies p2≥0.5, select the second update method and execute step S3343; when the prey's escape energy E satisfies |E|≥0.5 and the escape probability p2 satisfies p2<0.5, select the third update method and execute step S3344; when the prey's escape energy E satisfies |E|<0.5 and the escape probability p2 satisfies p2<0.5, select the fourth update method and execute step S3345.
[0116] S3342. The first update method is the soft-surround method. At this time, the position of the Harris Eagle population is updated as follows:
[0117] X l (t+1)=(X rabbit (t)-X l (t))-E|JX rabbit (t)-X l (t)| (16)
[0118] Where J represents the intensity of the rabbit's random jumps during the escape process and changes randomly in each iteration, J = 2(1-r6); r6 is a sixth random number between (0,1).
[0119] S3343, The second update method is a hard encirclement method. In this case, the position of the Harris Eagle population is updated as follows:
[0120] X l (t+1)=X rabbit (t)-E|X rabbit (t)-X l (t)| (17).
[0121] S3344, the third update method is a gradual, rapid dive-and-surround soft encirclement approach. In this case, the Harris Eagle population's position is updated as follows:
[0122]
[0123] Where Y represents the first position iteration and is the first position iteration executed; Z represents the first rapid dive pattern and is an irregular rapid dive pattern; if the adaptation of position Y is not as good as the current position, it indicates that the prey has more deceptive movements, and the Harris Eagle also begins to execute the irregular first rapid dive pattern Z; Y and Z are respectively represented as:
[0124] Y = X rabbit (t)-E|JX rabbit (t)-X l(t)| (19)
[0125] Z=Y+S×LF(D) (20)
[0126] Where D represents the dimension of the solution to the problem, S represents a seventh random vector of size 1×D, and LF represents the Wright flight function, expressed as:
[0127]
[0128] Where u and v represent the 1×D-dimensional eighth random vectors between (0,1); β is a constant with a value of 1.5.
[0129] S3345, the fourth update method is a gradual, rapid dive-and-surround approach. In this case, the Harris Eagle population's position is updated as follows:
[0130]
[0131] Where Y' represents the second position iteration and is the first position iteration executed; Z' represents the second rapid dive mode and is an irregular rapid dive mode; Y' and Z' are respectively represented as:
[0132] Y' = X rabbit (t)-E|JX rabbit (t)-X m (t)| (23)
[0133] Z'=Y'+S×LF(D) (24).
[0134] S34. Record the optimal parameter to be optimized in each iteration and determine whether the maximum number of iterations has been reached. If t < T, return to step S33; otherwise, terminate the iteration and output the optimal parameter to be optimized.
[0135] S4. Measure the rotation angle of the target image: Based on the single-pixel measurement model of the rotation angle and the optimal parameters to be optimized, perform single-pixel detection on the target image to measure the rotation angle of the target image.
[0136] In one specific embodiment, the test target images are two grayscale images of the letter G and Angry Birds, each with a size of 128×128 pixels.
[0137] In step S2, the target image is rotated once in 20° increments, for a total of k = 17 rotations. Therefore, the first rotation angle vector of the target image is θ1 = [20°, 40°, ..., 320°, 340°]. Under each set of optimization parameters [a, b, c, d], the target image is modulated using a binarized modulation mode. The radial moments of the target image and the 17 rotated target images are measured to obtain the second rotation angle vector θ2 of these 17 target images. The root mean square error (RMSE) between the second rotation angle vector θ2 and the first rotation angle vector θ1 is used as the optimization objective function F. The smaller the value of the optimization objective function, the better the selected optimization parameters.
[0138] In step S3, the population size N = 25 and the maximum number of iterations T = 10 are set for the Harris Eagle algorithm.
[0139] like Figure 3 As shown, this is a grayscale image of Angry Birds, the test target 1 in the first embodiment of the present invention; Figure 4 and Figure 5 The figures shown are the optimal fitness value of the Harris Eagle optimization algorithm corresponding to test target 1 of the present invention and the curve of the position [a,b,c,d] of one of the Harris Eagles changing with the number of iterations; for test target 1, the optimal parameter to be optimized is (a,b,c,d)=(5.1278,34.2658,19.8181,-29.6758).
[0140] like Figure 6 As shown, this is a grayscale image of the letter G, representing test target 2 in the second embodiment of the present invention; Figure 7 and Figure 8 The figures show the optimal fitness value of the Harris Eagle optimization algorithm corresponding to test target 2 of the present invention and the curve of the position [a,b,c,d] of one of the Harris Eagles changing with the number of iterations; for test target 2, the optimal parameter to be optimized is (a,b,c,d)=(-27.851,-3.4089,10.4267,12.9931).
[0141] Two test targets, grayscale images of Angry Birds and the letter G, were rotated 359 times in 1° increments to obtain a total of 360 images, including the target image and the rotated target image. The angles of the rotated target images were measured using three methods: second-order central moment, Zernike moment, and optimal radial moment. The root mean square error (RMSE) of the angle measurements for the 359 frames was calculated.
[0142] like Figure 9 As shown, the rotation angle measurement error results of the Angry Birds (test target 1) under three methods correspond to the test target 1 in the first embodiment of the present invention; as Figure 10As shown, the rotation angle measurement error results of the test target 2 letter G under three methods are corresponding to the second embodiment of the present invention; where the dotted line is the rotation angle measurement error of the differential central moment, the dashed line is the rotation angle measurement error of the Zernike moment, and the solid line is the rotation angle measurement error of the optimal radial moment under the method proposed in the present invention.
[0143] For test target 1, the rotation angle measurement error obtained using the differential central moment is between (-20°, 0°), and the root mean square error of the angle measurement over 359 frames is 9.49; the rotation angle measurement error obtained using the Zernike moment is between (-6°, 6°), and the root mean square error of the angle measurement over 359 frames is 3.05; the rotation angle measurement error obtained using the optimal radial moment proposed in this invention is between (-2.5°, 1.5°), and the root mean square error of the angle measurement over 359 frames is 0.68.
[0144] For test target 2, the rotation angle measurement error obtained using the differential central moment is between (-2°, 4°), and the root mean square error of the angle measurement over 359 frames is 1.29; the rotation angle measurement error obtained using the Zernike moment is between (-1.5°, 3°), and the root mean square error of the angle measurement over 359 frames is 0.88; the rotation angle measurement error obtained using the optimal radial moment proposed in this invention is between (-1.5°, 1.5°), and the root mean square error of the angle measurement over 359 frames is 0.49.
[0145] In summary, the method of the present invention can quickly and accurately measure the rotation angle of a target.
[0146] This invention proposes a single-pixel measurement method for the rotation angle of a target image based on optimal radial moment. For different target images, a unique modulation mode is designed for each image, resulting in relatively small angle measurement errors caused by binarization modulation. Each frame of the target image requires only a limited number of modulations, such as four, to measure the rotation angle. A differential measurement strategy is introduced to eliminate interference from ambient light. The proposed method can quickly measure the rotation angle of the target image and improve measurement accuracy. The Harris Eagle optimization algorithm is used to find the optimal solution for the parameters to be optimized. By simulating the hunting patterns of a Harris Eagle population, a strategy combining global and local search is employed, making the search both extensive and deep, thus improving the efficiency and accuracy of finding the optimal solution for the parameters to be optimized.
[0147] Finally, it should be noted that the above embodiments are for illustration only and not for limiting the technical solutions of the present invention. Although the present invention has been described in detail with reference to the above embodiments, those skilled in the art should understand that modifications or equivalent substitutions can still be made to the present invention without departing from the spirit and scope of the present invention. Any modifications or partial substitutions should be covered within the scope of the claims of the present invention.
Claims
1. A single-pixel measurement method for the rotation angle of a target image based on optimal radial moment, characterized in that, It includes the following steps: S1. Based on the radial moment model, construct a single-pixel measurement model for the rotation angle of the target image; the radial moment model of the target image is specifically as follows: For a target image defined in polar coordinates of a unit circle its nth order m-fold radial moment is: (1); in, Let r denote the radial moment polynomial and be an nth-order polynomial in r; r denotes the polar radius. Indicates the polar angle; d represents the imaginary number; n represents the differential; m represents the polynomial order; e is the natural constant. When the target image The rotation angle is At that time, the phase angle change of its nth order m-fold radial moment is as follows: The rotation angle of the target image is calculated by the phase shift of the radial moment; Constructing a single-pixel measurement model for the rotation angle of a target image specifically includes the following steps: Set grayscale modulation mode The first, second, third, and fourth modulation modes are obtained through dithering binarization. And the target image nth order m-fold radial moment The first, second, third and fourth modulation modes Corresponding light intensity value To determine: (7); S2. Determine the parameters to be optimized and their initial value range, and set the optimization objective function; S3. Use the Harris Eagle optimization algorithm to solve for the optimal parameter values; S31. Initialize algorithm variables; set the population size N and maximum number of iterations T for the Harris Eagle optimization algorithm; S32. Using the objective function F as the fitness function, calculate the fitness of each Harris Eagle position in the population in each iteration and record the best individual. S33. Update the positions of N Harris Eagles in the population, specifically including: S331. Calculate the prey's escape energy E: (13); wherein, represents the initial escape energy of the prey; t represents the current iteration number; S332, if E satisfies S333, if E satisfies S334, if E satisfies S333, The exploration phase includes reference exploration and random exploration update methods, using random probability. Choose: S334, the development phase includes the first, second, third, and fourth update methods, using E and escape probability. Choose; S34, if If the condition is met, return to step S33; otherwise, output the optimal parameters. S4. The rotation angle of the target image is measured using a single-pixel measurement model based on optimal parameters.
2. The single-pixel measurement method for target image rotation angle based on optimal radial moment according to claim 1, characterized in that, Step S2, determining the parameters to be optimized and their initial value range, includes the following sub-steps: S211, Setting the radial moment polynomial for: (10); in, These represent the first, second, third, and fourth unknown parameters, respectively. These are the parameters to be optimized. S212, Set the parameters to be optimized The lower and upper limits are respectively and .
3. The optimal radial moment based target image rotation angle single-pixel measurement method according to claim 2, wherein, Step S2, setting the optimization objective function, specifically includes the following steps: For target image From the first perspective Rotate in units, The number of rotations is Obtain the target image First rotation angle vector Its size is In each set of parameters to be optimized Below, the target image is analyzed using the binarized modulation mode. Modulation is performed, and the target image is measured. Given the radial moments of the target image after k rotations, calculate the second rotation angle vector of the target image after k rotations. ; with the second rotation angle vector With the first rotation angle vector The root mean square error (RMSE) is used as the objective function F.
4. The single-pixel measurement method for target image rotation angle based on optimal radial moment according to claim 3, characterized in that, Step S334 specifically includes the following steps: When E satisfies and satisfy When E satisfies the condition, select the first update method; when E satisfies the condition... and satisfy When E satisfies the condition, select the second update method; and satisfy When E satisfies the condition, select the third update method; and satisfy At that time, select the fourth update method.
5. The optimal radial moment based target image rotation angle single-pixel measurement method according to claim 4, characterized in that, In step S333 when satisfy When, choose to explore and update methods; when satisfy When that happens, choose the random exploration update method.
6. The single-pixel measurement method for target image rotation angle based on optimal radial moment according to claim 5, characterized in that, In step S31, the position of each Harris Eagle represents a set of parameters to be optimized. The value of is randomly generated to determine the positions of N Harris Eagles in the initial state; (12); in, Let represent a first random vector of size 1×4 that takes values between [0,1].
7. The single-pixel measurement method for target image rotation angle based on optimal radial moment according to claim 6, characterized in that, In step S333, the probabilities of the reference exploration update method and the random exploration update method are the same; in step S334, when satisfy When this occurs, it indicates that the prey has successfully escaped.
Citation Information
Patent Citations
Color image adaptive watermarking method based on quaternion transformation
CN107274334A
A quantum particle swarm-based Video SAR interframe registration method
CN109767462A