Image definition scoring method and device, storage medium and computer equipment

By constructing a variant of the sigmoid function, the image sharpness value calculated by the Laplacian operator is mapped to a specific range, which solves the problem of unclear sharpness value range in the existing technology and realizes stable scoring and intuitive perception of image sharpness.

CN116309140BActive Publication Date: 2026-01-02BEIJING WATERDROP TECH GRP CO LTD
View PDF 3 Cites 0 Cited by

Patent Information

Application Number
CN202310202312.X
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-03-02
Publication Date
2026-01-02
Estimated Expiration
2043-03-02

AI Technical Summary

Technical Problem

In existing technologies, image sharpness discrimination methods based on Laplacian gradients have difficulty in stably mapping image sharpness values ​​to an ideal bounded interval, making it difficult to provide reasonable sharpness scoring specifications, and the mapping relationship is not stable enough.

Method used

By constructing a variant of the sigmoid function, the image sharpness value calculated by the Laplacian operator is mapped to a specific preset sharpness score range. This function is used to achieve a monotonically increasing sharpness score, ensuring the stability and comparability of the sharpness value range.

Benefits of technology

It achieves stable mapping and ordered scoring of image sharpness values, enabling a more intuitive perception of image sharpness levels, solving the problem of unclear sharpness value range in existing technologies, and providing a unified scoring standard.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116309140B_ABST
    Figure CN116309140B_ABST
Patent Text Reader

Abstract

The application discloses a method and device for scoring image definition, a storage medium and a computer device, and the method comprises the following steps: receiving a target image to be scored, and performing definition evaluation on the target image based on a Laplacian operator to obtain an initial definition value of the target image; and substituting the initial definition value into a definition scoring function to obtain a definition score of the target image, wherein the definition scoring function is a variant function of a sigmoid function, and the value range of the definition scoring function is a preset definition score interval. By performing the variant on the sigmoid function, the definition scoring function which is monotonically increasing and has a specific value range is obtained, so that the definition value of the image calculated by using the Laplacian operator is mapped into the specific value range by using the function, and the image definition level can be more intuitively perceived.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the technical field of image processing, in particular to an image definition scoring method and device, a storage medium and a computer device. BACKGROUND

[0002] The image definition discrimination method based on Laplacian gradient is a very light and easy-to-build method. However, the image definition values given by the method differ greatly in magnitude, for example, the definition values of five pictures are 9, 3100, 30, 157, 488 in turn. For these scores, it is difficult to know the exact upper bound of the value range returned by the discrimination method. Therefore, it is difficult to give a reasonable measurement specification for the output definition data. It is difficult to judge the definition of a certain image in the overall level. Therefore, the definition score needs to be processed again and mapped to a given interval.

[0003] To solve the above problems, the prior art provides a processing method for mapping the above definition values [9, 3100, 30, 157, 488] to the interval [0, 10] and maintaining the order relationship, that is, taking the maximum value 3100 in the five values, and establishing a mapping relationship 3100 / 10=x / y, that is, y=x / 310. However, the limitation of using this method is very large. When there is a second group of five pictures, the definition scores of the second group of pictures are [790, 121, 4100, 1500, 950] respectively. Obviously, the mapping relationship established before is invalid. This way is not stable enough.

[0004] How to stably and orderly map the image definition value to the ideal bounded interval has become a problem worth exploring in this field. SUMMARY

[0005] Therefore, the present application provides an image definition scoring method and device, a storage medium and a computer device. By modifying the sigmoid function, a definition scoring function that is monotonically increasing and has a specific value range is obtained, so as to map the definition value of the image calculated by the Laplacian operator to a specific value range, so as to more intuitively perceive the image definition level.

[0006] According to one aspect of the present application, an image definition scoring method is provided, which comprises:

[0007] receiving a target image to be scored, and performing definition evaluation on the target image based on a Laplacian operator to obtain an initial definition value of the target image;

