An image sharpness evaluation method, device, and electronic device

By calculating the algorithmic clarity of the target image and determining the proportion of clear sample images in the matching sample images, the problem that the prior art cannot accurately measure whether the image is clear, and an accurate evaluation of image clarity and an effective measurement of whether the image is clear are achieved.

CN113902008BActive Publication Date: 2025-06-10BEIJING DUSHANG SOFTWARE TECH CO LTD
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202111165402.3
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-09-30
Publication Date
2025-06-10
Estimated Expiration
2041-09-30

AI Technical Summary

Technical Problem

The prior art cannot accurately measure whether an image is clear. The algorithmic clarity can only compare the sharpness of the image, but it is impossible to determine whether the image is a clear image.

Method used

By calculating the algorithmic clarity of the target image, and determining the proportion of the clear sample image in the matching sample image based on this clarity, to reflect the visual clarity of the target image.

Benefits of technology

Accurate evaluation of image clarity is achieved, and it can effectively measure whether the image is clear and provide the probability that the image is a clear image.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN113902008B_ABST
    Figure CN113902008B_ABST
Patent Text Reader

Abstract

The present disclosure provides an image sharpness evaluation method, apparatus, and electronic device. It relates to the field of computer vision technology, and particularly to the field of image sharpness evaluation technology. The specific implementation solution is as follows: Calculate the algorithm sharpness of the target image as the target algorithm sharpness; determine the proportion of clear sample images in the matching sample images according to the target algorithm sharpness as the visual sharpness of the target image, where the matching sample images are sample images whose algorithm sharpness matches the target algorithm sharpness, and the clear sample images are sample images labeled as clear. It can accurately evaluate whether an image is clear.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present disclosure relates to the field of computer vision technology, and particularly to the field of image sharpness evaluation technology. Background Art

[0002] A clear image enables users to obtain information from the image more easily. Therefore, the sharpness of an image is an important indicator for measuring the image quality. Summary of the Invention

[0003] The present disclosure provides a method, an apparatus, a device, and a storage medium for accurately evaluating whether an image is clear. According to a first aspect of the present disclosure, there is provided an image sharpness evaluation method, including:

[0004] Calculating the algorithm sharpness of a target image as the target algorithm sharpness;

[0005] Determining, according to the target algorithm sharpness, the proportion of clear sample images in the matching sample images as the visual sharpness of the target image, where the matching sample images are sample images whose algorithm sharpness matches the target algorithm sharpness, and the clear sample images are sample images labeled as clear.

[0006] According to a second aspect of the present disclosure, there is provided an image sharpness evaluation apparatus, including:

[0007] An algorithm sharpness determination module, configured to calculate the algorithm sharpness of a target image as the target algorithm sharpness;

[0008] A visual sharpness determination module, configured to determine, according to the target algorithm sharpness, the proportion of clear sample images in the matching sample images as the visual sharpness of the target image, where the matching sample images are sample images whose algorithm sharpness matches the target algorithm sharpness, and the clear sample images are sample images labeled as clear.

[0009] According to a third aspect of the present disclosure, there is provided an electronic device, including:

[0010] At least one processor; and

[0011] A memory communicatively connected to the at least one processor; wherein,

[0012] The memory stores instructions executable by the at least one processor, and when the instructions are executed by the at least one processor, the at least one processor is enabled to execute the method according to any one of the first aspect above.

[0013] According to a fourth aspect of the present disclosure, there is provided a non-transitory computer-readable storage medium storing computer instructions, wherein the computer instructions are used to cause the computer to execute the method according to any one of the above first aspects.

[0014] According to a fifth aspect of the present disclosure, there is provided a computer program product including a computer program, which implements the method according to any one of the above first aspects when executed by a processor.

[0015] It should be understood that the content described in this part is not intended to identify the key or important features of the embodiments of the present disclosure, nor is it used to limit the scope of the present disclosure. Other features of the present disclosure will become easily understood through the following description. Description of the Drawings

[0016] The drawings are used to better understand the solution and do not constitute a limitation to the present disclosure. Among them:

[0017] Figure 1 is a schematic flowchart of a method for evaluating image sharpness provided by the present disclosure;

[0018] Figure 2 is a schematic flowchart of a method for interval division for image sharpness evaluation provided by the present disclosure;

[0019] Figure 3 is a schematic flowchart of a method for image optimization based on image sharpness evaluation provided by the present disclosure;

[0020] Figure 4 is another schematic flowchart of a method for image optimization based on image sharpness evaluation provided by the present disclosure;

