A digital image tilt prediction and correction method based on improved sparrow algorithm

By improving the Sparrow algorithm, combining cubic chaos mapping and nonlinear inertial weights, and optimizing the recognition of tilt angles, the problem of accuracy decline caused by tilt in digital image recognition is solved, and more efficient and accurate image recognition is achieved.

CN118333912BActive Publication Date: 2025-01-24SHAANXI AONISI ELECTRONIC TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202410463860.2
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-04-17
Publication Date
2025-01-24
Estimated Expiration
2044-04-17

AI Technical Summary

Technical Problem

During the digital image recognition process, the recognition accuracy is reduced due to the digital tilt, and the rotation correction efficiency of the prior art is low and difficult to control, making it impossible to achieve the optimal image recognition state.

Method used

Adopting the improvement of the sparrow algorithm, by adjusting the accuracy of the inclined angle, the ratio of the ratio of height change to width changes is used as the basis for adjustment, combined with cube chaotic mapping, non -linear inertia weights, and mutant factors to optimize the optimal tilt angle and rotate images.

Benefits of technology

Improved the recognition efficiency and recognition accuracy of digital images, avoiding the problem of images after rotating, and satisfying the best image adjustment position.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118333912B_ABST
    Figure CN118333912B_ABST
Patent Text Reader

Abstract

The present invention discloses a digital image tilt prediction and correction method based on an improved sparrow algorithm. The angle of adjustment is predicted to make the irregularly distributed tilted digital image reach an optimal position. Because the digital image has the characteristics of narrow and irregular shape, in order to increase the accuracy of adjusting the tilt angle, the ratio of the height change ratio to the width change ratio is used as the basis for adjusting the tilt angle. The ratio reaches the optimal value, thereby satisfying the optimal adjustment angle. The present invention improves the sparrow search algorithm, uses cubic chaos mapping to initialize the sparrow population, increases the diversity and randomness of the initial population of the algorithm; introduces nonlinear inertia weights to improve the global optimization ability; adds mutation factors to enable the algorithm to have the ability to jump out of the local optimum, optimizes the aspect ratio and predicts the optimal tilt angle through the improved algorithm, takes the root mean square error of the true value and the predicted value of the tilt angle as the fitness function, and optimizes the algorithm to find the optimal correction angle.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The invention relates to the field of image legends, and in particular to a digital image tilt prediction and correction method based on an improved sparrow algorithm. Technical Background

[0002] With the development of information technology, computer vision technology has been widely used in life. Image recognition and processing technology, as a key part of it, has been widely used in the fields of medicine, transportation, and finance. In this process, the recognition and processing of digital images has played a positive role in the digital development of various fields and the coordination of intelligent data information, and has promoted the construction of urban informatization.

[0003] However, in the process of digital image recognition, due to illegible handwriting, incorrect collection methods, and environmental factors, the numbers may be tilted, making them difficult to recognize, affecting the accuracy of digital recognition and bringing inconvenience to data processing. In the actual process of correcting tilted digital images, most people choose to directly solve the above problems through simple rotation transformation. On the one hand, the efficiency is low when processing more abnormal digital images; on the other hand, it is difficult to control the adjustment angle, and it is impossible to achieve the best image recognition state, affecting the accuracy of digital image recognition. Conventional image correction optimization algorithms may have problems of high complexity and poor real-time performance in the actual application recognition process, and cannot meet the needs of fast and efficient digital image recognition. Summary of the invention

[0004] Purpose of the invention: In view of the problems existing in the prior art, the present invention provides a digital image tilt prediction and correction method based on an improved sparrow algorithm. The method adjusts the accuracy of the tilt angle and further improves the ratio of the height change ratio to the width change ratio as the basis for adjusting the tilt angle, so that the image tilt is close to a limit value, thereby satisfying the optimal digital image adjustment position; the sparrow algorithm that has been improved by cubic chaos mapping optimization, introduction of nonlinear inertia weights, and addition of new mutation factors is used to optimize and find the optimal ratio of the width-to-height change ratio, and then predict the optimal tilt angle and rotate the image, so as to achieve the purpose of optimizing the tilted digital image and improving recognition efficiency and recognition accuracy.

[0005] Technical solution: The present invention discloses a digital image tilt prediction and correction method based on an improved sparrow algorithm, the method comprising the following steps:

[0006] S1: Setting the maximum tilt adjustment angle of the initial active bitmap to be corrected. The active bitmap is rotated within the tilt adjustment angle value range [-45°, +45°] with the tilt angle of 45° being set as the adjustment reference at the origin;

[0007] S2: Extract the pixel points (x i ,yi ), the image tilt angle is estimated as the true value based on the binary search, and the pixel point (x j ,y j ), calculate the ratio η of the height change ratio to the width change ratio of the image pixel points, and use the estimated tilt angle β and the ratio η as initial parameters to perform optimization calculation;

[0008] To calculate the ratio of the height to the width of a pixel, the formula for the ratio of the pixel (x, y) after the active bitmap is rotated is:

[0009]

[0010] The ratio of the change in y to the change in x is:

[0011]

[0012] That is, when the parameter η reaches the optimal value, the required rotation angle β is also the optimal value, and β determines λ x ,λ y To avoid digital misalignment of the image after rotation due to excessive height and small width, the image rotation adjustment position is optimal at this time.

[0013] S3: Determine the image tilt direction, use the improved sparrow search algorithm to optimize the parameter η and predict the digital adjustment angle β:

[0014] S3.1: Initialize all relevant parameters of the algorithm, including the population size n of sparrows, the maximum number of iterations T, the ratio of discoverers and joiners in the population, and the warning threshold;

[0015] S3.2: Define the fitness function, take the root mean square error between the true value and the predicted value of the rotation angle as the fitness function, use the chaos method to initialize the sparrow population, select the better individuals as the initial population, and the number of individuals in the population corresponds to the parameter η and the adjustment angle β respectively;

[0016] S3.3: Update the individual positions of the population as the selection of the required parameter η, then input the required corrected digital samples and calculate the fitness value of the individual;

[0017] S3.4: Introduce nonlinear inertia weights into the sparrow algorithm, iteratively update the individual positions, and add mutation factors during the iteration process to find the global optimal individual. The judgment condition is whether the maximum number of iterations has been reached. If yes, record the optimal individual, otherwise return to S3.4;

[0018] S4: The tilted digits are rotated and adjusted by outputting the optimal parameter η and adjusting the angle β to achieve the best adjustment position.

[0019] Furthermore, S1 specifies that clockwise adjustment is positive and counterclockwise adjustment is negative, and the active bitmap is rotated according to the tilt angle.

[0020] Furthermore, the chaos algorithm for initializing the sparrow population in S3.2 is cubic chaos mapping optimization, which further increases the diversity and randomness of the initial population of the algorithm. The cubic chaos mapping formula is:

[0021]

[0022] -1 <y i′ <1,y i′ ≠0,i'=0,1,…,N

[0023]

[0024] Among them, x i′ is the individual sparrow after mapping, y i′ is the i-th mapping value, X fmin and X fmax Corresponding to the lower and upper bounds in the solution space, the specific process of initializing the sparrow population by cubic chaotic mapping is as follows: randomly generate a d-dimensional vector in [-1, 1] as the initial individual, then substitute it into formula (1) to iterate each dimension to generate N-1 new individuals, and then substitute it into formula (2) to map the variable values ​​generated by the cubic mapping onto the sparrow individuals.

[0025] Furthermore, the sparrow algorithm described in S3.4 introduces a nonlinear inertia weight ω to control the search range and convergence speed, reducing the dependence of the discoverer on the position in the early iteration to improve the global optimization ability; in the later iteration, the dependence on the individual's own position is increased to speed up the convergence speed. The calculation formula of the non-inertia weight is as follows:

[0026]

[0027] Among them, t represents the current number of iterations; T represents the maximum number of iterations; σ represents the random perturbation coefficient; randn() represents the normal distribution random value.

[0028] Furthermore, the sparrow algorithm adds a mutation factor λ, so that when the algorithm falls into a local optimum, it can randomly jump out of the local search through a certain oscillation frequency, thereby improving the flexibility of the algorithm. The formula of the mutation factor is:

[0029]

[0030] Among them, γ is the adjustment coefficient, γ∈(0,1]. When the population of the joiner is within n / 2, the sparrow individuals closest to the discoverer will move towards the discoverer, while the sparrows farther away will not approach. They will search by themselves within the warning range. By adding the mutation factor λ, the sparrows farther away will not compete with the sparrows closer for food sources, thus jumping out of the local search and conducting a global search.

