Image processing method and device based on blur detection

Through the image processing method based on blur detection, combined with Markov chain and edge window detector, the problems of low image blur detection efficiency and low processing quality in the existing technology are solved, and efficient and accurate image blur area processing and processing are realized. Clear image restoration.

CN113205467BActive Publication Date: 2024-10-25NEW VISION MICROELECTRONICS INC
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202110562199.7
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-05-24
Publication Date
2024-10-25
Estimated Expiration
2041-05-24

AI Technical Summary

Technical Problem

The existing technology has problems such as low efficiency in image blur detection and processing, inability to accurately distinguish blurred and clear parts of the image, and low quality of blur processing.

Method used

An image processing method based on fuzzy detection is used to perform image discrimination and fuzzy area detection through the first and second image recognition models, and the fuzzy equation of the Markov chain is used for multi-level restoration, combined with the edge window detector and window function method, step by step. Perform edge detection and progressively solve fuzzy equations to improve image clarity.

Benefits of technology

Significantly improves image processing efficiency and quality, can accurately screen clear images, reduce system resource consumption, and improve the accuracy of blurry area processing and image restoration quality.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN113205467B_ABST
    Figure CN113205467B_ABST
Patent Text Reader

Abstract

The present invention belongs to the field of image processing technology, and specifically relates to an image processing method and device based on blur detection. The method first improves efficiency by identifying whether the image information is a blurred image. Compared with the prior art that directly blurs the image information, the present invention can screen out clear images in advance and reduce system resources; at the same time, when processing the image information, the present invention also first determines the blurred area in the blurred image. When performing blur processing, only the blurred part of the image information can be processed in a targeted manner, further improving efficiency; in addition, when performing blur processing, the present invention uses a Markov chain-based fuzzy equation solution to restore the image, which can restore the image from multiple levels and improve the restored image.
Need to check novelty before this filing date? Find Prior Art

Description

Background Art

[0002] When shooting an object with a camera, the image may be blurred due to the relative movement or shaking between the camera and the object during the exposure process. For example, the forward propulsion of the aircraft and the vibration of the load platform during ground aerial photography, the shaking during the release and opening of the door when shooting an object with an ordinary digital camera, etc., many shooting environments will cause motion blur. Under certain conditions for image acquisition, how to use the information obtained to obtain a clearer image becomes a particularly important step in the imaging process and is also a hot topic in the field of modern image processing. It is of great significance in the fields of astronomical photography, aerial imaging, medical imaging, and civil photography.

[0003] The process of deblurring a blurred image to obtain a clear image is part of image restoration. The image restoration process can be regarded as a deconvolution problem, which belongs to a type of "inverse problem" in mathematical physics problems. The important characteristic of the inverse problem is its pathological nature, that is, the solution of the problem does not continuously depend on the observed data, that is, a small change in the observed data may lead to a large change in the solution. In image restoration, the addition of subtle noise may seriously affect the restoration result. Moreover, we often encounter situations where the degradation conditions are unknown or the degradation model is not known in advance, so we also have to estimate the degradation model. Restoring only from a single image can be regarded as a "blind restoration" problem. There is no good general solution to this type of problem, and it needs to be solved according to the specific situation. The image blurring process can be regarded as the process of convolving a clear image with a blur kernel and adding a certain amount of noise. Image deblurring is to reconstruct a clear image close to the original from the observed degraded, blurred and noisy image. When the blur kernel is unknown, the process of directly restoring a clear image from the blur image is image blind restoration. This type of problem is more pathological and more sensitive to noise.

[0004] Existing image blur detection methods can be roughly divided into two categories: one category gives an estimate of the blur degree of the entire image, and the other category divides the image into several regions and gives an estimate of the blur degree of each region. However, most of them have complex calculation methods, large amount of calculation, and slow processing speed.

[0005] Patent number CN201410344795.8A discloses an image blur detection method based on saliency detection. The technical solution mainly includes: collecting sample images, firstly performing fast Fourier transform and size reduction processing on the three RGB channels of the most salient area of ​​each sample image, constructing a new image with the complex data after size reduction, and using the newly constructed reduced image as the input image of the convolutional neural network to perform clear-blur image classification training to obtain a blur detection model, and finally performing fast Fourier transform and size reduction processing on the three RGB channels of the most salient area of ​​the image to be detected, and constructing a new image to be detected with the complex data after size reduction, and then using the blur detection model to distinguish the clear-blur image of the newly constructed image to be detected.

