Motion blurred image PSF parameter estimation method based on Hanning window preprocessing

By applying Hanning window preprocessing and quadratic Fourier transform on motion blur images, combined with Radon transform and vertical projection, the existing PSF estimation methods are solved in terms of accuracy and stability, and high-precision motion blur parameter estimation is achieved.

CN119762386APending Publication Date: 2025-04-04CHANGCHUN UNIV OF SCI & TECH
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411805408.6
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-12-10
Publication Date
2025-04-04

AI Technical Summary

Technical Problem

The existing PSF estimation methods have shortcomings in estimation accuracy, scope of application and algorithm stability, and it is difficult to effectively extract fuzzy information in the spectral map of the motion blur image, resulting in inaccurate estimation of motion blur parameters.

Method used

The Hanning window pretreatment method is used to process Hanning windows before Fourier transform on the motion blur image to reduce spectrum leakage problems; then perform secondary Fourier transform to reduce the bright stripe width and alleviate the influence of noise; detect the fringe direction through Radon transform and estimate the motion blur direction; finally detect the dark fringe spacing through vertical projection to estimate the motion blur scale.

Benefits of technology

It effectively improves the high-precision estimation capability of PSF parameters of motion blur image, and enhances the accuracy and reliability of estimation results.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119762386A_ABST
    Figure CN119762386A_ABST
Patent Text Reader

Abstract

The invention belongs to the technical field of image processing, and particularly relates to a motion blurred image PSF parameter estimation method based on Hanning window preprocessing, and the method comprises the following steps: S1, carrying out the Hanning window processing of a motion blurred image; s2, carrying out secondary Fourier transform on the image; s3, carrying out binaryzation on the spectrogram; s4, detecting fringe angles in the spectrogram by adopting Radon transform, and realizing motion blur direction parameter estimation; and S5, rotating once Fourier transform according to the motion blur direction to obtain a spectrogram, performing vertical projection on the image of the spectrogram to calculate a dark fringe interval, and estimating to obtain a motion blur scale parameter. The method comprises the following steps: performing Hanning window preprocessing on a motion blurred image to eliminate a cross bright line generated during Fourier transform; secondary Fourier transform is carried out, and the influence of noise and bright stripe width on angle detection is reduced; binarization processing is carried out on the spectrogram, and the influence of noise in the spectrogram on angle detection is further reduced.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The invention relates to the technical field of image processing, and in particular to a method for estimating PSF parameters of motion blurred images based on Hanning window preprocessing. Background Art

[0002] As an important medium for humans to perceive the outside world and transmit information, images play an important role in daily life and production activities. In the process of image acquisition, there are motion blur, distortion and defocus. Among them, motion blur caused by the relative movement of the shooting device and the object during the shooting process is a common image degradation process. This blur will significantly reduce the quality of the image and affect subsequent image analysis and processing tasks. In the study of motion blurred image restoration, the estimation of PSF is a key step. PSF has two important parameters: blur direction θ and blur scale L. Accurate estimation of blur direction θ and blur scale L is crucial to the restoration of motion blurred images. Existing PSF estimation methods usually rely on Fourier transform and other technologies, but they still have shortcomings in estimation accuracy, scope of application and algorithm stability. Therefore, an improved method is urgently needed to improve the PSF parameter estimation effect of motion blurred images. Summary of the invention

[0003] 1. Technical issues to be solved

[0004] In view of the shortcomings of the prior art, the present invention provides a method for estimating the PSF parameters of a motion blurred image based on Hanning window preprocessing, which overcomes the shortcomings of the existing PSF estimation technology, effectively extracts blur information in the motion blurred image spectrum, and realizes high-precision estimation of motion blur parameters. A method for estimating the PSF parameters of a motion blurred image based on Hanning window preprocessing, firstly applies a Hanning window function to the motion blurred image before Fourier transform, then performs Fourier transform on the image preprocessed by the Hanning window to obtain a spectrum, then performs a secondary Fourier transform on the image, and obtains the blur direction through Radon transform after threshold adaptive binarization of the spectrum, and finally rotates the image after the primary Fourier transform to the vertical direction according to the obtained angle, and makes a vertical projection curve to detect the blur scale.