[0021] Figure 5 is a schematic structural diagram of an image sharpness evaluation device provided by the present disclosure;

[0022] Figure 6 is a block diagram of an electronic device for implementing the method for evaluating image sharpness in the embodiments of the present disclosure. Detailed Embodiments

[0023] The following makes an explanation of the exemplary embodiments of the present disclosure with reference to the drawings. Various details of the embodiments of the present disclosure are included to facilitate understanding, and they should be considered merely exemplary. Therefore, those of ordinary skill in the art should recognize that various changes and modifications can be made to the embodiments described herein without departing from the scope and spirit of the present disclosure. Similarly, for the sake of clarity and conciseness, the description of well-known functions and structures is omitted below.

[0024] To more clearly illustrate the image sharpness evaluation method provided by the embodiments of the present disclosure, a possible application scenario of the image sharpness evaluation method provided by the present disclosure will be exemplarily described below. It can be understood that the following examples are only a possible application scenario of the image sharpness evaluation method provided by the present disclosure. In other possible embodiments, the image sharpness evaluation method provided by the present disclosure can also be applied to other possible application scenarios, and the following examples do not impose any restrictions on this.

[0025] Compared with text, images can display information to users in a more intuitive way. Therefore, in scenarios such as event promotion, cultural promotion, and advertising placement that require displaying information to users, information is often displayed through images. On the one hand, blurred images will make it difficult for users to accurately obtain information from the images. On the other hand, due to the poor visual effect, blurred images are difficult to attract users' attention, resulting in the information in the images being difficult to be effectively obtained by users.

[0026] Therefore, in order to enable the information in the images to be effectively obtained by users, clear images are needed. To determine whether an image is clear, in the related art, the algorithm sharpness of the image is calculated according to a preset sharpness algorithm, and it is considered that the higher the algorithm sharpness of the image, the clearer the image.

[0027] However, the algorithm sharpness can only be used to measure which image is clearer and cannot measure which image is a clear image. Exemplarily, assume that there are image A and image B. The algorithm sharpness of image A is 0.8, and the algorithm sharpness of image B is 0.9. Then, according to the algorithm sharpness, it can only be determined that image B is clearer than image A, but it cannot be determined whether image A is clear or whether image B is clear. Therefore, a clear image cannot be further determined based on the algorithm sharpness. That is, the algorithm sharpness cannot accurately reflect whether the image is clear.

[0028] Based on this, the present disclosure provides an image sharpness evaluation method, which can be applied to any electronic device with the ability to evaluate image sharpness, including but not limited to mobile phones, tablets, servers, etc. The image sharpness evaluation method provided by the present disclosure can be as Figure 1 shown, including:

[0029] S101, calculating the algorithm sharpness of the target image as the target algorithm sharpness.

[0030] S102, determining the proportion of clear sample images in the matching sample images according to the target algorithm sharpness as the visual sharpness of the target image, where the matching sample images are sample images whose algorithm sharpness matches the target algorithm sharpness, and the clear sample images are sample images marked as clear.

[0031] Selecting this embodiment, by calculating the target algorithm sharpness of the target image, the proportion of clear sample images in the matching sample images is determined. Since the algorithm sharpness of the matching sample images matches the target algorithm sharpness, the matching sample images can be considered as images with a sharpness comparable to that of the target image. And the proportion of clear sample images in the matching sample images can be considered as the probability that the matching sample images are clear images. And since the sharpness of the target image is comparable to that of the matching sample images, the probability that the target image is a clear image is also comparable to the probability that the matching sample images are clear images. Therefore, the obtained visual sharpness can reflect the probability that the target image is a clear image, so the visual sharpness can be used to measure whether the target image is clear.

[0032] Exemplarily, assuming that the determined proportion is 80%, and the determined proportion is used as the visual sharpness of the target image, then according to the visual sharpness, it can be determined that the target image has an 80% probability of being a clear image and a 20% probability of being a blurred image. It can be seen that compared with the algorithm sharpness, the visual sharpness determined in the present disclosure can effectively measure whether an image is clear.

[0033] To more clearly illustrate the image sharpness evaluation method provided in the present disclosure, the foregoing S101 - S102 will be described separately below:

[0034] In S101, the algorithm sharpness of the target image can be calculated according to any sharpness algorithm, including but not limited to using the Brenneer (a function for evaluating image sharpness) gradient method, the Tenengrad (another function for evaluating image sharpness) gradient method, the SMD (gray variance) method, the SMD2 (restored variance product) method, etc. This embodiment does not make any restrictions on this.