[0008] mapping the initial sharpness value into a sharpness score function to obtain a sharpness score of the target image, wherein the sharpness score function is a variant function of a sigmoid function, and a value range of the sharpness score function is a preset sharpness score interval.

[0009] Optionally, before the target image to be scored is received, the method further comprises:

[0010] obtaining a preset sharpness value and an expected image score corresponding to the preset sharpness value;

[0011] constructing a variant function of a sigmoid function;

[0012] solving the variant function according to the preset sharpness score interval, the preset sharpness value and the expected image score, and taking the solved variant function as a sharpness score function.

[0013] Optionally, the preset sharpness score interval is (0, a), and the variant function is S(x) = 2*N / (1+1 / e x *M )-N, M is a quantity to be solved, x represents a sharpness value, and S(x) represents a sharpness score; and the solving of the variant function according to the preset sharpness score interval, the preset sharpness value and the expected image score comprises:

[0014] substituting a, the preset sharpness value and the expected image score into N, x and S(x) of the variant function respectively to solve M.

[0015] Optionally, the obtaining of the preset sharpness value and the expected image score corresponding to the preset sharpness value comprises:

[0016] obtaining a plurality of first sample images, and performing sharpness evaluation on each of the first sample images based on a Laplacian operator to obtain a first sample sharpness value of the first sample image;

[0017] calculating a first statistical value of the first sample sharpness value, and taking the first statistical value as the preset sharpness value, wherein the first statistical value comprises a median value or an average value of the first sample sharpness value;

[0018] obtaining a medium level score in the preset sharpness score interval as the expected image score corresponding to the preset sharpness value based on a preset medium level score standard.

[0019] Optionally, the obtaining of the preset sharpness value and the expected image score corresponding to the preset sharpness value comprises:

[0020] obtaining a plurality of second sample images, and observing an expected image meeting an expected image scoring condition in terms of definition in the second sample images;

[0021] respectively evaluating the definition of each of the expected images based on a Laplacian operator to obtain a second sample definition value of the expected images;

[0022] calculating a second statistical value of the second sample definition value, and taking the second statistical value as the preset definition value, wherein the second statistical value includes a median value or an average value of the second sample definition value;

[0023] determining an expected image score corresponding to the preset definition value according to the expected image scoring condition.

[0024] Optionally, the evaluating the definition of the target image based on the Laplacian operator to obtain an initial definition value of the target image comprises:

[0025] converting the target image into a grayscale image, and performing Laplacian filtering on the grayscale image;

[0026] calculating a variance of a grayscale matrix obtained after the Laplacian filtering as the initial definition value of the target image.

[0027] Optionally, after receiving the target image to be scored, the method further comprises:

[0028] in a case where the target image includes a plurality of target images, calculating a similarity between different target images, and constructing a plurality of target images with a similarity greater than a preset threshold as an image group;

[0029] Correspondingly, after obtaining the definition score of the target image, the method further comprises:

[0030] for any image group, sorting each target image in the image group according to the definition score of each target image, and / or determining a recommended image corresponding to the image group according to the definition score of each target image in the image group.

[0031] According to another aspect of the present application, an image definition scoring device is provided, the device comprising:

[0032] a calculation module configured to receive a target image to be scored, and evaluate the definition of the target image based on a Laplacian operator to obtain an initial definition value of the target image;

[0033] The scoring module is configured to substitute the initial sharpness value into a sharpness scoring function to obtain a sharpness score of the target image, wherein the sharpness scoring function is a variant function of a sigmoid function, and a value range of the sharpness scoring function is a preset sharpness score interval.

[0034] Optionally, the device further comprises a scoring function determination module configured to:

[0035] obtain a preset sharpness value and an expected image score corresponding to the preset sharpness value;

[0036] construct a variant function of a sigmoid function;

[0037] solve the variant function according to the preset sharpness score interval, the preset sharpness value and the expected image score, and use the solved variant function as a sharpness scoring function.

[0038] Optionally, the preset sharpness score interval is (0, a), and the variant function is S(x) = 2*N / (1+1 / e x *M )-N, M is a quantity to be solved, x represents a sharpness value, and S(x) represents a sharpness score;

[0039] The scoring function determination module is further configured to substitute a, the preset sharpness value and the expected image score into N, x and S(x) of the variant function respectively, and solve M.

[0040] Optionally, the scoring function determination module is further configured to:

[0041] obtain a plurality of first sample images, and perform sharpness evaluation on each of the first sample images based on a Laplacian operator to obtain first sample sharpness values of the first sample images;

[0042] calculate a first statistical value of the first sample sharpness values, and use the first statistical value as the preset sharpness value, wherein the first statistical value includes a median value or an average value of the first sample sharpness values;

[0043] obtain a medium level score in the preset sharpness score interval as the expected image score corresponding to the preset sharpness value based on a preset medium level score standard.

[0044] Optionally, the scoring function determination module is further configured to:

[0045] obtain a plurality of second sample images, and observe an expected image in which sharpness meets an expected image score condition in the second sample images;

[0046] performing sharpness evaluation on each of the expected images based on a Laplacian operator to obtain second sample sharpness values of the expected images;

[0047] calculating a second statistical value of the second sample sharpness values and taking the second statistical value as the preset sharpness value, wherein the second statistical value comprises a median value or an average value of the second sample sharpness values;

[0048] determining an expected image score corresponding to the preset sharpness value according to the expected image score condition.

[0049] Optionally, the computing module is further configured to:

[0050] convert the target image into a gray-scale image and perform Laplacian filtering on the gray-scale image;

[0051] calculate a variance of a gray-scale image matrix obtained after the Laplacian filtering as an initial sharpness value of the target image.

[0052] Optionally, the apparatus further comprises:

[0053] a grouping module configured to, in a case where the target image comprises multiple images, calculate a similarity between different target images, and construct multiple target images with a similarity greater than a preset threshold as an image group;

[0054] a recommendation module configured to, for any image group, sort target images in the image group according to sharpness scores of the target images, and / or determine a recommended image corresponding to the image group according to the sharpness scores of the target images in the image group.

[0055] According to yet another aspect of the present application, a storage medium having a computer program stored thereon is provided, the program being executed by a processor to implement the above-mentioned image sharpness scoring method.

[0056] According to still another aspect of the present application, a computer device is provided, comprising a storage medium, a processor, and a computer program stored on the storage medium and executable on the processor, the processor implementing the above-mentioned image sharpness scoring method when executing the program.

[0057] By means of the technical scheme, the image sharpness scoring method and device, the storage medium and the computer device provided by the application are used to score a target image. Firstly, an initial sharpness value is obtained by performing sharpness evaluation on the target image by using a Laplacian operator. Then, the initial sharpness value is mapped into a preset sharpness scoring interval to obtain a sharpness score of the target image by using a sharpness scoring function with a preset sharpness scoring interval as a value range. The sigmoid function is modified to obtain a sharpness scoring function which is monotonously increasing and has a specific value range. Thus, the sharpness value of the image calculated by using the Laplacian operator is mapped into the specific value range by using the function, so that the image sharpness level can be perceived more intuitively.

[0058] The above description is only a summary of the technical scheme of the application. In order to make the technical means of the application more clearly understood and implemented according to the content of the description, and in order to make the above and other purposes, characteristics and advantages of the application more obvious and easy to understand, the following specific embodiments of the application are described. BRIEF DESCRIPTION OF DRAWINGS

[0059] The accompanying drawings, which are included to provide a further understanding of the application, constitute a part of the application and serve to explain the illustrative embodiments of the application and their descriptions, and do not constitute an improper limitation on the application. In the drawings:

[0060] Figure 1 A flowchart of a sharpness scoring method provided by an embodiment of the application is shown;

[0061] Figure 2 A flowchart of another sharpness scoring method provided by an embodiment of the application is shown;

[0062] Figure 3 A structural diagram of a sharpness scoring device provided by an embodiment of the application is shown;

[0063] Figure 4 A device structural diagram of a computer device provided by an embodiment of the application is shown. DETAILED DESCRIPTION

[0064] In the following, the application will be described in detail with reference to the drawings and in combination with the embodiments. It should be noted that the embodiments in the application and the features in the embodiments can be combined with each other without conflict.

[0065] In the embodiment, a sharpness scoring method is provided, as shown in Figure 1 The method comprises the following steps.

[0066] At step 101, a target image to be scored is received, and a definition evaluation is performed on the target image based on a Laplacian operator to obtain an initial definition value of the target image.

[0067] At step 102, the initial definition value is substituted into a definition score function to obtain a definition score of the target image, wherein the definition score function is a variant function of a sigmoid function, and a value range of the definition score function is a preset definition score interval.

[0068] Since the image definition calculated by the Laplacian operator is a value greater than 0 but with an unclear upper limit, the image definition calculated in this way is difficult to measure the level of the image definition. Embodiments of the present application provide a nonlinear post-processing method for the image definition value based on the Laplacian gradient. Finally, an image definition score that can measure the level of the image definition is obtained, so that the user can have a more intuitive perception of the image definition and image quality.

[0069] In embodiments of the present application, a definition score function suitable for all images is constructed in advance. The definition score function is constructed with a specific value range, i.e., a preset definition score interval. Any image definition value can be mapped into the preset definition score interval through this definition score function, and the definition value is positively correlated with the definition score, i.e., the higher the definition value, the higher the corresponding definition score. Specifically, the sigmoid function is a monotonically increasing bounded function. The function can be stretched, translated, etc. to obtain a variant function that is also monotonically increasing but has a different value range than the original function. The variant function is used as the definition score function.

[0070] For a target image to be scored, first, a definition evaluation is performed on the target image by using the Laplacian operator to obtain an initial definition value of the target image. The initial definition value is a value greater than 0 but with an unclear upper limit. Then, the initial definition value of the target image is mapped into a preset definition score interval by using the definition score function to obtain a definition score of the target image.

[0071] Optionally, the definition evaluation on the target image based on the Laplacian operator at step 101 to obtain the initial definition value of the target image includes: converting the target image into a grayscale image and performing Laplacian filtering on the grayscale image; and calculating a variance of a grayscale image matrix obtained after the Laplacian filtering as the initial definition value of the target image based on the grayscale image matrix.

[0072] In this embodiment, the definition evaluation process based on the Laplace operator is: converting the target image into a gray image, performing Laplace filtering, calculating the variance of the digital matrix of the gray image obtained after filtering, and taking this variance value as the initial definition value of the target image.

[0073] By applying the technical solution of the embodiment, for the target image to be scored, the initial definition value is obtained by performing definition evaluation through the Laplace operator, and then the initial definition value is mapped into the preset definition score interval to obtain the definition score of the target image by using the definition score function with the value range of the preset definition score interval. The embodiment of the application obtains a monotonically increasing definition score function with a specific value range by modifying the sigmoid function, so as to map the definition value of the image calculated by using the Laplace operator into a specific value range, so as to be able to more intuitively perceive the definition level of the image.

[0074] Further, as a refinement and extension of the specific implementation of the above embodiment, in order to completely describe the specific implementation process of the embodiment, another image definition scoring method is provided, as shown in Figure 2 The method comprises:

[0075] Step 201: obtaining a preset definition value and an expected image score corresponding to the preset definition value.

[0076] Step 202: constructing a modified function of the sigmoid function; solving the modified function according to the preset definition score interval, the preset definition value and the expected image score, and taking the solved modified function as a definition score function.

[0077] In this embodiment, in order to make the mapping of the definition score function to the definition value more in line with expectations, a definition value (i.e., a preset definition value) and an expected image score of the value can be set, so as to solve the function by using the preset definition value, the expected image score and the preset definition score interval, so that the finally derived definition score function can map the preset definition value to the expected image score, and the score obtained after mapping any definition value is within the preset definition score interval. For example, the preset definition value is 500, the corresponding expected image score is 5, and the definition score function obtained by solving the modified function can map the definition value 500 to the definition score 5.

[0078] In the embodiments of the present application, step 201 can be: obtaining a plurality of first sample images, and performing sharpness evaluation on each of the first sample images based on a Laplacian operator to obtain a first sample sharpness value of the first sample image; calculating a first statistical value of the first sample sharpness value, and taking the first statistical value as the preset sharpness value, wherein the first statistical value includes a median or an average of the first sample sharpness value; and obtaining a medium level score in the preset sharpness score interval as an expected image score corresponding to the preset sharpness value based on a preset medium level score standard.

[0079] In the above embodiments, first, the sharpness of a plurality of first sample images can be evaluated to obtain a first sample sharpness value of each image, for example, the sharpness values of 2000 sample images are calculated; second, the median or average of the first sample sharpness value is calculated to reflect the medium sharpness level of the sample images, and the median or average is taken as the preset sharpness value; and finally, a value reflecting the medium sharpness level is taken in the preset sharpness score interval, that is, a medium level score is obtained, and the medium level score is taken as the expected image score corresponding to the preset sharpness value.

[0080] In the embodiments of the present application, step 201 can also be: obtaining a plurality of second sample images, and observing an expected image in the second sample images whose sharpness meets an expected image score condition; performing sharpness evaluation on each of the expected images based on a Laplacian operator to obtain a second sample sharpness value of the expected image; calculating a second statistical value of the second sample sharpness value, and taking the second statistical value as the preset sharpness value, wherein the second statistical value includes a median or an average of the second sample sharpness value; and determining an expected image score corresponding to the preset sharpness value according to the expected image score condition.

[0081] In the above embodiments, after obtaining a plurality of second sample images, the images in the second sample images that meet the expected image score condition can be selected by observation, that is, the expected images are obtained, for example, the images whose sharpness is at a medium level in 2000 sample images are observed. Then, the selected expected images are evaluated for sharpness by the Laplacian operator to determine the sharpness value of the expected images, that is, the second sample sharpness value. Then, the median or average of the second sample sharpness value is calculated as the preset sharpness value of the expected image. Finally, the expected image score of the preset sharpness value is determined according to the expected image score condition, for example, the expected image score corresponding to the image whose sharpness is at a medium level is set to 5.

[0082] In the embodiment of the present application, optionally, the preset definition score interval is (0, a), and the variant function is S(x) = 2*N / (1+1 / e x*M )-N, M is a quantity to be solved, x represents a definition value, and S(x) represents a definition score; step 202 comprises: substituting a, the preset definition value and the expected image score into N, x and S(x) of the variant function respectively, and solving M.

[0083] In this embodiment, taking a definition score function with a value range of (0, 10), a preset definition value of 500 and an expected image score of 5 as an example. Assuming that the variant function of the sigmoid function is

[0084] S(x) = 2*N / (1+1 / e x*M )-N, N = a = 10 is taken, 500 is substituted into x, 5 is substituted into S(x), and M is solved through the following equation: 5 = 2*10 / (1+1 / e 500*M )-10. M is obtained by solving the above equation. Therefore, the expression of the definition score function is S(x) = 20 / [1+1 / e x*(ln3 / 500) ]-10. The definition score function can map definition values of any size into (0, 10), and the definition score obtained when the definition value is 500 is 5.

[0085] Step 203, receiving a target image to be scored, and in the case that the target image comprises multiple images, calculating the similarity between different target images, and constructing multiple target images with a similarity greater than a preset threshold as an image group.

[0086] Step 204, performing definition evaluation on the target image based on a Laplacian operator to obtain an initial definition value of the target image.

[0087] Step 205, substituting the initial definition value into a definition score function to obtain a definition score of the target image, wherein the definition score function is a variant function of a sigmoid function, and the value range of the definition score function is a preset definition score interval.