[0005] (II) Technical solution

[0006] In order to achieve the above-mentioned purpose, the present invention specifically adopts the following technical solutions:

[0007] A method for estimating PSF parameters of motion blurred images based on Hanning window preprocessing includes the following steps:

[0008] S1, firstly, perform Hanning window processing on the motion blurred image to obtain a motion blurred image with smooth edge transition;

[0009] S2, performing Fourier transform on the image to obtain a frequency spectrum containing light and dark stripe characteristics, and then performing a second Fourier transform on the frequency spectrum to reduce the width of the bright stripes and alleviate the influence of the noise term on the stripe characteristics in the frequency spectrum;

[0010] S3, smooth the grayscale histogram of the spectrum, detect the threshold of segmenting bright stripes and noise based on gradient changes, and Figure 2 Value is converted to retain the direction information of bright stripes;

[0011] S4, using Radon transform to calculate the line integral of each angle in the above spectrum, and calculating the fringe angle of the blurred image spectrum according to the angle corresponding to the maximum value of the integral result, so as to estimate the motion blur direction parameter;

[0012] S5. According to the motion blur direction estimated above, the spectrum obtained by Fourier transform of the motion blur image preprocessed by the Hanning window is rotated in an angle so that the bright stripes are in a vertical direction. The image is vertically projected to calculate the spacing between dark stripes, and the motion blur scale is estimated.

[0013] Further, in said S1, the motion blurred image is preprocessed by Hanning window;

[0014] The windowing function method is used to eliminate the interference of the central cross bright line in the motion blurred image spectrum. The appropriate window function parameters are selected according to the input blurred image size to ensure that all image information can be processed by windowing; the form of the Hanning window in two-dimensional space is:

[0015]

[0016] Where M and N are the width and height of the motion blurred image, and x and y represent the index of the image in the width and height directions. For an image of size MxN, the above formula can be used to generate a two-dimensional Hanning window function that is consistent with the image size.

[0017] Calculate the Hanning window in the x direction: Generate a Hanning window array w of length M x , where each element is calculated as:

[0018]

[0019] Calculate the Hanning window in the y direction: Generate a Hanning window array w of length N y , where each element is calculated as:

[0020]

[0021] Generate a two-dimensional window function: Get the two-dimensional Hanning window matrix W through the outer product:

[0022] W(x,y)=wx (x)·w y (y)

[0023] The size of the obtained W matrix is ​​MxN, which is consistent with the image size. The two-dimensional Hanning window W is multiplied element by element on the input image to complete the windowing operation. The image processed in this way can effectively reduce the spectrum leakage problem during Fourier transform, and the main lobe in the spectrum diagram becomes wider, while the side lobe height decreases. This helps to improve the accuracy of the Fourier transform results and obtain more reliable frequency features in subsequent image processing steps.

[0024] Further, in S2, the motion blurred image after Hanning window preprocessing is subjected to a second Fourier transform to obtain a spectrum diagram;

[0025] In the spatial domain, the blurred image is represented as:

[0026] g(x,y)=f(x,y)*h(x,y)+n(x,y)

[0027] Where f(x,y) is the original image, g(x,y) is the blurred image, h(x,y) is the point spread function PSF of the motion blurred image, n(x,y) is the additive noise function, and the symbol “*” represents convolution;

[0028] Without noise interference, the degradation process of motion blurred image is:

[0029] g(x,y)=f(x,y)*h(x,y)

[0030] Perform Fourier transform on the above formula to get its frequency domain expression:

[0031] G(u,v)=F(u,v)H(u,v)

[0032] Where G(u,v) is the motion blurred image, F(u,v) is the original image, and H(u,v) is the point spread degradation function;

[0033] For motion blurred images, the mathematical model is:

[0034]

[0035] x0(t) and y0(t) represent the displacement of the original image along the x and y directions in time t, respectively, and T is the exposure time; so the expression of G(u,v) is:

[0036]

[0037] Assuming that the movement distance of the image along the x and y directions during the exposure time is a and b respectively, the expression of the point spread function of motion blur in the frequency domain is:

[0038]

[0039] Assuming the image size is MxN, discretize the above formula to get:

[0040]

[0041] when When is a non-zero integer, |H(u,v)|=0 corresponds to G(u,v)=0, so there are light and dark stripes in the spectrum of the motion blurred image, and the stripe equation satisfies:

[0042]

[0043] The slope of the stripes is The motion blur directions are:

[0044]

[0045] When the image size M = N, the stripe direction and the motion blur direction are perpendicular to each other;

[0046] The Fourier transform of the motion blurred image after Hanning window preprocessing is completed to obtain a spectrum diagram containing light and dark stripe features. The above operation is repeated on the spectrum diagram for a second Fourier transform. The spectrum diagram is further processed to refine the stripe information, making the originally blurred stripes clearer and reducing the influence of the width of the bright stripes in the image on the angle detection. For images with the same width and height, the stripes in the spectrum diagram obtained by the second Fourier transform are perpendicular to the stripes in the spectrum diagram obtained by the first Fourier transform, which is consistent with the direction of motion blur.

[0047] Furthermore, in S3, the spectrum obtained by the second Fourier transform is Figure 2 Value, eliminate noise, and retain stripes;

[0048] Calculate the grayscale histogram of the spectrum image, use a smoothing window of size 13 to perform moving smoothing to obtain a smooth curve; in the smoothed histogram, there is a peak representing medium-brightness noise, and on the right side of the peak are high-brightness stripes representing blurred direction information. From the peak value to the right, traverse to find the turning point where the gradient changes to 30 and tends to be flat. The grayscale value corresponding to this point is the required threshold; select this threshold to adjust the spectrum Figure 2 The value processing eliminates noise and makes the spectrum Figure 2 After valuating, the points with grayscale values ​​lower than the threshold are set to 0, and those higher than the threshold are set to 255; this can not only filter out most of the noise, but also enhance the bright stripes and enhance the contrast.

[0049] Furthermore, in S4, the binarized spectrum image is subjected to Radon transformation to detect the stripe direction and estimate the motion blur direction;

[0050] Radon transform is used to detect the angle of the image obtained by binarization. Radon transform is an integral transform. Line integral is performed on the image along any straight line on the plane, and the direction of the line is determined by the integral result. The Radon transform in two-dimensional space is expressed as:

[0051] R(ρ, θ)=∫∫f(x, y)δ(ρ-xcosθ-ysinθ)dxdy

[0052] Where ρ represents the distance from the origin to the integral line, θ represents the inclination of the integral line, δ is the unit impulse function, and the integral result represents the projection of f(x,y) in the direction of the specified line;

[0053] According to the properties of Radon transform, the angle corresponding to the maximum value of the calculated result is perpendicular to the direction of the bright stripes. According to the properties of Fourier transform, the stripe direction in the Fourier transform result of the spectrum graph is perpendicular to the stripe direction in the spectrum graph, thus obtaining the stripe angle and motion blur direction θ of the motion blurred image spectrum graph.

[0054] Further, in S5, according to the motion blur direction rotation spectrum estimated in S4, a vertical projection is performed to calculate the dark fringe spacing and estimate the motion blur scale;

[0055] The spectrum image obtained by the first Fourier transform in S2 is rotated clockwise by the blurring angle θ to make the stripes vertical, and the spectrum image projection curve is obtained by vertical projection. The peaks in the middle of the curve are projections of bright stripes, and the troughs are projections of dark stripes. The width of the bright stripes in the center is twice that of other bright stripes, so the spacing of the dark stripes on both sides of the middle bright stripes is 2d, and the spacing of other adjacent dark stripes is d. The dark stripe spacing d value is detected in the vertical projection curve, specifically: the horizontal coordinates corresponding to the two adjacent trough points on both sides of the central peak of the vertical projection curve are detected, and they are marked as d1, d2, d3 and d4 from left to right, and the d value is calculated as follows:

[0056]

[0057] Calculate the motion blur scale L as:

[0058]

[0059] (III) Beneficial effects

[0060] Compared with the prior art, the present invention provides a method for estimating PSF parameters of motion blurred images based on Hanning window preprocessing, which has the following beneficial effects:

[0061] The present invention performs spectrum analysis on motion blurred images to obtain the correlation between spectrum features and point spread function parameters; performs Hanning window preprocessing on the motion blurred images to eliminate the bright cross lines generated during Fourier transform; performs secondary Fourier transform to reduce the influence of noise and bright stripe width on angle detection; performs binarization on the spectrum to further reduce the influence of noise on angle detection; uses Radon transform to perform angle detection on the spectrum image to estimate the motion blur direction; rotates the Fourier transform spectrum once according to the blur direction, detects the dark stripe spacing through vertical projection, and estimates the motion blur scale. The present invention effectively improves the accuracy of motion blur PSF parameter estimation. BRIEF DESCRIPTION OF THE DRAWINGS

[0062] Figure 1 It is a flow chart of PSF parameter estimation of the present invention;

[0063] Figure 2 The motion blurred image of Lena of the present invention;

[0064] Figure 3 For the present invention Figure 2 Image after Hanning window processing;

[0065] Figure 4 For the present invention Figure 3 Fourier transform spectrum diagram;

[0066] Figure 5 For the present invention Figure 4 Fourier transform spectrum diagram;

[0067] Figure 6 For the present invention Figure 5 Grayscale histogram of ;

[0068] Figure 7 For the present invention Figure 6 The image after smoothing;

[0069] Figure 8 For the present invention Figure 5 Image after binarization processing;

[0070] Fig. 9 For the present invention Figure 8 Radon transform extreme value curve graph;

[0071] Fig.10 For the present invention Figure 4 Rotation blur direction angle;

[0072] Fig.11 For the present invention Fig.10 Vertical projection graph. DETAILED DESCRIPTION

[0073] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only 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 ordinary technicians in this field without creative work are within the scope of protection of the present invention.

[0074] Example

[0075] like Figure 2-11 As shown, a motion blurred image PSF parameter estimation method based on Hanning window preprocessing proposed in an embodiment of the present invention selects a Lena image with a size of 256×256, manually adds a blur scale of 20 pixels and a blur angle of 45° to form a motion blurred image, such as Figure 2 As shown. PSF parameter estimation specifically includes the following steps:

[0076] S1. Yes Figure 2 The motion blurred image is preprocessed with Hanning window to obtain a motion blurred image with smooth edge transition. Figure 3 As shown in the figure, the interference of the central cross bright line in the motion blurred image spectrum is eliminated by the windowing function method to ensure that all image information can be processed by windowing. The form of the Hanning window in two-dimensional space is:

[0077]

[0078] Where M and N are the width and height of the motion blurred image, and x and y represent the index of the image in the width and height directions; a two-dimensional Hanning window function consistent with the image size is generated, and the two-dimensional Hanning window W is multiplied element by element on the input image to complete the windowing operation; the image processed in this way can effectively reduce the spectrum leakage problem during Fourier transform, the main lobe in the spectrum diagram becomes wider, and the side lobe height is reduced, which helps to improve the accuracy of the Fourier transform result and obtain more reliable frequency characteristics in the subsequent image processing steps;

[0079] S2, yes Figure 3 Perform a Fourier transform to obtain a spectrum image containing light and dark stripes. Figure 4 As shown, Figure 4 Repeat the above operation to perform the second Fourier transform, and we get Figure 5 ,The stripe information is refined, making the originally blurred stripes clearer and reducing the influence of the width of bright stripes in the image on angle detection;

[0080] Without noise interference, the degradation process of motion blurred image is:

[0081] g(x,y)=f(x,y)*h(x,y)

[0082] Among them, g(x,y) is the blurred image, which is Figure 3 , f(x,y) is the original image, h(x,y) is the point spread function PSF of the motion blurred image, and the symbol “*” represents convolution;

[0083] For a two-dimensional image g(x,y), its Fourier transform is defined as:

[0084]

[0085] Among them, g(x,y) is the original image function, x and y are spatial coordinates, G(u,v) is the frequency domain representation of the image, u and v are the corresponding frequency domain coordinates, M and N are the width and height of the image respectively, and j is the imaginary unit;

