Image fuzziness evaluation method and device, computer equipment and storage medium

By using the gradient direction entropy weighting operation of the frequency domain decomposed image in the image blur evaluation, the problem of low accuracy of image blur evaluation in the existing technology is solved, and higher accuracy and consistency are achieved.

CN118587154APending Publication Date: 2024-09-03ARCSOFT CORP LTD
View PDF 0 Cites 2 Cited by

Patent Information

Application Number
CN202410584758.8
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-05-11
Publication Date
2024-09-03

AI Technical Summary

Technical Problem

Existing reference-free image blur evaluation methods are easily affected by noise and other factors, resulting in low accuracy of image blur evaluation.

Method used

By obtaining at least two frequency domain decomposition images of the image to be evaluated, the uncertainty in the gradient change direction is determined as the gradient direction entropy of the frequency domain decomposition image, and a weighting operation is performed based on the weight value of each frequency domain decomposition image to obtain the evaluation The blur score of the image.

Benefits of technology

It improves the accuracy of image blur evaluation, enhances the consistency between blur evaluation results and subjective evaluation, and avoids the influence of noise and other factors.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118587154A
    Figure CN118587154A
Patent Text Reader

Abstract

The invention relates to an image fuzziness evaluation method and device, computer equipment and a storage medium, and the method comprises the steps: obtaining at least two frequency domain decomposition images of a to-be-evaluated image, and enabling the two frequency domain decomposition images to belong to different frequency domains of the to-be-evaluated image; in each frequency domain decomposition image, determining the uncertainty of the gradient change direction as the gradient direction entropy of the frequency domain decomposition image; and further, based on the weight value of each frequency domain decomposition image, carrying out weighted operation on the gradient direction entropy of each frequency domain decomposition image to obtain an ambiguity score of the to-be-evaluated image. According to the method and the device, the problem of low accuracy of image fuzziness evaluation is solved, and the accuracy of image fuzziness evaluation is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of image processing technology, and in particular to an image blur evaluation method, apparatus, computer equipment and storage medium. Background Art

[0002] Image blur evaluation is a technology related to measuring image clarity, which is widely used in image quality assessment, image restoration, image compression and other fields. The methods of image blur evaluation can be divided into subjective evaluation and objective evaluation. Among them, objective evaluation includes reference evaluation and non-reference evaluation. Reference evaluation refers to evaluating blur by comparing the difference between the original image and the blurred image when there is an original image, while non-reference evaluation refers to evaluating blur based on the statistical characteristics or edge information of the image when there is no original image.

[0003] The current no-reference evaluation method is to use edge detection filters in the horizontal and vertical directions to calculate the gradient magnitude matrix and zero gradient ratio of the image to be evaluated, and determine the evaluation score for evaluating the blurriness of the image to be evaluated based on the gradient magnitude matrix and zero gradient ratio. However, the above method is easily affected by factors such as noise, resulting in low accuracy in image blurriness evaluation.

[0004] With regard to the problem of low accuracy of image blur evaluation in related technologies, no effective solution has been proposed so far. Summary of the invention

[0005] In this embodiment, a method, apparatus, computer device and storage medium for evaluating image blur are provided to solve the problem of low accuracy of image blur evaluation in related technologies.

[0006] In a first aspect, a method for evaluating image blur is provided in this embodiment, and the method comprises:

[0007] Acquire at least two frequency domain decomposition images of the image to be evaluated, wherein the two frequency domain decomposition images belong to different frequency domains of the image to be evaluated;

[0008] In each of the frequency domain decomposition images, determining the uncertainty of the gradient change direction as the gradient direction entropy of the frequency domain decomposition image;

[0009] Based on the weight value of each frequency domain decomposition image, a weighted operation is performed on the gradient directional entropy of each frequency domain decomposition image to obtain a blur score of the image to be evaluated.

[0010] In some embodiments, determining the uncertainty of the gradient change direction in each frequency domain decomposition image as the gradient direction entropy of the frequency domain decomposition image includes:

[0011] Determine a gradient direction map corresponding to each of the frequency domain decomposition images;

[0012] An information entropy operation is performed based on the gradient directional map to obtain the gradient directional entropy.

[0013] In some embodiments, performing information entropy calculation based on the gradient directional map to obtain the gradient directional entropy includes:

[0014] In the gradient direction map, determining the probability of pixels corresponding to each gradient direction value appearing in the gradient direction map;

[0015] The gradient direction entropy is determined according to the probabilities corresponding to the multiple gradient direction values.

[0016] In some embodiments, determining the probability of a pixel corresponding to each gradient direction value appearing in the gradient direction map includes:

[0017] Determining a target gradient direction value among a plurality of different gradient direction values;

[0018] Determining a probability corresponding to the target gradient direction value according to a ratio of the number of pixels corresponding to the target gradient direction value to the number of all pixels in the gradient direction map;

[0019] All the gradient direction values ​​are sequentially used as the target gradient direction value to obtain the probability corresponding to each of the gradient direction values.

[0020] In some embodiments, after obtaining the blur score of the image to be evaluated, when the image to be evaluated is a partial image of the original image, the method further includes:

[0021] Obtaining blur scores of image blocks in different areas of the original image, wherein the image to be evaluated is one of the multiple image blocks;

[0022] According to the blur score corresponding to each of the image blocks, a local image enhancement strategy corresponding to the image block is selected;

[0023] According to all the local image enhancement strategies, the original image is enhanced.

[0024] In some of the embodiments, selecting a local image enhancement strategy corresponding to the image block according to the blur score corresponding to each image block includes:

[0025] According to the blur score corresponding to each image block, the image enhancement method and image enhancement parameters of the image block are determined to obtain the local image enhancement strategy.

[0026] In some embodiments, after obtaining the blur score of the image to be evaluated, when the image to be evaluated is an image frame of a video stream, the method further includes:

[0027] Obtaining multiple blur scores corresponding to multiple image frames in the video stream;

[0028] The blur attribute of the video stream is determined according to the numerical calculation results of the plurality of blur scores.