[0088] Step 206, for any image group, sorting each target image in the image group according to the definition score of each target image, and / or determining a recommended image corresponding to the image group according to the definition score of each target image in the image group.

[0089] In this embodiment, for a specific application scenario, for example, the target image contains many similar images, it is necessary to find the clearest one in the similar images. After obtaining multiple target images, the similarity between each image can be calculated first, and the images with higher similarity can be merged into an image group. Then, the initial sharpness value of each target image is obtained based on the Laplace operator, and the initial sharpness value is mapped to the sharpness score by using the sharpness score function. Finally, for the target images in each image group, the images are sorted and output according to the sharpness score, that is, the multiple similar images in the image group are output according to the sharpness. The image with the highest sharpness score in each image group can also be taken as the recommended image of the image group, and finally only one clearest recommended image can be retained for each image group, or the images other than the recommended image in the image group can be compressed and stored to save storage space.

[0090] Further, as Figure 1 a specific implementation of the method, the embodiment of the present application provides a scoring device for image sharpness, as shown in Figure 3 the device comprises:

[0091] a calculation module configured to receive a target image to be scored, and perform sharpness evaluation on the target image based on a Laplace operator to obtain an initial sharpness value of the target image;

[0092] a scoring module configured to substitute the initial sharpness value into a sharpness score function to obtain a sharpness score of the target image, wherein the sharpness score function is a variant function of a sigmoid function, and the value range of the sharpness score function is a preset sharpness score interval.

[0093] Optionally, the device further comprises a scoring function determination module configured to:

[0094] obtain a preset sharpness value and an expected image score corresponding to the preset sharpness value;

[0095] construct a variant function of a sigmoid function;

[0096] solve the variant function according to a preset sharpness score interval, the preset sharpness value and the expected image score, and take the solved variant function as a sharpness score function.

[0097] Optionally, the preset sharpness score interval is (0, a), and the variant function is S(x) = 2*N / (1+1 / e x *M )-N, M is a quantity to be solved, x represents a sharpness value, and S(x) represents a sharpness score.

[0098] The scoring function determination module is further configured to substitute a, the preset sharpness value and the expected image score into N, x and S(x) of the variant function respectively, and solve M.

[0099] Optionally, the scoring function determination module is further configured to:

[0100] A plurality of first sample images are obtained, and the sharpness of each of the first sample images is evaluated based on a Laplacian operator to obtain a first sample sharpness value of the first sample image.

[0101] A first statistical value of the first sample sharpness value is calculated, and the first statistical value is taken as the preset sharpness value, wherein the first statistical value includes a median value or an average value of the first sample sharpness value.

[0102] Based on a preset medium level score standard, a medium level score in the preset sharpness score interval is obtained as an expected image score corresponding to the preset sharpness value.

[0103] Optionally, the scoring function determination module is further configured to:

[0104] A plurality of second sample images are obtained, and an expected image with a sharpness meeting an expected image score condition is observed in the second sample images.

[0105] The sharpness of each of the expected images is evaluated based on a Laplacian operator to obtain a second sample sharpness value of the expected image.

[0106] A second statistical value of the second sample sharpness value is calculated, and the second statistical value is taken as the preset sharpness value, wherein the second statistical value includes a median value or an average value of the second sample sharpness value.

[0107] According to the expected image score condition, an expected image score corresponding to the preset sharpness value is determined.

[0108] Optionally, the calculation module is further configured to:

[0109] The target image is converted into a grayscale image, and the grayscale image is subjected to Laplacian filtering.

[0110] Based on a grayscale image matrix obtained after the Laplacian filtering, a variance of the grayscale image matrix is calculated as an initial sharpness value of the target image.

[0111] Optionally, the apparatus further comprises:

[0112] The grouping module is used to calculate the similarity between different target images when the target image includes multiple images, and to construct an image group from multiple target images whose similarity is greater than a preset threshold;