[0086] For blurred images Figure 3 Perform Fourier transform to blur the image Figure 3 The amplitude spectrum is converted from the spatial domain to the frequency domain; the spectrum is centered to move the zero-frequency component (DC component) to the center of the spectrum; finally, the centered spectrum is converted into a logarithmic amplitude spectrum to obtain the spectrum Figure 4 ,The logarithmic magnitude spectrum is obtained by taking the logarithm of the absolute value of the spectrogram, which helps to extend the dynamic range and make the details in the spectrogram more visible;

[0087] Spectrum Figure 4 The fringe slope is The motion blur directions are:

[0088]

[0089] When the image size M = N, the stripe direction and the motion blur direction are perpendicular to each other;

[0090] Then the spectrum Figure 4 Repeat the above operation to get the spectrum Figure 5 , spectrum Figure 5 Medium fringe direction and spectrum Figure 4 The stripes are perpendicular to the motion blurred image. Figure 3 and Figure 2 The fuzzy direction is consistent;

[0091] S3. Find the spectrum image Figure 5 The grayscale histogram of Figure 6 As shown in the figure, a smoothing window of size 13 is used to smooth its movement, and a smooth curve is obtained as shown in the figure. Figure 7As shown in the figure. There is a peak in the smoothed histogram, which indicates the noise of medium brightness. On the right side of the peak is a high brightness stripe, which indicates the blurred direction information. From the peak value to the right, we can find the turning point where the gradient changes to 30 and becomes flat. The gray value corresponding to this point is the required threshold. The threshold value is 207, and this threshold is selected for the spectrum. Figure 2 The value processing eliminates noise and makes the spectrum Figure 2 After the binarization, the grayscale values ​​below the threshold are set to 0, and those above the threshold are set to 255. The image after binarization is as follows: Figure 8 As shown. This can not only filter out most of the noise, but also enhance the bright fringes and enhance the contrast;

[0092] S4. Yes Figure 8 Perform Radon transform to get the extreme value curve diagram as follows Fig. 9 As shown, the horizontal coordinate where the extreme value is located is detected and the direction of motion blur is estimated.

[0093] The Radon transform in two-dimensional space is expressed as:

[0094] R(ρ, θ)=∫∫f(x, y)δ(ρ-xcosθ-ysinθ)dxdy

[0095] Where ρ represents the distance from the origin to the integral line, θ represents the inclination of the integral line, δ is the unit impulse function, and the integral result represents the projection of f(x,y) in the direction of the specified line;

[0096] Spectrum Figure 8 Perform Radon transformation from 0 to 180° to obtain matrix R. Each column of matrix R represents the projection value of the image in that direction at a specific angle, reflecting the linear characteristics of the image content at that angle. The maximum value of each column represents the projection value of the most prominent straight line feature in that direction. The maximum values ​​of each column are combined to form an extreme value curve graph as shown in Fig. 9 As shown, the horizontal coordinate of the maximum value on the detection extreme value curve is 135°, which is Figure 8 The direction of the middle stripe is 45°, so the estimated motion blur direction is 45°;

[0097] When the Radon transform detects a straight line, it will return the projection angle perpendicular to this oblique line, because the projection value at this angle is the largest. For the Radon transform of the spectrum graph, the column corresponding to the global maximum value in the entire matrix R is a specific angle, which reflects the direction of the most prominent straight line in the spectrum graph. This shows that in this direction, the straight line feature in the image, that is, the bright stripes, is most obvious. The direction angle of the bright stripes in the spectrum graph is detected by Radon transform, and the direction of the motion blur can be obtained by combining the spectral feature that the direction of the stripes is perpendicular to the direction of motion blur;

[0098] S5. Spectrum Figure 4 Rotate the estimated blur direction angle in S4 by 45° clockwise to make the stripes vertical, and we get Fig.10 , and make a vertical projection to get the vertical projection curve graph as shown in Fig.11 Vertical projection curve Fig.11 The peaks in the middle are projections of bright stripes, the troughs are projections of dark stripes, the spacing between the dark stripes on both sides of the middle bright stripe is 2d, and the spacing between other adjacent dark stripes is d. Fig.11 The horizontal coordinates of the two adjacent trough points on both sides of the central peak are marked as d1=328, d2=345, d3=379 and d4=396 from left to right. The calculated d value is:

[0099]

[0100] Calculate the motion blur scale L as:

[0101]

[0102] Finally, it should be noted that the above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art can still modify the technical solutions described in the aforementioned embodiments or replace some of the technical features therein by equivalents. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present invention shall be included in the protection scope of the present invention.

Claims

1. A method for estimating PSF parameters of motion blurred images based on Hanning window preprocessing, characterized in that: The following steps are included: S1, firstly, perform Hanning window processing on the motion blurred image to obtain a motion blurred image with smooth edge transition; S2, performing Fourier transform on the image to obtain a frequency spectrum containing light and dark stripe characteristics, and then performing a second Fourier transform on the frequency spectrum to reduce the width of the bright stripes and alleviate the influence of the noise term on the stripe characteristics in the frequency spectrum; S3, smoothing the grayscale histogram of the spectrum, detecting the threshold for segmenting bright stripes and noise based on gradient changes, binarizing the spectrum, and retaining the direction information of the bright stripes; S4, using Radon transform to calculate the line integral of each angle in the above spectrum, and calculating the fringe angle of the blurred image spectrum according to the angle corresponding to the maximum value of the integral result, so as to estimate the motion blur direction parameter; S5. According to the motion blur direction estimated above, the spectrum obtained by Fourier transform of the motion blur image preprocessed by the Hanning window is rotated in an angle so that the bright stripes are in a vertical direction. The image is vertically projected to calculate the spacing between dark stripes, and the motion blur scale is estimated.

2. The method for estimating PSF parameters of motion blurred images based on Hanning window preprocessing according to claim 1, characterized in that: In S1, the motion blurred image is preprocessed with a Hanning window; The windowing function method is used to eliminate the interference of the central cross bright line in the motion blurred image spectrum. The appropriate window function parameters are selected according to the input blurred image size to ensure that all image information can be processed by windowing; the form of the Hanning window in two-dimensional space is: Where M and N are the width and height of the motion blurred image, and x and y represent the index of the image in the width and height directions. For an image of size MxN, the above formula can be used to generate a two-dimensional Hanning window function that is consistent with the image size. Calculate the Hanning window in the x direction: Generate a Hanning window array w of length M x , where each element is calculated as: Calculate the Hanning window in the y direction: Generate a Hanning window array w of length N y , where each element is calculated as: Generate a two-dimensional window function: Get the two-dimensional Hanning window matrix W through the outer product: W(x,y)=w x (x)·w y (y) The size of the obtained W matrix is ​​MxN, which is consistent with the image size. The two-dimensional Hanning window W is multiplied element by element on the input image to complete the windowing operation. The image processed in this way can effectively reduce the spectrum leakage problem during Fourier transform, and the main lobe in the spectrum diagram becomes wider, while the side lobe height decreases. This helps to improve the accuracy of the Fourier transform results and obtain more reliable frequency features in subsequent image processing steps.