[0035] Depending on the different sharpness algorithms used, the value range of the calculated algorithm sharpness may be different. For the convenience of description below, the case where the value range of the algorithm sharpness is [0, 1] is taken as an example for illustration. And, only the case where the larger the algorithm sharpness, the clearer the image is taken as an example for illustration herein. The principle for the case where the smaller the algorithm sharpness, the clearer the image is the same, and will not be elaborated here.

[0036] In S102, the sample images are pre-annotated with whether they are clear or not. For the convenience of description in this article, the sample images annotated as clear are called clear sample images, and the sample images annotated as blurred are called blurred sample images. The matching of the algorithm clarity of the sample images and the target algorithm clarity may mean that the algorithm clarity of the matching sample images and the target algorithm clarity belong to the same value range, or it may mean that the difference between the algorithm clarity of the matching sample images and the target algorithm clarity is less than a preset threshold. The preset threshold can be set according to the user's needs or actual experience, and the present disclosure does not impose any restrictions on this.

[0037] It can be understood that since the algorithm clarity of the matching sample images matches the target algorithm clarity, it can be considered that the algorithm clarity of the matching sample images is approximately equal to the target algorithm clarity. Therefore, it can be considered that the clarity degrees of the matching sample images and the target images are approximately equal.

[0038] And theoretically, when the number of sample images is large enough, the proportion of clear sample images in the matching sample images can be regarded as the probability that the matching sample images are clear images. And as analyzed above, the clarity degrees of the matching sample images and the target images are approximately equal. Therefore, the probability that the matching sample images are clear images is approximately equal to the probability that the target images are clear images. Therefore, the visual clarity obtained by determining the proportion can reflect the probability that the target images are clear images, and the probability that the target images are clear images can reflect whether the target images are clear.

[0039] In one possible embodiment, the determined proportion can be directly used as the visual clarity of the target image. In another possible embodiment, the determined proportion can also be processed in any form to obtain a processing result, and the obtained processing result can be used as the visual clarity of the target image. For example, assuming that the determined proportion is 83.1%, the proportion can be rounded down to obtain a processing result of 83% as the visual clarity of the target image.

[0040] For another example, assume that the user believes that if the probability that the target image is a clear image is greater than 80%, then the target image is considered a clear image, and if the probability that the target image is a clear image is not greater than 80%, then the target image is considered a blurred image. Then a piecewise function can be used to map the proportion, and the mapping result output by the piecewise function is used as the visual clarity. Among them, when the input is greater than 80%, the output of the piecewise function is 1, and when the input is not greater than 80%, the output of the piecewise function is 0. When the visual clarity is 1, the target image is considered a clear image, and when the visual clarity is 0, the target image is considered a blurred image.

[0041] The proportion of the sample images marked as clear among the obtained matching sample images can be represented in different forms. For the convenience of description, the number of matching sample images is denoted as X, the number of clear sample images among the matching sample images is Y, and the number of blurred sample images among the matching sample images is Z. Then the form of this proportion can be represented in the form of Y / X, or in the form of Z / X, or in the form of Y / Z. And in other possible embodiments, it can also be represented in other forms. The present disclosure does not impose any restrictions on this.

[0042] It can be understood that since there is a constraint condition X = Y + Z, both Z / X and Y / Z can reflect the proportion of the sample images marked as clear among the matching sample images. Therefore, Z / X and Y / Z can be used to represent the proportion of the sample images marked as clear among the matching sample images. For the convenience of description in the following text, only the example where the proportion of clear sample images among the matching sample images is represented in the form of Y / X is described. The principle is the same for the proportion represented in other forms and will not be elaborated here.

[0043] To more clearly illustrate the image clarity evaluation method provided by the present disclosure, the determination of the proportion will be described below:

[0044] In a possible embodiment, the algorithm clarity is pre-divided into multiple intervals, and the matching sample images are the sample images whose algorithm clarity and the target algorithm clarity belong to the same interval.

[0045] Taking the algorithm clarity being divided into three intervals, and the three intervals being [0, 0.3], (0.3, 0.8], (0.8, 1] as an example, if the target algorithm clarity is 0.82, then it is determined that the target algorithm clarity belongs to the interval (0.8, 1]. Therefore, the matching sample images are the sample images whose algorithm clarity belongs to the interval (0.8, 1]. Suppose there are a total of 10,000 sample images whose algorithm clarity belongs to the interval (0.8, 1], that is, the number of matching sample images is 10,000. And suppose there are a total of 9,800 clear sample images whose algorithm clarity belongs to the interval (0.8, 1], that is, the number of clear sample images among the matching sample images is 9,800. Then it can be determined that the proportion of clear sample images among the matching sample images is 9,800 / 10,000 = 98%.

[0046] By selecting this embodiment, the proportion of the sample images marked as clear among the sample images whose algorithm clarity matches the target algorithm clarity can be determined by dividing the intervals, and the calculation amount is relatively small, which can further improve the efficiency of the image clarity evaluation method provided by the present disclosure.

[0047] In one possible embodiment, the algorithm clarity can be divided into multiple intervals according to user experience or actual needs. In another possible embodiment, see Figure 2 , Figure 2 The figure shows a flow chart of the interval division method provided by the present disclosure, which may include:

[0048] S201, calculating the algorithm clarity of each sample image.

[0049] The method used to calculate the algorithmic clarity of the sample image is the same as that used to calculate the algorithmic clarity of the target image.

[0050] S202: For each candidate threshold, determine a first proportion of clear sample images in the first category of sample images, and a second proportion of blurred sample images in the second category of sample images.

[0051] The first type of sample images are sample images whose algorithm clarity is greater than the candidate threshold, and the second type of sample images are sample images whose algorithm clarity is less than the candidate threshold.

[0052] There are multiple candidate thresholds, and the value range of the candidate thresholds can be the same as the value range of the algorithm clarity, or can be a proper subset of the value range of the algorithm clarity. Exemplarily, the value range of the candidate thresholds can be [0, 1], or [0.1, 0.9].

[0053] S203: Determine the highest candidate threshold value according to the first proportion and the second proportion, and use it as the target threshold value. The score is positively correlated with the first proportion and positively correlated with the second proportion.

[0054] It can be understood that the first proportion reflects the probability that the first type of sample images are clear images, and the second proportion reflects the probability that the second type of sample images are blurred images.

[0055] In this embodiment, the clarity of each first-category sample image is considered to be approximately equal, and the clarity of each second-category sample image is considered to be approximately equal. Therefore, ideally, the first-category sample images are all clear images, and the second-category sample images are all blurred images. It can be seen that when the second proportion remains unchanged, the higher the first proportion, the more ideal the candidate threshold value can be considered. Similarly, when the first proportion remains unchanged, the higher the second proportion, the more ideal the candidate threshold value can be considered.

[0056] Since the score is positively correlated with the first proportion and the second proportion, it can be considered that the candidate threshold with the highest score is the most ideal, that is, by dividing the interval with this candidate threshold, algorithm clarity images with equal clarity can be divided into the same interval as much as possible.

[0057] The calculation method of the score can be different according to different application scenarios. Exemplarily, the sum of the first ratio and the second ratio can be used as the score, or the result obtained by weighted averaging the first ratio and the second ratio according to a preset weight can be used as the score. The present disclosure does not impose any restrictions on this.

[0058] Since the score is positively correlated with the first ratio and the second ratio, in a possible embodiment, a coordinate system can be constructed with the first ratio and the second ratio as the horizontal axis and the vertical axis respectively. The positions of each candidate threshold are plotted in this coordinate system, and a curve is obtained by connecting these positions. The candidate threshold located at the intersection of this curve and the line y = x is the target threshold.

[0059] S204, divide the algorithm clarity into an interval greater than the target threshold and an interval not greater than the target threshold.

[0060] Exemplarily, assuming the target threshold is 0.8, the algorithm clarity is divided into the interval [0, 0.8] and the interval (0.8, 1].

[0061] By selecting this embodiment, the scores of each candidate threshold can be determined by performing binary classification on the sample images, so as to determine the candidate threshold that can perform the most ideal binary classification on the sample images from the candidate thresholds as the target threshold, and divide the algorithm clarity according to the target threshold to obtain two intervals. Thus, the clarity of the images belonging to the same interval of the algorithm clarity is made as approximately equal as possible, that is, the clarity of the target image can be further made approximately equal to the clarity of the matching sample image. Therefore, the proportion of the clear sample images in the matching sample images can more accurately reflect whether the target image is clear, that is, the determined visual clarity can be further improved to more accurately reflect whether the target image is clear.

[0062] As described above, users often hope that the images are clear. In the related art, the images can be optimized to make them clearer, so that the blurred images become clear images. However, optimizing the images requires consuming certain system resources. Therefore, if the images are optimized when they are clear, it will cause waste of system resources.

[0063] Based on this, in a possible embodiment, as Figure 3 shown, it includes:

[0064] S301, calculate the algorithm clarity of the target image as the target algorithm clarity.

[0065] This step is the same as the foregoing S101, and the relevant description of the foregoing S101 can be referred to and will not be elaborated here.

