Self-adaptive restoration method and system for blurred image, terminal and storage medium

The adaptive restoration method addresses the challenge of poor image quality in blurred images by analyzing blur type and degree, selecting a tailored deblurring scheme, and optimizing the image for enhanced clarity and quality.

CN119228689APending Publication Date: 2024-12-31深圳开鸿数字产业发展有限公司
View PDF 0 Cites 2 Cited by

Patent Information

Application Number
CN202411201842.3
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-08-29
Publication Date
2024-12-31

AI Technical Summary

Technical Problem

Existing image processing methods fail to adaptively repair blurred images, resulting in poor image quality and user experience due to the inability to determine the best processing solution based on the current situation of the blur.

Method used

An adaptive restoration method that analyzes the image blur type and degree using a trained classification model, selects a targeted deblurring scheme from a database, iteratively refines the image, and optimizes it through contrast enhancement, sharpening, and noise suppression to enhance clarity and quality.

Benefits of technology

Effectively repairs blurred images by selecting the best deblurring scheme based on blur type and degree, improving imaging quality and user experience.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119228689A_ABST
    Figure CN119228689A_ABST
Patent Text Reader

Abstract

The invention discloses an adaptive restoration method and system for a blurred image, a terminal and a storage medium, and the method comprises the steps: obtaining a to-be-processed blurred image, carrying out the image analysis of the to-be-processed blurred image, obtaining an image blurring type and an image blurring degree, performing scheme matching according to the image blurring type and the image blurring degree to obtain a target deblurring scheme; and performing deblurring processing on the blurred image to be processed according to the target deblurring scheme to obtain a deblurred image, and performing optimization processing on the deblurred image to obtain a target image. According to the method, the blurred image can be self-adaptively repaired, and the optimal blurring processing scheme is selected according to the type and degree of the blurred image, so that the imaging quality of the image is greatly improved while the blurred image is effectively repaired.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of image processing technology, and in particular to a method, system, terminal and computer-readable storage medium for adaptively repairing blurred images. Background Art

[0002] With the advent of the information age, digital image processing has been widely used in computer vision, machine learning, artificial intelligence and other fields, and its importance is becoming increasingly prominent. However, in the process of acquiring digital images, the acquisition device will inevitably produce slight jitters at the moment the shutter is opened, resulting in an image with blurred details. Especially under unfavorable lighting conditions, a longer shutter time makes the image blurrier. In order to ensure the quality of the image, it is necessary to deblur the blurred image.

[0003] At present, the existing blurred image processing methods are not targeted and cannot determine the best processing solution according to the current situation of the blurred image, resulting in poor overall effect of the processed blurred image, resulting in low image quality and affecting the user experience. Therefore, how to repair the blur problem of images in a targeted manner is a difficult problem that needs to be solved in the field of image processing.

[0004] Therefore, the prior art still needs to be improved and developed. Summary of the invention

[0005] The main purpose of the present invention is to provide a method, system, terminal and storage medium for adaptively repairing blurred images, aiming to solve the problem that the blur of images cannot be repaired in a targeted manner in the prior art, resulting in poor overall effect of the processed blurred images and low imaging quality.

[0006] To achieve the above object, the present invention provides an adaptive restoration method for blurred images, the adaptive restoration method for blurred images comprising the following steps:

[0007] Acquire a blurred image to be processed, perform image analysis on the blurred image to be processed, obtain an image blur type and an image blur degree, and perform scheme matching according to the image blur type and the image blur degree to obtain a target deblurring scheme;

[0008] The blurred image to be processed is deblurred according to the target deblurring scheme to obtain a deblurred image, and the deblurred image is optimized to obtain a target image.

[0009] Optionally, the method for adaptively restoring blurred images, wherein the step of obtaining a blurred image to be processed and performing image analysis on the blurred image to be processed to obtain an image blur type and an image blur degree, specifically comprises:

[0010] Obtain a fuzzy image to be processed, input the fuzzy image to be processed into a trained fuzzy image classification model, obtain a probability distribution of each blur type, sort all the probability distributions to obtain a sorting result, and obtain an image blur type according to the sorting result, wherein the image blur type is a blur type corresponding to the maximum probability distribution in the sorting result;

[0011] Preprocessing the blurred image to be processed to obtain a target blurred image to be processed, and extracting features from the target blurred image to be processed to obtain image features, wherein the preprocessing includes normalization processing, denoising processing and size adjustment processing;

[0012] The image features are input into a deep learning regression model, a blur degree value is output, and the corresponding image blur degree is matched according to the blur degree value.

[0013] Optionally, in the method for adaptively restoring blurred images, the training process of the blurred image classification model specifically includes:

[0014] Acquire a training image set and create a type classification training network model, wherein the training image set includes multiple groups of training samples, and each group of training samples includes a blurred image of a blur type and a corresponding clear image;

[0015] Inputting a group of training samples in the training image set into the type classification training network model, performing feature extraction on the blurred image to obtain target local features, and performing feature mapping on the target local features to obtain a target vector;

[0016] Classifying the target vector to obtain a probability distribution of blur types, and predicting the type of the target blur image according to the probability distribution to obtain a predicted blur type;

[0017] Calculating a loss value between the predicted blur type and the blur type of the clear image according to a cross entropy loss function, and adjusting parameters of the type classification training network model according to the loss value;

[0018] The next set of training samples is input into the type classification training network model until the training status of the type classification training network model meets the preset conditions, thereby obtaining a trained fuzzy image classification model.

[0019] Optionally, the method for adaptively restoring blurred images, wherein the scheme matching is performed according to the image blur type and the image blur degree to obtain a target deblurring scheme, specifically comprising:

[0020] Constructing a deblurring scheme database, wherein the deblurring scheme database stores a plurality of deblurring schemes, each of which corresponds to a blurring type and a blurring degree;

[0021] The deblurring solution database is matched with the image blurring type and the image blurring degree to obtain a target deblurring solution.

[0022] Optionally, in the adaptive restoration method for blurred images, the blur types include motion blur, defocus blur, Gaussian blur, optical blur, radial blur and uniform blur, and the blur degrees include light blur, moderate blur, heavy blur and extremely heavy blur.

[0023] Optionally, the method for adaptively restoring blurred images, wherein the deblurring the blurred image to be processed according to the target deblurring scheme to obtain the deblurred image, specifically comprises:

[0024] The blurred image to be processed is cleared according to the target deblurring scheme to obtain an initialization image, residual calculation is performed on the initialization image to obtain a target residual, and the initialization image is iteratively processed according to the target residual to obtain an iterative image;

[0025] The iterative image is subjected to error correction processing to obtain a target iterative image, and the target iterative image is subjected to quantitative evaluation according to a quantitative index to obtain a deblurred image, wherein the quantitative index includes a peak signal-to-noise ratio and a structural similarity.

[0026] Optionally, the method for adaptively restoring blurred images, wherein the step of optimizing the deblurred image to obtain a target image, specifically comprises:

[0027] Performing a first optimization process on the deblurred image to obtain an optimized image, wherein the first optimization process includes contrast enhancement process, sharpening process and color correction process;

[0028] The optimized image is subjected to a second optimization process to obtain a target image, wherein the second optimization process includes noise suppression, artifact suppression and image edge refinement.

[0029] Optionally, in the method for adaptively restoring blurred images, the adaptive restoring system for blurred images comprises:

[0030] A scheme matching module is used to obtain a blurred image to be processed, perform image analysis on the blurred image to be processed, obtain an image blur type and an image blur degree, and perform scheme matching according to the image blur type and the image blur degree to obtain a target deblurring scheme;

[0031] The image processing module is used to perform deblurring processing on the blurred image to be processed according to the target deblurring scheme to obtain a deblurred image, and perform optimization processing on the deblurred image to obtain a target image.

[0032] In addition, to achieve the above-mentioned purpose, the present invention also provides a terminal, wherein the terminal includes: a memory, a processor, and an adaptive repair program for blurred images stored in the memory and executable on the processor, wherein the adaptive repair program for blurred images implements the steps of the adaptive repair method for blurred images as described above when executed by the processor.

[0033] In addition, to achieve the above-mentioned purpose, the present invention also provides a computer-readable storage medium, wherein the computer-readable storage medium stores an adaptive repair program for blurred images, and when the adaptive repair program for blurred images is executed by a processor, the steps of the adaptive repair method for blurred images as described above are implemented.

[0034] In the present invention, a blurred image to be processed is obtained, image analysis is performed on the blurred image to be processed to obtain the image blur type and image blur degree, and scheme matching is performed according to the image blur type and the image blur degree to obtain a target deblurring scheme; the blurred image to be processed is deblurred according to the target deblurring scheme to obtain a deblurred image, and the deblurred image is optimized to obtain a target image. The present invention can adaptively repair blurred images and select the best blurring scheme according to the type and degree of blurred images, thereby effectively repairing blurred images while greatly improving the imaging quality of the image. BRIEF DESCRIPTION OF THE DRAWINGS

[0035] Figure 1 It is a flow chart of a preferred embodiment of the method for adaptively repairing blurred images in the present invention;

[0036] Figure 2 It is a schematic diagram of the principle of a preferred embodiment of the adaptive restoration system for blurred images in the present invention;

[0037] Figure 3 It is a schematic diagram of the operating environment of a preferred embodiment of the terminal of the present invention. DETAILED DESCRIPTION

[0038] In order to make the purpose, technical solution and advantages of the present invention clearer and more specific, the present invention is further described in detail below with reference to the accompanying drawings and examples. It should be understood that the specific embodiments described herein are only used to explain the present invention and are not used to limit the present invention.

[0039] It should be noted that if the embodiments of the present invention involve directional indications (such as up, down, left, right, front, back, etc.), the directional indications are only used to explain the relative position relationship, movement status, etc. between the components under a certain specific posture (as shown in the accompanying drawings). If the specific posture changes, the directional indication will also change accordingly.

[0040] In addition, if there are descriptions involving "first", "second", etc. in the embodiments of the present invention, the descriptions of "first", "second", etc. are only used for descriptive purposes and cannot be understood as indicating or suggesting their relative importance or implicitly indicating the number of the indicated technical features. Therefore, the features defined as "first" and "second" may explicitly or implicitly include at least one of the features. In addition, the technical solutions between the various embodiments can be combined with each other, but they must be based on the ability of ordinary technicians in the field to implement them. When the combination of technical solutions is contradictory or cannot be implemented, it should be deemed that such a combination of technical solutions does not exist and is not within the scope of protection required by the present invention.

[0041] The adaptive restoration method for blurred images described in the preferred embodiment of the present invention is as follows: Figure 1 As shown, the adaptive restoration method of the blurred image comprises the following steps:

[0042] Step S10, obtaining a blurred image to be processed, performing image analysis on the blurred image to be processed to obtain an image blur type and an image blur degree, and performing scheme matching according to the image blur type and the image blur degree to obtain a target deblurring scheme.

[0043] Specifically, when a blurred image to be processed, i.e., a blurred image to be processed, is obtained, before processing the blurred image to be processed, it is necessary to first perform image analysis on the blurred image to be processed, and the content of the analysis includes the image blur type and image blur degree of the blurred image to be processed; in an embodiment of the present invention, the image blur type of the blurred image to be processed is analyzed by a trained CNN (Convolutional Neural Networks) model, i.e., a blurred image classification model, and the training process of the blurred image classification model is as follows: first, a data set for training and verification, i.e., a training image set, needs to be prepared, wherein the training image set includes multiple groups of training samples, and each group of the training samples includes a blurred image of a blur type and a corresponding clear image.

[0044] Afterwards, a CNN model for training is created, namely, a type classification training network model, wherein the type classification training network model includes an input layer, a convolution layer, a pooling layer, a batch normalization layer, a fully connected layer and an output layer; then, a group of training samples in the training image set is input into the type classification training network model, wherein the input layer in the type classification training network model is used to receive the training samples, and usually the size of the blurred image in the training sample is a fixed size, in order to facilitate subsequent processing; the convolution layer is used to extract features from the blurred image to obtain target local features, specifically, the blurred image is convolved with a sliding window, and the convolution kernel extracts low-level features such as edges and textures in the image, wherein each convolution layer is usually followed by an activation function (e.g., a ReLU function), and the role of the activation function is to introduce nonlinearity so that the corresponding network model can learn more complex features. As the convolution layer deepens layer by layer, more advanced abstract features are gradually extracted; the pooling layer is used to reduce the dimension of the output of the convolution layer and retain important features at the same time. Commonly used pooling operations include maximum pooling and average pooling. The purpose of the pooling operation is to effectively reduce the calculation amount of the type classification training network model and prevent overfitting; the batch normalization layer is used to normalize the activation value of each convolution layer, so as to accelerate the training and stabilize the learning process of the model; the fully connected layer is used to map the target local features to the classification space after the feature extraction of the convolution and pooling layers is completed and the target local features are obtained, and flatten them into a one-dimensional vector, namely the target vector, and then classify the target vector through a weight matrix; the output layer converts the classified target vector into the probability distribution of each fuzzy type by using the Softmax activation function, and finally outputs the probability distribution of each fuzzy type.

[0045] During the training process of the type classification training network model, a cross entropy loss function is used to calculate the error between the predicted blur type of the type classification training network model and the blur type of the clear image, that is, the loss value. The purpose of using the cross entropy loss function is to effectively measure the difference between the predicted probability distribution and the actual distribution; then, according to the loss value, the corresponding optimization algorithm (for example, Adam optimizer or SGD) is used to adjust the parameters of the type classification training network model. Specifically, the optimization algorithm calculates the gradient through the back propagation algorithm and updates the network weights so that the value of the loss function gradually decreases; then, the next set of training samples is input into the type classification training network model, and the above process is repeated. , no further details are given here, until the training situation of the type classification training network model meets the preset conditions, the preset conditions include that the loss value meets the preset requirements or the number of training times reaches the preset number of times, wherein the preset requirements can be determined according to the accuracy of the fuzzy image classification model, which is not described in detail here, the preset number of times can be the maximum number of training times of the type classification training network model, for example, 2000 times, etc., and finally a trained fuzzy image classification model is obtained; after the fuzzy image classification model is obtained, the fuzzy image classification model needs to be tested to evaluate its performance on unseen data, and the test set usually contains fuzzy images different from the training set and the validation set, aiming to evaluate the generalization ability of the model.

[0046] The blurred image to be processed is input into a trained blurred image classification model to obtain a probability distribution of each blur type, for example, the probability of the output motion blur is 0.7, the probability of defocus blur is 0.2, and the probability of optical blur is 0.1, all the probability distributions are sorted to obtain a sorting result, for example, motion blur>defocus blur>optical blur, and the image blur type is obtained according to the sorting result, wherein the image blur type is the blur type corresponding to the maximum probability distribution in the sorting result, for example, the image blur type is motion blur; thereafter, after identifying the image blur type of the blurred image to be processed, it is also necessary to quantify the blur degree of the image blur type, first, preprocess the blurred image to be processed to obtain a target blurred image to be processed, wherein the preprocessing content includes normalization processing, denoising processing and resizing processing, the normalization processing is to scale the pixel value of the blurred image to be processed to a preset range, for example, [0, 1]), the denoising processing is to remove the blurred image to be processed by a Gaussian filtering method Image noise, the resizing process refers to adjusting the size of the blurred image to be processed to adapt to the subsequent input requirements; feature extraction is performed on the target blurred image to be processed to obtain image features. The feature extraction method is to extract through a deep learning model. The deep learning model can effectively capture the spatial features in the image, such as edges, textures, and local contrast, etc. These features can help identify the blur patterns in the image; it can also be done by using manually designed image features, such as gradient direction histograms and local binary patterns; then, the blur degree of the target blurred image to be processed is evaluated using a deep learning regression model, the image features are input into the deep learning regression model, and a continuous value, i.e., a blur degree value, is output to indicate the severity of the blur. The blur degree value can be a predefined blur metric, such as a blur radius and a blur kernel size; in addition, it can also be completed by calculating the gradient amplitude or spectrum analysis of the target blurred image to be processed. For images with a high degree of blur, the gradient amplitude is small and the attenuation of high-frequency components is more obvious. In addition, the degree of blur can also be divided according to specific quantitative indicators, such as blur kernel size, the larger the size of the blur kernel, the higher the degree of blur; blur radius, the larger the radius, the more obvious the blur.

[0047] The output blur level value is divided into several intervals, such as light blur, medium blur and heavy blur, so as to facilitate the subsequent selection of the corresponding deblurring algorithm; then, the image blur type and image blur level of the blurred image to be processed are comprehensively considered to generate a complete blur feature description, and the blurred image to be processed is guided to select the optimal deblurring scheme, i.e., the target deblurring scheme, according to the blur feature description. Specifically, a deblurring scheme database is constructed, wherein the deblurring scheme database stores multiple deblurring schemes, each of which corresponds to a blur type and a blur level, wherein the blur types include motion blur, defocus blur, Gaussian blur, optical blur, radial blur and uniform blur, wherein the motion blur is caused by the movement of the camera or the object during exposure, characterized by stretching or smearing along the direction of motion, and the corresponding processing algorithm is a deblurring algorithm based on inverse filtering, and the corresponding image is deconvoluted by utilizing the linear characteristics of motion blur. The defocus blur is caused by the inaccurate focus of the camera, characterized by the defocus of the whole or local area, usually manifested as the softening of the image, and the corresponding processing algorithm is a non-blind deblurring algorithm and a deep learning model. The Gaussian blur is a blur caused by a Gaussian function, which is often used to simulate natural blur effects. Its characteristic is that the details in the image are smoothed. The corresponding processing algorithms are Wiener filtering and Laplace regularization. The optical blur is a blur caused by optical defects of the lens, such as spherical aberration, chromatic aberration, etc., characterized by edge distortion or color shift. The corresponding processing algorithms are PSF estimation and inverse convolution. The radial blur is a blur that radiates outward from the center of the image, usually caused by rotational motion or zooming. The corresponding processing algorithms are radial deblurring filters and adaptive convolution. The radial deblurring filter is based on radial symmetry and can effectively correct the blur caused by rotation or zooming.

[0048] The degree of blur includes light blur, moderate blur, heavy blur and extremely heavy blur, wherein the light blur means that the image details are slightly lost, but the overall image is still relatively clear. The details may be slightly blurred, which usually does not affect the recognition of the main content. The corresponding processing algorithm is a fast recovery method, for example, the fast deblurring technology based on FFT (fast Fourier transform) can efficiently handle light blur. The moderate blur means that the image details are obviously lost and the edges become blurred, but the main objects can still be identified, and a certain degree of deblurring is required to restore clarity. The corresponding processing algorithms are L0 regularization and multi-scale deblurring. L0 regularization is a method of minimizing the L0 norm, which can effectively restore the edges and structures in the image; multi-scale deblurring is a method of gradually restoring blurred details at different levels through multi-scale decomposition to ensure image clarity under moderate blur. The severe blur refers to that the image is severely blurred, the details are almost lost, the edges are blurred and the main objects are difficult to identify. It is necessary to use an advanced deblurring algorithm for processing. The corresponding processing algorithm is an iterative optimization method. For example, the RichardsonLucy algorithm can restore details under severe blur conditions through multiple iterative corrections. The extremely severe blur refers to that the image is almost unrecognizable, and all details and edge information are blurred and covered. The corresponding processing algorithm is an adaptive regularization method. By using an adaptive regularization strategy, the ability to repair extremely severely blurred images is enhanced. Afterwards, the deblurring solution database is matched according to the image blur type and the image blur degree to obtain the target deblurring solution.

[0049] Step S20: deblurring the blurred image to be processed according to the target deblurring scheme to obtain a deblurred image, and optimizing the deblurred image to obtain a target image.

[0050] The step S20 comprises:

[0051] Step S21, performing a clearing process on the blurred image to be processed according to the target deblurring scheme to obtain an initialization image, performing residual calculation on the initialization image to obtain a target residual, and performing iterative processing on the initialization image according to the target residual to obtain an iterative image;

[0052] Step S22, performing error correction processing on the iterative image to obtain a target iterative image, and performing quantitative evaluation on the target iterative image according to a quantitative index to obtain a deblurred image, wherein the quantitative index includes a peak signal-to-noise ratio and a structural similarity;

[0053] Step S23, performing a first optimization process on the deblurred image to obtain an optimized image, wherein the first optimization process includes contrast enhancement process, sharpening process and color correction process;

[0054] Step S24: performing a second optimization process on the optimized image to obtain a target image, wherein the second optimization process includes noise suppression, artifact suppression and image edge refinement.

[0055] Specifically, in an embodiment of the present invention, after obtaining the corresponding target deblurring scheme, the to-be-processed blurred image is subjected to preliminary deblurring processing, i.e., clearing processing, according to the target blurring scheme to obtain an initialization image; the image after the preliminary deblurring processing usually contains some residual blurring effects or noise, and in order to further refine the image quality, it is necessary to perform denoising processing on the initialization image, specifically, on the basis of the preliminary deblurring processing, the initialization image is further deblurred using an iterative optimization algorithm, and each iteration is based on calculating the residual of the initialization image, i.e., the target residual, and iterative processing is performed, so that a clearer image, i.e., an iterative image, can be obtained after a certain number of iterations; after the refinement processing is completed, there may still be a certain residual error, and the iterative image can be subjected to error correction processing to obtain a target iterative image, and the error correction processing is to learn the residual and correct it by training a residual learning network, so as to effectively reduce residual blur and artifacts. Afterwards, the target iterative image is quantitatively evaluated according to a quantitative index to obtain a deblurred image, wherein the quantitative index includes a peak signal-to-noise ratio and a structural similarity.

[0056] Subsequently, in order to further improve the quality of the deblurred image, especially in detail recovery and visual perception, in an embodiment of the present invention, the deblurred image is subjected to a first optimization process to obtain an optimized image, wherein the first optimization process includes contrast enhancement, sharpening and color correction; the contrast enhancement process includes histogram equalization and adaptive histogram equalization, through which the global contrast of the deblurred image can be adjusted to make the brightness distribution of the deblurred image more uniform, thereby enhancing the detail performance of the deblurred image; on the basis of histogram equalization, adaptive histogram equalization performs equalization processing on the local area of ​​the deblurred image, which is particularly suitable for improving the local contrast when the image brightness is uneven. The sharpening process is to enhance the edge of the deblurred image by using the Laplace operator, which can highlight the details of the deblurred image, or to superimpose the high-frequency part of the deblurred image with the original image by nonlinear sharpening, thereby enhancing the edge and detail areas of the image, thereby improving the overall clarity of the deblurred image. The color correction processing includes white balance adjustment and color saturation adjustment. Because the color of the image may be affected to a certain extent during the deblurring process, the white balance adjustment corrects the color temperature of the deblurred image to make the color of the deblurred image more natural; and improves the color saturation of the deblurred image, enhances the color expression of the deblurred image, and makes the deblurred image more vivid.

[0057] Afterwards, the optimized image is subjected to a second optimization process to obtain a target image, wherein the second optimization process includes noise suppression, artifact suppression and image edge refinement, wherein the noise suppression includes median filtering and bilateral filtering, wherein median filtering can eliminate noise that may be introduced during the deblurring process, especially salt noise and pepper noise, thereby ensuring the purity of the image, and bilateral filtering can retain the edge information of the image while removing noise. The artifact suppression includes residual learning and de-artifact filtering, wherein the residual learning network is used to eliminate artifacts and unnatural textures during the deblurring process, and a specially designed de-artifact filter is used to process block artifacts, stripe artifacts, etc. that may be generated during the deblurring process, thereby ensuring the improvement of the image visual quality. The image edge refinement is to identify and refine the edge portion of the optimized image through an edge detection algorithm, so that the optimized image is clearer and sharper in the edge area, or to enhance the edge of the image at different scales to ensure the expressiveness of the optimized image at various detail levels; in an embodiment of the present invention, the gamma value of the target image is adjusted to ensure that the brightness and contrast of the target image are in line with the visual habits of the human eye, thereby improving the user's viewing experience; the brightness range of the target image can also be stretched to ensure that the bright parts of the target image are brighter and the dark parts are darker, thereby enhancing the layering and three-dimensional sense of the target image. The present invention can not only effectively improve the visual effect of the image, but also make it reach higher standards in terms of clarity, contrast, color, details and noise control.

[0058] Furthermore, if Figure 2 As shown, based on the above-mentioned adaptive restoration method for blurred images, the present invention also provides an adaptive restoration system for blurred images, and the adaptive restoration system for blurred images includes:

[0059] A scheme matching module 51 is used to obtain a blurred image to be processed, perform image analysis on the blurred image to be processed, obtain an image blur type and an image blur degree, and perform scheme matching according to the image blur type and the image blur degree to obtain a target deblurring scheme;

[0060] The image processing module 52 is used to perform deblurring processing on the blurred image to be processed according to the target deblurring scheme to obtain a deblurred image, and perform optimization processing on the deblurred image to obtain a target image.

[0061] Furthermore, if Figure 3 As shown, based on the above-mentioned adaptive restoration method for blurred images, the present invention also provides a terminal accordingly, and the terminal includes a processor 10, a memory 20 and a display 30. Figure 3 Only some components of the terminal are shown, but it should be understood that it is not required to implement all of the components shown, and more or fewer components may be implemented instead.

[0062] In some embodiments, the memory 20 may be an internal storage unit of the terminal, such as a hard disk or memory of the terminal. In other embodiments, the memory 20 may also be an external storage device of the terminal, such as a plug-in hard disk, a smart memory card (Smart Media Card, SMC), a secure digital (SecureDigital, SD) card, a flash card (Flash Card), etc. equipped on the terminal. Further, the memory 20 may also include both an internal storage unit of the terminal and an external storage device. The memory 20 is used to store application software and various types of data installed on the terminal, such as the program code of the installation terminal. The memory 20 may also be used to temporarily store data that has been output or is to be output. In one embodiment, the memory 20 stores a blurred image adaptive repair program 40, which can be executed by the processor 10, thereby realizing the blurred image adaptive repair method in the present application.

[0063] In some embodiments, the processor 10 may be a central processing unit (CPU), a microprocessor or other data processing chip, used to run the program code or process data stored in the memory 20, such as executing the adaptive repair method of the blurred image.

[0064] In some embodiments, the display 30 may be an LED display, a liquid crystal display, a touch-sensitive liquid crystal display, an OLED (Organic Light-Emitting Diode) touch device, etc. The display 30 is used to display information on the terminal and to display a visual user interface. The components 10-30 of the terminal communicate with each other via a system bus.

[0065] In one embodiment, when the processor 10 executes the adaptive restoration program 40 for blurry images in the memory 20, the following steps are implemented:

[0066] Acquire a blurred image to be processed, perform image analysis on the blurred image to be processed, obtain an image blur type and an image blur degree, and perform scheme matching according to the image blur type and the image blur degree to obtain a target deblurring scheme;

[0067] The blurred image to be processed is deblurred according to the target deblurring scheme to obtain a deblurred image, and the deblurred image is optimized to obtain a target image.

[0068] The obtaining of the blurred image to be processed and performing image analysis on the blurred image to be processed to obtain the image blur type and image blur degree specifically include:

[0069] Obtain a fuzzy image to be processed, input the fuzzy image to be processed into a trained fuzzy image classification model, obtain a probability distribution of each blur type, sort all the probability distributions to obtain a sorting result, and obtain an image blur type according to the sorting result, wherein the image blur type is a blur type corresponding to the maximum probability distribution in the sorting result;

[0070] Preprocessing the blurred image to be processed to obtain a target blurred image to be processed, and extracting features from the target blurred image to be processed to obtain image features, wherein the preprocessing includes normalization processing, denoising processing and size adjustment processing;

[0071] The image features are input into a deep learning regression model, a blur degree value is output, and the corresponding image blur degree is matched according to the blur degree value.

[0072] The training process of the fuzzy image classification model specifically includes:

[0073] Acquire a training image set and create a type classification training network model, wherein the training image set includes multiple groups of training samples, and each group of training samples includes a blurred image of a blur type and a corresponding clear image;

[0074] Inputting a group of training samples in the training image set into the type classification training network model, performing feature extraction on the blurred image to obtain target local features, and performing feature mapping on the target local features to obtain a target vector;

[0075] Classifying the target vector to obtain a probability distribution of blur types, and predicting the type of the target blur image according to the probability distribution to obtain a predicted blur type;

[0076] Calculating a loss value between the predicted blur type and the blur type of the clear image according to a cross entropy loss function, and adjusting parameters of the type classification training network model according to the loss value;

[0077] The next set of training samples is input into the type classification training network model until the training status of the type classification training network model meets the preset conditions, thereby obtaining a trained fuzzy image classification model.

[0078] The method of matching the schemes according to the image blur type and the image blur degree to obtain the target deblurring scheme specifically includes:

[0079] Constructing a deblurring scheme database, wherein the deblurring scheme database stores a plurality of deblurring schemes, each of which corresponds to a blurring type and a blurring degree;

[0080] The deblurring solution database is matched with the image blurring type and the image blurring degree to obtain a target deblurring solution.

[0081] Among them, the blur types include motion blur, defocus blur, Gaussian blur, optical blur, radial blur and uniform blur, and the blur degrees include light blur, medium blur, heavy blur and extremely heavy blur.

[0082] The deblurring the blurred image to be processed according to the target deblurring scheme to obtain a deblurred image specifically includes:

[0083] The blurred image to be processed is cleared according to the target deblurring scheme to obtain an initialization image, residual calculation is performed on the initialization image to obtain a target residual, and the initialization image is iteratively processed according to the target residual to obtain an iterative image;

[0084] The iterative image is subjected to error correction processing to obtain a target iterative image, and the target iterative image is subjected to quantitative evaluation according to a quantitative index to obtain a deblurred image, wherein the quantitative index includes a peak signal-to-noise ratio and a structural similarity.

[0085] The step of optimizing the deblurred image to obtain a target image specifically includes:

[0086] Performing a first optimization process on the deblurred image to obtain an optimized image, wherein the first optimization process includes contrast enhancement process, sharpening process and color correction process;

[0087] The optimized image is subjected to a second optimization process to obtain a target image, wherein the second optimization process includes noise suppression, artifact suppression and image edge refinement.

[0088] The present invention also provides a computer-readable storage medium, wherein the computer-readable storage medium stores an adaptive repair program for blurred images, and when the adaptive repair program for blurred images is executed by a processor, the steps of the adaptive repair method for blurred images as described above are implemented.

[0089] It should be noted that, in this article, the terms "include", "comprises" or any other variations thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, an element defined by the sentence "comprises a ..." does not exclude the existence of other identical elements in the process, method, article or device including the element.

[0090] Of course, those skilled in the art can understand that all or part of the processes in the above-mentioned embodiments can be implemented by instructing related hardware (such as a processor, a controller, etc.) through a computer program, and the program can be stored in a computer-readable storage medium that can be read by a computer, and the program can include the processes of the above-mentioned method embodiments when executed. The computer-readable storage medium can be a memory, a disk, an optical disk, etc.

[0091] It should be understood that the application of the present invention is not limited to the above examples. For ordinary technicians in this field, improvements or changes can be made based on the above description. All these improvements and changes should fall within the scope of protection of the claims attached to the present invention.

Claims

1. A method for adaptively repairing blurred images, characterized in that: The adaptive restoration method of the blurred image comprises: Acquire a blurred image to be processed, perform image analysis on the blurred image to be processed, obtain an image blur type and an image blur degree, and perform scheme matching according to the image blur type and the image blur degree to obtain a target deblurring scheme; The blurred image to be processed is deblurred according to the target deblurring scheme to obtain a deblurred image, and the deblurred image is optimized to obtain a target image.