[0006] Although it has performed classification detection of blurred images through a classification model based on a neural network, it lacks the ability to process blurred images, and when detecting blurred images, it can only distinguish blurred images from clear images, but cannot distinguish the blurred and clear parts of a single image. As a result, it still cannot completely solve the problem of processing blurred images. Summary of the invention

[0007] In view of this, the main purpose of the present invention is to provide an image processing method and device based on blur detection, which first improves efficiency by identifying whether image information is a blurred image. Compared with the prior art that directly blurs image information, the present invention can screen out clear images in advance and reduce system resources; at the same time, when processing image information, the present invention first determines the blurred area in the blurred image, and when performing blur processing, it can only process the blurred part of the image information in a targeted manner, further improving efficiency; in addition, when performing blur processing, the present invention uses a fuzzy equation solution based on a Markov chain to restore the image, which can restore the image from multiple levels and improve the quality of the restored image.

[0008] To achieve the above object, the technical solution of the present invention is achieved as follows:

[0009] The image processing method based on blur detection performs the following steps:

[0010] Step 1: When capturing image information, the image capturing device first uses a first image recognition model to perform image recognition on the captured object to obtain a first image recognition result, and then adds the first image recognition result to the captured image information to obtain complete image information, and then executes step 2;

[0011] Step 2: performing image blur discrimination on the complete image information, specifically comprising: performing image recognition on the image information in the complete image information using the second image recognition model to obtain a second image recognition result, and comparing the second image recognition result with the first image recognition result in the complete image information to obtain a similarity value; if the similarity value between the first image recognition result and the second image recognition result is greater than or equal to a set threshold, then judging that the image information in the complete image information is a clear image; if the similarity value between the first image recognition result and the second image recognition result is less than the set threshold, then judging that the image information in the complete image information is a blurred image, and executing step 3;

[0012] Step 3: Perform blur area detection on the image information in the complete image information, specifically including: based on the similarity value obtained in step 2, calculate the size value of the blur area in the image information; construct an edge window detector equal to the size value of the blur area; use the edge window detector to perform line-by-line edge detection in the image information using a window function, find the blur area part in the image information, and execute step 4;

[0013] Step 4: Perform blur area processing on the image information in the complete image information, specifically including: selecting the blurred area portion found in step 3, enlarging the blurred area portion according to multiple preset ratios to obtain multiple blurred image layers; placing the blurred area at the bottom layer, overlapping them in sequence according to the ratio from small to large, placing the blurred image layer corresponding to the largest ratio at the top layer, and establishing a fuzzy equation based on a Markov chain for each layer; gradually solving the fuzzy equation from the bottom layer to the top layer and restoring the image, while setting adaptive parameters at different scales until the image size reaches the original scale, obtaining the final accurate fuzzy equation, and using the fuzzy equation to restore the blurred area to obtain a clear image.

[0014] Furthermore, the method of performing image recognition on the captured image by the first image recognition model in step 1 includes: determining a target candidate area from the captured object, and performing feature extraction in the target candidate area to obtain extracted image features; performing target detection based on a deep convolutional multi-layer neural network target detection model using the extracted image features to obtain candidate targets; and identifying the candidate targets based on a deep convolutional multi-layer neural network target classification model using the extracted image features to obtain a first image recognition result.

[0015] Furthermore, the method for the second image recognition model in step 2 to perform image recognition on the image information in the complete image information includes: extracting multi-dimensional local features of the image information, and extracting deep learning features of the image information; splicing the multi-dimensional local features and the deep learning features to form a multi-dimensional vector of the image information, and performing dimensionality reduction processing on the spliced ​​multi-dimensional vector through a metric learning dimensionality reduction matrix to obtain metric learning features, wherein the metric learning dimensionality reduction matrix includes a first metric learning dimensionality reduction matrix and a second metric learning dimensionality reduction matrix; recognizing the image according to the metric learning features to obtain a second image recognition result.