[0031] Furthermore, the position update strategy of the sentinel in the improved sparrow algorithm is simplified to speed up the convergence of the algorithm and avoid local optimal solutions. The simplified sentinel position update formula is:

[0032]

[0033] in represents the current global optimal position, represents the current global worst position, β is the step size control parameter, which is a random number that follows a normal distribution with a mean of 0 and a variance of 1, K∈[-1,1] is a random number, f i is the fitness value of the current sparrow individual, f g is the current global optimal fitness value.

[0034] Furthermore, the fitness function described in S3.2 is the root mean square error between the true value and the predicted value of the rotation angle, and the formula is:

[0035]

[0036] Where F(x i ) is the true value, f(x i ) is the predicted value, and N is the number of samples.

[0037] Beneficial effects:

[0038] 1. The present invention uses the ratio of the height change ratio to the width change ratio as the basis for adjusting the tilt angle, optimizes and predicts the optimal adjustment angle β through the sparrow algorithm, improves the accuracy of the adjustment angle, and avoids the situation where the image is out of adjustment due to the excessive height and small width of the rotated image.

[0039] 2. The present invention initializes the individuals of the sparrow algorithm population through cubic chaos mapping, thereby enhancing the diversity and ergodicity of the initialized population.

[0040] 3. In the iterative process of optimizing the width-to-height change ratio by the sparrow algorithm, the present invention introduces a nonlinear weight factor to improve the population finder position update formula and accelerate the algorithm convergence speed.

[0041] 4. The present invention uses the root mean square error between the true value and the predicted value of the rotation angle as the fitness function, calculates the prediction error between the predicted rotation angle and the actual rotation angle, and calculates the number of predicted values ​​within the acceptable error limit of the actual angle. The optimal adjustment position is predicted and the rotation formula is used for rotation correction.

[0042] 5. The present invention improves and simplifies the sparrow algorithm by adding participants and updating the position of the sentinels, and introduces mutation factors to dynamically adjust the sparrow positions, so that the algorithm has the ability to jump out of the local optimum, traverse the entire search space, further improve the accuracy of optimizing the aspect ratio, and output more accurate prediction results. BRIEF DESCRIPTION OF THE DRAWINGS

[0043] Figure 1 It is a schematic diagram of the algorithm flow;

[0044] Figure 2 This is a schematic diagram of pixel rotation;

[0045] Figure 3 This is a comparison chart of digital images before and after correction; DETAILED DESCRIPTION

[0046] In order to make the purpose, technical solution and advantages of the embodiments of the present invention clearer, the technical solution in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative work are within the scope of protection of the present invention.

[0047] This embodiment first stipulates:

[0048] When a point in the image rotates clockwise, the angle is positive, and when it rotates counterclockwise, the angle is negative. The rotation center is set at the lower left corner of the image, which is (0, 0). For any given pixel point (x 0 ,y 0 )(This point is not a background point), the clockwise and counterclockwise rotations around the rotation center are as follows Figure 2 As shown in the figure, (x 1 ,y 1 ),(x 2 ,y 2 ) respectively represent (x 0 ,y 0 ) The point reached after rotating a certain angle clockwise or counterclockwise. (The pixel image is rotated, and the background image size is scaled proportionally)

[0049] The original position of the image pixel before rotation is (x 0 ,y0 ), r is the distance from the coordinate origin to the pixel point. x 0 = r cos α, y 0 =r sinα.

[0050] The position after rotating clockwise by angle β is (x 1 ,y 1 ):

[0051] x 1 =rcos(α-β)=r(cosαcosβ+sinαsinβ)=x 0 cosβ+y 0 sinβ

[0052] y 1 =rsin(α-β)=r(sinαcosβ-sinβcosα)=y 0 cosβ-x 0 sinβ

[0053] The position after rotating counterclockwise by angle γ is (x 2 ,y 2 ):

[0054] x 2 =rcos(α+γ)=r(cosαcosγ-sinαsinγ)=x 0 cosγ-y 0 sinγ

[0055] y 2 =rsin(α+γ)=r(sinαcosγ+sinγcosα)=x 0 sinγ+y 0 cosγ

[0056] like Figure 1 A digital image tilt prediction and correction method based on an improved sparrow algorithm is shown, characterized in that it includes the following steps:

[0057] S1: Set the maximum tilt adjustment angle β. The value range of β is [-45°, +45°]. It is specified that clockwise adjustment is positive and counterclockwise adjustment is negative. The active bitmap is rotated according to the tilt angle.