3. The method for estimating PSF parameters of motion blurred images based on Hanning window preprocessing according to claim 1, characterized in that: In S2, the motion blurred image preprocessed by the Hanning window is subjected to a second Fourier transform to obtain a spectrum diagram; In the spatial domain, the blurred image is represented as: g(x,y)=f(x,y)*h(x,y)+n(x,y) Where f(x,y) is the original image, g(x,y) is the blurred image, h(x,y) is the point spread function PSF of the motion blurred image, n(x,y) is the additive noise function, and the symbol "*" represents convolution; Without noise interference, the degradation process of motion blurred image is: g(x,y)=f(x,y)*h(x,y) Perform Fourier transform on the above formula to get its frequency domain expression: G(u,v)=F(u,v)H(u,v) Where G(u,v) is the motion blurred image, F(u,v) is the original image, and H(u,v) is the point spread degradation function; For motion blurred images, the mathematical model is: x0(t) and y0(t) represent the displacement of the original image along the x and y directions in time t, respectively, and T is the exposure time; so the expression of G(u,v) is: Assuming that the movement distance of the image along the x and y directions during the exposure time is a and b respectively, the expression of the point spread function of motion blur in the frequency domain is: Assuming the image size is MxN, discretize the above formula to get: when When is a non-zero integer, |H(u,v)|=0 corresponds to G(u,v)=0, so there are light and dark stripes in the spectrum of the motion blurred image, and the stripe equation satisfies: The slope of the fringe is The motion blur directions are: When the image size M = N, the stripe direction and the motion blur direction are perpendicular to each other; The Fourier transform of the motion blurred image after Hanning window preprocessing is completed to obtain a spectrum diagram containing light and dark stripe features. The above operation is repeated on the spectrum diagram for a second Fourier transform. The spectrum diagram is further processed to refine the stripe information, making the originally blurred stripes clearer and reducing the influence of the width of the bright stripes in the image on the angle detection. For images with the same width and height, the stripes in the spectrum diagram obtained by the second Fourier transform are perpendicular to the stripes in the spectrum diagram obtained by the first Fourier transform, which is consistent with the direction of motion blur.

4. The method for estimating PSF parameters of motion blurred images based on Hanning window preprocessing according to claim 1, characterized in that: In S3, the spectrum obtained by the quadratic Fourier transform is binarized to eliminate noise and retain stripes; The grayscale histogram of the spectrum image is calculated, and a smoothing window of size 13 is used to perform moving smoothing to obtain a smooth curve; in the smoothed histogram, there is a peak representing medium-brightness noise, and on the right side of the peak are high-brightness stripes representing blurred direction information. From the peak value of the peak to the right, find a turning point where the gradient change is 30 and tends to be flat. The grayscale value corresponding to this point is the required threshold; select this threshold to binarize the spectrum image to eliminate noise, so that after the spectrum image is binarized, the points with grayscale values ​​lower than the threshold are set to 0, and those higher than the threshold are set to 255; this can not only filter most of the noise, but also enhance the contrast of bright stripes.

5. The method for estimating PSF parameters of motion blurred images based on Hanning window preprocessing according to claim 1, characterized in that: In S4, the binarized spectrum image is subjected to Radon transformation to detect the stripe direction and estimate the motion blur direction; Radon transform is used to detect the angle of the image obtained by binarization. Radon transform is an integral transform. Line integral is performed on the image along any straight line on the plane, and the direction of the line is determined by the integral result. The Radon transform in two-dimensional space is expressed as: R(ρ, θ)=∫∫f(x, y)δ(ρ-x cosθ-y sinθ)dxdy Where ρ represents the distance from the origin to the integral line, θ represents the inclination of the integral line, δ is the unit impulse function, and the integral result represents the projection of f(x,y) in the direction of the specified line; According to the properties of Radon transform, the angle corresponding to the maximum value of the calculated result is perpendicular to the direction of the bright stripes. According to the properties of Fourier transform, the stripe direction in the Fourier transform result of the spectrum graph is perpendicular to the stripe direction in the spectrum graph, thus obtaining the stripe angle and motion blur direction θ of the motion blurred image spectrum graph.

6. The method for estimating PSF parameters of motion blurred images based on Hanning window preprocessing according to claim 1, characterized in that: In S5, according to the motion blur direction rotation spectrum estimated in S4, a vertical projection is performed to calculate the dark fringe spacing and estimate the motion blur scale; The spectrum image obtained by the first Fourier transform in S2 is rotated clockwise by the blurring angle θ to make the stripes vertical, and the spectrum image projection curve is obtained by vertical projection. The peaks in the middle of the curve are projections of bright stripes, and the troughs are projections of dark stripes. The width of the bright stripes in the center is twice that of other bright stripes, so the spacing of the dark stripes on both sides of the middle bright stripes is 2d, and the spacing of other adjacent dark stripes is d. The dark stripe spacing d value is detected in the vertical projection curve, specifically: the horizontal coordinates corresponding to the two adjacent trough points on both sides of the central peak of the vertical projection curve are detected, and they are marked as d1, d2, d3 and d4 from left to right, and the d value is calculated as follows: Calculate the motion blur scale L as: