Custom restoration method and system for blurred image, terminal and storage medium
By analyzing user needs, determining the deblurred area and intensity, and customizing the repair of blurred images, the problem of low repair efficiency in the existing technology is solved, and efficient image repair and optimal visual effects are achieved.
Patent Information
- Application Number
- CN202411201845.7
- 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
The existing blur image processing methods cannot support user-defined repair methods, resulting in the repaired image requiring further adjustment by the user, which consumes a lot of time and is inefficient in repair.
By acquiring the user's image repair needs, analyzing and processing the blurred images, determining the defuzzy area, blur kernel and defuzzy intensity, performing defuzzy processing and refinement processing, generating the target image to meet the user's repair needs.
It realizes custom repair of blurred images according to user needs, improves repair efficiency, ensures that the repaired images reach the best state, and improves user experience.
Smart Images

Figure CN119228690A_ABST
Abstract
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 customizing the restoration of 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 cannot support user-defined methods for repair, so that the repaired blurred image is not what the user needs. After the repair is completed, the user needs to make further adjustments, which not only consumes a lot of user's time, but also causes the image after the user's adjustment to not be in the best processing state, resulting in low efficiency in repairing blurred images.
[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 customized repair method, system, terminal and storage medium for blurred images, aiming to solve the problem that the prior art cannot support user-defined methods for repair, so that the repaired blurred image needs to be adjusted by the user, which not only takes a lot of time, but also causes the adjusted image to not be in the best processing state, resulting in low efficiency of blurred image repair.
[0006] To achieve the above object, the present invention provides a custom repair method for a blurred image, the custom repair method for a blurred image comprising the following steps:
[0007] Obtaining a blurred image to be processed and a user's image restoration requirement, and analyzing and processing the blurred image to be processed according to the image restoration requirement to obtain a target analysis result;
[0008] According to the target analysis result, the blurred image to be processed is matched with a scheme to obtain a target restoration scheme, the blurred image to be processed is deblurred according to the target restoration scheme to obtain a deblurred image, and the deblurred image is refined to obtain a target image.
[0009] Optionally, in the custom restoration method for blurred images, the target analysis result includes a target deblurring area, a target blur kernel and a target deblurring strength;
[0010] The obtaining of the blurred image to be processed and the image restoration requirement of the user, and analyzing and processing the blurred image to be processed according to the image restoration requirement to obtain a target analysis result specifically includes:
[0011] Obtaining a blurred image to be processed and a user's image restoration requirement, wherein the image restoration requirement includes a restoration area requirement, a restoration type requirement, and a restoration effect requirement;
[0012] Divide the blurred image to be processed into regions according to the repair area requirements to obtain a target deblurred region;
[0013] Determine a blur kernel for the blurred image to be processed according to the restoration type requirement and the restoration area requirement to obtain a target blur kernel;
[0014] The restoration degree of the blurred image to be processed is analyzed according to the restoration effect requirement to obtain the target deblurring strength.
[0015] Optionally, the method for customizing restoration of blurred images, wherein the blurred image to be processed is divided into regions according to the restoration region requirement to obtain a target deblurred region, and then further comprises:
[0016] If the target deblurring area includes multiple deblurring areas, the image content of each deblurring area is acquired, and the priority of each deblurring area is set according to the complexity of all the image contents.
[0017] Optionally, the method for customizing restoration of blurred images, wherein the step of determining a blur kernel for the blurred image to be processed according to the restoration type requirement and the restoration area requirement to obtain a target blur kernel, specifically includes:
[0018] Determining the blur kernel type of the blurred image to be processed according to the restoration type requirement to obtain a target blur kernel type, wherein the blur kernel type includes a uniform blur kernel, a Gaussian blur kernel, and a motion blur kernel;
[0019] Confirming the blur kernel size of the blurred image to be processed according to the size information and feature information of the target deblurring area to obtain the target blur kernel size;
[0020] Fuzzy kernel matching is performed according to the target blur kernel type and the target blur kernel size to obtain a target blur kernel.
[0021] Optionally, the custom restoration method for blurred images, wherein the deblurring of the blurred image to be processed according to the target restoration scheme to obtain the deblurred image, specifically comprises:
[0022] Deblurring the blurred image to be processed according to the target restoration scheme to obtain an initial deblurred image, and performing denoising correction processing on the initial deblurred image to obtain a deblurred image;
[0023] An effect evaluation is performed on the deblurred image to obtain an evaluation result. If the evaluation result is that the deblurring effect of the deblurred image reaches a preset effect, the deblurred image is output.
[0024] Optionally, the method for customizing restoration of blurred images, wherein the step of evaluating the effect of the deblurred image to obtain an evaluation result, further comprises:
[0025] If the evaluation result is that the deblurring effect of the deblurred image does not meet expectations, the target restoration scheme is adjusted according to the evaluation result, and the blurred image to be processed is processed according to the adjusted target restoration scheme.
[0026] Optionally, the method for customizing restoration of blurred images, wherein the step of performing thinning processing on 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 customizing the blurred image, the system for customizing the blurred image includes:
[0030] A demand analysis module is used to obtain the blurred image to be processed and the image restoration requirements of the user, and analyze and process the blurred image to be processed according to the image restoration requirements to obtain a target analysis result;
[0031] The image processing module performs scheme matching on the blurred image to be processed according to the target analysis result to obtain a target restoration scheme, deblurs the blurred image to be processed according to the target restoration scheme to obtain a deblurred image, and refines 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 a custom repair program for blurred images stored in the memory and runnable on the processor, and when the custom repair program for blurred images is executed by the processor, the steps of the custom repair method for blurred images as described above are implemented.
[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 a custom repair program for blurred images, and when the custom repair program for blurred images is executed by a processor, the steps of the custom repair method for blurred images as described above are implemented.
[0034] In the present invention, a blurred image to be processed and a user's image restoration requirement are obtained, and the blurred image to be processed is analyzed and processed according to the image restoration requirement to obtain a target analysis result; a scheme matching is performed on the blurred image to be processed according to the target analysis result to obtain a target restoration scheme, the blurred image to be processed is deblurred according to the target restoration scheme to obtain a deblurred image, and the deblurred image is refined to obtain a target image. The present invention can restore blurred images according to different user requirements, thereby obtaining the deblurred image required by the user, realizing effective processing of blurred images, and improving the restoration efficiency of blurred images to enhance the user experience. BRIEF DESCRIPTION OF THE DRAWINGS
[0035] Figure 1 It is a flow chart of a preferred embodiment of the method for customizing the blurred image repair in the present invention;
[0036] Figure 2 It is a schematic diagram of the principle of a preferred embodiment of the custom repair 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 custom repair method for blurred images described in the preferred embodiment of the present invention is as follows: Figure 1 As shown, the custom repair method for the blurred image includes the following steps:
[0042] Step S10: Obtain the blurred image to be processed and the image restoration requirement of the user, and analyze and process the blurred image to be processed according to the image restoration requirement to obtain a target analysis result.
[0043] The step S10 comprises:
[0044] Step S11, obtaining a blurred image to be processed and a user's image restoration requirement, wherein the image restoration requirement includes a restoration area requirement, a restoration type requirement, and a restoration effect requirement;
[0045] Step S12, dividing the blurred image to be processed into regions according to the repair region requirement to obtain a target deblurring region;
[0046] Step S13, determining a blur kernel for the blurred image to be processed according to the restoration type requirement and the restoration area requirement, to obtain a target blur kernel;
[0047] Step S14: analyzing the degree of restoration of the blurred image to be processed according to the restoration effect requirement to obtain a target deblurring strength.
[0048] Specifically, when a blurred image to be processed, i.e., a blurred image to be processed, is obtained, in order to make the restored image meet the user's requirements, it is necessary to first obtain the user's image restoration requirements, wherein the image restoration requirements include restoration area requirements, restoration type requirements, and restoration effect requirements; then, the blurred image to be processed is divided into regions according to the restoration area requirements to obtain a target deblurred region, specifically by identifying the characteristics of the corresponding region of the blurred image to be processed, for example, whether it contains important details (e.g., a person's face, a text area, etc.) or whether it belongs to a background area (e.g., the sky, a wall, etc.); for an area containing important details, the corresponding deblurring scheme should pay more attention to retaining details and enhancing clarity, while for the background area, A smoother deblurring process can be used to avoid artifacts caused by over-sharpening; a blur kernel is determined for the blurred image to be processed according to the restoration type requirement and the restoration area requirement to obtain a target blur kernel, wherein a blur kernel is a mathematical representation used to describe how each pixel in an image is "diffused" to the pixels around it, resulting in blur, that is, it describes the impact on the image during the blurring process and is the "source" of image blur. The blur kernel can also be regarded as a convolution kernel. When a clear image is convolved with this convolution kernel, a blurring effect will be produced; the blur kernel is usually expressed as a two-dimensional matrix, in which each element represents the diffusion weight at that position; the size and shape of the matrix determine the range and direction of the blur.
[0049] The specific determination process of the target blur kernel is to determine the blur kernel type of the blurred image to be processed according to the restoration type requirement to obtain the target blur kernel type, wherein the blur kernel types include uniform blur kernel, Gaussian blur kernel and motion blur kernel. The uniform blur kernel means that the blur in all directions is uniform, which is common in simple average blur. The Gaussian blur kernel means that the blur is Gaussian distributed, and the influence of the central pixel is the largest. The more it diffuses outward, the smaller the influence is, which is often used to simulate the natural blur effect. The motion blur kernel is used to simulate the motion trajectory of the camera when shooting, and is often expressed as a linear kernel, which represents The blur kernel size of the blurred image to be processed is confirmed according to the size information and feature information of the target deblurring area to obtain the target blur kernel size, wherein the blur kernel size, that is, the size of the blur kernel refers to the size of the blur kernel matrix, which is usually expressed by the number of rows and columns, for example, 3x3, 5x5, etc., and the size of the blur kernel determines the range of blur, that is, the larger the blur kernel, the more severe the image blur, because the larger blur kernel will diffuse the pixel value in a larger area; a large blur kernel is suitable for simulating a larger blur range, for example, strong defocus or motion blur under long exposure. A small blur kernel is suitable for slight blur, for example, slight jitter or slight focus error, and then blur kernel matching is performed according to the target blur kernel type and the target blur kernel size to obtain the target blur kernel.
[0050] The degree of restoration of the blurred image to be processed is analyzed according to the restoration effect requirement, that is, the corresponding deblurring strength is analyzed to obtain the target deblurring strength, wherein the deblurring strength refers to the processing strength applied when restoring the clarity of the image, and different deblurring strengths can affect the details, sharpness and possible artifacts of the deblurring result. The types of deblurring strength include low-intensity deblurring, medium-intensity deblurring and high-intensity deblurring, wherein the low-intensity deblurring refers to a more conservative processing with less image detail restoration, mainly retaining the smoothness of the overall image to avoid introducing obvious artifacts or enhancing noise, and is suitable for scenes with slight blur or where the user wants to retain some of the original blur effects, that is, slight motion blur or defocus blur. For example, a 3x3 blur kernel and a low-intensity algorithm are used to slightly restore the image, and the corresponding result may be that the image is slightly clear, but still retains some blur, and the overall visual effect is smooth without too many sharp details; while the medium-intensity deblurring refers to retaining While improving image smoothness, it also enhances a certain degree of detail recovery and moderately enhances image sharpness, but at the same time controls the generation of noise and artifacts. It is suitable for medium-degree blur, i.e., medium-distance motion blur or slightly defocused blur with a slightly deviated focus. For example, using a 5x5 blur kernel and applying a medium-intensity algorithm, the corresponding restored image details are more obvious than low-intensity deblurring, and the edges are sharper, but a certain sense of smoothness is still maintained, and noise and artifacts are controlled within an acceptable range; the high-intensity deblurring refers to strongly restoring the sharp details of the image, pursuing as much detail restoration as possible. Although high-intensity deblurring can significantly improve the clarity of the image, it may introduce some artifacts or enhance existing image noise. It is suitable for severe blur, i.e., long-exposure motion blur or severe defocus blur. For example, using a 7x7 or larger blur kernel and applying a high-intensity algorithm, the corresponding result is that the image details are obviously restored and the edges are very sharp, but some ring artifacts or small noise enhancement may appear.
[0051] Furthermore, if the target deblurred area includes multiple deblurred areas, the image content of each deblurred area is obtained, and the priority of each deblurred area is set according to the complexity of all the image contents. Subsequently, deblurred areas with high priority, i.e., important areas, are preferentially processed to ensure that the key parts obtain the best restoration effect.
[0052] Step S20, matching the blurred image to be processed according to the target analysis result to obtain a target restoration solution, deblurring the blurred image to be processed according to the target restoration solution to obtain a deblurred image, and refining the deblurred image to obtain a target image.
[0053] Specifically, in an embodiment of the present invention, after obtaining the corresponding target analysis results, namely, the target deblurring area, the target blur kernel and the target deblurring strength, it is necessary to perform scheme matching on the blurred image to be processed according to the target analysis results to obtain a target restoration scheme. Specifically, a deblurring scheme database is constructed, wherein the deblurring scheme database stores multiple deblurring schemes, each of which corresponds to a deblurring area, a blur kernel and a deblurring strength. Thereafter, the deblurring scheme database is matched according to the target analysis results to obtain a target restoration scheme. For example, assuming that there is a motion blurred image and the user wants to restore it in a medium-intensity manner, the target analysis result corresponding to the user's image restoration requirement is: the target blurring area is the area of the moving object in the image, the target blur kernel is a blur kernel estimated to be 5x5 according to the motion trajectory of the object, and the target deblurring strength is to select medium-intensity deblurring. The corresponding target restoration scheme is to use a 5x5 blur kernel and apply a medium-intensity algorithm for deblurring. During the deblurring process, the deblurring strength is adjusted so that the details and sharpness of the image are appropriately enhanced while avoiding obvious noise or artifacts. Afterwards, the blurred image to be processed is deblurred according to the target restoration scheme to obtain a deblurred image. Specifically, the blurred image to be processed is deblurred according to the target blurring scheme to obtain an initial deblurred image; the image after the deblurring process usually contains some residual blurring effects or noise. In order to further refine the image quality, the initial clear image can be denoised; after the denoising process is completed, there may still be a certain residual error. In this case, the initial deblurred image can be error corrected by training a residual learning network to learn the residual and perform correction, so that the residual blur and artifacts can be effectively reduced, and a deblurred image can be obtained after the processing is completed.
[0054] Afterwards, it is necessary to evaluate the effect of the deblurred image, that is, to evaluate the effect of the deblurred image through an image quality evaluation method (for example, PSNR, SSIM, etc.) to obtain an evaluation result. If the evaluation result is that the deblurring effect of the deblurred image reaches a preset effect, the deblurred image is output; if the evaluation result is that the deblurring effect of the deblurred image does not meet expectations, the target restoration scheme is adjusted according to the evaluation result, and the blurred image to be processed is processed according to the adjusted target restoration scheme until the deblurring effect of the deblurred image meets the preset requirements. 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.
[0055] 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.
[0056] Furthermore, if Figure 2 As shown, based on the above-mentioned custom restoration method for blurred images, the present invention also provides a custom restoration system for blurred images, and the custom restoration system for blurred images includes:
[0057] The demand analysis module 51 is used to obtain the blurred image to be processed and the image restoration demand of the user, and analyze and process the blurred image to be processed according to the image restoration demand to obtain a target analysis result;
[0058] The image processing module 52 performs scheme matching on the blurred image to be processed according to the target analysis result to obtain a target restoration scheme, deblurs the blurred image to be processed according to the target restoration scheme to obtain a deblurred image, and refines the deblurred image to obtain a target image.
[0059] Furthermore, if Figure 3 As shown, based on the above-mentioned custom repair method for blurred images, the present invention also provides a terminal, which 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.
[0060] 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, a custom repair program 40 for blurred images is stored on the memory 20, and the custom repair program 40 for blurred images can be executed by the processor 10, thereby realizing the custom repair method for blurred images in the present application.
[0061] 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 a custom repair method for the blurred image.
[0062] 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.
[0063] In one embodiment, when the processor 10 executes the custom repair program 40 for blurry images in the memory 20, the following steps are implemented:
[0064] Obtaining a blurred image to be processed and a user's image restoration requirement, and analyzing and processing the blurred image to be processed according to the image restoration requirement to obtain a target analysis result;
[0065] According to the target analysis result, the blurred image to be processed is matched with a scheme to obtain a target restoration scheme, the blurred image to be processed is deblurred according to the target restoration scheme to obtain a deblurred image, and the deblurred image is refined to obtain a target image.
[0066] Wherein, the target analysis result includes the target deblurring area, the target blur kernel and the target deblurring strength;
[0067] The obtaining of the blurred image to be processed and the image restoration requirement of the user, and analyzing and processing the blurred image to be processed according to the image restoration requirement to obtain a target analysis result specifically includes:
[0068] Obtaining a blurred image to be processed and a user's image restoration requirement, wherein the image restoration requirement includes a restoration area requirement, a restoration type requirement, and a restoration effect requirement;
[0069] Divide the blurred image to be processed into regions according to the repair area requirements to obtain a target deblurred region;
[0070] Determine a blur kernel for the blurred image to be processed according to the restoration type requirement and the restoration area requirement to obtain a target blur kernel;
[0071] The restoration degree of the blurred image to be processed is analyzed according to the restoration effect requirement to obtain the target deblurring strength.
[0072] The method further includes dividing the blurred image to be processed into regions according to the repair region requirement to obtain a target deblurred region, and then:
[0073] If the target deblurring area includes multiple deblurring areas, the image content of each deblurring area is acquired, and the priority of each deblurring area is set according to the complexity of all the image contents.
[0074] The step of determining the blur kernel of the blurred image to be processed according to the restoration type requirement and the restoration area requirement to obtain a target blur kernel specifically includes:
[0075] Determining the blur kernel type of the blurred image to be processed according to the restoration type requirement to obtain a target blur kernel type, wherein the blur kernel type includes a uniform blur kernel, a Gaussian blur kernel, and a motion blur kernel;
[0076] Confirming the blur kernel size of the blurred image to be processed according to the size information and feature information of the target deblurring area to obtain the target blur kernel size;
[0077] Fuzzy kernel matching is performed according to the target blur kernel type and the target blur kernel size to obtain a target blur kernel.
[0078] The deblurring the blurred image to be processed according to the target restoration scheme to obtain the deblurred image specifically includes:
[0079] Deblurring the blurred image to be processed according to the target restoration scheme to obtain an initial deblurred image, and performing denoising correction processing on the initial deblurred image to obtain a deblurred image;
[0080] An effect evaluation is performed on the deblurred image to obtain an evaluation result. If the evaluation result is that the deblurring effect of the deblurred image reaches a preset effect, the deblurred image is output.
[0081] The step of evaluating the effect of the deblurred image to obtain an evaluation result further includes:
[0082] If the evaluation result is that the deblurring effect of the deblurred image does not meet expectations, the target restoration scheme is adjusted according to the evaluation result, and the blurred image to be processed is processed according to the adjusted target restoration scheme.
[0083] The step of performing thinning processing on the deblurred image to obtain a target image specifically includes:
[0084] 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;
[0085] 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.
[0086] The present invention also provides a computer-readable storage medium, wherein the computer-readable storage medium stores a custom repair program for blurred images, and when the custom repair program for blurred images is executed by a processor, the steps of the custom repair method for blurred images described above are implemented.
[0087] 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 includes 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.
[0088] 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.
[0089] 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 custom repair method for blurred images, characterized in that: The custom repair method for the blurred image includes: Obtaining a blurred image to be processed and a user's image restoration requirement, and analyzing and processing the blurred image to be processed according to the image restoration requirement to obtain a target analysis result; According to the target analysis result, the blurred image to be processed is matched with a scheme to obtain a target restoration scheme, the blurred image to be processed is deblurred according to the target restoration scheme to obtain a deblurred image, and the deblurred image is refined to obtain a target image.
2. The method for customizing the blurred image according to claim 1, characterized in that: The target analysis result includes a target deblurring area, a target blur kernel and a target deblurring strength; The obtaining of the blurred image to be processed and the image restoration requirement of the user, and analyzing and processing the blurred image to be processed according to the image restoration requirement to obtain a target analysis result specifically includes: Obtaining a blurred image to be processed and a user's image restoration requirement, wherein the image restoration requirement includes a restoration area requirement, a restoration type requirement, and a restoration effect requirement; Divide the blurred image to be processed into regions according to the repair area requirements to obtain a target deblurred region; Determine a blur kernel for the blurred image to be processed according to the restoration type requirement and the restoration area requirement to obtain a target blur kernel; The restoration degree of the blurred image to be processed is analyzed according to the restoration effect requirement to obtain the target deblurring strength.
3. The method for customizing the blurred image according to claim 2, characterized in that: The blur image to be processed is divided into regions according to the repair region requirement to obtain a target deblurring region, and then the following steps are further included: If the target deblurring area includes multiple deblurring areas, the image content of each deblurring area is acquired, and the priority of each deblurring area is set according to the complexity of all the image contents.
4. The method for customizing the blurred image restoration according to claim 2, characterized in that: Determining the blur kernel of the blurred image to be processed according to the restoration type requirement and the restoration area requirement to obtain a target blur kernel specifically includes: Determining the blur kernel type of the blurred image to be processed according to the restoration type requirement to obtain a target blur kernel type, wherein the blur kernel type includes a uniform blur kernel, a Gaussian blur kernel, and a motion blur kernel; Confirming the blur kernel size of the blurred image to be processed according to the size information and feature information of the target deblurring area to obtain the target blur kernel size; Fuzzy kernel matching is performed according to the target blur kernel type and the target blur kernel size to obtain a target blur kernel.
5. The method for customizing the blurred image restoration according to claim 1, characterized in that: The deblurring the blurred image to be processed according to the target restoration scheme to obtain a deblurred image specifically includes: Deblurring the blurred image to be processed according to the target restoration scheme to obtain an initial deblurred image, and performing denoising correction processing on the initial deblurred image to obtain a deblurred image; An effect evaluation is performed on the deblurred image to obtain an evaluation result. If the evaluation result is that the deblurring effect of the deblurred image reaches a preset effect, the deblurred image is output.
6. The method for customizing the blurred image restoration according to claim 1, characterized in that: The step of evaluating the effect of the deblurred image to obtain an evaluation result further includes: If the evaluation result is that the deblurring effect of the deblurred image does not meet expectations, the target restoration scheme is adjusted according to the evaluation result, and the blurred image to be processed is processed according to the adjusted target restoration scheme.
7. The method for customizing the blurred image restoration according to claim 1, characterized in that: The thinning process of the deblurred image to obtain a 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. A custom restoration system for blurred images, characterized in that: The custom repair system for blurred images includes: A demand analysis module is used to obtain the blurred image to be processed and the image restoration requirements of the user, and analyze and process the blurred image to be processed according to the image restoration requirements to obtain a target analysis result; The image processing module performs scheme matching on the blurred image to be processed according to the target analysis result to obtain a target restoration scheme, deblurs the blurred image to be processed according to the target restoration scheme to obtain a deblurred image, and refines 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 custom repair method for 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 a custom repair program for blurred images, and when the custom repair program for blurred images is executed by a processor, the steps of the custom repair method for blurred images as described in any one of claims 1-7 are implemented.
Citation Information
Patent Citations
Image de-blurring method and apparatus
CN104112252A
Image de-blurring method and image de-blurring device
CN104331871A
An image deblurring method and system based on depth learning
CN109087256A
Image processing method and device, storage medium and terminal
CN114708166A