[0113] The recommendation module is used to sort the target images in any image group according to the sharpness score of each target image in the image group, and / or to determine the recommended image corresponding to the image group according to the sharpness score of each target image in the image group.

[0114] It should be noted that other corresponding descriptions of the functional units involved in the image sharpness scoring device provided in this application embodiment can be found in the following references. Figures 1 to 2 The corresponding descriptions in the method will not be repeated here.

[0115] This application also provides a computer device, which may specifically be a personal computer, a server, a network device, etc. Figure 4 As shown, the computer device includes a bus, a processor, memory, and a communication interface, and may also include an input / output interface and a display device. The processor provides computing and control capabilities. The memory includes a non-volatile storage medium and internal memory. The non-volatile storage medium stores an operating system, computer programs, and a database. The internal memory provides an environment for the operation of the operating system and computer programs in the non-volatile storage medium. The database stores location information. The network interface allows communication with external terminals via a network connection. When the computer program is executed by the processor, it implements the steps in the various method embodiments.

[0116] Those skilled in the art will understand that Figure 4 The structure shown is merely a block diagram of a portion of the structure related to the present application and does not constitute a limitation on the computer device to which the present application is applied. Specific computer devices may include more or fewer components than those shown in the figure, or combine certain components, or have different component arrangements.

[0117] In one embodiment, a computer-readable storage medium is provided, which may be non-volatile or volatile, having stored thereon a computer program that, when executed by a processor, implements the steps in the above method embodiments.

[0118] In one embodiment, a computer program product is provided, including a computer program that, when executed by a processor, implements the steps in the above method embodiments.

[0119] It should be noted that the user information (including but not limited to user equipment information, user personal information, etc.) and data (including but not limited to data for analysis, stored data, displayed data, etc.) involved in the present application are all information and data authorized by the user or authorized by all parties.

[0120] It can be understood by those skilled in the art that all or part of the processes in the above-mentioned embodiment methods can be completed by instructing related hardware through a computer program. The computer program can be stored in a non-volatile computer readable storage medium, and when executed, can include the processes of the above-mentioned embodiments. Any reference to memory, database or other medium used in the embodiments provided by the present application can include at least one of non-volatile and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical storage, high-density embedded non-volatile memory, resistive memory (ReRAM), magnetoresistive random access memory (MRAM), ferroelectric memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory can include random access memory (RAM) or external cache memory, etc. As an illustration but not limitation, RAM can be in various forms, such as static random access memory (SRAM) or dynamic random access memory (DRAM), etc. The database involved in the embodiments provided by the present application can include at least one of a relational database and a non-relational database. The non-relational database can include a distributed database based on a block chain, etc., without being limited thereto. The processor involved in the embodiments provided by the present application can be a general-purpose processor, a central processing unit, a graphics processing unit, a digital signal processor, a programmable logic device, a data processing logic device based on quantum computing, etc., without being limited thereto.

[0121] The technical features of the above embodiments can be combined in any way. In order to make the description concise, not all possible combinations of the technical features in the above embodiments are described, but as long as the combinations of the technical features do not exist contradictory, they should be considered as the scope of the present application.

[0122] The above-described embodiments are merely illustrative of several embodiments of the present application, and the description is relatively specific and detailed, but should not be understood as a limitation on the scope of the patent. It should be noted that for those skilled in the art, without departing from the concept of the present application, a number of modifications and improvements can be made, which are all within the scope of the present application. Therefore, the scope of protection of the present application should be subject to the appended claims.

Claims

1. A method of scoring image sharpness, characterized by, The method comprises: obtaining a preset sharpness value and an expected image score corresponding to the preset sharpness value; constructing a variant function of a sigmoid function; solving the variant function according to a preset sharpness score interval, the preset sharpness value and the expected image score, and taking the solved variant function as a sharpness score function; receiving a target image to be scored, and performing sharpness evaluation on the target image based on a Laplacian operator to obtain an initial sharpness value of the target image; substituting the initial sharpness value into the sharpness score function to obtain a sharpness score of the target image, wherein the sharpness score function is a variant function of a sigmoid function, and the value range of the sharpness score function is a preset sharpness score interval.