2. The method for adaptively restoring blurred images according to claim 1, characterized in that: The obtaining of the blurred image to be processed and performing image analysis on the blurred image to be processed to obtain the image blur type and image blur degree specifically include: Obtain a fuzzy image to be processed, input the fuzzy image to be processed into a trained fuzzy image classification model, obtain a probability distribution of each blur type, sort all the probability distributions to obtain a sorting result, and obtain an image blur type according to the sorting result, wherein the image blur type is a blur type corresponding to the maximum probability distribution in the sorting result; Preprocessing the blurred image to be processed to obtain a target blurred image to be processed, and extracting features from the target blurred image to be processed to obtain image features, wherein the preprocessing includes normalization processing, denoising processing and size adjustment processing; The image features are input into a deep learning regression model, a blur degree value is output, and the corresponding image blur degree is matched according to the blur degree value.

3. The method for adaptively repairing blurred images according to claim 2, characterized in that: The training process of the fuzzy image classification model specifically includes: Acquire a training image set and create a type classification training network model, wherein the training image set includes multiple groups of training samples, and each group of training samples includes a blurred image of a blur type and a corresponding clear image; Inputting a group of training samples in the training image set into the type classification training network model, performing feature extraction on the blurred image to obtain target local features, and performing feature mapping on the target local features to obtain a target vector; Classifying the target vector to obtain a probability distribution of blur types, and predicting the type of the target blur image according to the probability distribution to obtain a predicted blur type; Calculating a loss value between the predicted blur type and the blur type of the clear image according to a cross entropy loss function, and adjusting parameters of the type classification training network model according to the loss value; The next set of training samples is input into the type classification training network model until the training status of the type classification training network model meets the preset conditions, thereby obtaining a trained fuzzy image classification model.

4. The method for adaptively restoring blurred images according to claim 1, characterized in that: The scheme matching is performed according to the image blur type and the image blur degree to obtain a target deblurring scheme, specifically including: Constructing a deblurring scheme database, wherein the deblurring scheme database stores a plurality of deblurring schemes, each of which corresponds to a blurring type and a blurring degree; The deblurring solution database is matched with the image blurring type and the image blurring degree to obtain a target deblurring solution.

5. The method for adaptively restoring blurred images according to claim 4, characterized in that: The blur types include motion blur, defocus blur, Gaussian blur, optical blur, radial blur and uniform blur, and the blur degrees include light blur, medium blur, heavy blur and extremely heavy blur.

6. The method for adaptively restoring blurred images according to claim 1, characterized in that: The deblurring the blurred image to be processed according to the target deblurring scheme to obtain a deblurred image specifically includes: The blurred image to be processed is cleared according to the target deblurring scheme to obtain an initialization image, residual calculation is performed on the initialization image to obtain a target residual, and the initialization image is iteratively processed according to the target residual to obtain an iterative image; The iterative image is subjected to error correction processing to obtain a target iterative image, and the target iterative image is subjected to quantitative evaluation according to a quantitative index to obtain a deblurred image, wherein the quantitative index includes a peak signal-to-noise ratio and a structural similarity.

7. The method for adaptively restoring blurred images according to claim 1, characterized in that: The optimizing process of the deblurred image to obtain the target image specifically includes: Performing a first optimization process on the deblurred image to obtain an optimized image, wherein the first optimization process includes contrast enhancement process, sharpening process and color correction process; The optimized image is subjected to a second optimization process to obtain a target image, wherein the second optimization process includes noise suppression, artifact suppression and image edge refinement.

8. An adaptive restoration system for blurred images, characterized in that: The adaptive restoration system for blurred images comprises: A scheme matching module is used to obtain a blurred image to be processed, perform image analysis on the blurred image to be processed, obtain an image blur type and an image blur degree, and perform scheme matching according to the image blur type and the image blur degree to obtain a target deblurring scheme; The image processing module is used to perform deblurring processing on the blurred image to be processed according to the target deblurring scheme to obtain a deblurred image, and perform optimization processing on the deblurred image to obtain a target image.

9. A terminal, characterized in that: The terminal includes a memory, a processor, and a program stored in the memory and executable on the processor. When the program is executed by the processor, the steps of the method for adaptively repairing blurred images as described in any one of claims 1 to 7 are implemented.

10. A computer-readable storage medium, characterized in that: A computer program is stored thereon, wherein the computer-readable storage medium stores an adaptive repair program for blurred images, and when the adaptive repair program for blurred images is executed by a processor, the steps of the adaptive repair method for blurred images as described in any one of claims 1-7 are implemented.

Citation Information

Cited By

  • Instrument value reading method based on image recognition

    CN122336724A

  • An instrument value reading method based on image recognition

    CN122336724B