[0016] Furthermore, in step 2, the method for comparing the second image recognition result with the first image recognition result in the complete image information to obtain a similarity value includes: setting multiple hierarchical recognition classification sets, namely, a first recognition classification set, a second recognition classification set, ..., an Nth recognition classification set; wherein the second recognition classification set is a subset of the first recognition classification set, and by analogy, the Nth recognition classification set is a subset of the N-1th recognition classification set; each hierarchical recognition classification set contains multiple recognition classification subsets; if the first image recognition result and the second image recognition result both belong to the first recognition classification set, but the first image recognition result and the second image recognition result do not belong to the second recognition classification set, then the similarity value obtained is 1; by analogy, if the first image recognition result and the second image recognition result both belong to the N-1th recognition classification set, but the first image recognition result and the second image recognition result do not belong to the Nth recognition classification set, then the similarity value obtained is N-1.

[0017] Furthermore, the method for calculating the size value of the blurred area in the image information based on the similarity value obtained in step 2 in step 3 includes: using the following formula to calculate the size value of the blurred area in the image information:

[0018] Furthermore, the edge window detector in step 3 is expressed using the following formula: Among them, G(x, y) is the edge detection value of the pixel coordinates (x, y) in the image information, W(x, y) is the gradient value of the pixel coordinates (x, y) in the image information, W(x+1, y+1) is the gradient value of the pixel coordinates (x+1, y+1) in the image information, W(x+1, y) is the gradient value of the pixel coordinates (x+1, y) in the image information, and W(x, y+1) is the gradient value of the pixel coordinates (x, y+1) in the image information.

[0019] Furthermore, in step 3, an edge window detector is used to perform line-by-line edge detection in the image information, and the method for finding the blurred area part in the image information includes: comparing the edge detection value with the set discrimination threshold; if the difference between the edge detection value and the discrimination threshold is within the set threshold range, the pixel point corresponding to the edge detection value is used as a blurred pixel point; and the area composed of all blurred pixels is used as a blurred area B.

[0020] Furthermore, the fuzzy equation based on the Markov chain established in step 4 is expressed using the following formula: Among them B * represents the set of first-order and second-order gradient maps in each direction corresponding to the blurred area B; || represents the modulus operation; K n+1 , K n-1 and K n is a fuzzy equation managed by a Markov chain; represents the convolution operation, L is the convolution kernel; β is the adjustment coefficient, the value range is: 2.5~5; after solving K1 to K n After all the values ​​of are obtained, the step-by-step solution of the fuzzy equations from the bottom layer to the top layer is completed.

[0021] Furthermore, the method for restoring the blurred area to obtain a clear image in step 4 includes: based on the fuzzy equations from the bottom layer to the top layer obtained by solving, setting adaptive parameters at different scales until the image size reaches the original scale, obtaining the final accurate fuzzy equation, and using this fuzzy equation to restore the blurred area to obtain a clear image.

[0022] Image processing device based on blur detection.

[0023] The image processing method and device based on blur detection of the present invention have the following beneficial effects:

[0024] 1. High image processing efficiency: When performing blurred image processing, the present invention first judges the image information. When the judgment result is a clear image, there is no need to perform blurred image processing; if the judgment result is a blurred image, subsequent processing is performed. Compared with the prior art that performs blurred processing on each image, the image processing efficiency can be significantly improved and system resources can be saved; at the same time, when performing blurred image processing, the present invention also needs to perform pre-processing on the blurred image to find the blurred part in the blurred image. Compared with the prior art that processes the entire blurred image, it can further improve the system efficiency and save system resources.

[0025] 2. Simple algorithm: The present invention determines blurred images and blurred areas without reducing processing efficiency; when processing blurred images, the present invention uses two different recognition models to identify the same image information to determine whether the blurred image is blurred, and adds the concept of similarity value to avoid misrecognition caused by image recognition model errors; that is, the results obtained by the two recognition models for the same image information may be different, but this may be due to the errors of the recognition model itself. By adding similarity values, the influence of the errors of the recognition model itself can be eliminated; the discrimination method used does not require a large amount of system calculations, and can be achieved using only existing algorithms, further improving efficiency; in addition, when determining the blurred area, the algorithm used by the present invention is the window function method. Compared with the prior art method using a simple edge operator, this method can more comprehensively find the blurred area in the image, because the edge operator method often cannot find the complete blurred area when calculating the blurred area because the blurred area is highly dispersed, while the window function method can traverse the entire image to find the entire blurred area.

[0026] 3. High quality of blur processing: When performing blur processing, the present invention uses a Markov chain-based fuzzy equation solution method for the blurred area; the advantage of this is that the image can be restored from multiple scales, thereby improving the quality of blurred image restoration; when performing blurred image restoration in the prior art, it is generally based on a blur kernel method. If the blur kernel is unknown, blind restoration is performed. Regardless of whether it is based on a blur kernel or a blind restoration method, most of them are based on one scale, and the restoration process is relatively cumbersome and the restoration quality is not high, resulting in more distorted parts in the image and a higher distortion rate. BRIEF DESCRIPTION OF THE DRAWINGS

[0027] Figure 1 A schematic diagram of a method flow of an image processing method based on blur detection provided by an embodiment of the present invention;

[0028] Figure 2 A schematic diagram of a blurred area of ​​a blurred image of an image processing method and device based on blur detection provided by an embodiment of the present invention;

[0029] Figure 3 A schematic diagram of the principle of performing line-by-line edge detection by an edge window detector of an image processing method and device based on blur detection according to an embodiment of the present invention;

[0030] Figure 4 A schematic diagram of the size of the blur area of ​​the image processing method and device based on blur detection according to an embodiment of the present invention;

[0031] Figure 5A schematic diagram of a curve showing how the image distortion rate after restoration of a blurred image of an image processing method and device based on blur detection provided by an embodiment of the present invention changes with the number of experiments, and a schematic diagram of comparative experimental results of the prior art. DETAILED DESCRIPTION

[0032] The method of the present invention is further described in detail below in conjunction with the accompanying drawings and embodiments of the present invention.

[0033] Example 1

[0034] like Figure 1 Shown

[0035] The image processing method based on blur detection performs the following steps:

[0036] Step 1: When capturing image information, the image capturing device first uses a first image recognition model to perform image recognition on the captured object to obtain a first image recognition result, and then adds the first image recognition result to the captured image information to obtain complete image information, and then executes step 2;

[0037] Step 2: performing image blur discrimination on the complete image information, specifically comprising: performing image recognition on the image information in the complete image information using the second image recognition model to obtain a second image recognition result, and comparing the second image recognition result with the first image recognition result in the complete image information to obtain a similarity value; if the similarity value between the first image recognition result and the second image recognition result is greater than or equal to a set threshold, then judging that the image information in the complete image information is a clear image; if the similarity value between the first image recognition result and the second image recognition result is less than the set threshold, then judging that the image information in the complete image information is a blurred image, and executing step 3;

[0038] Step 3: Perform blur area detection on the image information in the complete image information, specifically including: based on the similarity value obtained in step 2, calculate the size value of the blur area in the image information; construct an edge window detector equal to the size value of the blur area; use the edge window detector to perform line-by-line edge detection in the image information using a window function, find the blur area part in the image information, and execute step 4;

[0039] Step 4: Perform blur area processing on the image information in the complete image information, specifically including: selecting the blurred area portion found in step 3, enlarging the blurred area portion according to multiple preset ratios to obtain multiple blurred image layers; placing the blurred area at the bottom layer, overlapping them in sequence according to the ratio from small to large, placing the blurred image layer corresponding to the largest ratio at the top layer, and establishing a fuzzy equation based on a Markov chain for each layer; gradually solving the fuzzy equation from the bottom layer to the top layer and restoring the image, while setting adaptive parameters at different scales until the image size reaches the original scale, obtaining the final accurate fuzzy equation, and using the fuzzy equation to restore the blurred area to obtain a clear image.

[0040] Example 2

[0041] Based on the previous embodiment, the method for performing image recognition on the captured image by the first image recognition model in step 1 includes: determining a target candidate area from the captured object, and performing feature extraction in the target candidate area to obtain extracted image features; performing target detection based on a deep convolutional multi-layer neural network target detection model using the extracted image features to obtain candidate targets; and identifying the candidate targets based on a deep convolutional multi-layer neural network target classification model using the extracted image features to obtain a first image recognition result.