2. The method of claim 1, wherein, The preset definition score interval is (0, a), and the variant function is S(x) = 2*N / (1+1 / e x*M )-N, M is a quantity to be solved, x represents a definition value, and S(x) represents a definition score. The solving of the variant function according to the preset sharpness score interval, the preset sharpness value and the expected image score comprises: substituting a, the preset sharpness value and the expected image score into N, x and S(x) of the variant function respectively, and solving M.

3. The method according to claim 1 or 2, characterized in that, The obtaining of the preset sharpness value and the expected image score corresponding to the preset sharpness value comprises: obtaining a plurality of first sample images, and performing sharpness evaluation on each of the first sample images based on a Laplacian operator to obtain a first sample sharpness value of the first sample image; calculating a first statistical value of the first sample sharpness value, and taking the first statistical value as the preset sharpness value, wherein the first statistical value comprises a median value or an average value of the first sample sharpness value; obtaining a medium level score in the preset sharpness score interval as the expected image score corresponding to the preset sharpness value based on a preset medium level score standard.

4. The method according to claim 1 or 2, characterized in that, The obtaining of the preset sharpness value and the expected image score corresponding to the preset sharpness value comprises: obtaining a plurality of second sample images, and observing an expected image in which the sharpness meets an expected image score condition in the second sample images; performing sharpness evaluation on each of the expected images based on a Laplacian operator to obtain a second sample sharpness value of the expected image; calculating a second statistical value of the second sample sharpness value, and taking the second statistical value as the preset sharpness value, wherein the second statistical value comprises a median value or an average value of the second sample sharpness value; determining the expected image score corresponding to the preset sharpness value according to the expected image score condition.

5. The method of any one of claims 1 to 2, wherein, The sharpness evaluation on the target image based on the Laplacian operator to obtain the initial sharpness value of the target image comprises: converting the target image into a grayscale image, and performing Laplacian filtering on the grayscale image; calculating a variance of a grayscale matrix obtained after the Laplacian filtering as the initial sharpness value of the target image.

6. The method of any one of claims 1 to 2, wherein, After receiving the target image to be scored, the method further comprises: in the case where the target image comprises a plurality of images, calculating the similarity between different target images, and constructing the target images with a similarity greater than a preset threshold as an image group; Correspondingly, after obtaining the sharpness score of the target image, the method further comprises: For any image group, the target images in the image group are sorted according to the sharpness scores of the target images, and / or the recommended image corresponding to the image group is determined according to the sharpness scores of the target images in the image group.

7. An apparatus for scoring image sharpness, characterized by The device comprises: A computing module configured to receive a target image to be scored, and perform sharpness evaluation on the target image based on a Laplacian operator to obtain an initial sharpness value of the target image; A scoring module configured to substitute the initial sharpness value into a sharpness score function to obtain a sharpness score of the target image, wherein the sharpness score function is a variant function of a sigmoid function, and the value range of the sharpness score function is a preset sharpness score interval; A scoring function determination module configured to obtain a preset sharpness value and an expected image score corresponding to the preset sharpness value; construct a variant function of a sigmoid function; solve the variant function according to the preset sharpness score interval, the preset sharpness value and the expected image score, and take the solved variant function as a sharpness score function.

8. A storage medium having stored thereon a computer program, characterized in that The computer program, when executed by a processor, implements the method of any one of claims 1 to 6.

9. A computer device comprising a storage medium, a processor, and a computer program stored on the storage medium and executable on the processor, characterized in that, The processor, when executing the computer program, implements the method of any one of claims 1 to 6.

Citation Information

Patent Citations

  • Video quality evaluation method and device

    CN110278485A

  • License plate image definition model training method, definition detection method and device

    CN110807491A

  • Image relative definition evaluation method and device, equipment and medium

    CN112288699A