Image clarity evaluation method, device and computer-readable storage medium

By dividing the image into sub-regions, calculating and normalizing the gradient value, combining information entropy threshold screening and fusion calculation, the problems of inaccurate image clarity evaluation and large amount of calculation in the prior art are solved, and efficient and accurate Image definition evaluation.

CN111899243BActive Publication Date: 2025-02-07阳光保险集团股份有限公司
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202010747394.2
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2020-07-28
Publication Date
2025-02-07
Estimated Expiration
2040-07-28

AI Technical Summary

Technical Problem

The prior art has problems with inaccuracy in evaluating image clarity, especially when processing images of different sizes and areas containing different numbers of text, there is an error in the calculation of gradient value. In addition, deep learning-based methods require large amounts of sample annotations and have a large amount of computation, which affects deployment and use.

Method used

The clarity evaluation index is obtained by dividing the image to be processed into at least two subregions, and calculating and normalizing the gradient value of each subregion. Then, the sub-regions are screened according to the information entropy threshold, and the fusion calculation results in the overall clarity evaluation index.

Benefits of technology

It improves the accuracy of image clarity evaluation, reduces the impact on image size and information entropy, and reduces the amount of calculation, making it suitable for deployment and use on terminals such as mobile phones.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN111899243B_ABST
    Figure CN111899243B_ABST
Patent Text Reader

Abstract

The embodiment of the present application provides an image clarity evaluation method, device and computer-readable storage medium, the method comprising acquiring an image to be processed; dividing the image to be processed into at least two sub-regions; calculating a gradient value of each sub-region; normalizing the gradient value of each sub-region to obtain a clarity evaluation index of each sub-region; screening each sub-region according to an information entropy threshold, and fusing the clarity evaluation index of each screened sub-region to obtain an overall clarity evaluation index, which can accurately and efficiently evaluate image clarity.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of image detection, and in particular, to an image clarity evaluation method, device and computer-readable storage medium. Background Art

[0002] With the development of science and technology, intelligent image recognition has replaced manual image recognition. When performing optical character recognition (OCR) based on images, the clarity of the text in the image often has a great impact on the recognition accuracy. In the prior art, the image clarity is directly represented by the gradient value, but there is a problem of inaccurate clarity evaluation. For example, for images of different sizes with the same content and the same clarity, the gradient value corresponding to the large image will be much greater than the gradient value corresponding to the small image; for areas of the same size and clarity, the number of texts in each area is different, and the gradient value of the area with more texts is often much larger than the gradient value of the area with fewer texts.

[0003] On the other hand, there are also some clarity evaluation methods based on deep learning. Such methods often require a large number of sample annotations and require a relatively large amount of computing when used, which affects the deployment and use of the model on mobile phones and other end devices.

[0004] Therefore, how to accurately and efficiently evaluate image clarity has become an urgent problem to be solved. Summary of the invention

[0005] In a first aspect, a method for evaluating image clarity comprises:

[0006] Get the image to be processed;

[0007] Dividing the image to be processed into at least two sub-areas;

[0008] Calculating the gradient value of each of the sub-regions;

[0009] Performing normalization calculation on the gradient value of each sub-region to obtain a clarity evaluation index of each sub-region;

[0010] Each of the sub-regions is screened according to the information entropy threshold, and the clarity evaluation index of each of the screened sub-regions is fused and calculated to obtain an overall clarity evaluation index.

[0011] Therefore, by acquiring an image to be processed; dividing the image to be processed into at least two sub-regions and calculating the gradient value of each sub-region; normalizing the gradient value of each sub-region to obtain a clarity evaluation index for each sub-region; screening each sub-region according to an information entropy threshold, and fusion calculating the clarity evaluation index of each screened sub-region to obtain an overall clarity evaluation index, the clarity evaluation index can be calculated according to the size and information entropy in the image, and sub-regions that are not suitable for calculation can be removed, thereby improving the accuracy of evaluating image clarity, and thus accurately and efficiently evaluating image clarity.

[0012] In combination with the first aspect, in a possible implementation manner, the normalizing calculation of the gradient value of each sub-region to obtain a clarity evaluation index of each sub-region includes:

[0013] According to the size of each of the sub-regions, normalize the gradient value of each of the sub-regions to obtain a normalized gradient value;

[0014] According to the information entropy of each sub-region, the normalized gradient value is further normalized and calculated to obtain a clarity evaluation index for each sub-region.

[0015] Therefore, according to the size of each sub-region, the gradient value of each sub-region is normalized and calculated to obtain the normalized gradient value; according to the information entropy of each sub-region, the normalized gradient value is further normalized and calculated to obtain the clarity evaluation index of each sub-region, so that the normalized gradient value can be obtained, and then the clarity evaluation index of each sub-region can be obtained, and then an accurate evaluation image clarity index can be obtained.

[0016] In combination with the first aspect, in another possible implementation, the normalizing calculation of the gradient value of each sub-region according to the size of each sub-region to obtain the normalized gradient value includes:

[0017] According to the number of pixels in each sub-region and the gradient value of each sub-region image, the gradient value of each sub-region is normalized and calculated to obtain a normalized gradient value.

[0018] Therefore, by normalizing the gradient value of each sub-region by the number of pixels in each sub-region and the gradient value of each sub-region image, the influence of the image size on the image clarity evaluation can be effectively reduced, thereby improving the accuracy of the image clarity evaluation.

[0019] In combination with the first aspect, in another possible implementation, further normalizing the normalized gradient value according to the information entropy of each sub-region to obtain a clarity evaluation index for each sub-region includes:

[0020] According to the normalized gradient value and the information entropy of each sub-region, the normalized gradient value is further normalized and calculated to obtain a clarity evaluation index for each sub-region.

[0021] Therefore, by further normalizing the normalized gradient value and the information entropy of each sub-region, the normalized gradient value is further normalized, which can effectively reduce the impact of too little information in the sub-region on the clarity evaluation index, thereby improving the accuracy of image clarity.

[0022] In combination with the first aspect, in another possible implementation manner, before dividing the image to be processed into at least two sub-regions, the method further includes:

[0023] An original image is acquired, and grayscale conversion is performed on the original image to obtain the image to be processed.

[0024] Therefore, grayscale conversion of the original image can improve the efficiency of calculating the clarity evaluation index.

[0025] In combination with the first aspect, in another possible implementation, screening each of the sub-regions according to the information entropy threshold, and fusing and calculating the clarity evaluation index of each of the screened sub-regions to obtain an overall clarity evaluation index include:

[0026] removing the sub-region whose information entropy is less than a threshold;

[0027] The clarity evaluation index of each of the remaining sub-region images is fused and calculated.

[0028] Therefore, by removing the sub-regions whose information entropy is less than a threshold and performing fusion calculation on the clarity evaluation index of each remaining sub-region image, the regions that are not suitable for participating in the overall clarity calculation can be removed, thereby improving the accuracy of the clarity evaluation index.

[0029] Therefore, by acquiring an image to be processed; dividing the image to be processed into at least two sub-regions and calculating the gradient value of each sub-region; normalizing the gradient value of each sub-region to obtain a clarity evaluation index for each sub-region; screening each sub-region according to an information entropy threshold, and fusion calculating the clarity evaluation index of each screened sub-region to obtain an overall clarity evaluation index, the clarity evaluation index can be calculated according to the size of the image and the information entropy, and the sub-regions that are not suitable for the calculation can be removed, thereby improving the accuracy of evaluating the clarity of the image, and thus accurately and efficiently evaluating the clarity of the image.

[0030] In a second aspect, an image clarity evaluation device includes:

[0031] An acquisition unit, used for acquiring an image to be processed;

[0032] A division unit, used for dividing the image to be processed into at least two sub-areas;

[0033] A calculation unit, used for calculating the gradient value of each sub-region;

[0034] A normalization unit, used for performing normalization calculation on the gradient value of each sub-region to obtain a clarity evaluation index of each sub-region;

[0035] The fusion calculation unit is used to screen each of the sub-regions according to the information entropy threshold, and perform fusion calculation on the clarity evaluation index of each of the screened sub-regions to obtain an overall clarity evaluation index.

[0036] In conjunction with the second aspect, in a possible implementation manner, the normalization unit is specifically configured to:

[0037] According to the size of each of the sub-regions, normalize the gradient value of each of the sub-regions to obtain a normalized gradient value;

[0038] According to the information entropy of each sub-region, the normalized gradient value is further normalized and calculated to obtain a clarity evaluation index for each sub-region.

[0039] In conjunction with the second aspect, in another possible implementation manner, the normalization unit is specifically configured to:

[0040] According to the number of pixels of the sub-region image and the gradient value of the sub-region image, the gradient value of the sub-region image is normalized and calculated to obtain a normalized gradient value.

[0041] In conjunction with the second aspect, in another possible implementation manner, the normalization unit is specifically configured to:

[0042] According to the normalized gradient value and the information entropy of each sub-region, the normalized gradient value is further normalized and calculated to obtain a clarity evaluation index for each sub-region.

[0043] In conjunction with the second aspect, in another possible implementation manner, the acquiring unit is specifically configured to:

[0044] An original image is acquired, and grayscale conversion is performed on the original image to obtain the image to be processed.

[0045] In conjunction with the second aspect, in another possible implementation manner, the fusion calculation unit is specifically used to:

[0046] removing the sub-region whose information entropy is less than a threshold;

[0047] The clarity evaluation index of each of the remaining sub-region images is fused and calculated.

[0048] Therefore, the second aspect and its various embodiments can accurately and efficiently evaluate image clarity by implementing the method of the first aspect and its various embodiments.

[0049] According to a third aspect, an electronic device includes:

[0050] A processor, a memory and a bus, wherein the processor is connected to the memory via the bus, and the memory stores computer-readable instructions. When the computer-readable instructions are executed by the processor, they are used to implement the image clarity evaluation method described in any one of the first aspect and all the embodiments of the first aspect.

[0051] In a fourth aspect, a computer-readable storage medium stores a computer program, which, when executed by a server, is used to implement the image clarity evaluation method described in any one of the first aspect and all the embodiments of the first aspect.

[0052] Therefore, by acquiring an image to be processed; dividing the image to be processed into at least two sub-regions and calculating the gradient value of each sub-region; normalizing the gradient value of each sub-region to obtain a clarity evaluation index for each sub-region; screening each sub-region according to an information entropy threshold, and fusion calculating the clarity evaluation index of each screened sub-region to obtain an overall clarity evaluation index, the clarity evaluation index can be calculated according to the size and information entropy in the image, and sub-regions that are not suitable for calculation can be removed, thereby improving the accuracy of evaluating image clarity, and thus accurately and efficiently evaluating image clarity.

[0053] This application breaks through the original deep learning-based clarity evaluation method that requires a large number of sample annotations. It has a faster calculation speed and is convenient for deployment and use on user terminals such as mobile phones and computers, making the image clarity evaluation process more efficient.

[0054] In order to make the above-mentioned objects, features and advantages of the present application more obvious and understandable, embodiments are listed below and described in detail with reference to the attached drawings. BRIEF DESCRIPTION OF THE DRAWINGS

[0055] Figure 1 is an overall flow chart of an image clarity evaluation method shown in an embodiment of the present application;

[0056] Figure 2 is an internal unit diagram of an image clarity evaluation device shown in an embodiment of the present application;

[0057] Figure 3 This is a diagram of an internal unit of an electronic device shown in an embodiment of the present application. DETAILED DESCRIPTION

[0058] In order to make the purpose, technical scheme and advantages of the embodiments of the present application clearer, the technical scheme in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, rather than all the embodiments. The components of the embodiments of the present application generally described and shown in the drawings here can be arranged and designed in various different configurations. Therefore, the following detailed description of the embodiments of the present application provided in the drawings is not intended to limit the scope of the application claimed for protection, but merely represents the selected embodiments of the present application. Based on the embodiments of the present application, all other embodiments obtained by those skilled in the art without making creative work belong to the scope of protection of the present application.

[0059] The technical solutions in the embodiments of the present application will be described below in conjunction with the accompanying drawings.

[0060] It should be understood that the embodiments of the present application can be applied to a variety of scenarios, such as text recognition in online insurance operations, text recognition in insurance audits, etc. The embodiments of the present application are not limited thereto.

[0061] In existing solutions, intelligent image recognition has replaced manual image recognition. When performing OCR recognition based on images, the clarity of the text in the image often has a great impact on the recognition accuracy. Traditional text image clarity evaluation methods often judge the clarity of the image based on information such as gradient information, brightness, variance, and histogram statistics in the image. There is a certain error in judging the clarity of the image using these methods.

[0062] In view of the above situation, the embodiments of the present application provide an image clarity evaluation method, device and computer-readable storage medium, which solve the above problems by acquiring an image to be processed; dividing the image to be processed into at least two sub-regions; calculating the gradient value of each sub-region; normalizing the gradient value of each sub-region to obtain a clarity evaluation index for each sub-region; screening each sub-region according to an information entropy threshold, and fusion calculating the clarity evaluation index of each sub-region after screening to obtain an overall clarity evaluation index.

[0063] Combine the following Figure 1 Specific examples, applied to text images, such as Figure 1 The method shown comprises:

[0064] 110, obtaining an image to be processed.

[0065] Specifically, an original image is acquired, and grayscale conversion is performed on the original image to obtain the image to be processed.

[0066] Specifically, the server obtains an original image, such as an insurance policy displaying text, an insurance policy displaying a photo, etc. After the server obtains the original image, the original image is gray-processed to obtain an image to be processed.

[0067] It should be understood that the original image may be an image that is entirely text information, an image that is entirely photos, or an image that contains both text information and photos. The embodiments of the present application are not limited thereto.

[0068] It should be understood that the original image is an image that has not been processed in any way. The office staff uploads it to the server by scanning, taking a photo, etc., and the server obtains it.

[0069] Therefore, the server can improve the efficiency of image clarity evaluation by performing grayscale conversion processing on the original image.

[0070] The above describes the process of performing grayscale conversion processing on the original image to obtain the image to be processed after the server obtains the original image. The following describes the process of dividing the image to be processed into at least two sub-areas.

[0071] 120. Divide the image to be processed into at least two sub-regions.

[0072] Specifically, the distribution of text in text images varies greatly. In some images, the text fills the entire image, while in some images, the text is only distributed in a smaller area. The text area is the area we are concerned about. In order to more accurately calculate the overall clarity evaluation index of the text image, this application divides the text image into at least two sub-areas. For example, the image can be divided into 6 sub-areas (3 horizontally and 2 vertically), and the pixels of each sub-area are 180*180; the image can also be divided into 4 sub-areas (2 horizontally and 2 vertically). The embodiments of the present application are not limited to this.

[0073] It should be understood that the image to be processed is divided into at least two sub-regions, which may be divided into regions of equal size or into sub-regions of different sizes. The embodiment of the present application is not limited thereto.

[0074] It should be understood that the shape of the sub-region may be a rectangle, a square, etc. The embodiment of the present application is not limited thereto.

[0075] Therefore, by dividing the image to be processed into at least two sub-regions, the image to be processed can be segmented, so that the calculation in subsequent steps can be more accurate.

[0076] The above describes the step of dividing the image to be processed into at least two sub-regions, and the following describes the process of calculating the gradient value of each sub-region.

[0077] 130, calculating the gradient value of each of the sub-regions.

[0078] Specifically, each sub-region is represented by Bi, for example: the first sub-region is represented by B1 and the second sub-region is represented by B2. The gradient value of each pixel in each sub-region is first calculated. In the embodiment of the present application, the Sobel operator is used to extract the gradient value of each pixel in each sub-region, and then the cumulative value of all gradients in each sub-region is calculated.

[0079] It should be understood that commonly used gradient operators include Sobel operator, Robert operator, Prewitt operator, etc. The Sobel operator is an edge detection operator based on the first-order derivative. Since an operation similar to the local average is introduced in the calculation of the Sobel operator, the Sobel operator has a smoothing effect on noise and can well eliminate the influence of noise. Therefore, the Sobel operator is used to calculate the gradient in the embodiment of the present application.

[0080] It should be understood that the Sobel operator includes two sets of 3*3 templates. The X-direction template has the largest response to vertical edges, and the Y-direction template has the largest response to horizontal edges. The horizontal gradient is calculated by formula (1), the vertical gradient is calculated by formula (2), and the total gradient is calculated by formula (3).

[0081]

[0082] Among them, G x Represents the gradient value of each pixel in the X direction, G y represents the gradient value of each pixel in the Y direction, G represents the total gradient value corresponding to each pixel, and I represents the original image.

[0083] The text image has relatively strong gradient information in the X and Y directions, so the gradients in the two directions are fused to obtain the gradient value Gi of each pixel in each sub-region. For example, the gradient value of the first pixel in the first sub-region is G1, the gradient value of the second pixel in the first sub-region is G2, and so on. All Gi gradient values ​​are accumulated and calculated to obtain the gradient value Ti of each sub-region. For example, the gradient value of the first sub-region is T1, the gradient value of the second sub-region is T2, and so on.

[0084] The above describes the process of calculating the gradient value of each sub-region. The following describes the process of normalizing the gradient value of each sub-region to obtain the clarity evaluation index of each sub-region.

[0085] 140 , performing normalization calculation on the gradient value of each of the sub-regions to obtain a clarity evaluation index of each of the sub-regions.

[0086] Specifically, according to the size of the sub-region image, the gradient value of the sub-region image is normalized and calculated to obtain the normalized gradient value; according to the information entropy of the sub-region image, the normalized gradient value is further normalized and calculated to obtain the clarity evaluation index of the sub-region image.

[0087] Specifically, according to the number of pixels of the sub-region image and the gradient value of the sub-region image, the gradient value of the sub-region image is normalized and calculated to obtain the normalized gradient value. According to the normalized gradient value and the information entropy of each of the sub-regions, the normalized gradient value is further normalized and calculated to obtain the clarity evaluation index of each of the sub-regions.

[0088] Specifically, firstly, normalize the gradient value Ti corresponding to each sub-region and the number of pixels in each sub-region, and calculate the normalized gradient value by formula (4), which is represented by Ni. For example, the gradient value of the first sub-region is N1, and the gradient value of the second sub-region is N2. The formula used is:

[0089] Ni=Ti / (w*h) (4)

[0090] Among them, Ni represents the normalized gradient value of each sub-region, Ti represents the gradient value of each sub-region, and w*h represents the number of pixels in each sub-region.

[0091] Then, according to the normalized gradient value of each sub-region obtained above and the information entropy of each sub-region, further normalization calculation is performed to obtain the clarity evaluation index of each sub-region. The formula (5) defining the information entropy in the embodiment of the present application is:

[0092]

[0093] Among them, H represents the information entropy of each sub-region, and pi represents the proportion of pixels with gray value i in each sub-region.

[0094] After the information entropy of each sub-region is calculated by the above formula (5), further normalization calculation is performed according to formula (6) to obtain the clarity evaluation index of each sub-region.

[0095] Ci=Ni / (Hi a ) (6)

[0096] Among them, Ci represents the clarity evaluation index of each sub-region, Ni represents the normalized gradient value of each sub-region, Hi represents the information entropy of each sub-region, and a represents the empirical constant value obtained in the experiment.

[0097] It should be understood that the empirical constant value a obtained in the experiment can be 2 or 3, and the embodiments of the present application are not limited thereto.

[0098] It should be understood that normalization calculation refers to the process of performing formula calculation on parameters such as gradient value and information entropy during the calculation process.

[0099] Therefore, in the embodiment of the present application, the gradient value of the sub-region image is normalized based on the number of pixels of the sub-region image and the gradient value of the sub-region image; the normalized gradient value is further normalized based on the normalized gradient value and the information entropy of each sub-region, so as to obtain the normalized gradient value, and then obtain the clarity evaluation index of each sub-region, and then obtain an accurate and efficient evaluation image clarity index.

[0100] The above describes a process of normalizing the gradient value of each sub-region to obtain a clarity evaluation index for each sub-region. The following describes a process of filtering the clarity evaluation index of each sub-region according to a threshold, fusing the filtered clarity evaluation index of each sub-region, and obtaining an overall clarity evaluation index.

[0101] 150. Screen each of the sub-regions according to the information entropy threshold, and perform fusion calculation on the definition evaluation index of each of the screened sub-regions to obtain an overall definition evaluation index.

[0102] Specifically, each of the sub-regions whose information entropy is less than a threshold value is removed; and the clarity evaluation index of the remaining images of each of the sub-regions is fused and calculated.

[0103] Specifically, some of the divided sub-regions may not have text or have very few texts, which are not suitable for the overall clarity calculation. These regions need to be removed from the total region. The sub-regions with few texts have relatively little corresponding image information. The information entropy of each sub-region is calculated. When the information entropy H of the region is less than a certain threshold Ht, the region does not participate in the calculation of the final clarity evaluation index.

[0104] It should be understood that the information entropy threshold may be 0, indicating that there is no information in this sub-region, or may be any information entropy threshold, which is not specifically limited here.

[0105] Specifically, after removing the sub-regions whose information entropy is less than the threshold, the clarity evaluation index of each remaining sub-region is fused and calculated, and the clarity evaluation index of each remaining sub-region can be averaged to obtain the clarity evaluation index of the entire image, or the maximum and minimum values ​​can be removed and the average value can be calculated. The embodiments of the present application are not limited to this.

[0106] Therefore, by removing the sub-regions whose information entropy is less than a threshold and performing fusion calculation on the clarity evaluation index of each remaining sub-region image, the regions that are not suitable for participating in the overall clarity calculation can be removed, thereby improving the accuracy of the clarity evaluation index.

[0107] It should be noted that Figure 1 The examples are only intended to help those skilled in the art understand the embodiments of the present application, and are not intended to limit the embodiments of the present application to the specific scenarios illustrated. Figure 1 It is obvious that various equivalent modifications or changes can be made, and such modifications or changes also fall within the scope of the embodiments of the present application.

[0108] It should be understood that the sequence numbers of the above processes do not mean the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of the present application.

[0109] The above describes an image clarity evaluation method according to an embodiment of the present application. Figure 2 The internal unit of an image clarity evaluation device according to an embodiment of the present application is described in detail. Figure 3 An electronic device according to an embodiment of the present application is described in detail.

[0110] like Figure 2 As shown, specifically, the device includes an acquisition unit 210 , a division unit 220 , a calculation unit 230 , a normalization unit 240 and a fusion calculation unit 250 .

[0111] Specifically, the acquisition unit is used to acquire the image to be processed; the division unit is used to divide the image to be processed into at least two sub-regions; the calculation unit is used to calculate the gradient value of each sub-region; the normalization unit is used to perform normalization calculation on the gradient value of each sub-region to obtain the clarity evaluation index of each sub-region; the fusion calculation unit is used to screen each sub-region according to the information entropy threshold, and perform fusion calculation on the clarity evaluation index of each sub-region after screening to obtain the overall clarity evaluation index.

[0112] In a possible implementation, the normalization unit is specifically used to: perform normalization calculation on the gradient value of each sub-region according to the size of each sub-region to obtain a normalized gradient value; perform further normalization calculation on the normalized gradient value according to the information entropy of each sub-region to obtain a clarity evaluation index for each sub-region.

[0113] In another possible implementation, the normalization unit is specifically used to: perform normalization calculation on the gradient value of the sub-region image according to the number of pixels of the sub-region image and the gradient value of the sub-region image to obtain a normalized gradient value.

[0114] In another possible implementation, the normalization unit is specifically used to: perform further normalization calculation on the normalized gradient value according to the normalized gradient value and the information entropy of each sub-region to obtain a clarity evaluation index for each sub-region.

[0115] In another possible implementation, the acquisition unit is specifically used to: acquire an original image, perform grayscale conversion processing on the original image, and obtain the image to be processed.

[0116] In another possible implementation, the fusion calculation unit is specifically used to: remove the sub-regions whose information entropy is less than a threshold; and perform fusion calculation on the clarity evaluation index of each of the remaining sub-region images.

[0117] It should be understood that Figure 2 The device shown enables Figure 1 The operations and / or functions of each module in the method embodiment are respectively to achieve Figure 1 The corresponding process in the method embodiment. For details, please refer to the description in the above method embodiment. To avoid repetition, the detailed description is appropriately omitted here.

[0118] The present application also provides a computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a server, it is used to implement the image clarity evaluation method described in any of the above embodiments.

[0119] The present application also provides an electronic device, comprising: a processor, a memory and a bus, wherein the processor is connected to the memory via the bus, and the memory stores computer-readable instructions. When the computer-readable instructions are executed by the processor, they are used to implement the image clarity evaluation method described in any of the above embodiments.

[0120] Figure 3 FIG. 4 shows a structural block diagram of an electronic device 300 provided in an embodiment of the present application. Figure 3 As shown. It includes a processor 310, a memory 320 and at least one bus 330. Among them, the bus is used to realize the direct connection and communication of these components. Among them, the processor in the embodiment of the present application can be an integrated circuit chip with signal processing capabilities. The above-mentioned processor can be a general-purpose processor, including a central processing unit (CPU), a network processor (NP), etc.; it can also be a digital signal processor (DSP), an application-specific integrated circuit (ASIC), a field-programmable gate array (FPGA) or other programmable logic devices, discrete gates or transistor logic devices, discrete hardware components. The disclosed methods, steps and logic block diagrams in the embodiments of the present application can be implemented or executed. The general-purpose processor can be a microprocessor or the processor can also be any conventional processor, etc.

[0121] The memory may be, but is not limited to, a random access memory (RAM), a read only memory (ROM), a programmable read-only memory (PROM), an erasable programmable read-only memory (EPROM), an electrically erasable read-only memory (EEPROM), etc. The memory stores computer-readable instructions. When the computer-readable instructions are executed by the processor, the computer device can execute the above-mentioned Figure 1 The various steps in the method embodiment.

[0122] Understandably, Figure 3 The structure shown is for illustration only, and the computer device may also include Figure 3 More or fewer components as shown, or with Figure 3 Different configurations are shown. Figure 3 Each component shown in the figure can be implemented by hardware, software or a combination thereof.

[0123] An embodiment of the present application also provides a computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a server, the method of any of the above method embodiments is implemented. For details, please refer to the description in the above method embodiments. To avoid repetition, the detailed description is appropriately omitted here.

[0124] It should be noted that each embodiment in this specification is described in a progressive manner, and each embodiment focuses on the differences from other embodiments, and the same or similar parts between the embodiments can be referred to each other. For the device embodiment, since it is basically similar to the method embodiment, the description is relatively simple, and the relevant parts can be referred to the partial description of the method embodiment.

[0125] In several embodiments provided by the present application, it should be understood that the disclosed devices and methods can also be implemented in other ways. The device embodiments described above are merely schematic. For example, the flowcharts and block diagrams in the accompanying drawings show the possible architecture, functions and operations of the devices, methods and computer program products according to multiple embodiments of the present application. In this regard, each box in the flowchart or block diagram can represent a module, a program segment or a part of a code, and the module, a program segment or a part of a code contains one or more executable instructions for implementing the specified logical function. It should also be noted that in some alternative implementations, the functions marked in the box can also occur in a different order from the order marked in the accompanying drawings. For example, two consecutive boxes can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each box in the block diagram and / or flowchart, and the combination of boxes in the block diagram and / or flowchart can be implemented with a dedicated hardware-based system that performs a specified function or action, or can be implemented with a combination of dedicated hardware and computer instructions.

[0126] In addition, the functional modules in the various embodiments of the present application may be integrated together to form an independent part, or each module may exist separately, or two or more modules may be integrated to form an independent part.

[0127] If the function is implemented in the form of a software function module and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present application is essentially or the part that contributes to the prior art or the part of the technical solution can be embodied in the form of a software product, which is stored in a storage medium and includes several instructions to enable a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present application. The aforementioned storage medium includes: various media that can store program codes, such as a USB flash drive, a mobile hard disk, a read-only memory (ROM, Read-Only Memory), a random access memory (RAM, Random Access Memory), a disk or an optical disk. It should be noted that, in this article, relational terms such as first and second, etc. are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply that there is any such actual relationship or order between these entities or operations. Moreover, the terms "comprises," "comprising," or any other variation thereof are intended to encompass non-exclusive inclusion, such that a process, method, article, or apparatus that includes a list of elements includes not only those elements, but also other elements not explicitly listed, or elements inherent to such process, method, article, or apparatus. In the absence of further limitations, an element defined by the phrase "comprising a ..." does not exclude the presence of additional identical elements in the process, method, article, or apparatus that includes the element.

[0128] The above description is only a preferred embodiment of the present application and is not intended to limit the present application. For those skilled in the art, the present application may have various changes and variations. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of the present application shall be included in the protection scope of the present application. It should be noted that similar numbers and letters represent similar items in the following drawings, so once an item is defined in one drawing, it does not need to be further defined and explained in the subsequent drawings.

[0129] The above is only a specific implementation of the present application, but the protection scope of the present application is not limited thereto. Any technician familiar with the technical field can easily think of changes or substitutions within the technical scope disclosed in the present application, which should be included in the protection scope of the present application. Therefore, the protection scope of the present application should be based on the protection scope of the claims.

Claims

1. A method for evaluating image clarity, characterized in that: include: Get the image to be processed; Dividing the image to be processed into at least two sub-areas; Calculating the gradient value of each of the sub-regions; Performing normalization calculation on the gradient value of each sub-region to obtain a clarity evaluation index of each sub-region; According to the information entropy threshold, each of the sub-regions is screened, and the clarity evaluation index of each of the screened sub-regions is fused and calculated to obtain an overall clarity evaluation index; The normalizing calculation of the gradient value of each sub-region to obtain the clarity evaluation index of each sub-region includes: performing normalization calculation of the gradient value of each sub-region according to the size of each sub-region to obtain a normalized gradient value; According to the information entropy of each sub-region, the normalized gradient value is further normalized and calculated to obtain a clarity evaluation index for each sub-region.

2. The method according to claim 1, characterized in that: The step of normalizing the gradient value of each sub-region according to the size of each sub-region to obtain the normalized gradient value includes: According to the number of pixels in each sub-region and the gradient value of each sub-region, the gradient value of each sub-region is normalized and calculated to obtain a normalized gradient value.

3. The method according to claim 1 or 2, characterized in that: The step of further normalizing the normalized gradient value according to the information entropy of each sub-region to obtain a clarity evaluation index of each sub-region includes: According to the normalized gradient value and the information entropy of each sub-region, the normalized gradient value is further normalized and calculated to obtain a clarity evaluation index for each sub-region.

4. The method according to claim 1 or 2, characterized in that: Before dividing the image to be processed into at least two sub-regions, the method further includes: An original image is acquired, and grayscale conversion is performed on the original image to obtain the image to be processed.

5. The method according to claim 1 or 2, characterized in that: The method of screening each of the sub-regions according to the information entropy threshold, and fusing and calculating the definition evaluation index of each of the screened sub-regions to obtain an overall definition evaluation index includes: removing the sub-region whose information entropy is less than a threshold; The clarity evaluation index of each of the remaining sub-regions is fused and calculated.

6. An image clarity evaluation device, characterized in that: include: An acquisition unit, used for acquiring an image to be processed; A division unit, used for dividing the image to be processed into at least two sub-areas; A calculation unit, used for calculating the gradient value of each sub-region; A normalization unit, used for performing normalization calculation on the gradient value of each sub-region to obtain a clarity evaluation index of each sub-region; A fusion calculation unit, used for screening each of the sub-regions according to an information entropy threshold, and performing fusion calculation on the clarity evaluation index of each of the screened sub-regions to obtain an overall clarity evaluation index; The normalization unit is specifically used to: perform normalization calculation on the gradient value of each sub-region according to the size of each sub-region to obtain the normalized gradient value; and perform further normalization calculation on the normalized gradient value according to the information entropy of each sub-region to obtain the clarity evaluation index of each sub-region.

7. An electronic device, characterized in that: include: A processor, a memory and a bus, wherein the processor is connected to the memory via the bus, and the memory stores computer-readable instructions. When the computer-readable instructions are executed by the processor, they are used to implement the image clarity evaluation method according to any one of claims 1 to 5.

8. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, and when the computer program is executed by the server, the image clarity evaluation method according to any one of claims 1 to 5 is implemented.

Citation Information

Patent Citations

  • Picture definition evaluation method and device

    CN104182962A

  • Image quality evaluation method and device, electronic equipment and storage medium

    CN111368837A