[0029] In some embodiments, judging the blur attribute of the video stream according to the numerical calculation results of the plurality of blur scores includes:

[0030] Determining the video blurriness of the video stream according to an average of the plurality of blurriness scores; or,

[0031] According to the difference between the two blur scores, blur consistency between the corresponding two image frames is determined.

[0032] In some of the embodiments, the weight value of each of the frequency domain decomposition images is determined according to the position and attribute characteristics of the region of interest in the image to be evaluated.

[0033] In some of the embodiments, the at least two frequency domain decomposition images in different frequency domains include a low frequency image, a medium frequency image and a high frequency image.

[0034] In a second aspect, an image blur evaluation device is provided in this embodiment, the device comprising: an acquisition module, a determination module and an evaluation module;

[0035] The acquisition module is used to acquire at least two frequency domain decomposition images of the image to be evaluated, wherein the two frequency domain decomposition images belong to different frequency domains of the image to be evaluated;

[0036] The determination module is used to determine the uncertainty of the gradient change direction in each of the frequency domain decomposition images as the gradient direction entropy of the frequency domain decomposition image;

[0037] The evaluation module is used to perform a weighted operation on the gradient directional entropy of each frequency domain decomposition image based on the weight value of each frequency domain decomposition image to obtain a blur score of the image to be evaluated.

[0038] In a third aspect, a computer device is provided in this embodiment, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the image blur evaluation method described in the first aspect when executing the computer program.

[0039] In a fourth aspect, a storage medium is provided in this embodiment, on which a computer program is stored, and when the program is executed by a processor, the image blur evaluation method described in the first aspect is implemented.

[0040] Compared with the related art, the image blur evaluation method, apparatus, computer equipment and storage medium provided in the present embodiment obtain at least two frequency domain decomposition images of the image to be evaluated, wherein the two frequency domain decomposition images belong to different frequency domains of the image to be evaluated; in each frequency domain decomposition image, the uncertainty of the gradient change direction is determined as the gradient directional entropy of the frequency domain decomposition image; further, based on the weight value of each frequency domain decomposition image, the gradient directional entropy of each frequency domain decomposition image is weightedly calculated to obtain the blur score of the image to be evaluated, thereby solving the problem of low accuracy of image blur evaluation and improving the accuracy of image blur evaluation.

[0041] Details of one or more embodiments of the present application are set forth in the following drawings and description to make other features, objects, and advantages of the present application more readily apparent. BRIEF DESCRIPTION OF THE DRAWINGS

[0042] The drawings described herein are used to provide a further understanding of the present application and constitute a part of the present application. The illustrative embodiments of the present application and their descriptions are used to explain the present application and do not constitute an improper limitation on the present application. In the drawings:

[0043] Figure 1 It is a hardware structure block diagram of a terminal device of an image blur evaluation method provided by an embodiment of the present application;

[0044] Figure 2 is a flow chart of an image blur evaluation method provided by an embodiment of the present application;

[0045] Figure 3 is a flow chart of an image enhancement method provided by an embodiment of the present application;

[0046] Figure 4 is a flow chart of a method for determining blur attributes of a video stream provided by an embodiment of the present application;

[0047] Figure 5 is a flow chart of an image blur evaluation method provided by a preferred embodiment of the present application;

[0048] Figure 6 It is a structural block diagram of an image blur evaluation device provided in one embodiment of the present application.

[0049] In the figure: 102, processor; 104, memory; 106, transmission device; 108, input and output device; 10, acquisition module; 20, determination module; 30, evaluation module. DETAILED DESCRIPTION

[0050] In order to more clearly understand the purpose, technical solutions and advantages of the present application, the present application is described and illustrated below in conjunction with the accompanying drawings and embodiments.

[0051] Unless otherwise defined, the technical terms or scientific terms involved in this application shall have the general meaning understood by people with ordinary skills in the technical field to which this application belongs. The words "one", "a", "a", "the", "these" and the like in this application do not represent quantitative restrictions, and they can be singular or plural. The terms "include", "comprise", "have" and any variants thereof involved in this application are intended to cover non-exclusive inclusions; for example, a process, method and system, product or device comprising a series of steps or modules (units) is not limited to the listed steps or modules (units), but may include unlisted steps or modules (units), or may include other steps or modules (units) inherent to these processes, methods, products or devices. The words "connect", "connected", "coupled" and the like involved in this application are not limited to physical or mechanical connections, but may include electrical connections, whether directly or indirectly. The "multiple" involved in this application refers to two or more. "And / or" describes the association relationship of associated objects, indicating that there can be three relationships. For example, "A and / or B" can mean: A exists alone, A and B exist at the same time, and B exists alone. Usually, the character " / " indicates that the objects associated with each other are in an "or" relationship. The terms "first", "second", "third", etc. involved in this application are only used to distinguish similar objects and do not represent a specific ordering of the objects.

[0052] The method embodiment provided in this embodiment can be executed in a terminal, a computer or a similar computing device. For example, running on a terminal, Figure 1 FIG. 1 is a hardware structure diagram of a terminal of the image blur evaluation method of this embodiment. Figure 1 As shown, the terminal may include one or more ( Figure 1 Only one is shown in the figure) processor 102 and memory 104 for storing data, wherein processor 102 may include but is not limited to a processing device such as a microprocessor MCU or a programmable logic device FPGA. The above terminal may also include a transmission device 106 and an input and output device 108 for communication functions. It can be understood by those skilled in the art that Figure 1 The structure shown is only for illustration and does not limit the structure of the above terminal. Figure 1 More or fewer components as shown, or with Figure 1 Different configurations shown.

[0053] The memory 104 can be used to store computer programs, for example, software programs and modules of application software, such as the computer program corresponding to the image blur evaluation method in this embodiment. The processor 102 executes various functional applications and data processing by running the computer program stored in the memory 104, that is, to implement the above method. The memory 104 may include a high-speed random access memory, and may also include a non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory. In some instances, the memory 104 may further include a memory remotely arranged relative to the processor 102, and these remote memories may be connected to the terminal via a network. Examples of the above-mentioned network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.

