Image blurring correction method and device, electronic equipment and medium
Through the Gaussian-Kruger projection model and bilinear interpolation method, the blurred image is corrected, which solves the problem of limited image blur correction effect in the prior art, and achieves more efficient image clarity and visual quality.
Patent Information
- Application Number
- CN202510342963.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-03-21
- Publication Date
- 2025-06-27
- Estimated Expiration
- 2045-03-21
AI Technical Summary
The prior art has limited effects in image blur correction, and cannot effectively ensure the clarity and visual quality of the image.
The blurred image is projected through the Gaussian-Kruger projection model, the conversion coordinates are compared with the projected coordinates, and if they are inconsistent, they are resampled. The image is optimized using bilinear interpolation method, and the image is corrected by deteriorating the analysis of pixel points and adjusting the signal.
It improves the accuracy and effect of image blur correction, and improves the clarity and visual perception of the image.
Smart Images

Figure CN120219235A_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the technical field of image processing, and particularly relates to an image blur correction method, device, electronic device and medium. Background Art
[0002] Image blur is a common problem, which may be caused by various factors such as lens shake, motion blur, defocus, etc. These factors will lead to the loss of image details, affecting the clarity and visual quality of the image. Traditional image blur correction methods usually rely on complex algorithms and a large amount of computing resources, and the effect is limited. Therefore, a more efficient and accurate image blur correction method is needed to improve the image quality and user experience.
[0003] A Chinese patent application with the publication number CN110660034A discloses an image correction method, device and electronic device, including: The present invention provides an image correction method, device and electronic device, relating to the technical field of image processing. The method includes: obtaining an image to be corrected and device parameters of the acquisition device of the image to be corrected; detecting a target object in the image to be corrected to obtain object information; the object information includes the size and / or position of the target object in the image to be corrected; and performing correction processing on the image to be corrected according to the object information and the device parameters.
[0004] However, in the above-mentioned prior art, by detecting the acquisition and recognition parameters of the image to be corrected and the objects in the image, but lacking the analysis of the image to be corrected itself and the image pixels, the correction effect and visual perception of the image cannot be guaranteed.
[0005] Therefore, the present invention provides an image blur correction method, device, electronic device and medium. Summary of the Invention
[0006] In order to make up for the deficiencies of the prior art and solve at least one technical problem proposed in the background art.
[0007] The technical solution adopted by the present invention to solve its technical problems is: obtaining a blurred image, uniformly selecting a plurality of pixel points within the image range to ensure that all regions are covered, and establishing a Gauss-Kruger projection model; Based on the Gauss-Kruger projection model, taking the WGS84 standard ellipsoid model as a reference to obtain auxiliary parameters, and calculating the coordinate transformation formula of the Gauss-Kruger projection based on the auxiliary parameters to obtain the abscissa and ordinate in the plane rectangular coordinate system; Based on the Gauss-Krüger projection coordinate transformation relationship, convert the pixel points into the coordinates of the plane rectangular coordinate system, and mark the coordinates of the converted pixel points as the conversion coordinates. Based on the comparison relationship between the conversion coordinates and the projection coordinates, if the conversion coordinates and the projection coordinates are inconsistent in the same plane rectangular coordinate system, resample the image to generate a sampling signal; Based on the sampling signal, resample the image using the bilinear interpolation method to obtain a sampled image. Calculate the difference between the pixel values of the sampled image pixel points and the pixel values of the corresponding pixel points in the original image to obtain the sampled pixel difference. Compare the sampled pixel difference with the sampled pixel difference threshold. If the sampled pixel difference is greater than the sampled pixel difference threshold, mark this pixel point as a deteriorated pixel point. Based on the deteriorated pixel points, obtain the deterioration quantity ratio and the deterioration degree ratio, and obtain the deterioration performance value based on the deterioration quantity ratio and the deterioration degree ratio; Based on the adjustment signal, establish a fitting curve for the conversion coordinates and the projection coordinates, obtain the error data, and adjust the deteriorated coordinates according to the error data; As a further technical solution of the present invention: mark the deterioration quantity ratio as SL and the deterioration degree ratio as CD; Through the formula Calculate the deterioration performance value BX, where s1 and s2 are preset proportionality coefficients; As a further technical solution of the present invention: the method for obtaining the deterioration quantity ratio is as follows: Compare all optimized pixel values with the original pixel values; If the optimized pixel value is greater than or equal to the original pixel value, mark this pixel point as an improved pixel point; If the optimized pixel value is less than the original pixel value, mark this pixel point as a deteriorated pixel point; Count the number of deteriorated pixel points, calculate the ratio of the number of deteriorated pixel points to the total number of pixel points to obtain the deterioration quantity ratio; As a further technical solution of the present invention: the method for obtaining the deterioration degree ratio is as follows: Sum up all the deteriorated pixel values and take the average value to calculate the average deteriorated pixel value; Calculate the difference between the average deteriorated pixel value and the deteriorated pixel value, and take the absolute value to process and obtain the deteriorated pixel deviation value; Calculate the difference between the deteriorated pixel deviation value and the average deteriorated pixel value and take the absolute value to process and obtain the average deviation value of the deteriorated pixel; Sum up all the original pixel values and take the average value to process and obtain the average original pixel value; Calculate the ratio of the average deviation value of the deteriorated pixel to the average original pixel value to process and obtain the deterioration degree ratio; As a further technical solution of the present invention: the proportion of the number of curves in the coincidence stage is SV, and the proportion of the remaining area is marked as IP; Through the formula The error characterization value is calculated, where a1 and a2 are both preset proportionality coefficients; As a further technical solution of the present invention: the method for obtaining the proportion of the number of curves in the coincidence stage is: The straight line where the abscissa of the coordinate system is located is divided into several sub-stages, and the number of curves in the coincidence stage is measured. Among them, the meaning of the curves in the coincidence stage is: the overlapping stage curves among the two curves of the transformed coordinate fitting curve and the projected coordinate fitting curve; The ratio of the number of curves in the coincidence stage to the number of all stage curves is calculated, and the proportion of the number of curves in the coincidence stage is obtained through processing; As a further technical solution of the present invention: the method for obtaining the proportion of the remaining area is: The two end points on both sides of the two curves are extended to the X-axis to obtain the figure enclosed by the curves and the X-axis; The areas of the figures enclosed by the two curves and the X-axis and the area of the overlapping part of the two curves are calculated respectively by mathematical methods, and the overlapping area of the curves, the area of the transformed coordinate curve and the area of the projected coordinate curve are obtained through processing; The difference between the area of the transformed coordinate curve and the overlapping area of the curves is calculated and the absolute value is taken to obtain the remaining area after transformation; The difference between the area of the projected coordinate curve and the overlapping area of the curves is calculated and the absolute value is taken to obtain the remaining area after projection; The remaining area after transformation and the remaining area after projection are summed up to obtain the remaining area; The ratio of the total remaining area to the area of the projected coordinate curve is calculated to obtain the proportion of the remaining area; As a further technical solution of the present invention: an image blur correction device, including: Coordinate acquisition module: Based on the blurred image, the image is projected onto the standard map, and evenly distributed pixel points covering the entire image are selected on the image to establish a Gauss-Kruger projection model; Model establishment module: Based on the Gauss-Kruger projection model, auxiliary parameters are obtained based on the WGS84 standard ellipsoid model, and the coordinate transformation formula of the Gauss-Kruger projection is calculated based on the auxiliary parameters to obtain the abscissa and ordinate in the plane rectangular coordinate system; Signal acquisition module: Based on the Gauss-Krüger projection coordinate transformation relationship, convert pixel points into coordinates in a plane rectangular coordinate system, and mark the coordinates converted from pixel points as conversion coordinates. Based on the comparison relationship between the conversion coordinates and the projection coordinates, if the conversion coordinates and the projection coordinates are inconsistent in the same plane rectangular coordinate system, resample the image to generate a sampling signal; Sampling signal analysis module: Based on the sampling signal, resample the image using the bilinear interpolation method to obtain a sampled image. Calculate the difference between the pixel values of the pixel points in the sampled image and the pixel values of the corresponding pixel points in the original image to obtain the sampled pixel difference. Compare the sampled pixel difference with the sampled pixel difference threshold. If the sampled pixel difference is greater than the sampled pixel difference threshold, mark this pixel point as a deteriorated pixel point. Based on the deteriorated pixel points, obtain the proportion of deteriorated quantity and the proportion of deteriorated degree. Based on the proportion of deteriorated quantity and the proportion of deteriorated degree, obtain the deteriorated performance value; Image adjustment module: Based on the adjustment signal, establish a fitting curve between the conversion coordinates and the projection coordinates, obtain error data, and adjust the deteriorated coordinates according to the error data; An electronic device includes a processor, a communication interface, a memory, and a communication bus. Among them, the processor, the communication interface, and the memory complete communication with each other through the communication bus; The memory is used to store computer programs; A computer-readable storage medium stores a computer program therein. When the computer program is executed by a processor, the above method steps are implemented.
[0008] The beneficial effects of the present invention are as follows: 1. Through the Gauss-Krüger projection model, project the blurred image, so that the blurred image is corrected in the form of coordinates, which is beneficial to improving the accuracy of the image blur correction technology; 2. Based on the sampling signal, resample the image using the bilinear interpolation method to obtain an optimized image. Compare the optimized pixel value with the original pixel value. If the optimized pixel value is less than the original pixel value, mark this pixel point as a deteriorated pixel point. Based on the deteriorated pixel points, obtain the proportion of deteriorated quantity and the proportion of deteriorated degree. Based on the proportion of deteriorated quantity and the proportion of deteriorated degree, obtain the deteriorated performance value. Compare the deteriorated performance value with the threshold to obtain an adjustment signal. Based on the adjustment signal, establish a fitting curve between the conversion coordinates and the projection coordinates, obtain error data, and adjust the deteriorated coordinates according to the error data. The present invention processes the deteriorated pixel values and corrects the blurred image through coordinate transformation, effectively ensuring the correction effect of the blurred image and improving the image perception. Description of the Drawings
[0009] The present invention will be further described below with reference to the accompanying drawings.
[0010] Figure 1 is the flowchart of the steps of Embodiment 1 of the present invention; Figure 2 is the flowchart of the steps of Embodiment 2 of the present invention; Figure 3 is the device flowchart of Embodiment 3 of the present invention; Figure 4 is the electronic device diagram of Embodiment 4 of the present invention. Detailed implementation manners
[0011] In order to make the technical means, creative features, achieved purposes and functions of the present invention easy to understand, the present invention will be further described below in conjunction with specific implementation manners.
[0012] Embodiment 1 As Figure 1 shown, the image blurring correction method described in the embodiment of the present invention includes: Step 1: Obtain a blurred image, uniformly select multiple pixel points within the image range to ensure coverage of all regions, and establish a Gauss-Kruger projection model; Through geographic information system data, accurate maps and reliable geographic information sources, obtain the GPS coordinates and terrain features of all pixel points, establish a Gauss-Kruger projection model, and mark the positions of the pixel points in the coordinate system of the Gauss-Kruger projection; Among them, the acquisition of terrain features is for facilitating the establishment of the Gauss-Kruger projection model; Step 2: Based on the Gauss-Kruger projection model, obtain auxiliary parameters with the WGS84 standard ellipsoid model as the reference, and calculate the coordinate transformation formula of the Gauss-Kruger projection to obtain the abscissa and ordinate in the plane rectangular coordinate system; Among them, the auxiliary parameters include the radius of curvature of the prime vertical, the meridian arc length, and the value of the meridian arc length on the central meridian; Mark the radius of curvature of the prime vertical as N, the meridian arc length as M, and the distance of the meridian arc length from the central meridian as M0; Among them, the radius of curvature of the prime vertical N is the radius of curvature of the prime vertical (i.e., the circle perpendicular to the latitude circle at a certain point on the earth ellipsoid), and the meridian arc length M is the length of the meridian from the equator of the ellipsoid to the latitude B of a certain point; Calculate the radius of curvature of the prime vertical N through the formula where a represents the semi-major axis, f represents the flattening, and B represents the latitude of the point; It should be noted that the semi-major axis a and the flattening f are obtained from the standard ellipsoid model WGS84; Calculate through the formula The meridian arc length M is calculated, where m0, m2, m4, m6,... are coefficients related to the ellipsoid parameters. These coefficients can be calculated from the semi-major axis a and flattening f of the ellipsoid. B represents the latitude of the point, and these coefficients are known based on common ellipsoids such as the WGS84 ellipsoid; In the WGS84 standard ellipsoid model, the value of the meridian arc length on the central meridian is a known constant; Through the formula The value of the abscissa in the plane rectangular coordinate system is calculated; Through the formula The value of the ordinate in the plane rectangular coordinate system is calculated; Where X and Y represent the abscissa and ordinate in the plane rectangular coordinate system respectively, k0 is the scale factor, usually taken as 1; B and L are the latitude and longitude of the point respectively, and L0 is the longitude of the central meridian; Step 3: Based on the Gauss-Krüger projection coordinate transformation relationship, convert the pixel points into coordinates in the plane rectangular coordinate system, and mark the coordinates of the converted pixel points as the transformed coordinates. Based on the comparison relationship between the transformed coordinates and the projection coordinates, if the transformed coordinates and the projection coordinates are inconsistent in the same plane rectangular coordinate system, resample the image to generate a sampling signal; It should be noted that the meaning represented by the projection coordinates is: the coordinates of the pixel points projected on the plane rectangular coordinate system; If the image is a rectangle, and its lower left corner is the coordinate origin (0, 0), with the right direction as the positive x-axis and the upward direction as the positive y-axis; The image is usually stored in the form of a two-dimensional matrix in the computer. Here, we use the two-dimensional matrix to solve the coordinates of the transformed pixel points; For any pixel point, mark it as the m-th row and the n-th column in the two-dimensional matrix, that is, the position of the pixel point in the two-dimensional matrix is ; The abscissa of the pixel point in the coordinate system is the abscissa of the pixel point in the two-dimensional matrix, that is: The ordinate of the pixel point in the coordinate system is the abscissa of the pixel point in the two-dimensional matrix, that is: The transformed coordinates of all pixel points are compared with the projection coordinates ; If the transformed coordinates of the pixel point and the projection coordinates are consistent in the same plane rectangular coordinate system, no processing is done; If the transformed coordinates of the pixel point and the projection coordinates are inconsistent in the same plane rectangular coordinate system, resample the image to generate a sampling signal; It should be noted that the meaning of image resampling is as follows: to improve the resolution of the image, so that there is more pixel information in the blurred image during correction, which helps to improve the quality of the final image; The technical solution of the embodiment of the present invention is: through the Gauss-Kruger projection model, project the blurred image, so that the blurred image is corrected in the form of coordinates, which is beneficial to improving the accuracy of the image blur correction technology.
[0013] Embodiment 2 As Figure 2 shown, based on Embodiment 1, an image blur correction method described in an embodiment of the present invention includes: Step 4: Based on the sampling signal, resample the image using the bilinear interpolation method to obtain a sampled image. Calculate the difference between the pixel value of the pixel point in the sampled image and the pixel value of the corresponding pixel point in the original image to obtain a sampled pixel difference. Compare the sampled pixel difference with the sampled pixel difference threshold. If the sampled pixel difference is greater than the sampled pixel difference threshold, mark the pixel point as a deteriorated pixel point. Based on the deteriorated pixel points, obtain the deterioration quantity ratio and the deterioration degree ratio, and obtain a deterioration performance value based on the deterioration quantity ratio and the deterioration degree ratio; In some embodiments, the pixel value of the pixel point in the sampled image is calculated by bilinear interpolation, and the difference is calculated between it and the pixel value of the same pixel point in the original image, and the absolute value is taken to obtain the sampled pixel difference of the pixel point; Compare the sampled pixel difference with the sampled pixel difference threshold; If the sampled pixel difference is greater than the sampled pixel difference threshold, mark the pixel point as a deteriorated pixel point; If the sampled pixel difference is less than or equal to the sampled pixel difference threshold, mark the pixel point as an improved pixel point; Based on the deteriorated pixel points, count the number of deteriorated pixel points, calculate the ratio of the number of deteriorated pixel points to the total number of pixel points, and obtain the deterioration pixel quantity ratio; Sum all the sampled pixel differences and take the average to obtain the sampled pixel average difference; Sum the sampled pixel differences of the deteriorated pixel points to obtain the deteriorated pixel average difference; Perform a ratio process on the deteriorated pixel average difference and the sampled pixel average difference to obtain the deterioration pixel degree ratio; Mark the deterioration quantity ratio as SL and the deterioration degree ratio as CD; Through the formula calculate to obtain the deterioration performance value BX, where s1 and s2 are preset proportionality coefficients; Compare the deterioration pixel performance value BX with the deterioration pixel performance threshold; If the deterioration pixel performance value BX is less than or equal to the deterioration pixel performance threshold, no processing is performed; If the deterioration pixel performance value BX is greater than the deterioration pixel performance threshold, an adjustment signal is generated; Step Five: Based on the adjustment signal, establish a fitting curve of the conversion coordinates and the projection coordinates, obtain error data, and adjust the deteriorated coordinates according to the error data; It should be noted that the error data includes the proportion of the remaining area and the proportion of the number of overlapping stage curves; Among them, the meaning of the deteriorated coordinates is: the coordinates converted by the deteriorated pixel points; In some embodiments, the conversion coordinates and the projection coordinates are marked on the same coordinate system, and the marked points are connected to obtain a fitting curve of the conversion coordinates and the projection coordinates; The straight line where the abscissa of the coordinate system is located is divided into several sub-stages, and the number of overlapping stage curves is measured. Among them, the meaning of the overlapping stage curve is: the overlapping stage curve among the two curves of the conversion coordinate fitting curve and the projection coordinate fitting curve; Calculate the ratio of the number of overlapping stage curves to the number of all stage curves, and process to obtain the proportion of the number of overlapping stage curves; Extend the two end points of the two curves to the X-axis to obtain the figure enclosed by the curves and the X-axis; By mathematical methods, calculate the areas of the figures enclosed by the two curves and the X-axis and the area of the overlapping part of the two curves respectively, and process to obtain the overlapping area of the curves, the area of the conversion coordinate curve, and the area of the projection coordinate curve; Calculate the difference between the area of the conversion coordinate curve and the overlapping area of the curves, and take the absolute value to process and obtain the remaining area of the conversion; Calculate the difference between the area of the projection coordinate curve and the overlapping area of the curves, and take the absolute value to process and obtain the remaining area of the projection; Calculate the sum of the remaining area of the conversion and the remaining area of the projection to process and obtain the remaining area; Calculate the ratio of the total remaining area to the area of the projection coordinate curve to process and obtain the proportion of the remaining area; Mark the proportion of the number of overlapping stage curves as SV, and mark the proportion of the remaining area as IP; Through the formula Calculate the error characterization value, where a1 and a2 are both preset proportionality coefficients; Compare the error characterization value with the error characterization threshold; If the error characterization value is greater than or equal to the error characterization threshold, it indicates that the reason for the blurred image is related to the improper conversion of the conversion coordinates, and correct it according to the projection coordinates to make the blurred image clear; If the error characterization value is less than the error characterization threshold, it indicates that the reason for the blurred image has nothing to do with the conversion coordinates; The technical solution of the embodiment of the present invention is as follows: Based on the sampling signal, bilinear interpolation is used to resample the image to obtain an optimized image. The original pixel values are compared based on the optimized pixel values. If the optimized pixel value is less than the original pixel value, this pixel point is marked as a deteriorated pixel point. Based on the deteriorated pixel points, the proportion of the number of deteriorations and the proportion of the degree of deterioration are obtained. Based on the proportion of the number of deteriorations and the proportion of the degree of deterioration, a deterioration performance value is obtained. The deterioration performance value is compared with a threshold to obtain an adjustment signal. Based on the adjustment signal, a fitting curve of the transformation coordinates and the projection coordinates is established, error data is obtained, and the deteriorated coordinates are adjusted according to the error data. By processing the deteriorated pixel values and correcting the blurred image through coordinate transformation, the present invention effectively ensures the correction effect of the blurred image and improves the image perception.
[0014] Example 3 Please refer to Figure 3 As shown, the present invention is an image blur correction device, including: Model establishment module: Obtain a blurred image, uniformly select multiple pixel points within the image range to ensure coverage of all regions, and establish a Gauss-Kruger projection model; Coordinate acquisition module: Based on the Gauss-Kruger projection model, auxiliary parameters are obtained based on the WGS84 standard ellipsoid model, and the coordinate transformation formula of the Gauss-Kruger projection is calculated based on the auxiliary parameters to obtain the abscissa and ordinate in the plane rectangular coordinate system; Signal acquisition module: Based on the Gauss-Kruger projection coordinate transformation relationship, the pixel points are converted into coordinates in the plane rectangular coordinate system, and the coordinates of the converted pixel points are marked as transformation coordinates. Based on the comparison relationship between the transformation coordinates and the projection coordinates, if the transformation coordinates and the projection coordinates are inconsistent in the same plane rectangular coordinate system, the image is resampled to generate a sampling signal; Sampling signal analysis module: Based on the sampling signal, bilinear interpolation is used to resample the image to obtain a sampled image. The pixel values of the pixel points of the sampled image are subtracted from the pixel values of the corresponding pixel points in the original image to obtain a sampling pixel difference. The sampling pixel difference is compared with a sampling pixel difference threshold. If the sampling pixel difference is greater than the sampling pixel difference threshold, this pixel point is marked as a deteriorated pixel point. Based on the deteriorated pixel points, the proportion of the number of deteriorations and the proportion of the degree of deterioration are obtained. Based on the proportion of the number of deteriorations and the proportion of the degree of deterioration, a deterioration performance value is obtained; Image adjustment module: Based on the adjustment signal, a fitting curve of the transformation coordinates and the projection coordinates is established, error data is obtained, and the deteriorated coordinates are adjusted according to the error data.
[0015] Example 4 Please refer to Figure 4As shown in the figure, the present invention is an electronic device, including: a processor 301, a communication interface 302, a memory 303, and a communication bus 304. Among them, the processor 301, the communication interface 302, and the memory 303 complete communication with each other through the communication bus 304; The memory 303 is used to store computer programs; When the processor 301 is used to execute the program stored on the memory 303, the following steps are implemented: Step 1: Obtain a blurred image, uniformly select multiple pixel points within the image range to ensure that all areas are covered, and establish a Gauss-Kruger projection model; Step 2: Based on the Gauss-Kruger projection model, obtain auxiliary parameters with the WGS84 standard ellipsoid model as the reference, and calculate the coordinate transformation formula of the Gauss-Kruger projection based on the auxiliary parameters to obtain the abscissa and ordinate in the plane rectangular coordinate system; Step 3: Based on the Gauss-Kruger projection coordinate transformation relationship, convert the pixel points into the coordinates of the plane rectangular coordinate system, and mark the coordinates of the converted pixel points as the conversion coordinates. Based on the comparison relationship between the conversion coordinates and the projection coordinates, if the conversion coordinates and the projection coordinates are inconsistent on the same plane rectangular coordinate system, resample the image to generate a sampling signal; Step 4: Based on the sampling signal, resample the image using the bilinear interpolation method to obtain a sampled image. Calculate the difference between the pixel values of the pixel points in the sampled image and the pixel values of the corresponding pixel points in the original image to obtain the sampling pixel difference. Compare the sampling pixel difference with the sampling pixel difference threshold. If the sampling pixel difference is greater than the sampling pixel difference threshold, mark the pixel point as a deteriorated pixel point. Based on the deteriorated pixel points, obtain the proportion of the deteriorated quantity and the proportion of the deteriorated degree. Based on the proportion of the deteriorated quantity and the proportion of the deteriorated degree, obtain the deteriorated performance value; Step 5: Based on the adjustment signal, establish a fitting curve between the conversion coordinates and the projection coordinates, obtain error data, and adjust the deteriorated coordinates according to the error data; The communication bus mentioned in the above electronic device can be a Peripheral Component Interconnect (PCI) bus or an Extended Industry Standard Architecture (EISA) bus, etc. This communication bus can be divided into an address bus, a data bus, a control bus, etc. For the convenience of representation, only a thick line is used in the figure, but it does not mean that there is only one bus or one type of bus.
[0016] The communication interface is used for communication between the above electronic device and other devices.
[0017] The memory may include a Random Access Memory (RAM), or may also include a Non-Volatile Memory (NVM), such as at least one disk memory. Optionally, the memory may also be at least one storage device located away from the aforementioned processor.
[0018] The aforementioned processor may be a general-purpose processor, including a Central Processing Unit (CPU), a Network Processor (NP), etc.; it may also be a Digital Signal Processor (DSP), an Application Specific Integrated Circuit (ASIC), a Field-Programmable Gate Array (FPGA), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components.
[0019] In another embodiment provided by the present invention, a medium is further provided, in which a computer program is stored, and when the computer program is executed by a processor, the steps of the above calculation method are implemented.
[0020] The above shows and describes the basic principles, main features and advantages of the present invention. Those skilled in the art should understand that the present invention is not limited by the above embodiments. What is described in the above embodiments and the specification only illustrates the principles of the present invention. Without departing from the spirit and scope of the present invention, the present invention will have various changes and improvements, and these changes and improvements all fall within the scope of the present invention claimed. The scope of protection claimed by the present invention is defined by the appended claims and their equivalents.
Claims
1. An image blur correction method, characterized in that: include: Obtain a blurred image, evenly select multiple pixels within the image range to ensure that all areas are covered, and establish a Gauss-Krüger projection model; Based on the Gauss-Krüger projection model, the auxiliary parameters are obtained based on the WGS84 standard ellipsoid model, and the coordinate transformation formula of the Gauss-Krüger projection is calculated based on the auxiliary parameters to obtain the abscissa and ordinate in the plane rectangular coordinate system; Based on the Gauss-Krüger projection coordinate transformation relationship, the pixel points are transformed into coordinates of a plane rectangular coordinate system, and the coordinates of the pixel point transformation are marked as transformation coordinates. Based on the comparison relationship between the transformation coordinates and the projection coordinates, if the transformation coordinates and the projection coordinates are inconsistent in the same plane rectangular coordinate system, the image is resampled to generate a sampling signal; Based on the sampling signal, the image is resampled by using a bilinear interpolation method to obtain a sampled image, the pixel value of the sampled image pixel is calculated to be different from the pixel value of the corresponding pixel in the original image to obtain a sampled pixel difference, the sampled pixel difference is compared with a sampled pixel difference threshold, if the sampled pixel difference is greater than the sampled pixel difference threshold, the pixel is marked as a deteriorated pixel, based on the deteriorated pixel, the deterioration number ratio and the deterioration degree ratio are obtained, and the deterioration performance value is obtained based on the deterioration number ratio and the deterioration degree ratio; Based on the adjustment signal, a conversion coordinate and a projection coordinate fitting curve are established, error data is obtained, and the deteriorated coordinate is adjusted according to the error data.
2. The image blur correction method according to claim 1, characterized in that: The percentage of deterioration quantity is marked as SL, and the percentage of deterioration degree is marked as CD; By formula The deterioration performance value BX is calculated, where s1 and s2 are preset proportional coefficients.
3. The image blur correction method according to claim 2, characterized in that: The method for obtaining the ratio of the deterioration quantity is as follows: Compare all optimized pixel values with the original pixel values; If the optimized pixel value is greater than or equal to the original pixel value, the pixel point is marked as an improved pixel point; If the optimized pixel value is less than the original pixel value, the pixel is marked as a deteriorated pixel; The number of deteriorated pixels is counted, and the ratio of the number of deteriorated pixels to the total number of pixels is calculated to obtain the percentage of deteriorated pixels.
4. The image blur correction method according to claim 2, characterized in that: The method for obtaining the deterioration ratio is as follows: All degraded pixel values are summed up and averaged to obtain the degraded pixel mean; The degraded pixel mean and the degraded pixel value are subtracted and the absolute value is taken to obtain the degraded pixel deviation value; The deteriorated pixel deviation value and the deteriorated pixel mean value are subtracted and the absolute value is taken to obtain the deteriorated pixel mean deviation value; All original pixel values are summed and averaged to obtain the original pixel mean; The ratio of the average deviation value of the deteriorated pixels to the original pixel average is calculated to obtain the percentage of the deterioration degree.
5. The image blur correction method according to claim 1, characterized in that: The proportion of the number of curves in the overlap stage is marked as SV, and the proportion of the remaining area is marked as IP; By formula The error characterization value is calculated, where a1 and a2 are both preset proportional coefficients.
6. The image blur correction method according to claim 5, characterized in that: The method for obtaining the proportion of the number of curves in the overlap stage is as follows: The straight line where the horizontal coordinate of the coordinate system is located is divided into several sub-stages, and the number of overlapping stage curves is measured, wherein the overlapping stage curve means: the overlapping stage curves of the conversion coordinate fitting curve and the projection coordinate fitting curve; The ratio of the number of overlapping stage curves to the number of all stage curves is calculated to obtain the ratio of the number of overlapping stage curves.
7. The image blur correction method according to claim 5, characterized in that: The remaining area ratio is obtained as follows: Extend the endpoints of the two curves toward the X-axis to obtain the figure enclosed by the curves and the X-axis; The area of the figure enclosed by the two curves and the X-axis and the area of the overlapped part of the two curves are calculated by mathematical methods, and the overlapped area of the curves, the area of the converted coordinate curve and the area of the projected coordinate curve are obtained; The area of the converted coordinate curve is calculated by subtracting the area of the curve overlap, and the absolute value is taken to obtain the conversion residual area; The area of the projected coordinate curve is calculated by subtracting the area of the curve overlap, and the absolute value is taken to obtain the remaining area of the projection; The remaining area of the transformation is calculated by summing the remaining area of the projection to obtain the remaining area; The ratio of the total remaining area to the area of the projected coordinate curve is calculated to obtain the remaining area ratio.
8. An image blur correction device, characterized in that: include: Coordinate acquisition module: Based on the fuzzy image, the image is projected with the standard map, and pixels that are evenly distributed and cover the entire image are selected on the image to establish a Gauss-Krüger projection model; Model building module: Based on the Gauss-Krüger projection model, the auxiliary parameters are obtained based on the WGS84 standard ellipsoid model, and the coordinate transformation formula of the Gauss-Krüger projection is calculated based on the auxiliary parameters to obtain the horizontal coordinate and vertical coordinate in the plane rectangular coordinate system; Signal acquisition module: Based on the Gauss-Krüger projection coordinate transformation relationship, the pixel points are transformed into plane rectangular coordinate system coordinates, and the coordinates of the pixel point transformation are marked as transformation coordinates. Based on the comparison relationship between the transformation coordinates and the projection coordinates, if the transformation coordinates and the projection coordinates are inconsistent in the same plane rectangular coordinate system, the image is resampled to generate a sampling signal; Sampling signal analysis module: Based on the sampling signal, the image is resampled by bilinear interpolation to obtain a sampled image, the pixel value of the sampled image pixel is calculated to be different from the pixel value of the corresponding pixel in the original image to obtain a sampled pixel difference, the sampled pixel difference is compared with the sampled pixel difference threshold, if the sampled pixel difference is greater than the sampled pixel difference threshold, the pixel is marked as a deteriorated pixel, based on the deteriorated pixel, the deterioration number ratio and the deterioration degree ratio are obtained, and the deterioration performance value is obtained based on the deterioration number ratio and the deterioration degree ratio; Image adjustment module: Based on the adjustment signal, the conversion coordinate and projection coordinate fitting curve are established, the error data is obtained, and the deteriorated coordinates are adjusted according to the error data.
9. An electronic device, characterized in that: It includes a processor, a communication interface, a memory and a communication bus, wherein the processor, the communication interface and the memory communicate with each other through the communication bus; Memory, used to store computer programs; A processor, for implementing the method steps described in any one of claims 1 to 7 when executing a program stored in a memory.
10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the method steps described in any one of claims 1 to 7 are implemented.
Citation Information
Patent Citations
Image correction method and device and electronic equipment
CN110660034A
A method and an apparatus for debluring non-uniform motion blur
CN103310413A
Method for eliminating fuzzy effect of cone-shape beam SPECT collimator
CN107292843A
Image processing apparatus, image processing method, imaging device, and image processing system
CN115244567A
Regular geographic image data slicing processing method and related equipment
CN119357139A
Cited By
Self-adaptive projection transformation method of low-altitude aviation navigation system and related device
CN120976009A