[0042] Specifically, Convolutional Neural Networks (CNN) is a type of feedforward neural network that includes convolution calculations and has a deep structure. It is one of the representative algorithms of deep learning. Convolutional neural networks have representation learning capabilities and can perform shift-invariant classification on input information according to their hierarchical structure. Therefore, they are also called "Shift-Invariant Artificial Neural Networks (SIANN)".

[0043] The hidden layers of convolutional neural networks include three common structures: convolutional layers, pooling layers, and fully connected layers. In some more modern algorithms, there may be complex structures such as Inception modules and residual blocks. Among the common structures, convolutional layers and pooling layers are unique to convolutional neural networks. The convolution kernel in the convolutional layer contains weight coefficients, while the pooling layer does not contain weight coefficients. Therefore, in the literature, the pooling layer may not be considered an independent layer. Taking LeNet-5 as an example, the order of the three common structures in the hidden layer is usually: input-convolutional layer-pooling layer-fully connected layer-output.

[0044] Example 3

[0045] Based on the previous embodiment, the method for the second image recognition model in step 2 to perform image recognition on the image information in the complete image information includes: extracting multidimensional local features of the image information, and extracting deep learning features of the image information; splicing the multidimensional local features and the deep learning features to form a multidimensional vector of the image information, and performing dimensionality reduction processing on the spliced ​​multidimensional vector through a metric learning dimensionality reduction matrix to obtain metric learning features, wherein the metric learning dimensionality reduction matrix includes a first metric learning dimensionality reduction matrix and a second metric learning dimensionality reduction matrix; recognizing the image according to the metric learning features to obtain a second image recognition result.

[0046] Specifically, according to different methods of processing image information, feature point detection is generally divided into:

[0047] Template-based approach

[0048] The template-based method mainly uses parameter models or templates to detect feature points. Because it needs to build various parameter models or templates, it is usually used to detect feature points of specific types, and the calculation speed is generally fast. The disadvantage is that it is not suitable for templates with more complex forms.

[0049] Edge-based methods

[0050] The edge-based method uses the vertices of polygons or points on the edge of objects with large curvature changes as feature points. Because feature points are a collection of object edges, the edge extraction algorithm has high requirements to a certain extent. If the edge positioning is biased, it will have a great impact on the detection results.

[0051] Grayscale-based methods

[0052] The grayscale-based method uses the local change of the grayscale of the pixel to detect. The feature point is based on a certain algorithm, and the pixel with the largest grayscale change in the algorithm. Differential operations can be used to obtain the derivative of the grayscale around the pixel to find the position of the feature point. The disadvantage of this method is that the noise is relatively large.

[0053] Methods based on spatial transformation

[0054] The method based on spatial transformation uses spatial transformation to obtain feature points with relatively easy-to-identify characteristics, and then detects extreme points in the transformed space. Usually, space is divided into scale space, frequency space, wavelet space, etc. Scale space refers to the point with the smallest or largest absolute value searched in the curvature scale space or in the DOG scale space as a feature point. Frequency space is to use the calculated local phase or specific phase maximum as a feature point. Wavelet transform uses the local maximum of the wavelet coefficient or modulus and the optimal scale to detect extreme points.

[0055] Example 4

[0056] On the basis of the previous embodiment, the method for comparing the second image recognition result with the first image recognition result in the complete image information in step 2 to obtain a similarity value includes: setting multiple hierarchical recognition classification sets, namely, a first recognition classification set, a second recognition classification set, ..., an Nth recognition classification set; wherein the second recognition classification set is a subset of the first recognition classification set, and by analogy, the Nth recognition classification set is a subset of the N-1th recognition classification set; each hierarchical recognition classification set contains multiple recognition classification subsets; if the first image recognition result and the second image recognition result both belong to the first recognition classification set, but the first image recognition result and the second image recognition result do not belong to the second recognition classification set, then the similarity value obtained is 1; by analogy, if the first image recognition result and the second image recognition result both belong to the N-1th recognition classification set, but the first image recognition result and the second image recognition result do not belong to the Nth recognition classification set, then the similarity value obtained is N-1.

