Search

CN-120219235-B - Image blur correction method, device, electronic equipment and medium

CN120219235BCN 120219235 BCN120219235 BCN 120219235BCN-120219235-B

Abstract

The invention belongs to the technical field of image processing, and provides an image blur correction method, an image blur correction device, electronic equipment and a medium, wherein the image blur correction method comprises the following steps: based on the blurred image, projecting the image and a standard map, establishing a Gaussian-gram projection model, acquiring auxiliary parameters, calculating to obtain an abscissa and an ordinate in a projection plane rectangular coordinate system based on the auxiliary parameters, converting a pixel point into a plane rectangular coordinate system coordinate, marking the coordinate converted by the pixel point as a converted coordinate, generating a sampling signal if the converted coordinate and the projection coordinate are inconsistent on the same plane rectangular coordinate system, resampling the image by a bilinear interpolation method based on the sampling signal, marking the pixel point as a deteriorated pixel point if the pixel value of the pixel point of the sampled image is smaller than the pixel value of the pixel point of the original image, acquiring a deteriorated representation value based on the deteriorated pixel point, acquiring error data based on the adjustment signal, and adjusting the deteriorated coordinate according to the error data.

Inventors

  • ZHAO KUNDIAN
  • TANG ZHONGHUA
  • ZHAO ZEJIAN
  • LI BINGBING

Assignees

  • 深圳市索达数码科技有限公司

Dates

Publication Date
20260508
Application Date
20250321