[0058] To avoid digital image distortion and to balance visual comfort and image integrity, the β value will not exceed 45 degrees.

[0059] S2: Get the pixel points (x i ,y i), estimate the image tilt angle based on binary search, and calculate the pixel point (x) of the rotated active bitmap based on the estimated tilt angle j ,y j ), and then the ratio η of the height change ratio to the width change ratio of the image pixel point is obtained. The estimated tilt angle β and the ratio η are used as initial parameters for optimization calculation.

[0060] To calculate the ratio of the height to the width of a pixel, the ratio of the pixel x, y) after rotating the active bitmap by an angle of β is calculated as follows:

[0061]

[0062] The condition is met when the ratio of the change ratio of y to the change ratio of x reaches the optimal value.

[0063]

[0064] That is, when η reaches the optimum, the predicted adjustment angle β required for rotation is optimal, and the adjustment position is optimal.

[0065] S3: According to the coordinate origin, an adjustment reference with a tilt angle of 45° is set, and an improved sparrow search algorithm is used to optimize the parameter η and predict the digital tilt angle β.

[0066] The sparrow algorithm is optimized by using cube chaos mapping, introducing nonlinear inertia weight, and adding new mutation factor optimization, so that the algorithm has better optimization effect.

[0067] The sparrow algorithm is optimized by cubic chaos mapping to further increase the diversity and randomness of the initial population of the algorithm. The cubic chaos mapping formula is:

[0068]

[0069] -1 <y i′ <1,y i′ ≠0,i'=0,1,…,N

[0070]

[0071] Among them, x i′ is the individual sparrow after mapping, y i′ is the i-th mapping value, X fmin and X fmax Corresponding to the lower and upper bounds in the solution space, the specific process of initializing the sparrow population by cubic chaotic mapping is as follows: randomly generate a d-dimensional vector in [-1, 1] as the initial individual, then substitute it into formula (4) to iterate each dimension to generate N-1 new individuals, and then substitute it into formula (5) to map the variable values ​​generated by the cubic mapping onto the sparrow individuals.

[0072] The sparrow algorithm introduces a nonlinear inertia weight ω to control the search range and convergence speed. In the early iteration, the dependence of the discoverer on the position is reduced to improve the global optimization ability; in the later iteration, the dependence on the individual's own position is increased to speed up the convergence speed. The calculation formula of the inertia weight is as follows:

[0073]

[0074] Among them, t represents the current number of iterations; T represents the maximum number of iterations; σ represents the random perturbation coefficient; randn() represents the normal distribution random value.

[0075] The sparrow algorithm adds a mutation factor λ, so that when the algorithm falls into a local optimum, it can randomly jump out of the local search through a certain oscillation frequency, thereby improving the flexibility of the algorithm. The formula of the mutation factor is:

[0076]

[0077] Among them, γ is the adjustment coefficient, γ∈(0,1]. When the population number of the joiner is within n / 2, the sparrow individuals closest to the discoverer will move towards the discoverer, while the sparrows farther away will not approach. They will search by themselves within the warning range. The mutation factor λ is added to prevent these sparrows farther away from competing for food sources with the sparrows closer, so that they can jump out of the local search and conduct a global search.

[0078] The position update strategy of the alert in the algorithm is simplified as follows: when on the edge of the warning, both the discoverer and the joiner must move to the safe area, and the sparrows in the safe area move randomly between the best position and the worst position. The formula at this time is:

[0079]

[0080] in represents the current global optimal position, represents the current global worst position, β is the step size control parameter, which is a random number that follows a normal distribution with a mean of 0 and a variance of 1, K∈[-1,1] is a random number, f i is the fitness value of the current sparrow individual, f g is the current global optimal fitness value.

[0081] The following are the test comparison steps of the improved sparrow algorithm and the standard sparrow algorithm:

[0082] Step 1: Select the test function: The search range of the test function is [-10,10], and the optimal theoretical value is 0.

[0083] Step 2: Determine the population size as N=30, the number of iterations T=1000, the number of discoverers PD=20%, the number of alerters SD=10%, and the safety threshold ST=0.8.

[0084] Step 3: Input the selected test function into the standard sparrow search algorithm and record the output of the best individual of each generation.

[0085] Step 4: Input the selected test function into the improved sparrow search algorithm and record the output of the best individual of each generation.