[0054] The transmission device 106 is used to receive or send data via a network. The above network includes a wireless network provided by the communication provider of the terminal. In one example, the transmission device 106 includes a network adapter (Network Interface Controller, referred to as NIC), which can be connected to other network devices through a base station so as to communicate with the Internet. In one example, the transmission device 106 can be a radio frequency (Radio Frequency, referred to as RF) module, which is used to communicate with the Internet wirelessly.

[0055] In this embodiment, a method for evaluating image blur is provided. Figure 2 is a flow chart of the image blur evaluation method of this embodiment, as shown in Figure 2 As shown, the process includes the following steps:

[0056] Step S210: obtaining at least two frequency domain decomposition images of the image to be evaluated, wherein the two frequency domain decomposition images belong to different frequency domains of the image to be evaluated.

[0057] In this embodiment, the image to be evaluated is an image that needs to be judged for blurriness, which can be obtained by taking an image acquisition device, or can be an image automatically generated by a computer, or can be an image frame intercepted from a video stream. Furthermore, the image to be evaluated can be an image containing any target, such as a human body, a face, a vehicle, a landscape, a medical image, etc. Specifically, a frequency domain decomposition method such as Fourier transform, wavelet transform or image pyramid can be used to process the image to be evaluated, and at least two frequency domain decomposition images in different frequency domains can be obtained. The frequency domain decomposition images can be at least two of a low-frequency image, a medium-frequency image and a high-frequency image.

[0058] It should be noted that the frequency domain decomposition image is at least two images in different frequency domains obtained by frequency domain decomposition methods such as Fourier transform, wavelet transform or image pyramid. Among them, frequency domain decomposition refers to describing the characteristics of an image with spatial frequency (i.e. wave number) as the independent variable, decomposing the spatial variation of the pixel value of an image into the linear superposition of simple vibration functions with different amplitudes, spatial frequencies and phases. The composition and distribution of various spatial frequency components in the image are called spatial spectrum.

[0059] For images obtained through image super-resolution reconstruction, image compression, image fusion or other intelligent processing algorithms, image blur evaluation can provide effective assistance for verifying the algorithm effect. The images to be evaluated in this embodiment include but are not limited to super-resolution algorithm effect images, compressed images and fused images.

[0060] Step S220: In each frequency domain decomposition image, the uncertainty of the gradient change direction is determined as the gradient direction entropy of the frequency domain decomposition image.

[0061] It should be noted that the gradient direction entropy of the frequency domain decomposition image represents the uncertainty of the gradient change direction in the image. The uncertainty of the gradient change direction refers to the randomness of the distribution of different gradient direction values ​​in the image, for example, the degree of change and distribution of the gradient direction of each pixel. The higher the gradient direction entropy of the image, the more gradient direction changes the image has, such as a clear image, while the lower the gradient direction entropy of the image, the more uniform and consistent the distribution of the gradient direction, such as a more blurred image.

[0062] Step S230 , based on the weight value of each frequency domain decomposition image, a weighted operation is performed on the gradient directional entropy of each frequency domain decomposition image to obtain a blur score of the image to be evaluated.

[0063] Specifically, a weight value corresponding to each frequency domain decomposition image is obtained, and a weighted operation is performed on the gradient directional entropy of each frequency domain decomposition image based on the weight value to obtain a blur score of the image to be evaluated, so as to use the gradient directional entropy to characterize the blur degree of the image, so that the blur evaluation result has a higher consistency with the subjective evaluation. Among them, images in different frequency domains contain different image information, and the weight value of each frequency domain decomposition image in this embodiment can be set according to demand.

[0064] Exemplarily, the frequency domain decomposition image corresponding to the image to be evaluated includes a low-frequency image F 1 , intermediate frequency image F m and high frequency image F h , image F 1 、F m and F h The influence weights of the blur degree of the image to be evaluated are ω 1 ,ω m and ωh , and image F 1 、F m and F h The corresponding gradient direction entropies are and At this time, the blur score S of the image to be evaluated can be obtained by weighted operation, as shown in formula (1):

[0065]

[0066] It should be noted that since the gradient direction distribution of the blurred image is more uniform or concentrated, and the clear image has more gradient direction changes, the size of the gradient direction entropy is negatively correlated with the blurriness of the image, which makes the size of the blurriness score negatively correlated with the blurriness of the image, that is, the larger the blurriness score, the lower the image blurriness.

[0067] In the existing no-reference evaluation method, the image blur is evaluated based on the gradient magnitude matrix and zero gradient ratio of the image to be evaluated. However, the above method is easily affected by factors such as noise, resulting in low accuracy of image blur evaluation.

[0068] Compared with the prior art, the present application determines the gradient directional entropy in each frequency domain decomposition image of the image to be evaluated; further, based on the weight value of each frequency domain decomposition image, the gradient directional entropy is weighted to obtain the blur score of the image to be evaluated. Based on this, the uncertainty of the gradient change direction in the image is used to characterize the image blur degree, improve the consistency of the blur evaluation result and the subjective evaluation, and adopt a multi-scale calculation method to use different weight parameters for different frequency regions to calculate the blur score. While avoiding the influence of noise, brightness and other factors on the blur evaluation process, the influence of the image information-rich area is strengthened, solving the problem of low accuracy of image blur evaluation and achieving the improvement of the accuracy of image blur evaluation.

[0069] In some embodiments, in step S220, determining the uncertainty of the gradient change direction in each frequency domain decomposition image as the gradient direction entropy of the frequency domain decomposition image includes the following steps:

[0070] Step S221, determining the gradient direction map corresponding to each frequency domain decomposition image;

[0071] Step S222, performing information entropy calculation based on the gradient directional map to obtain gradient directional entropy.

[0072] Specifically, in each frequency domain decomposition image, the gradient direction of each pixel is calculated to obtain the gradient direction value of each pixel in the image, including the horizontal gradient value and the vertical gradient value. x and the vertical gradient value G yThe following formulas (2) and (3) are used to obtain:

[0073] G x =F(x+1, y)-F(x, y) (2)

[0074] G y =F(x, y+1)-F(x, y) (3)

[0075] In formula (2), F(x, y) represents the grayscale value of the image at (x, y), and F(x+1, y) represents the grayscale value of the image at (x+1, y). In formula (3), F(x, y) represents the grayscale value of the image at (x, y), and F(x, y+1) represents the grayscale value of the image at (x, y+1).

[0076] Furthermore, the gradient direction formula is used to calculate the gradient direction value of each pixel in the frequency domain decomposition image, as shown in formula (4):

[0077]

[0078] In formula (4), θ represents the gradient direction value of each pixel; G x , G y Represent the horizontal gradient value and vertical gradient value of the pixel respectively.

[0079] After that, based on the gradient direction value of each pixel, a gradient direction map corresponding to the frequency domain decomposition image is generated, the probability of different gradient direction values ​​appearing in the gradient direction map is counted, and information entropy is calculated based on the probabilities corresponding to multiple gradient direction values ​​to obtain the gradient direction entropy of the frequency domain decomposition image. Information entropy is the amount of information gathered by pixels in an image, for example, the amount of information contained in the aggregated features such as chromaticity, brightness, and grayscale of pixels in an image.

[0080] Through this embodiment, the gradient directional map corresponding to each frequency domain decomposition image is determined, and information entropy calculation is performed based on the gradient directional map to obtain gradient directional entropy, so that the gradient directional entropy can be used to characterize the blur degree of the image, thereby improving the consistency of subsequent blur evaluation results with subjective evaluation.

[0081] In some of the embodiments, performing information entropy calculation based on the gradient directional map to obtain gradient directional entropy in step S222 includes the following steps: determining, in the gradient directional map, the probability of pixels corresponding to each gradient directional value appearing in the gradient directional map; and determining the gradient directional entropy based on the probabilities corresponding to multiple gradient directional values.

[0082] Specifically, after obtaining the gradient direction map, different gradient direction values ​​in the gradient direction map can be determined, and different gradient direction values ​​can be sequentially used as target gradient direction values ​​for probability statistics to obtain the probability of pixels corresponding to each gradient direction value appearing in the gradient direction map.

[0083] Furthermore, the information entropy is calculated based on the probabilities corresponding to multiple gradient direction values ​​to obtain the gradient direction entropy of the frequency domain decomposition image, so as to accurately measure the uncertainty of the gradient change direction in the image. The gradient direction entropy can be obtained by formula (5):

[0084] H=-∑ i P(i)log P(i) (5)

[0085] In formula (5), H represents the calculated gradient direction entropy, and P(i) represents the probability of a pixel with a gradient direction value of i appearing in the image, that is, the ratio of the number of pixels with a gradient direction value of i to the total number of pixels in the image. When i takes different values, it is necessary to sum all P(i)log P(i).

[0086] Through this embodiment, the gradient direction entropy is determined according to the probabilities corresponding to a plurality of gradient direction values, so that the uncertainty of the gradient change direction in the image can be accurately measured.

[0087] In some of the embodiments, determining the probability of pixels corresponding to each gradient direction value appearing in the gradient direction map includes the following steps: determining a target gradient direction value among a plurality of different gradient direction values; determining the probability corresponding to the target gradient direction value according to the ratio of the number of pixels corresponding to the target gradient direction value to the number of all pixels in the gradient direction map; and taking all the gradient direction values ​​in turn as the target gradient direction values ​​to obtain the probability corresponding to each gradient direction value.

[0088] Specifically, different gradient direction values ​​are taken as target gradient direction values ​​in turn, and the ratio of the number of pixels corresponding to each target gradient direction value to the number of all pixels in the gradient direction map is calculated to obtain the probability corresponding to the target gradient direction value, so as to obtain the probability corresponding to each gradient direction value.

[0089] It should be noted that the gradient direction map contains the gradient direction value of each pixel. By accurately counting the occurrence probabilities of different gradient direction values ​​in the gradient direction map, it is convenient to subsequently measure the uncertainty of the gradient change direction in the image, thereby enabling accurate evaluation of the image blur degree based on the negative correlation between the image blur degree and the uncertainty of the gradient change direction.

[0090] In some of the embodiments, after obtaining the blurriness score of the image to be evaluated, when the image to be evaluated is a partial image of the original image, the above-mentioned image blurriness evaluation method also includes the following steps: obtaining blurriness scores of image blocks in different areas of the original image, wherein the image to be evaluated is one of multiple image blocks; selecting a local image enhancement strategy corresponding to the image block according to the blurriness score corresponding to each image block; and performing image enhancement on the original image according to all local image enhancement strategies.

[0091] Specifically, the image blur evaluation method in the present application can also be used for image enhancement. For example, the original image that needs to be enhanced is divided into blocks, and the image to be evaluated is used as one of the image blocks in different areas of the original image. Then, the blurriness of each image block in the original image is evaluated to obtain the blurriness score corresponding to each image block, and the blurriness of the image block is determined according to the blurriness score corresponding to each image block, and the corresponding local image enhancement strategy is selected for image enhancement. For example, image block A is slightly blurred, and sharpening processing can be used to enhance the edges and details, and the image details can be made clearer by adjusting the contrast; image block B is moderately blurred, and Gaussian filtering can be used to reduce image noise and blur.

[0092] It should be noted that the fuzzy distortion area and the degree of fuzzy distortion in the image can be determined according to the gradient directional entropy of different image blocks. Based on this, according to the fuzziness score corresponding to each image block, the corresponding image enhancement strategy can be adopted to improve the visualization effect of the image and make it more suitable for specific application fields.

[0093] Through this embodiment, the local image enhancement strategy corresponding to the image block is selected according to the blur score corresponding to each image block in the original image, so that the original image can be enhanced according to all local image enhancement strategies. Compared with directly enhancing the entire image, the flexibility and practicality of image enhancement can be improved, and the efficiency and effect of image enhancement can be significantly improved.

[0094] In some of the embodiments, a local image enhancement strategy corresponding to an image block is selected according to a blurriness score corresponding to each image block, comprising the following steps: determining an image enhancement method and image enhancement parameters of the image block according to a blurriness score corresponding to each image block, and obtaining a local image enhancement strategy.

[0095] Specifically, according to the blur score corresponding to each image block, the blur distortion degree of different image blocks is determined, and the corresponding local image enhancement strategy is selected according to the blur distortion degree of the image block. The local image enhancement strategy includes the image enhancement method and image enhancement parameters of the image block.

[0096] Among them, image enhancement methods refer to algorithms and technologies for processing image blocks to improve image quality or improve visualization effects, such as adjusting image brightness, contrast, saturation, sharpening, and various filtering operations; correspondingly, image enhancement parameters are used to adjust the processing degree or effect of the image enhancement method, such as contrast enhancement amplitude, sharpening intensity, and filtering parameters.

[0097] Through this embodiment, according to the blur score corresponding to each image block, the image enhancement method and image enhancement parameters of the image block are determined, and the local image enhancement strategy is obtained, so as to ensure the rationality of the selection of the image enhancement strategy and improve the image enhancement effect.

[0098] In some of the embodiments, after obtaining the blurriness score of the image to be evaluated, when the image to be evaluated is an image frame of a video stream, the above-mentioned image blurriness evaluation method also includes the following steps: obtaining multiple blurriness scores corresponding to multiple image frames in the video stream; and judging the blurriness property of the video stream based on the numerical calculation results of the multiple blurriness scores.

[0099] Specifically, the blur evaluation method in the present application can also be used to determine the blur attribute of a video stream. For example, a number of image frames are selected from a video stream, and each image frame is used as the above-mentioned image to be processed. With reference to the blur evaluation method of the above-mentioned image to be evaluated, each image frame in the video stream is processed to obtain a blur score corresponding to each image frame in the video stream. Afterwards, a numerical calculation is performed on the multiple blur scores, and the blur attribute of the video stream is determined based on the numerical calculation results.

[0100] Through this embodiment, multiple blur scores corresponding to multiple image frames in a video stream are obtained, and the blur attribute of the video stream is judged based on the numerical calculation results of the multiple blur scores, thereby achieving accurate evaluation of the video blur degree and its related attributes.

[0101] Furthermore, the above numerical calculation results include the mean of multiple blur scores, the difference between two blur scores, and the variance of multiple blur scores. Among them, according to the mean of multiple blur scores, it can be used to determine the overall video blur of the video stream; according to the difference between two blur scores, the blur consistency between the corresponding two image frames can be determined; and by calculating the variance of each blur score, it can be determined whether there is a large fluctuation in the blur degree of each image frame in the video stream, which is used to infer the stability of the camera or other equipment during the shooting process. In other embodiments, there is no limitation on the calculation method of the numerical calculation results.

[0102] Specifically, after obtaining the blurriness score of each image frame, the average value of all blurriness scores is used as the video blurriness score of the video stream. The video blurriness score can be compared with a preset threshold, and the video quality can be accurately evaluated based on the comparison result; alternatively, the video stream can be divided into multiple video segments, and the average blurriness score of each image frame in each video segment is counted, so as to screen out video segments with high blurriness, and further analyze the cause of video blurring based on the shooting time corresponding to the video segment.

[0103] In addition, the blurriness of any two image frames in the video stream can be evaluated to obtain the blurriness scores of the two image frames, and the difference between the two blurriness scores can be calculated to evaluate the blur consistency between the image frames. For example, during the camera shooting process, the blurriness scores of two or more adjacent image frames in the captured video are obtained in real time, and the differences between the blurriness scores are compared in the order of shooting time to detect whether there is image blur caused by factors such as camera shake, so as to facilitate timely correction.

[0104] Through this embodiment, the video blur of the video stream is determined according to the average of multiple blur scores, or the blur consistency between the corresponding two image frames is determined according to the difference between two blur scores, so as to achieve accurate evaluation of the video blur degree and its related attributes.

[0105] In some of the embodiments, the weight values ​​of each frequency domain decomposition image are determined according to the position and attribute characteristics of the region of interest in the image to be evaluated. The position of the region of interest may be a fixed region in the image to be evaluated, or may be determined according to the position of the subject in the image to be evaluated. For example, when the region of interest is a face, the position of the region of interest changes with the position of the face. The attribute characteristics of the region of interest include overall structure and detail information. Different attribute characteristics are concerned, and the weights of each frequency domain decomposition image are also different.

[0106] It should be noted that the frequency domain decomposition images corresponding to different frequency domain components are used to reflect the features of different scales in the image to be evaluated. The high-frequency components correspond to the detailed information of the image, such as contours, textures and edges, and the low-frequency components correspond to the overall structure of the image. Selecting different weight values ​​for different frequency components can enhance the influence of the corresponding area of ​​the image on the fuzzy evaluation. Based on this, the region of interest in the image can be determined according to the application requirements of the image to be evaluated. For example, in the pedestrian detection scenario, the image to be recognized is used as the image to be evaluated, and the facial area is selected as the region of interest. Or in medical image analysis, the image area where specific anatomical structures such as ventricles, heart and blood vessels are located is selected as the region of interest.

[0107] Furthermore, the weight values ​​of each frequency domain decomposition image are determined according to the location and attribute characteristics of the region of interest. For example, when calculating the background blur of a blurred image, it is expected to retain the overall scene structure and increase the weight of the low-frequency image accordingly; while processing portrait photos requires more attention to facial features and textures, and the overall background structure is relatively unimportant. At this time, the weight of the medium-frequency image is increased, the weight of the low-frequency image is reduced, and the weight of the high-frequency image is controlled to be in the middle value to retain some edge and detail information; in addition, for medical images, in order to retain important detail information, such as the edge and texture of the lesion area, the weight of the high-frequency image needs to be reasonably increased.

[0108] Through this embodiment, the weight value of each frequency domain decomposition image is determined according to the position and attribute characteristics of the region of interest in the image to be evaluated, the influence of the image information-rich region on the fuzzy evaluation is strengthened, and the accuracy and reliability of the evaluation are improved.

[0109] In some embodiments, at least two frequency domain decomposition images in different frequency domains include a low-frequency image, a medium-frequency image, and a high-frequency image, wherein the high-frequency image contains detail information such as contours, edges, and textures, and the low-frequency image is an area with slow grayscale changes.

[0110] Specifically, the image to be evaluated is processed by frequency domain decomposition methods such as Fourier transform, wavelet transform and image pyramid to obtain at least two frequency domain decomposition images in different frequency domains. The at least two frequency domain decomposition images in different frequency domains include a low-frequency image, a medium-frequency image and a high-frequency image.

[0111] Exemplarily, a Fourier transform is performed on the image to be evaluated to obtain the spectrum information of the image to be evaluated, and different frequency domain components of the image are separated by frequency domain filtering; an inverse Fourier transform is performed on the frequency domain image after filtering to obtain at least two frequency domain decomposition images of different frequencies, such as a low-frequency image, a medium-frequency image, and a high-frequency image corresponding to the image to be evaluated.

[0112] In addition, when wavelet transform is used, the image to be evaluated is decomposed into wavelet coefficients of different scales and positions, the wavelet coefficients to be retained are selected according to different frequency requirements, and the selected wavelet coefficients are inversely transformed to the image domain to obtain an image of the corresponding frequency range, where the high-frequency image corresponds to the details of the image, the medium-frequency image corresponds to medium-frequency information such as texture information, and the low-frequency image corresponds to the smoother part of the image. When the image pyramid is used, the image to be evaluated is downsampled or upsampled to obtain images of different resolutions, where the high-resolution image corresponds to the high-frequency component, and the low-resolution image corresponds to the low-frequency component.

[0113] Through this embodiment, at least two frequency domain decomposition images of the image to be evaluated are obtained, including a low-frequency image, a medium-frequency image and a high-frequency image, so as to use different weight parameters for different frequency regions to calculate the fuzziness score. While avoiding the influence of factors such as noise and brightness on the fuzziness evaluation process, the influence of the image information-rich area is strengthened to improve the accuracy and reliability of the evaluation.

[0114] In this embodiment, an image enhancement method based on image blur evaluation is also provided. When the image to be evaluated is a partial image of the original image, Figure 3 is a flow chart of the image enhancement method of this embodiment. Figure 3 As shown, the method comprises the following steps:

[0115] Step S310, dividing the original image into a plurality of image blocks, and obtaining blur scores of image blocks in different areas of the original image;

[0116] Step S320, determining the blur distortion degree of the image block according to the blur score corresponding to each image block;

[0117] Step S330, selecting an image enhancement method and image enhancement parameters corresponding to the image as a local image enhancement strategy according to the blur distortion degree of each image block;

[0118] Step S340: performing image enhancement on the original image according to all local image enhancement strategies.

[0119] Through this embodiment, the local image enhancement strategy corresponding to the image block is selected according to the blur score corresponding to each image block in the original image, so that the original image can be enhanced according to all local image enhancement strategies. Compared with directly enhancing the entire image, the flexibility and practicality of image enhancement can be improved, and the efficiency and effect of image enhancement can be significantly improved.

[0120] In this embodiment, a method for determining the fuzzy attribute of a video stream is also provided. When the image to be evaluated is an image frame of a video stream, Figure 4 is a flow chart of the method for determining the fuzzy attribute of a video stream of this embodiment. Figure 4 As shown, the method comprises the following steps:

[0121] Step S410, obtaining multiple blur scores corresponding to multiple image frames in the video stream; illustratively, the blur score of the video stream may be calculated frame by frame;

[0122] Step S420, obtaining multiple numerical calculation results corresponding to each fuzziness score, the multiple numerical calculation results including the mean of the multiple fuzziness scores and the difference between two fuzziness scores;

[0123] Step S430, determining the video blurriness of the video stream according to the average of the plurality of blurriness scores; or determining the blur consistency between the corresponding two image frames according to the difference between two blurriness scores.

[0124] Through this embodiment, multiple blur scores corresponding to multiple image frames in a video stream are obtained, and the blur attribute of the video stream is judged based on the numerical calculation results of the multiple blur scores, thereby achieving accurate evaluation of the video blur degree and its related attributes.

[0125] The present embodiment is described and illustrated below through preferred embodiments.

[0126] Figure 5 is a flow chart of the image blur evaluation method of the preferred embodiment, as shown in Figure 5 As shown, the image blur evaluation method includes the following steps:

[0127] Step S510, performing Fourier transform on the image to be evaluated to obtain corresponding spectrum information;

[0128] Step S520, decomposing the spectrum information, and performing inverse Fourier transform on the decomposition result to obtain a plurality of frequency domain decomposition images; the frequency domain decomposition images include a low frequency image, a medium frequency image, and a high frequency image;

[0129] Step S530, determining the vertical gradient value and the horizontal gradient value of each pixel in the frequency domain decomposition image;

[0130] Step S540, determining the corresponding gradient direction according to the vertical gradient value and the horizontal gradient value of the pixel;

[0131] Step S550, generating a gradient direction map based on the gradient direction of each pixel;

[0132] Step S560, performing information entropy operation on the gradient directional map to obtain gradient directional entropy;

[0133] Step S570: Based on the weight value corresponding to each frequency domain decomposition image, a weighted operation is performed on each gradient direction entropy to obtain a blur score of the image to be evaluated.

[0134] Through this embodiment, a low-frequency image, a medium-frequency image and a high-frequency image of the image to be evaluated are obtained, so that different weight parameters are used for subsequent fuzziness score calculation for different frequency regions.

[0135] Furthermore, an information entropy operation is performed on the gradient direction map of the image to be evaluated to obtain the gradient direction entropy, so that based on the weight value corresponding to each frequency domain decomposition image, a weighted operation can be performed on each gradient direction entropy to obtain the blur score of the image to be evaluated, thereby avoiding the influence of factors such as noise and brightness on the blur evaluation process, and at the same time strengthening the influence of image information-rich areas, solving the problem of low accuracy of image blur evaluation and achieving improved accuracy of image blur evaluation.

[0136] It should be noted that the steps shown in the above process or the flowchart in the accompanying drawings can be executed in a computer system such as a set of computer executable instructions, and although a logical order is shown in the flowchart, in some cases, the steps shown or described can be executed in an order different from that shown here.

[0137] In this embodiment, an image blur evaluation device is also provided, which is used to implement the above-mentioned embodiments and preferred implementation modes, and will not be repeated hereafter. The terms "module", "unit", "subunit", etc. used below can implement a combination of software and / or hardware for a predetermined function. Although the devices described in the following embodiments are preferably implemented in software, the implementation in hardware, or a combination of software and hardware, is also possible and conceivable.

[0138] Figure 6 is a structural block diagram of the image blur evaluation device of this embodiment. Figure 6 As shown, the device includes: an acquisition module 10, a determination module 20 and an evaluation module 30;

[0139] An acquisition module 10 is used to acquire at least two frequency domain decomposition images of the image to be evaluated, wherein the two frequency domain decomposition images belong to different frequency domains of the image to be evaluated;

[0140] A determination module 20, for determining the uncertainty of the gradient change direction in each frequency domain decomposition image as the gradient direction entropy of the frequency domain decomposition image;

[0141] The evaluation module 30 is used to perform a weighted operation on the gradient directional entropy of each frequency domain decomposition image based on the weight value of each frequency domain decomposition image to obtain a blur score of the image to be evaluated.

[0142] Through the device provided by this embodiment, at least two frequency domain decomposition images of the image to be evaluated are obtained, wherein the two frequency domain decomposition images belong to different frequency domains of the image to be evaluated; in each frequency domain decomposition image, the uncertainty of the gradient change direction is determined as the gradient directional entropy of the frequency domain decomposition image; further, based on the weight value of each frequency domain decomposition image, a weighted operation is performed on the gradient directional entropy of each frequency domain decomposition image to obtain a blur score of the image to be evaluated, thereby solving the problem of low accuracy of image blur evaluation and improving the accuracy of image blur evaluation.

[0143] In some of the embodiments, the determination module 20 is further used to determine a gradient direction map corresponding to each frequency domain decomposition image; and perform information entropy calculation based on the gradient direction map to obtain gradient direction entropy.

[0144] In some of the embodiments, the determination module 20 is further used to determine the probability of pixels corresponding to each gradient direction value appearing in the gradient direction map; and determine the gradient direction entropy according to the probabilities corresponding to multiple gradient direction values.

[0145] In some of the embodiments, the determination module 20 is further used to determine a target gradient direction value among multiple different gradient direction values; determine the probability corresponding to the target gradient direction value according to the ratio of the number of pixels corresponding to the target gradient direction value to the number of all pixels in the gradient direction map; and take all the gradient direction values ​​as the target gradient direction values ​​in turn to obtain the probability corresponding to each gradient direction value.

[0146] In some of these embodiments, Figure 6 On the basis of, the device also includes an image enhancement module, which is used to obtain blur scores of image blocks in different areas of the original image, wherein the image to be evaluated is one of multiple image blocks; according to the blur scores corresponding to each image block, a local image enhancement strategy corresponding to the image block is selected; according to all local image enhancement strategies, the original image is enhanced.

[0147] In some of the embodiments, the image enhancement module is further used to determine the image enhancement method and image enhancement parameters of the image block according to the blur score corresponding to each image block, so as to obtain a local image enhancement strategy.

[0148] In some of these embodiments, Figure 6 On the basis of, the device also includes a video evaluation module, which is used to obtain multiple blur scores corresponding to multiple image frames in the video stream; and judge the blur attribute of the video stream according to the numerical calculation results of the multiple blur scores.

[0149] In some of the embodiments, the video evaluation module is further configured to determine the video blurriness of the video stream according to an average of multiple blurriness scores; or to determine the blur consistency between two corresponding image frames according to a difference between two blurriness scores.

[0150] In some of these embodiments, Figure 6 On the basis of, the device also includes a setting module, which is used to determine the weight value of each frequency domain decomposition image according to the position and attribute characteristics of the region of interest in the image to be evaluated.

[0151] It should be noted that the above modules can be functional modules or program modules, and can be implemented by software or hardware. For modules implemented by hardware, the above modules can be located in the same processor; or the above modules can be located in different processors in any combination.

[0152] In this embodiment, a computer device is further provided, including a memory and a processor, wherein a computer program is stored in the memory, and the processor is configured to run the computer program to execute the steps in any one of the above method embodiments.

[0153] Optionally, the computer device may further include a transmission device and an input / output device, wherein the transmission device is connected to the processor, and the input / output device is connected to the processor.

[0154] Optionally, in this embodiment, the processor may be configured to perform the following steps through a computer program:

[0155] S1, obtaining at least two frequency domain decomposition images of the image to be evaluated, wherein the two frequency domain decomposition images belong to different frequency domains of the image to be evaluated;

[0156] S2, in each frequency domain decomposition image, the uncertainty of the gradient change direction is determined as the gradient direction entropy of the frequency domain decomposition image;

[0157] S3, based on the weight value of each frequency domain decomposition image, a weighted operation is performed on the gradient directional entropy of each frequency domain decomposition image to obtain a blur score of the image to be evaluated.

[0158] It should be noted that the specific examples in this embodiment can refer to the examples described in the above embodiments and optional implementation modes, and will not be repeated in this embodiment.

[0159] In addition, in combination with the image blur evaluation method provided in the above embodiments, a storage medium may be provided in this embodiment to implement the image blur evaluation method. The storage medium stores a computer program; when the computer program is executed by a processor, any one of the image blur evaluation methods in the above embodiments is implemented.

[0160] It should be understood that the specific embodiments described herein are only used to explain the application, rather than to limit it. Based on the embodiments provided in this application, all other embodiments obtained by ordinary technicians in this field without creative work are within the protection scope of this application.

[0161] Obviously, the drawings are only some examples or embodiments of the present application. For ordinary technicians in the field, the present application can also be applied to other similar situations based on these drawings without creative work. In addition, it is understandable that although the work done in this development process may be complicated and lengthy, for ordinary technicians in the field, certain changes in design, manufacturing or production based on the technical content disclosed in this application are only conventional technical means and should not be regarded as insufficient content disclosed in this application.

[0162] The term "embodiment" in this application refers to a specific feature, structure or characteristic described in conjunction with the embodiment that can be included in at least one embodiment of the present application. The appearance of this phrase in various locations in the specification does not necessarily mean the same embodiment, nor does it mean that it is mutually exclusive with other embodiments and is independent or optional. It is clearly or implicitly understood by those of ordinary skill in the art that the embodiments described in this application can be combined with other embodiments without conflict.

[0163] The above-mentioned embodiments only express several implementation methods of the present application, and the descriptions thereof are relatively specific and detailed, but they cannot be understood as limiting the scope of patent protection. It should be pointed out that, for a person of ordinary skill in the art, several variations and improvements can be made without departing from the concept of the present application, and these all belong to the scope of protection of the present application. Therefore, the scope of protection of the present application shall be subject to the attached claims.

Claims

1. A method for evaluating image blur. It is characterized in that The method comprises: Acquire at least two frequency domain decomposition images of the image to be evaluated, wherein the two frequency domain decomposition images belong to different frequency domains of the image to be evaluated; In each of the frequency domain decomposition images, determining the uncertainty of the gradient change direction as the gradient direction entropy of the frequency domain decomposition image; Based on the weight value of each frequency domain decomposition image, a weighted operation is performed on the gradient directional entropy of each frequency domain decomposition image to obtain a blur score of the image to be evaluated.

2. The image blur evaluation method according to claim 1, It is characterized in that The step of determining the uncertainty of the gradient change direction in each of the frequency domain decomposition images as the gradient direction entropy of the frequency domain decomposition image comprises: Determine a gradient direction map corresponding to each of the frequency domain decomposition images; An information entropy operation is performed based on the gradient directional map to obtain the gradient directional entropy.

3. The image blur evaluation method according to claim 2, It is characterized in that The performing information entropy calculation based on the gradient directional map to obtain the gradient directional entropy includes: In the gradient direction map, determining the probability of pixels corresponding to each gradient direction value appearing in the gradient direction map; The gradient direction entropy is determined according to the probabilities corresponding to the multiple gradient direction values.

4. The image blur evaluation method according to claim 3, It is characterized in that Determining the probability of a pixel corresponding to each gradient direction value appearing in the gradient direction map includes: Determining a target gradient direction value among a plurality of different gradient direction values; Determining a probability corresponding to the target gradient direction value according to a ratio of the number of pixels corresponding to the target gradient direction value to the number of all pixels in the gradient direction map; All the gradient direction values ​​are sequentially used as the target gradient direction value to obtain the probability corresponding to each of the gradient direction values.

5. The image blur evaluation method according to claim 1, It is characterized in that After obtaining the blur score of the image to be evaluated, in the case where the image to be evaluated is a partial image of the original image, the method further includes: Obtaining blur scores of image blocks in different areas of the original image, wherein the image to be evaluated is one of the multiple image blocks; According to the blur score corresponding to each of the image blocks, a local image enhancement strategy corresponding to the image block is selected; According to all the local image enhancement strategies, the original image is enhanced.

6. The image blur evaluation method according to claim 5, It is characterized in that The selecting, according to the blur score corresponding to each of the image blocks, a local image enhancement strategy corresponding to the image block comprises: According to the blur score corresponding to each image block, the image enhancement method and image enhancement parameters of the image block are determined to obtain the local image enhancement strategy.

7. The image blur evaluation method according to claim 1, It is characterized in that After obtaining the blur score of the image to be evaluated, when the image to be evaluated is an image frame of a video stream, the method further includes: Obtaining multiple blur scores corresponding to multiple image frames in the video stream; The blur attribute of the video stream is determined according to the numerical calculation results of the plurality of blur scores.

8. The image blur evaluation method according to claim 7, It is characterized in that The step of determining the blur attribute of the video stream according to the numerical calculation results of the plurality of blur scores comprises: Determining the video blurriness of the video stream according to an average of the plurality of blurriness scores; or, According to the difference between the two blur scores, blur consistency between the corresponding two image frames is determined.

9. The image blur evaluation method according to claims 1 to 8, It is characterized in that The weight value of each of the frequency domain decomposition images is determined according to the position and attribute characteristics of the region of interest in the image to be evaluated.

10. The image blur evaluation method according to claim 9, It is characterized in that The at least two frequency domain decomposition images in different frequency domains include a low frequency image, a medium frequency image and a high frequency image.

11. An image blur evaluation device, It is characterized in that The device comprises: an acquisition module, a determination module and an evaluation module; The acquisition module is used to acquire at least two frequency domain decomposition images of the image to be evaluated, wherein the two frequency domain decomposition images belong to different frequency domains of the image to be evaluated; The determination module is used to determine the uncertainty of the gradient change direction in each of the frequency domain decomposition images as the gradient direction entropy of the frequency domain decomposition image; The evaluation module is used to perform a weighted operation on the gradient directional entropy of each frequency domain decomposition image based on the weight value of each frequency domain decomposition image to obtain a blur score of the image to be evaluated.

12. A computer device comprising a memory and a processor, It is characterized in that A computer program is stored in the memory, and the processor is configured to run the computer program to execute the steps of the image blur assessment method according to any one of claims 1 to 10.

13. A computer-readable storage medium having a computer program stored thereon, It is characterized in that When the computer program is executed by a processor, the steps of the image blur evaluation method according to any one of claims 1 to 10 are implemented.

Citation Information

Cited By

  • Fuzzy type self-adaptive image restoration method

    CN120833280A

  • An image inpainting method adaptive to blur type

    CN120833280B