Claims (10)

  1. 1. The image blurring correction method is characterized by comprising the following steps: Acquiring a blurred image, uniformly selecting a plurality of pixel points in an image range, ensuring to cover all areas, and establishing a Gaussian-Kelvin projection model; Based on a Gaussian-Kelvin projection model, acquiring auxiliary parameters by taking a WGS84 standard ellipsoid model as a reference, and calculating a coordinate conversion formula of Gaussian-Kelvin projection based on the auxiliary parameters to obtain an abscissa and an ordinate in a plane rectangular coordinate system; Converting the pixel points into plane rectangular coordinate system coordinates based on Gaussian-Kelvin projection coordinate transformation relation, marking the coordinates converted by the pixel points as conversion coordinates, and resampling the image to generate sampling signals if the conversion coordinates and the projection coordinates are inconsistent on the same plane rectangular coordinate system based on comparison relation of the conversion coordinates and the projection coordinates; Resampling an image by a bilinear interpolation method based on a sampling signal to obtain a sampling image, carrying out difference calculation on a pixel value of a pixel point of the sampling image and a pixel value of a corresponding pixel point in an original image to obtain a sampling pixel difference value, comparing the sampling pixel difference value with a sampling pixel difference threshold value, marking the pixel point as a deteriorated pixel point if the sampling pixel difference value is larger than the sampling pixel difference threshold value, acquiring a deteriorated quantity duty ratio and a deteriorated degree duty ratio based on the deteriorated pixel point, and acquiring a deteriorated representation value based on the deteriorated quantity duty ratio and the deteriorated degree duty ratio; and based on the adjustment signal, establishing a fitting curve of the conversion coordinates and the projection coordinates, acquiring error data, and adjusting the deteriorated coordinates according to the error data.
  2. 2. The image blur correction method according to claim 1, characterized in that: Marking the deterioration quantity duty ratio as SL and the deterioration degree duty ratio as CD; By the formula The degradation representation value BX is calculated, where s1, s2 is a preset scaling factor.
  3. 3. The image blur correction method according to claim 2, characterized in that: The obtaining mode of the degradation quantity ratio is as follows: Comparing all optimized pixel values with the original pixel values; if the optimized pixel value is greater than or equal to the original pixel value, marking the pixel point as an improved pixel point; if the optimized pixel value is smaller than the original pixel value, marking the pixel point as a deteriorated pixel point; And counting the number of the deteriorated pixel points, and calculating the ratio of the number of the deteriorated pixel points to the number of the total pixel points to obtain the duty ratio of the number of the deteriorated pixel points.
  4. 4. The image blur correction method according to claim 2, characterized in that: The obtaining mode of the deterioration degree ratio is as follows: summing all the deteriorated pixel values, adding and taking an average value, and calculating to obtain a deteriorated pixel average value; calculating the difference value between the average value of the deteriorated pixels and the value of the deteriorated pixels, taking the absolute value, and processing to obtain the deviation value of the deteriorated pixels; Calculating the difference value of the deteriorated pixel deviation value and the average value of the deteriorated pixels, and taking the absolute value, and processing to obtain the average deviation value of the deteriorated pixels; summing all the original pixel values, calculating and taking an average value, and processing to obtain an original pixel average value; and calculating the ratio of the average deviation value of the deteriorated pixels to the average value of the original pixels, and processing to obtain the duty ratio of the deteriorated degree.
  5. 5. The image blur correction method according to claim 1, characterized in that: the number of the curves in the overlapping stage is set as SV, and the remaining area is marked as IP; By the formula And calculating to obtain an error characterization value, wherein a1 and a2 are preset proportionality coefficients.
  6. 6. The image blur correction method according to claim 5, characterized in that: the acquisition mode of the curve quantity ratio of the coincident stage is as follows: dividing a straight line where an abscissa of a coordinate system is located into a plurality of sub-stages, and measuring the number of coincident stage curves, wherein the coincident stage curves represent the stage curves which are coincident in two curves of a transformation coordinate fitting curve and a projection coordinate fitting curve; and calculating the ratio of the number of the coincident phase curves to the number of the all phase curves, and processing to obtain the number ratio of the coincident phase curves.
  7. 7. The image blur correction method according to claim 5, characterized in that: The remaining area ratio is obtained by the following steps: Extending the end points of two sides of the two curves towards the X axis to obtain a graph surrounded by the curves and the X axis; Calculating the area of a graph formed by the two curves and the X axis and the area of the overlapping part of the two curves respectively by a mathematical method, and processing to obtain the overlapping area of the curves, the area of a transformation coordinate curve and the area of a projection coordinate curve; Performing difference calculation on the curve area of the conversion coordinates and the curve superposition area, taking an absolute value, and processing to obtain the conversion remaining area; Calculating the difference between the area of the projected coordinate curve and the overlapping area of the curve, taking the absolute value, and processing to obtain the remaining area of the projection; summing the converted remaining area and the projected remaining area, and processing to obtain a total remaining area; and calculating the ratio of the total remaining area to the projected coordinate curve area, and processing to obtain the remaining area ratio.
  8. 8. An image blur correction apparatus, comprising: The coordinate acquisition module is used for projecting the image and the standard map based on the blurred image, selecting pixel points which are uniformly distributed and cover the whole image on the image, and establishing a Gaussian-Krueger projection model; The model building module is used for obtaining auxiliary parameters based on a Gaussian-Creuger projection model and taking a WGS84 standard ellipsoid model as a reference, and calculating a coordinate conversion formula of Gaussian-Creuger projection based on the auxiliary parameters to obtain an abscissa and an ordinate in a plane rectangular coordinate system; The signal acquisition module converts the pixel points into plane rectangular coordinate system coordinates based on the Gaussian-Kelvin projection coordinate transformation relation, marks the coordinates converted by the pixel points as converted coordinates, and resamples the image to generate sampling signals if the converted coordinates and the projection coordinates are inconsistent on the same plane rectangular coordinate system based on the comparison relation of the converted coordinates and the projection coordinates; The sampling signal analysis module is used for resampling an image by a bilinear interpolation method based on a sampling signal to obtain a sampling image, carrying out difference calculation on a pixel value of a pixel point of the sampling image and a pixel value of a corresponding pixel point in an original image to obtain a sampling pixel difference value, comparing the sampling pixel difference value with a sampling pixel difference threshold value, marking the pixel point as a deteriorated pixel point if the sampling pixel difference value is larger than the sampling pixel difference threshold value, acquiring a deteriorated quantity duty ratio and a deteriorated degree duty ratio based on the deteriorated pixel point, and acquiring a deteriorated representation value based on the deteriorated quantity duty ratio and the deteriorated degree duty ratio; And the image adjusting module is used for establishing a fitting curve of the conversion coordinates and the projection coordinates based on the adjusting signals, acquiring error data and adjusting the deteriorated coordinates according to the error data.
  9. 9. The electronic equipment is characterized by comprising a processor, a communication interface, a memory and a communication bus, wherein the processor, the communication interface and the memory are communicated with each other through the communication bus; A memory for storing a computer program; A processor for implementing the method of any of claims 1-7 when executing a program stored on a memory.
  10. 10. A computer readable storage medium, characterized in that the computer readable storage medium has stored therein a computer program which, when executed by a processor, implements the method of any of claims 1-7.