[0086] Step 5: Compare the two optimal individual values ​​and draw conclusions. The results are shown in Table 1.

[0087] Table 1 Comparison of algorithm before and after optimization

[0088]

[0089] According to the data analysis in Table 1, the optimized sparrow search algorithm has better optimization effect than the standard sparrow algorithm.

[0090] S4: Output the optimized optimal theoretical value and assign it to the parameter η and the adjustment angle β, and use the rotation formula to correct the pixels in the image, as shown below:

[0091]

[0092] The pixels of the image are transformed according to the rotation formula, and the tilted numbers are also rotating. The change ratio of x and y changes with the rotation angle β, which determines λ x ,λ y to prevent the rotated image from being too high and too small in width, causing image imbalance.

[0093] The root mean square error between the true value and the predicted value of the rotation angle is used as the fitness function, the prediction error between the predicted rotation angle and the actual rotation angle is calculated, the number of predicted values ​​within the acceptable error limit of the actual angle is calculated, and the root mean square error is used to measure the difference between the predicted rotation angle and the actual rotation angle.

[0094] S5: Correct the tilted digits according to the best predicted rotation result found by the algorithm, so that the image reaches the best position.

[0095] The improved sparrow algorithm steps include:

[0096] Step 1: Initialize all relevant parameters of the algorithm, including the population size n of sparrows, the maximum number of iterations T, the ratio of discoverers and joiners in the population, and the warning threshold.

[0097] Step 2: Define the fitness function, and use the minimization of the mean square error between the true value and the predicted value of the rotation angle as the fitness function. Initialize the sparrow population through cubic chaos mapping, and select the better individuals as the initial population. The number of individuals in the population corresponds to the parameter η and the adjustment angle β.

[0098] Step 3: Update the individual positions of the population as the selection of the required parameters, and then input the required corrected digital samples to calculate the fitness value of the individuals.

[0099] Step 4: Iterate and update the individual positions through the improved sparrow search algorithm to find the global optimal individual, and then determine whether the conditions have reached the termination condition of the maximum number of iterations, record the optimal individual, otherwise return to Step 3.

[0100] Step 5: Adjust the tilted digits by outputting the optimal parameter η and adjusting the angle β to achieve the best adjustment position.

[0101] The handwritten numbers 0-9 were adjusted and corrected using this method. The experimental data are shown in Table 2:

[0102] Table 2

[0103]

[0104]

[0105] The experimental results are as follows Figure 3 As shown in the figure, after the tilt correction, the shape of the handwritten digits has not changed, and the tilted digits have returned to normal. The contours of the digits after correction will be a little dim, but this will not affect the recognition results of the classifier. Because after the correction process, refinement (i.e. skeleton extraction) is required. Since the refinement work is not the subject of this article, it will not be explained in detail.

[0106] The above embodiments are only for illustrating the technical concept and features of the present invention, and their purpose is to enable people familiar with the technology to understand the content of the present invention and implement it accordingly, and they cannot be used to limit the protection scope of the present invention. Any equivalent transformation or modification made according to the spirit of the present invention should be included in the protection scope of the present invention.

Claims

1. A digital image tilt prediction and correction method based on an improved sparrow algorithm, characterized in that: The method comprises the following steps: S1: Setting the maximum tilt adjustment angle of the initial active bitmap to be corrected. The active bitmap is rotated within the tilt adjustment angle value range [-45°, +45°] with the tilt angle of 45° being set as the adjustment reference at the origin; S2: Extract the pixel points (x i ,y i ), the image tilt angle is estimated as the true value based on the binary search, and the pixel point (x j ,y j ), calculate the ratio η of the height change ratio to the width change ratio of the image pixel points, and use the estimated tilt angle β and the ratio η as initial parameters to perform optimization calculation; To calculate the ratio of the height to the width of a pixel, the formula for the ratio of the pixel (x, y) after the active bitmap is rotated is: The ratio of the change in y to the change in x is: That is, when the parameter η reaches the optimal value, the required rotation angle β is also the optimal value, and β determines λ x ,λ y To avoid the image being out of alignment after rotation due to the image being too high and too small in width, the image is rotated to the best position at this time. S3: Determine the image tilt direction, use the improved sparrow search algorithm to optimize the parameter η and predict the digital adjustment angle β: S3.1: Initialize all relevant parameters of the algorithm, including the population size n of sparrows, the maximum number of iterations T, the ratio of discoverers and joiners in the population, and the warning threshold; S3.2: Define the fitness function, take the root mean square error between the true value and the predicted value of the rotation angle as the fitness function, use the chaos method to initialize the sparrow population, select the better individuals as the initial population, and the number of individuals in the population corresponds to the parameter η and the adjustment angle β respectively; S3.3: Update the individual positions of the population as the selection of the required parameter η, then input the required corrected digital samples and calculate the fitness value of the individual; S3.4: Introduce nonlinear inertia weights into the sparrow algorithm, iteratively update the individual positions, and add mutation factors during the iteration process to find the global optimal individual. The judgment condition is whether the maximum number of iterations has been reached. If yes, record the optimal individual, otherwise return to S3.4; S4: The tilted digits are rotated and adjusted by outputting the optimal parameter η and adjusting the angle β to achieve the best adjustment position.