[0066] S302. Determine the proportion of clear sample images in the matching sample images according to the target algorithm clarity as the visual clarity of the target image.

[0067] This step is the same as the aforementioned S102. For the relevant description, refer to the aforementioned S102 and will not be elaborated here.

[0068] S303. Determine the optimization strategy corresponding to the image attribute of the target image according to the preset correspondence between the image attribute and the optimization strategy as the target optimization strategy.

[0069] S304. Optimize the target image according to the target optimization strategy.

[0070] Selecting this embodiment, the optimization strategy can be determined according to the image attribute of the target image. Since the image attribute includes visual clarity, and as described above, visual clarity can reflect whether the target image is clear, the optimization strategy of the target image can be determined according to whether the target image is clear, thus avoiding further optimizing the clarity of the target image when the target image is clear and effectively avoiding waste of system resources.

[0071] Among them, the image attribute includes visual clarity, and the image attribute may also include other attributes other than visual clarity, including but not limited to image height and data volume of the image.

[0072] The correspondence between the image attribute and the optimization strategy may be different according to different application scenarios. The present disclosure does not impose any restrictions on this. Only an exemplary description of the correspondence is given below. In a possible embodiment, if the visual clarity is lower than the preset lower threshold, the optimization strategy is: re-acquire the target image. If the visual clarity is not lower than the lower threshold and not higher than the upper threshold, the optimization strategy is: optimize the target image to make it clearer. If the visual clarity is not lower than the upper threshold, the optimization strategy is: do not optimize.

[0073] The optimization of the target image can be performed by the execution subject of the image clarity evaluation method provided by the present disclosure, or by other electronic devices other than the execution subject. Exemplarily, in a possible application scenario, if the target image is an image uploaded by the client, the client can optimize the target image.

[0074] In another possible embodiment, the target image is an image uploaded by a client. If the visual clarity is not lower than the lower threshold and not higher than the upper threshold, and the data volume of the target image is less than the preset data volume threshold, the optimization strategy is: the execution entity of the image clarity evaluation method provided by the present disclosure optimizes the target image to make the target image clearer. If the visual clarity is not lower than the lower threshold and not higher than the upper threshold, and the data volume of the target image is not less than the preset data volume threshold, the optimization strategy is: the client that uploads the target image optimizes the target image to make the target image clearer.

[0075] It can be understood that if the data volume of the target image is less than the preset quantity threshold, it can be considered that the system resources occupied by optimizing the image are less. Therefore, the execution entity can optimize the target image. If the data volume of the target image is not less than the preset quantity threshold, it can be considered that the system resources occupied by optimizing the image are more. And the computing resources of the execution entity are limited. Therefore, the client optimizes the target image.

[0076] It can be understood that it may be difficult for the client to optimize the target image due to limited software and hardware conditions. Therefore, by selecting this embodiment, while taking into account the computing resource load of the execution entity, the execution entity can replace the client to optimize the target image to solve the technical problem that it is difficult for the client to optimize the target image.

[0077] In another possible embodiment, the target image is an image to be displayed on a preset screen. If the visual clarity is not lower than the upper threshold, and the height of the target image is not higher than 1.5 times the height of the preset screen, the optimization strategy is: do not optimize. If the visual clarity is not lower than the upper threshold, and the height of the target image is higher than 1.5 times the height of the preset screen, the optimization strategy is: adjust the height of the target image so that the height of the target image is lower than 1.5 times the height of the preset screen.

[0078] It can be understood that if the height of the target image is higher than 1.5 times the height of the preset screen, when the target image is displayed on the preset screen, the target image will be distorted due to stretching, or the details in the image will be difficult to observe due to scaling. Whether it is distortion or difficult to observe details, it will make it difficult for users to obtain information from the displayed target image. By selecting this embodiment, when the height of the target image is higher than 1.5 times the height of the preset screen, the height of the target image can be adjusted so that users can effectively obtain information from the target image displayed on the preset screen.

[0079] In a possible embodiment, the target image is an image uploaded by a client. Exemplarily, in this embodiment, the executing entity may be a server for improving the services of an advertising platform, and the target image is an image for advertising promotion uploaded by a user through the client. To improve the effect of advertising promotion, the user hopes that the uploaded image is as clear as possible, but it is difficult for the user to accurately determine whether the uploaded image is clear. Based on this, in this embodiment, as Figure 4 described, it includes:

[0080] S401, calculate the algorithm clarity of the target image as the target algorithm clarity.

[0081] This step is the same as the foregoing S101. For relevant descriptions, refer to the foregoing S101 and will not be elaborated here.