[0057] Specifically, when performing blurred image processing, the present invention first determines the image information. When the determination result is a clear image, there is no need to perform blurred image processing. If the determination result is a blurred image, subsequent processing is performed. Compared with the prior art that performs blurred processing on each image, the efficiency of image processing can be significantly improved and system resources can be saved. At the same time, when performing blurred image processing, the present invention also needs to perform pre-processing on the blurred image to find the blurred part in the blurred image. Compared with the prior art that processes the entire blurred image, the efficiency of the system can be further improved and system resources can be saved.

[0058] Example 5

[0059] On the basis of the previous embodiment, the method for calculating the size value of the blurred area in the image information based on the similarity value obtained in step 2 in step 3 includes: using the following formula to calculate the size value of the blurred area in the image information:

[0060] Example 6

[0061] Based on the previous embodiment, the edge window detector in step 3 is expressed using the following formula: Among them, G(x, y) is the edge detection value of the pixel coordinates (x, y) in the image information, W(x, y) is the gradient value of the pixel coordinates (x, y) in the image information, W(x+1, y+1) is the gradient value of the pixel coordinates (x+1, y+1) in the image information, W(x+1, y) is the gradient value of the pixel coordinates (x+1, y) in the image information, and W(x, y+1) is the gradient value of the pixel coordinates (x, y+1) in the image information.

[0062] Specifically, the present invention determines blurred images and blurred areas without reducing processing efficiency; when processing blurred images, the present invention uses two different recognition models to identify the same image information to determine whether the blurred image is blurred, and adds the concept of similarity value to avoid misrecognition caused by image recognition model errors; that is, the results obtained by the two recognition models for the same image information may be different, but this may be due to the errors of the recognition model itself. By adding similarity values, the influence of the errors of the recognition model itself can be eliminated; the discrimination method used does not require a large amount of system calculations, and can be achieved using only existing algorithms, further improving efficiency; in addition, when determining the blurred area, the algorithm used in the present invention is the window function method. Compared with the prior art method using a simple edge operator, this method can more comprehensively find the blurred area in the image, because the edge operator method often cannot find the complete blurred area when calculating the blurred area because the blurred area is highly dispersed, while the window function method can traverse the entire image to find the entire blurred area.

[0063] Example 7

[0064] Based on the previous embodiment, in step 3, an edge window detector is used to perform line-by-line edge detection in the image information, and the method for finding the blurred area part in the image information includes: comparing the edge detection value with the set discrimination threshold; if the difference between the edge detection value and the discrimination threshold is within the set threshold range, the pixel point corresponding to the edge detection value is used as a blurred pixel point; and the area composed of all blurred pixels is used as a blurred area B.

[0065] Specifically, the present invention uses a Markov chain-based fuzzy equation solution method to perform blur processing on the blurred area. The advantage of this method is that the image can be restored from multiple scales, thereby improving the quality of blurred image restoration. When the existing technology restores blurred images, it is generally restored based on a blur kernel method. If the blur kernel is unknown, blind restoration is performed. Whether it is based on a blur kernel or a blind restoration method, most of them are based on one scale, and the restoration process is relatively cumbersome, and the restoration quality is not high, resulting in more distorted parts in the image and a high distortion rate.

[0066] Example 8

[0067] Based on the previous embodiment, the fuzzy equation based on the Markov chain established in step 4 is expressed by the following formula: Among them B * represents the set of first-order and second-order gradient maps in each direction corresponding to the blurred area B; || represents the modulus operation; K n+1 , K n-1 and K n is a fuzzy equation managed by a Markov chain; represents the convolution operation, L is the convolution kernel; β is the adjustment coefficient, the value range is: 2.5~5; after solving K1 to K n After all the values ​​of are obtained, the step-by-step solution of the fuzzy equations from the bottom layer to the top layer is completed.

[0068] Example 9