2. The digital image tilt prediction and correction method based on the improved sparrow algorithm according to claim 1 is characterized in that: S1 stipulates that clockwise adjustment is positive and counterclockwise adjustment is negative, and the active bitmap is rotated according to the tilt angle.

3. The digital image tilt prediction and correction method based on the improved sparrow algorithm according to claim 1 is characterized in that: The chaos algorithm for initializing the sparrow population in S3.2 is cubic chaos mapping optimization, which further increases the diversity and randomness of the algorithm's initial population. The cubic chaos mapping formula is: -1<y i′ <1,y i′ ≠0,i′=0,1,…,N Among them, x i′ is the individual sparrow after mapping, y i′ is the i-th mapping value, X fmin and X fmax Corresponding to the lower and upper bounds in the solution space, the specific process of initializing the sparrow population by cubic chaotic mapping is as follows: randomly generate a d-dimensional vector in [-1, 1] as the initial individual, then substitute it into formula (1) to iterate each dimension to generate N-1 new individuals, and then substitute it into formula (2) to map the variable values ​​generated by the cubic mapping onto the sparrow individuals.

4. The digital image tilt prediction and correction method based on the improved sparrow algorithm according to claim 1 is characterized in that: The sparrow algorithm described in S3.4 introduces a nonlinear inertia weight ω to control the search range and convergence speed. In the early stage of iteration, the dependence of the discoverer on the position is reduced to improve the global optimization ability; in the later stage of iteration, the dependence on the individual's own position is increased to speed up the convergence speed. The calculation formula of the non-inertia weight is as follows: Where, t represents the current number of iterations; T represents the maximum number of iterations; σ represents the random perturbation coefficient; randn() represents normally distributed random values.

5. The digital image tilt prediction and correction method based on the improved sparrow algorithm according to claim 1 is characterized in that: The sparrow algorithm adds a mutation factor λ, so that when the algorithm falls into a local optimum, it can randomly jump out of the local search through a certain oscillation frequency, thereby improving the flexibility of the algorithm. The formula of the mutation factor is: Among them, γ is the adjustment coefficient, γ∈(0,1]. When the population of the joiner is within n / 2, the sparrow individuals closest to the discoverer will move towards the discoverer, while the sparrows farther away will not approach. They will search by themselves within the warning range. By adding the mutation factor λ, the sparrows farther away will not compete with the sparrows closer for food sources, thus jumping out of the local search and conducting a global search.

6. A digital image tilt prediction and correction method based on an improved sparrow algorithm according to any one of claims 3 to 5, characterized in that: The position update strategy of the sentinel in the improved sparrow algorithm is simplified to speed up the convergence of the algorithm and avoid local optimal solutions. The simplified position update formula of the sentinel is: in represents the current global optimal position, represents the current global worst position, β is the step size control parameter, which is a random number that follows a normal distribution with a mean of 0 and a variance of 1, K∈[-1,1] is a random number, f i is the fitness value of the current sparrow individual, f g is the current global optimal fitness value.

7. The digital image tilt prediction and correction method based on the improved sparrow algorithm according to claim 1 is characterized in that: The fitness function described in S3.2 is the root mean square error between the true value and the predicted value of the rotation angle, and the formula is: Where F(x i ) is the true value, f(x i ) is the predicted value, and N is the number of samples.

Citation Information

Patent Citations

  • A license plate recognition method based on a particle swarm optimization neural network

    CN109359656A

  • Train ticket number identification method and algorithm based on improved neural network

    CN114170603A