[0082] S402, determine the proportion of clear sample images in the matching sample images according to the target algorithm clarity as the visual clarity of the target image.

[0083] This step is the same as the foregoing S102. For relevant descriptions, refer to the foregoing S102 and will not be elaborated here.

[0084] S403, determine the optimization strategy corresponding to the image attribute of the target image according to the preset correspondence between the image attribute and the optimization strategy as the target optimization strategy.

[0085] This step is the same as the foregoing S303. For relevant descriptions, refer to the foregoing S303 and will not be elaborated here.

[0086] S404, send guiding information representing the target optimization strategy to the client so that the client optimizes the target image according to the guiding information according to the target optimization strategy.

[0087] Selecting this embodiment, the executing entity can guide the client so that the target image uploaded by the client is as clear as possible.

[0088] It can be understood that, considering reducing the amount of data to be uploaded, in a possible embodiment, the image uploaded by the client is a compressed image, and the clarity of the compressed image is often low. Based on this, in a possible embodiment, the target image uploaded by the client is an uncompressed original image, and to reduce the amount of data to be uploaded, the target image is an image in the webq (an image format) format.

[0089] And it can be understood that storing the target image uploaded by the client will occupy the storage space of the execution entity, and the storage space of the execution entity is often limited. Therefore, in a possible embodiment, the target image uploaded by the client is an image with a data volume smaller than the limit threshold, and the limit threshold can be set according to actual needs or experience, such as 1 Mb, 200 Kb, etc. And the smaller the data volume of the image, the more blurred it is. Therefore, in a possible embodiment, to make the target image uploaded by the client clearer, the limit threshold is set to 2 Mb.

[0090] See Figure 5 , Figure 5 shown is a schematic structural diagram of an image clarity evaluation device provided by the present disclosure, which may include:

[0091] An algorithm clarity determination module 501, configured to calculate the algorithm clarity of the target image as the target algorithm clarity;

[0092] A visual clarity determination module 502, configured to determine, according to the target algorithm clarity, the proportion of clear sample images in the matching sample images as the visual clarity of the target image, where the matching sample images are sample images with algorithm clarity matching the target algorithm clarity, and the clear sample images are sample images labeled as clear.

[0093] In a possible embodiment, the algorithm clarity is pre-divided into multiple intervals;

[0094] The matching sample images are sample images with algorithm clarity belonging to the same interval as the target algorithm clarity.

[0095] In a possible embodiment, the device further includes an interval division module, configured to calculate the algorithm clarity of each sample image;

[0096] For each candidate threshold, determine a first proportion of clear sample images in the first type of sample images and a second proportion of blurred sample images in the second type of sample images, where the first type of sample images are sample images with algorithm clarity greater than the candidate threshold, the second type of sample images are sample images with algorithm clarity less than the candidate threshold, and the blurred sample images are sample images labeled as blurred;

[0097] According to the first proportion and the second proportion, determine the candidate threshold with the highest score as the target threshold, where the score is positively correlated with the first proportion and positively correlated with the second proportion;

[0098] Divide the algorithm clarity into an interval greater than the target threshold and an interval not greater than the target threshold.

[0099] In a possible embodiment, it further includes:

[0100] An optimization module, configured to determine, according to the corresponding relationship between the preset image attributes and the optimization strategies, the optimization strategy corresponding to the image attributes of the target image as the target optimization strategy, where the image attributes include visual clarity;

[0101] Optimize the target image according to the target optimization strategy.

[0102] In a possible embodiment, the optimization module is specifically configured to send guiding information for representing the target optimization strategy to the client, so that the client optimizes the target image according to the guiding information and in accordance with the target optimization strategy.

[0103] In the technical solution of the present disclosure, the collection, storage, use, processing, transmission, provision, and disclosure of the user's personal information and other processing all comply with the provisions of relevant laws and regulations and do not violate public order and good customs.

[0104] According to the embodiments of the present disclosure, the present disclosure also provides an electronic device, a readable storage medium, and a computer program product.

[0105] Figure 6 The schematic block diagram of an exemplary electronic device 600 that can be used to implement the embodiments of the present disclosure is shown. The electronic device is intended to represent various forms of digital computers, such as, a laptop computer, a desktop computer, a workbench, a personal digital assistant, a server, a blade server, a mainframe computer, and other suitable computers. The electronic device can also represent various forms of mobile devices, such as, a personal digital processing, a cellular phone, a smart phone, a wearable device, and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely examples and are not intended to limit the implementation of the present disclosure described and / or claimed herein.

[0106] As Figure 6 shown, the device 600 includes a computing unit 601, which can execute various appropriate actions and processes according to the computer program stored in the read-only memory (ROM) 602 or the computer program loaded from the storage unit 608 into the random access memory (RAM) 603. In the RAM 603, various programs and data required for the operation of the device 600 can also be stored. The computing unit 601, the ROM 602, and the RAM 603 are connected to each other through a bus 604. The input / output (I / O) interface 605 is also connected to the bus 604.

[0107] Multiple components in device 600 are connected to I / O interface 605, including: input unit 606, such as a keyboard, mouse, etc.; output unit 607, such as various types of displays, speakers, etc.; storage unit 608, such as a disk, optical disc, etc.; and communication unit 609, such as a network card, modem, wireless communication transceiver, etc. Communication unit 609 allows device 600 to exchange information / data with other devices via a computer network such as the Internet and / or various telecommunication networks.

[0108] Computing unit 601 can be various general-purpose and / or special-purpose processing components with processing and computing capabilities. Some examples of computing unit 601 include but are not limited to a central processing unit (CPU), a graphics processing unit (GPU), various dedicated artificial intelligence (AI) computing chips, various computing units running machine learning model algorithms, a digital signal processor (DSP), and any suitable processor, controller, microcontroller, etc. Computing unit 601 executes the various methods and processes described above, such as the image sharpness evaluation method. For example, in some embodiments, the image sharpness evaluation method can be implemented as a computer software program, which is tangibly contained in a machine-readable medium, such as storage unit 608. In some embodiments, part or all of the computer program can be loaded and / or installed onto device 600 via ROM 602 and / or communication unit 609. When the computer program is loaded into RAM 603 and executed by computing unit 601, one or more steps of the image sharpness evaluation method described above can be executed. Alternatively, in other embodiments, computing unit 601 can be configured to execute the image sharpness evaluation method in any other suitable way (e.g., by means of firmware).

[0109] The various embodiments of the systems and technologies described above herein can be implemented in digital electronic circuit systems, integrated circuit systems, field-programmable gate arrays (FPGA), application-specific integrated circuits (ASIC), application-specific standard products (ASSP), system-on-chip systems (SOC), complex programmable logic devices (CPLD), computer hardware, firmware, software, and / or combinations thereof. These various embodiments can include: implemented in one or more computer programs that can be executed and / or interpreted on a programmable system including at least one programmable processor, which can be a special or general-purpose programmable processor, receive data and instructions from a storage system, at least one input device, and at least one output device, and transmit the data and instructions to the storage system, the at least one input device, and the at least one output device.

[0110] The program code for implementing the methods of the present disclosure may be written in any combination of one or more programming languages. These program codes may be provided to a processor or controller of a general purpose computer, a special purpose computer, or other programmable data processing device, such that the program codes, when executed by the processor or controller, cause the functions / operations specified in the flowcharts and / or block diagrams to be implemented. The program code may be executed entirely on the machine, partly on the machine, as a stand-alone software package partly on the machine and partly on a remote machine, or entirely on the remote machine or server.

[0111] In the context of the present disclosure, a machine-readable medium may be a tangible medium that can contain or store a program for use by or in connection with an instruction execution system, apparatus, or device. A machine-readable medium may be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium may include, but is not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, apparatus, or devices, or any suitable combination of the foregoing. More specific examples of a machine-readable storage medium would include an electrical connection based on one or more wires, a portable computer diskette, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or Flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.

[0112] In order to provide interaction with a user, the systems and techniques described herein may be implemented on a computer having: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to the user; and a keyboard and a pointing device (e.g., a mouse or a trackball) by which the user can provide input to the computer. Other kinds of devices may also be used to provide interaction with the user; for example, the feedback provided to the user may be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user may be received in any form (including acoustic input, voice input, or tactile input).

[0113] The systems and techniques described herein can be implemented in a computing system including backend components (e.g., as a data server), or a computing system including middleware components (e.g., an application server), or a computing system including frontend components (e.g., a user computer having a graphical user interface or a web browser through which a user can interact with an implementation of the systems and techniques described herein), or a computing system including any combination of such backend components, middleware components, or frontend components. The components of the system can be interconnected with each other by digital data communication in any form or medium (e.g., a communication network). Examples of communication networks include: local area network (LAN), wide area network (WAN), and the Internet.

[0114] A computer system can include a client and a server. The client and the server are generally far from each other and typically interact through a communication network. The client-server relationship is created by computer programs running on the respective computers and having a client-server relationship with each other. The server can be a cloud server, a server of a distributed system, or a server incorporating a blockchain.

[0115] It should be understood that the various forms of processes shown above can be used, with steps reordered, added, or deleted. For example, the steps recited in this disclosure can be executed in parallel, sequentially, or in a different order, as long as the desired results of the technical solutions disclosed in this disclosure can be achieved, and this is not limited herein.

[0116] The above specific embodiments do not constitute a limitation on the protection scope of this disclosure. Those skilled in the art should understand that various modifications, combinations, sub-combinations, and substitutions can be made according to design requirements and other factors. Any modifications, equivalent replacements, and improvements made within the spirit and principles of this disclosure shall be included within the protection scope of this disclosure.

Claims

1. An image sharpness evaluation method, comprising: Calculating the algorithm sharpness of the target image as the target algorithm sharpness; Determining, according to the target algorithm sharpness, the proportion of clear sample images in the matching sample images as the visual sharpness of the target image, where the matching sample images are sample images whose algorithm sharpness belongs to the same interval as the target algorithm sharpness, and the clear sample images are sample images labeled as clear; wherein, the algorithm sharpness is pre-divided into multiple intervals in the following manner: Calculating the algorithm sharpness of each sample image; For each candidate threshold, determining the first proportion of clear sample images in the first type of sample images and the second proportion of blurred sample images in the second type of sample images, where the first type of sample images are sample images whose algorithm sharpness is greater than the candidate threshold, the second type of sample images are sample images whose algorithm sharpness is less than the candidate threshold, and the blurred sample images are sample images labeled as blurred; Determining the candidate threshold with the highest score as the target threshold according to the first proportion and the second proportion, where the score is positively correlated with the first proportion and positively correlated with the second proportion; Dividing the algorithm sharpness into an interval greater than the target threshold and an interval not greater than the target threshold.

2. The method according to claim 1, further comprising: Determining, according to the correspondence between the preset image attributes and the optimization strategies, the optimization strategy corresponding to the image attributes of the target image as the target optimization strategy, where the image attributes include visual sharpness; Optimizing the target image according to the target optimization strategy.

3. The method according to claim 2, wherein, the target image is an image uploaded by the client; The optimizing the target image according to the target optimization strategy includes: Sending guiding information representing the target optimization strategy to the client, so that the client optimizes the target image according to the guiding information according to the target optimization strategy.

4. An image sharpness evaluation device, comprising: An algorithm sharpness determination module, configured to calculate the algorithm sharpness of the target image as the target algorithm sharpness; A visual sharpness determination module, configured to determine, according to the target algorithm sharpness, the proportion of clear sample images in the matching sample images as the visual sharpness of the target image, where the matching sample images are sample images whose algorithm sharpness belongs to the same interval as the target algorithm sharpness, and the clear sample images are sample images labeled as clear; wherein, the device further includes an interval division module, configured to calculate the algorithm sharpness of each sample image; For each candidate threshold, determining the first proportion of clear sample images in the first type of sample images and the second proportion of blurred sample images in the second type of sample images, where the first type of sample images are sample images whose algorithm sharpness is greater than the candidate threshold, the second type of sample images are sample images whose algorithm sharpness is less than the candidate threshold, and the blurred sample images are sample images labeled as blurred; Based on the first ratio and the second ratio, determine the candidate threshold with the highest score as the target threshold, where the score is positively correlated with the first ratio and positively correlated with the second ratio; Divide the algorithm clarity into an interval greater than the target threshold and an interval not greater than the target threshold.

5. The apparatus according to claim 4, further comprising: an optimization module, configured to determine, according to the corresponding relationship between the preset image attribute and the optimization strategy, the optimization strategy corresponding to the image attribute of the target image as the target optimization strategy, where the image attribute includes visual clarity; Optimize the target image according to the target optimization strategy.

6. The apparatus according to claim 5, wherein, the optimization module is specifically configured to send guiding information for representing the target optimization strategy to the client, so that the client optimizes the target image according to the guiding information and in accordance with the target optimization strategy.

7. An electronic device, comprising: at least one processor; and a memory communicatively connected to the at least one processor; wherein, the memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor so that the at least one processor can execute the method according to any one of claims 1-3.

8. A non-transitory computer-readable storage medium storing computer instructions, wherein, the computer instructions are used to cause the computer to execute the method according to any one of claims 1-3.

9. A computer program product, comprising a computer program, where the computer program, when executed by a processor, implements the method according to any one of claims 1-3.

Citation Information

Patent Citations

  • Classification model evaluation method and device, computer equipment and storage medium

    CN110852400A