[0069] Based on the previous embodiment, the method for restoring the blurred area to obtain a clear image in step 4 includes: based on the fuzzy equations from the bottom layer to the top layer obtained by solving, setting adaptive parameters at different scales until the image size reaches the original scale, obtaining the final accurate fuzzy equation, and using this fuzzy equation to restore the blurred area to obtain a clear image.

[0070] Example 10

[0071] Image processing device based on blur detection.

[0072] Those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working process and related instructions of the system described above can refer to the corresponding process in the aforementioned method embodiment, and will not be repeated here.

[0073] It should be noted that the system provided in the above embodiment is only illustrated by the division of the above functional units. In practical applications, the above functions can be assigned to different functional units as needed, that is, the units or steps in the embodiments of the present invention can be decomposed or combined. For example, the units in the above embodiments can be combined into one unit, or further divided into multiple sub-units to complete all or unit functions described above. The names of the units and steps involved in the embodiments of the present invention are only for distinguishing the various units or steps and are not regarded as improper limitations of the present invention.

[0074] Those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working process and related instructions of the storage device and processing device described above can refer to the corresponding process in the aforementioned method embodiment and will not be repeated here.

[0075] Those skilled in the art should be able to appreciate that the units and method steps of each example described in conjunction with the embodiments disclosed herein can be implemented with electronic hardware, computer software or a combination of the two, and the programs corresponding to the software units and method steps can be placed in random access memory (RAM), internal memory, read-only memory (ROM), electrically programmable ROM, electrically erasable programmable ROM, registers, hard disks, removable disks, CD-ROMs, or any other form of storage medium known in the technical field. In order to clearly illustrate the interchangeability of electronic hardware and software, the composition and steps of each example have been generally described in the above description according to the function. Whether these functions are performed in electronic hardware or software depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but this implementation should not be considered to exceed the scope of the present invention.

[0076] The terms “first”, “another part” and the like are used to distinguish similar objects but are not used to describe or indicate a specific sequence or order.

[0077] The term "comprise" or any other similar term is intended to cover non-exclusive inclusion, such that a process, method, article, or unit / apparatus that includes a list 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 unit / apparatus.

[0078] So far, the technical solutions of the present invention have been described in conjunction with the preferred embodiments shown in the accompanying drawings. However, it is easy for those skilled in the art to understand that the protection scope of the present invention is obviously not limited to these specific embodiments. Without departing from the principle of the present invention, those skilled in the art can make equivalent changes or substitutions to the relevant technical marks, and the technical solutions after these changes or substitutions will fall within the protection scope of the present invention.

[0079] The above description is only a preferred embodiment of the present invention and is not intended to limit the protection scope of the present invention.

Claims

1. An image processing method based on blur detection, characterized in that: The method performs the following steps: Step 1: When capturing image information, the image capturing device first uses a first image recognition model to perform image recognition on the captured object to obtain a first image recognition result, and then adds the first image recognition result to the captured image information to obtain complete image information, and then executes step 2; Step 2: performing image blur discrimination on the complete image information, specifically comprising: performing image recognition on the image information in the complete image information using the second image recognition model to obtain a second image recognition result, and comparing the second image recognition result with the first image recognition result in the complete image information to obtain a similarity value; if the similarity value between the first image recognition result and the second image recognition result is greater than or equal to a set threshold, then judging that the image information in the complete image information is a clear image; if the similarity value between the first image recognition result and the second image recognition result is less than the set threshold, then judging that the image information in the complete image information is a blurred image, and executing step 3; Step 3: Perform blur area detection on the image information in the complete image information, specifically including: based on the similarity value obtained in step 2, calculate the size value of the blur area in the image information; construct an edge window detector equal to the size value of the blur area; use the edge window detector to perform line-by-line edge detection in the image information using a window function, find the blur area part in the image information, and execute step 4; Step 4: Perform fuzzy area processing on the image information in the complete image information, specifically including: selecting the fuzzy area part found in step 3, enlarging the fuzzy area part according to multiple preset ratios to obtain multiple fuzzy image layers; placing the fuzzy area at the bottom layer, overlapping them in order from small to large ratios, placing the fuzzy image layer corresponding to the largest ratio at the top layer, and establishing a fuzzy equation based on a Markov chain for each layer; gradually solving the fuzzy equation from the bottom layer to the top layer and restoring the image, while setting adaptive parameters at different scales until the image size reaches the original scale, obtaining the final accurate fuzzy equation, and using the fuzzy equation to restore the fuzzy area to obtain a clear image; The method for calculating the size value of the blurred area in the image information based on the similarity value obtained in step 2 in step 3 includes: using the following formula to calculate the size value of the blurred area in the image information: The edge window detector in step 3 is expressed by the following formula: Wherein, G(x, y) is the edge detection value of the pixel coordinates (x, y) in the image information, W(x, y) is the gradient value of the pixel coordinates (x, y) in the image information, W(x+1, y+1) is the gradient value of the pixel coordinates (x+1, y+1) in the image information, W(x+1, y) is the gradient value of the pixel coordinates (x+1, y) in the image information, and W(x, y+1) is the gradient value of the pixel coordinates (x, y+1) in the image information; The fuzzy equation based on Markov chain established in step 4 is expressed by the following formula: Among them B * represents the set of first-order and second-order gradient maps in each direction corresponding to the blurred area B; || represents the modulus operation; K n+1 , K n-1 and K n is a fuzzy equation managed by a Markov chain; represents the convolution operation, L is the convolution kernel; β is the adjustment coefficient, the value range is: 2.5~5; after solving K1 to K n After all the values ​​of are obtained, the step-by-step solution of the fuzzy equations from the bottom layer to the top layer is completed.