Description

Image blur correction method, device, electronic equipment and medium Technical Field The invention belongs to the technical field of image processing, and particularly relates to an image blur correction method, an image blur correction device, electronic equipment and a medium. Background Image blur is a common problem that may be caused by various factors, such as lens shake, motion blur, defocus, etc., which may cause loss of image details and affect the sharpness and visual quality of an image, and conventional image blur correction methods generally rely on complex algorithms and a large amount of computing resources and have limited effects, so that a more efficient and accurate image blur correction method is required to improve the image quality and user experience. The invention provides an image correction method, an image correction device and electronic equipment, which relate to the technical field of image processing and comprise the steps of acquiring an image to be corrected and equipment parameters of acquisition equipment of the image to be corrected; detecting a target object in an image to be corrected to obtain object information, wherein the object information comprises the size and/or the position of the target object in the image to be corrected, and correcting the image to be corrected according to the object information and equipment parameters. However, in the above prior art, the image to be corrected is detected by acquiring the identification parameters and the object in the image, but the image to be corrected and the image pixels are not analyzed, so that the correction effect and the visual impression of the image cannot be ensured. To this end, the invention provides an image blur correction method, an image blur correction device, an electronic device and a medium. Disclosure of Invention In order to overcome the deficiencies of the prior art, at least one technical problem presented in the background art is solved. The invention solves the technical problems by adopting the technical proposal that a blurred image is obtained, a plurality of pixel points are uniformly selected in the image range, all areas are ensured to be covered, and a Gaussian-Kelvin projection model is established; Based on a Gaussian-Kelvin projection model, acquiring auxiliary parameters by taking a WGS84 standard ellipsoid model as a reference, and calculating a coordinate conversion formula of Gaussian-Kelvin projection based on the auxiliary parameters to obtain an abscissa and an ordinate in a plane rectangular coordinate system; Converting the pixel points into plane rectangular coordinate system coordinates based on Gaussian-Kelvin projection coordinate transformation relation, marking the coordinates converted by the pixel points as conversion coordinates, and resampling the image to generate sampling signals if the conversion coordinates and the projection coordinates are inconsistent on the same plane rectangular coordinate system based on comparison relation of the conversion coordinates and the projection coordinates; Resampling an image by a bilinear interpolation method based on a sampling signal to obtain a sampling image, carrying out difference calculation on a pixel value of a pixel point of the sampling image and a pixel value of a corresponding pixel point in an original image to obtain a sampling pixel difference value, comparing the sampling pixel difference value with a sampling pixel difference threshold value, marking the pixel point as a deteriorated pixel point if the sampling pixel difference value is larger than the sampling pixel difference threshold value, acquiring a deteriorated quantity duty ratio and a deteriorated degree duty ratio based on the deteriorated pixel point, and acquiring a deteriorated representation value based on the deteriorated quantity duty ratio and the deteriorated degree duty ratio; based on the adjustment signal, establishing a conversion coordinate and projection coordinate fitting curve, acquiring error data, and adjusting the deteriorated coordinates according to the error data; The further technical scheme of the invention is that the deterioration quantity duty ratio is marked as SL, and the deterioration degree duty ratio is marked as CD; By the formula Calculating to obtain a deterioration representation value BX, wherein s1 and s2 are preset proportion coefficients; The further technical scheme of the invention is that the acquisition mode of the deterioration quantity ratio is as follows: Comparing all optimized pixel values with the original pixel values; if the optimized pixel value is greater than or equal to the original pixel value, marking the pixel point as an improved pixel point; if the optimized pixel value is smaller than the original pixel value, marking the pixel point as a deteriorated pixel point; Counting the number of the deteriorated pixel points, and calculating the ratio of the number of the deteriorated pixel poi