2. The method according to claim 1, characterized in that The method for performing image recognition on the captured image by the first image recognition model in step 1 includes: determining a target candidate area from the captured object, and performing feature extraction in the target candidate area to obtain extracted image features; performing target detection based on a deep convolutional multi-layer neural network target detection model using the extracted image features to obtain candidate targets; and identifying the candidate targets based on a deep convolutional multi-layer neural network target classification model using the extracted image features to obtain a first image recognition result.

3. The method according to claim 2, characterized in that The method for the second image recognition model in step 2 to perform image recognition on the image information in the complete image information includes: extracting multi-dimensional local features of the image information, and extracting deep learning features of the image information; splicing the multi-dimensional local features and the deep learning features to form a multi-dimensional vector of the image information, and performing dimensionality reduction processing on the spliced ​​multi-dimensional vector through a metric learning dimensionality reduction matrix to obtain metric learning features, wherein the metric learning dimensionality reduction matrix includes a first metric learning dimensionality reduction matrix and a second metric learning dimensionality reduction matrix; recognizing the image according to the metric learning features to obtain a second image recognition result.

4. The method according to claim 3, characterized in that The method for comparing the second image recognition result with the first image recognition result in the complete image information in step 2 to obtain a similarity value includes: setting multiple hierarchical recognition classification sets, namely, a first recognition classification set, a second recognition classification set, ..., an Nth recognition classification set; wherein the second recognition classification set is a subset of the first recognition classification set, and by analogy, the Nth recognition classification set is a subset of the N-1th recognition classification set; each hierarchical recognition classification set contains multiple recognition classification subsets; if the first image recognition result and the second image recognition result both belong to the first recognition classification set, but the first image recognition result and the second image recognition result do not belong to the second recognition classification set, then the similarity value obtained is 1; by analogy, if the first image recognition result and the second image recognition result both belong to the N-1th recognition classification set, but the first image recognition result and the second image recognition result do not belong to the Nth recognition classification set, then the similarity value obtained is N-1.

5. The method according to claim 4, characterized in that In step 3, an edge window detector is used to perform line-by-line edge detection in the image information, and the method for finding the blurred area part in the image information includes: comparing the edge detection value with the set discrimination threshold; if the difference between the edge detection value and the discrimination threshold is within the set threshold range, the pixel point corresponding to the edge detection value is used as a blurred pixel point; and the area composed of all blurred pixels is used as a blurred area B.

6. The method according to claim 5, characterized in that The method for restoring the blurred area to obtain a clear image in step 4 includes: based on the fuzzy equations from the bottom layer to the top layer obtained by solving, setting adaptive parameters at different scales until the image size reaches the original scale, obtaining the final accurate fuzzy equation, and using the fuzzy equation to restore the blurred area to obtain a clear image.