Image definition comparison method and device, storage medium and electronic equipment

By acquiring and integrating multi-dimensional image features for image clarity comparison, the problems of low edge detection accuracy and low frequency domain analysis efficiency in the prior art are solved, and higher accuracy and efficiency are achieved.

CN120125604APending Publication Date: 2025-06-10HANGZHOU NETEASE CLOUD MUSIC TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510206919.4
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-02-24
Publication Date
2025-06-10

AI Technical Summary

Technical Problem

In the prior art, the image definition comparison method based on edge detection has a lower accuracy, while the method based on frequency domain analysis has a lower efficiency.

Method used

By obtaining the multi-dimensional image features of the image pair to be compared, including edge features, texture feature matrix and multi-scale subband images, the comprehensive image sharpness is calculated and the comparison is performed to obtain accurate sharpness comparison results.

Benefits of technology

It improves the accuracy and efficiency of image clarity comparison, reduces the problems of noise impact and low frequency domain analysis efficiency, and provides users with a better experience.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120125604A_ABST
    Figure CN120125604A_ABST
Patent Text Reader

Abstract

The invention relates to an image definition comparison method and device, a storage medium and electronic equipment, and relates to the technical field of image data processing, and the method comprises the steps: obtaining a to-be-compared image pair; the to-be-compared image pair comprises a first to-be-compared image and a second to-be-compared image; determining a first multi-dimensional image feature of the first to-be-compared image and a second multi-dimensional image feature of the second to-be-compared image; determining a first comprehensive image definition of a first to-be-compared image according to the first multi-dimensional image feature, and determining a second comprehensive image definition of a second to-be-compared image according to the second multi-dimensional image feature; and determining a definition comparison result of the to-be-compared image pair according to the first comprehensive image definition and the second comprehensive image definition. The image definition comparison efficiency is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] Embodiments of the present disclosure relate to the technical field of image data processing. More specifically, embodiments of the present disclosure relate to a method for comparing image sharpness, an apparatus for comparing image sharpness, a computer-readable storage medium, and an electronic device. Background Art

[0002] This section aims to provide background or context for the embodiments of the present disclosure recited in the claims. The description herein is not admitted to be prior art merely by including it in this section.

[0003] In existing methods for comparing image sharpness, it can be implemented based on edge detection. However, in the specific detection process, this method is easily affected by noise and is not accurate enough in detecting weak edges, resulting in a low accuracy rate of the obtained sharpness comparison result. Summary of the Invention

[0004] However, in related technical solutions, on the one hand, when comparing sharpness based on an edge detection algorithm, there is a problem of low accuracy rate of the sharpness comparison result. On the other hand, when comparing sharpness based on a frequency domain analysis method, there is a problem of low efficiency of sharpness comparison.

[0005] Therefore, there is a great need for an improved method for comparing sharpness to obtain a pair of images to be compared, then determine the first multi-dimensional image features of the first image to be compared and the second multi-dimensional image features of the second image to be compared, and further determine the first comprehensive image sharpness of the first image to be compared according to the first multi-dimensional image features and the second comprehensive image sharpness of the second image to be compared according to the second multi-dimensional image features. Finally, determine the sharpness comparison result of the pair of images to be compared according to the first comprehensive image sharpness and the second comprehensive image sharpness, so as to improve the accuracy rate of the obtained sharpness comparison result on the basis of improving the sharpness comparison efficiency.

[0006] In this context, embodiments of the present disclosure are expected to provide a method for comparing image sharpness, an apparatus for comparing image sharpness, a computer-readable storage medium, and an electronic device.

[0007] According to one aspect of the present disclosure, there is provided a method for comparing image sharpness, including:

[0008] Obtain a pair of images to be compared; the pair of images to be compared includes a first image to be compared and a second image to be compared;

[0009] Determine the first multi-dimensional image features of the first image to be compared and the second multi-dimensional image features of the second image to be compared;

[0010] Determine the first comprehensive image sharpness of the first image to be compared according to the first multi-dimensional image feature, and determine the second comprehensive image sharpness of the second image to be compared according to the second multi-dimensional image feature;

[0011] Determine the sharpness comparison result of the pair of images to be compared according to the first comprehensive image sharpness and the second comprehensive image sharpness.

[0012] In an exemplary embodiment of the present disclosure, the first multi-dimensional image feature includes at least one of a first edge image feature, a first image texture feature matrix, and multi-scale first sub-band images; wherein, determining the first multi-dimensional image feature of the first image to be compared includes:

[0013] Perform edge detection processing on the first image to be compared to obtain the first edge image feature;

[0014] Determine the first sub-region gray-level co-occurrence matrix of the first sub-region image in the first image to be compared, and determine the first image texture feature matrix according to the first sub-region gray-level co-occurrence matrix;

[0015] Construct a multi-scale first wavelet coefficient matrix, and perform wavelet transform processing on the first image to be compared according to the multi-scale first wavelet coefficient matrix to obtain multi-scale first sub-band images.

[0016] In an exemplary embodiment of the present disclosure, performing edge detection processing on the first image to be compared to obtain the first edge image feature includes:

[0017] Perform gray-scale processing on the first image to be compared to obtain a first gray-scale image, and perform Gaussian filtering processing on the first gray-scale image to obtain a first filtered image;

[0018] Calculate the first horizontal image gradient of the first filtered image in the horizontal coordinate direction, and calculate the first vertical image gradient of the first filtered image in the vertical coordinate direction;

[0019] Determine the first gradient direction of the first filtered image based on the first horizontal gradient and the first vertical gradient, and determine the first maximum gradient value and the first minimum gradient value according to the first gradient direction;

[0020] Determine the first image boundary points of the first filtered image according to the first maximum gradient value and the first minimum gradient value, and determine the first edge image feature according to the first image boundary points.

[0021] In an exemplary embodiment of the present disclosure, determining the first sub-region gray-level co-occurrence matrix of the first sub-region image in the first image to be compared includes:

[0022] Perform image region division on the first grayscale image corresponding to the first image to be processed, obtain multiple first sub-region images with the same first region area, and acquire the first sub-region pixel values of the first sub-region pixel points in the first sub-region images;

[0023] Calculate the first joint probability of the first sub-region pixel pairs composed of the first sub-region pixel values in different first pixel distances and different first pixel directions among the first sub-region pixel points, and generate the first sub-region gray-level co-occurrence matrix of the first sub-region image according to the first joint probability.

[0024] In an exemplary embodiment of the present disclosure, calculating the first joint probability of the first sub-region pixel pairs composed of the first sub-region pixel values in different first pixel distances and different first pixel directions among the first sub-region pixel points includes:

[0025] Determine the first gray level according to the first sub-region pixel values of the first sub-region pixel points in the first sub-region image, and construct a first initial matrix according to the first gray level;

[0026] Select any pixel point from the first sub-region pixel points as the first target pixel point, and traverse the first other pixel points except the first target pixel point among the first sub-region pixel points based on different first pixel distances and different first pixel directions, so as to construct a first sub-region pixel point pair according to the first target pixel point and the first other pixel points;

[0027] Determine the first placement position of the first sub-region pixel point pair in the first initial matrix according to the region pixel values included in the first sub-region pixel point pair, and place the first sub-region pixel point pair into the first initial matrix based on the first placement position to obtain the first pixel point square matrix of the first sub-region pixel point pair;

[0028] Calculate the number of first pixel point pairs at different positions in the first pixel point square matrix, and perform normalization processing on the number of first pixel point pairs to obtain the first joint probability.

[0029] In an exemplary embodiment of the present disclosure, determining the first image texture feature matrix according to the first sub-region gray-level co-occurrence matrix includes:

[0030] Perform mean processing on the first sub-region gray-level co-occurrence matrix to obtain a first mean processing result, and perform normalization processing on the first mean processing result to obtain the first image texture feature matrix.

[0031] In an exemplary embodiment of the present disclosure, constructing a multi-scale first wavelet coefficient matrix includes:

[0032] Obtain the first overall pixel coordinates of the first overall pixels included in the first grayscale image corresponding to the first image to be processed, and determine the first scale value range of the first scale factor and the first position value range of the first position factor according to the first overall pixel coordinates;

[0033] Determine the first scale parameter values and the first position parameter values with multiple different scales according to the first scale value range and the first position value range;

[0034] Determine the first wavelet transform coefficients at the first scale parameter values and the first position parameter values according to the first scale parameter values and the first position parameter values, and generate a multi-scale first wavelet coefficient matrix according to the first wavelet transform coefficients.

[0035] In an exemplary embodiment of the present disclosure, determining the first comprehensive image sharpness of the first image to be compared according to the first multi-dimensional image features includes:

[0036] Determine the first edge sharpness evaluation value of the first image to be compared according to the first edge image feature in the first multi-dimensional image features;

[0037] Determine the first texture sharpness evaluation value of the first image to be compared according to the first image texture feature matrix in the first multi-dimensional image features;

[0038] Determine the first multi-scale sharpness evaluation value of the first image to be compared according to the multi-scale first sub-band images in the first multi-dimensional image features;

[0039] Determine the first comprehensive image sharpness according to the first edge sharpness evaluation value, the first texture sharpness evaluation value, and the first multi-scale sharpness evaluation value.

[0040] In an exemplary embodiment of the present disclosure, determining the first edge sharpness evaluation value of the first image to be compared according to the first edge image feature in the first multi-dimensional image features includes:

[0041] Determine the first edge pixel intensity value of the first image to be compared according to the first edge image feature in the first multi-dimensional image features;

[0042] Determine the first edge pixel sharpness value of the first image to be compared according to the first edge image feature;

[0043] Determine the first edge sharpness evaluation value of the first image to be compared according to the first edge pixel intensity value and the first edge pixel sharpness value.

[0044] In an exemplary embodiment of the present disclosure, determining the first texture sharpness evaluation value of the first image to be compared according to the first image texture feature matrix in the first multi-dimensional image feature includes:

[0045] Determine the first pixel texture contrast value and the first pixel correlation value of the first image to be compared according to the first image texture feature matrix in the first multi-dimensional image feature;

[0046] Determine the first texture sharpness evaluation value of the first image to be compared according to the first pixel texture contrast value and the first pixel correlation value.

[0047] In an exemplary embodiment of the present disclosure, determining the first multi-scale sharpness evaluation value of the first image to be compared according to the first sub-band image with multiple scales in the first multi-dimensional image feature includes:

[0048] Determine the first image energy, the first image mean, and the first image standard deviation of the first sub-band image at this scale according to the first wavelet coefficient matrix corresponding to the first sub-band image with multiple scales in the first multi-dimensional image feature;

[0049] Determine the first sub-sharpness evaluation value of the first sub-band image at this scale according to the first image energy, the first image mean, and the first image standard deviation;

[0050] Determine the first multi-scale sharpness evaluation value of the first image to be compared according to the first sub-sharpness evaluation values of the first sub-band images at different scales.

[0051] In an exemplary embodiment of the present disclosure, determining the first comprehensive image sharpness according to the first edge sharpness evaluation value, the first texture sharpness evaluation value, and the first multi-scale sharpness evaluation value includes:

[0052] Based on a preset weight value prediction model, determine the first edge weight value corresponding to the first edge sharpness evaluation value, the first texture weight value corresponding to the first texture sharpness evaluation value, and the first multi-scale weight value corresponding to the first multi-scale sharpness evaluation value;

[0053] Perform weighted summation on the first edge sharpness evaluation value and the first edge weight value, the first texture sharpness evaluation value and the first texture weight value, and the first multi-scale sharpness evaluation value and the first multi-scale weight value to obtain the first comprehensive image sharpness.

[0054] In an exemplary embodiment of the present disclosure, determining the clarity comparison result of the image pair to be compared according to the first comprehensive image clarity and the second comprehensive image clarity includes:

[0055] Calculating the clarity difference between the first comprehensive image clarity and the second comprehensive image clarity, and determining the clarity comparison result of the image pair to be compared according to the clarity difference;

[0056] Wherein, if the absolute value of the clarity difference is greater than a preset threshold, it is determined that there is an obvious difference in clarity between the first image to be compared and the second image to be compared;

[0057] If the absolute value of the clarity difference is less than or equal to the preset threshold, it is determined that the clarity of the first image to be compared and the second image to be compared is consistent.

[0058] In an exemplary embodiment of the present disclosure, the method for comparing the clarity of images further includes:

[0059] Selecting a target image from the first image to be compared and the second image to be compared according to the clarity comparison result.

[0060] In an exemplary embodiment of the present disclosure, selecting a target image from the first image to be compared and the second image to be compared according to the clarity comparison result includes:

[0061] If the clarity comparison result is that there is an obvious difference in clarity between the first image to be compared and the second image to be compared, determining whether the clarity difference between the first comprehensive image clarity and the second comprehensive image clarity is a positive number;

[0062] If the clarity difference is a positive number, determining the first image to be compared as the target image, and if the clarity difference is a negative number, determining the second image to be compared as the target image.

[0063] According to one aspect of the present disclosure, there is provided an apparatus for comparing the clarity of images, including:

[0064] An image pair acquisition module, configured to acquire an image pair to be compared; the image pair to be compared includes a first image to be compared and a second image to be compared;

[0065] A multi-dimensional image feature determination module, configured to determine a first multi-dimensional image feature of the first image to be compared and a second multi-dimensional image feature of the second image to be compared;

[0066] A comprehensive image sharpness determination module, configured to determine the first comprehensive image sharpness of the first image to be compared according to the first multi-dimensional image feature, and determine the second comprehensive image sharpness of the second image to be compared according to the second multi-dimensional image feature;

[0067] An image sharpness comparison module, configured to determine the sharpness comparison result of the image pair to be compared according to the first comprehensive image sharpness and the second comprehensive image sharpness.

[0068] In an exemplary embodiment of the present disclosure, the first multi-dimensional image feature includes at least one of a first edge image feature, a first image texture feature matrix, and multi-scale first sub-band images; wherein, determining the first multi-dimensional image feature of the first image to be compared includes:

[0069] Performing edge detection processing on the first image to be compared to obtain the first edge image feature;

[0070] Determining the first sub-region gray-level co-occurrence matrix of the first sub-region image in the first image to be compared, and determining the first image texture feature matrix according to the first sub-region gray-level co-occurrence matrix;

[0071] Constructing a multi-scale first wavelet coefficient matrix, and performing wavelet transform processing on the first image to be compared according to the multi-scale first wavelet coefficient matrix to obtain multi-scale first sub-band images.

[0072] In an exemplary embodiment of the present disclosure, performing edge detection processing on the first image to be compared to obtain the first edge image feature includes:

[0073] Performing gray-level processing on the first image to be compared to obtain a first gray-level image, and performing Gaussian filtering processing on the first gray-level image to obtain a first filtered image;

[0074] Calculating a first horizontal image gradient of the first filtered image in the horizontal coordinate, and calculating a first vertical image gradient of the first filtered image in the vertical coordinate;

[0075] Determining a first gradient direction of the first filtered image based on the first horizontal gradient and the first vertical gradient, and determining a first maximum gradient value and a first minimum gradient value according to the first gradient direction;

[0076] Determining a first image boundary point of the first filtered image according to the first maximum gradient value and the first minimum gradient value, and determining the first edge image feature according to the first image boundary point.

[0077] In an exemplary embodiment of the present disclosure, determining the first sub-region gray-level co-occurrence matrix of the first sub-region image in the first image to be compared includes:

[0078] Performing image region division on the first gray-level image corresponding to the first image to be processed to obtain a plurality of first sub-region images with the same first region area, and obtaining the first sub-region pixel values of the first sub-region pixel points in the first sub-region image;

[0079] Calculating the first joint probability of the first sub-region pixel pairs composed of the first sub-region pixel values in different first pixel distances and different first pixel directions among the first sub-region pixel points, and generating the first sub-region gray-level co-occurrence matrix of the first sub-region image according to the first joint probability.

[0080] In an exemplary embodiment of the present disclosure, calculating the first joint probability of the first sub-region pixel pairs composed of the first sub-region pixel values in different first pixel distances and different first pixel directions among the first sub-region pixel points includes:

[0081] Determining a first gray level according to the first sub-region pixel values of the first sub-region pixel points in the first sub-region image, and constructing a first initial matrix according to the first gray level;

[0082] Selecting any pixel point from the first sub-region pixel points as a first target pixel point, and traversing the first other pixel points in the first sub-region pixel points except the first target pixel point based on different first pixel distances and different first pixel directions to construct a first sub-region pixel point pair according to the first target pixel point and the first other pixel points;

[0083] Determining the first placement position of the first sub-region pixel point pair in the first initial matrix according to the region pixel values included in the first sub-region pixel point pair, and placing the first sub-region pixel point pair into the first initial matrix based on the first placement position to obtain a first pixel point square matrix of the first sub-region pixel point pair;

[0084] Calculating the number of first pixel point pairs of the first sub-region pixel point pairs at different positions in the first pixel point square matrix, and performing normalization processing on the number of first pixel point pairs to obtain a first joint probability.

[0085] In an exemplary embodiment of the present disclosure, determining the first image texture feature matrix according to the first sub-region gray-level co-occurrence matrix includes:

[0086] Perform a mean processing on the gray-level co-occurrence matrix of the first sub-region to obtain a first mean processing result, and perform a normalization processing on the first mean processing result to obtain the first image texture feature matrix.

[0087] In an exemplary embodiment of the present disclosure, constructing a multi-scale first wavelet coefficient matrix includes:

[0088] Obtain the first overall pixel point coordinates of the first overall pixel points included in the first grayscale image corresponding to the first image to be processed, and determine the first scale value range of the first scale factor and the first position value range of the first position factor according to the first overall pixel point coordinates;

[0089] Determine the first scale parameter values and the first position parameter values with multiple different scales according to the first scale value range and the first position value range;

[0090] Determine the first wavelet transform coefficients at the first scale parameter values and the first position parameter values according to the first scale parameter values and the first position parameter values, and generate a multi-scale first wavelet coefficient matrix according to the first wavelet transform coefficients.

[0091] In an exemplary embodiment of the present disclosure, determining the first comprehensive image sharpness of the first image to be compared according to the first multi-dimensional image features includes:

[0092] Determine the first edge sharpness evaluation value of the first image to be compared according to the first edge image feature in the first multi-dimensional image features;

[0093] Determine the first texture sharpness evaluation value of the first image to be compared according to the first image texture feature matrix in the first multi-dimensional image features;

[0094] Determine the first multi-scale sharpness evaluation value of the first image to be compared according to the multi-scale first sub-band images in the first multi-dimensional image features;

[0095] Determine the first comprehensive image sharpness according to the first edge sharpness evaluation value, the first texture sharpness evaluation value, and the first multi-scale sharpness evaluation value.

[0096] In an exemplary embodiment of the present disclosure, determining the first edge sharpness evaluation value of the first image to be compared according to the first edge image feature in the first multi-dimensional image features includes:

[0097] Determine the first edge pixel intensity value of the first image to be compared according to the first edge image feature in the first multi-dimensional image features;

[0098] Determine the first edge pixel sharpness value of the first image to be compared according to the first edge image feature;

[0099] Determine the first edge sharpness evaluation value of the first image to be compared according to the first edge pixel intensity value and the first edge pixel sharpness value.

[0100] In an exemplary embodiment of the present disclosure, determining the first texture sharpness evaluation value of the first image to be compared according to the first image texture feature matrix in the first multi-dimensional image feature includes:

[0101] Determine the first pixel texture contrast value and the first pixel correlation value of the first image to be compared according to the first image texture feature matrix in the first multi-dimensional image feature;

[0102] Determine the first texture sharpness evaluation value of the first image to be compared according to the first pixel texture contrast value and the first pixel correlation value.

[0103] In an exemplary embodiment of the present disclosure, determining the first multi-scale sharpness evaluation value of the first image to be compared according to the multi-scale first sub-band image in the first multi-dimensional image feature includes:

[0104] Determine the first image energy, the first image mean, and the first image standard deviation of the first sub-band image at this scale according to the first wavelet coefficient matrix corresponding to the multi-scale first sub-band image in the first multi-dimensional image feature;

[0105] Determine the first sub-sharpness evaluation value of the first sub-band image at this scale according to the first image energy, the first image mean, and the first image standard deviation;

[0106] Determine the first multi-scale sharpness evaluation value of the first image to be compared according to the first sub-sharpness evaluation values of the first sub-band images at different scales.

[0107] In an exemplary embodiment of the present disclosure, determining the first comprehensive image sharpness according to the first edge sharpness evaluation value, the first texture sharpness evaluation value, and the first multi-scale sharpness evaluation value includes:

[0108] Based on a preset weight value prediction model, determine the first edge weight value corresponding to the first edge sharpness evaluation value, the first texture weight value corresponding to the first texture sharpness evaluation value, and the first multi-scale weight value corresponding to the first multi-scale sharpness evaluation value;

[0109] Perform a weighted sum of the first edge sharpness evaluation value and the first edge weight value, the first texture sharpness evaluation value and the first texture weight value, and the first multi-scale sharpness evaluation value and the first multi-scale weight value to obtain the first comprehensive image sharpness.

[0110] In an exemplary embodiment of the present disclosure, determining the sharpness comparison result of the pair of images to be compared according to the first comprehensive image sharpness and the second comprehensive image sharpness includes:

[0111] Calculate the sharpness difference between the first comprehensive image sharpness and the second comprehensive image sharpness, and determine the sharpness comparison result of the pair of images to be compared according to the sharpness difference;

[0112] Wherein, if the absolute value of the sharpness difference is greater than a preset threshold, it is determined that there is an obvious difference in sharpness between the first image to be compared and the second image to be compared;

[0113] If the absolute value of the sharpness difference is less than or equal to the preset threshold, it is determined that the sharpness between the first image to be compared and the second image to be compared is consistent.

[0114] In an exemplary embodiment of the present disclosure, the apparatus for comparing image sharpness further includes:

[0115] A target image selection module, configured to select a target image from the first image to be compared and the second image to be compared according to the sharpness comparison result.

[0116] In an exemplary embodiment of the present disclosure, selecting a target image from the first image to be compared and the second image to be compared according to the sharpness comparison result includes:

[0117] If the sharpness comparison result is that there is an obvious difference in sharpness between the first image to be compared and the second image to be compared, determine whether the sharpness difference between the first comprehensive image sharpness and the second comprehensive image sharpness is a positive number;

[0118] If the sharpness difference is a positive number, determine the first image to be compared as the target image, and if the sharpness difference is a negative number, determine the second image to be compared as the target image.

[0119] According to one aspect of the present disclosure, there is provided a computer-readable storage medium having a computer program stored thereon, and when the computer program is executed by a processor, the method for comparing image sharpness as described in any one of the above is implemented.

[0120] According to one aspect of the present disclosure, there is provided an electronic device, including:

[0121] A processor; and a memory for storing executable instructions of the processor;

[0122] Wherein, the processor is configured to execute the method for comparing image sharpness described in any one of the above by executing the executable instructions.

[0123] According to the method and device for comparing image sharpness of the embodiments of the present disclosure, a pair of images to be compared can be obtained; then the first multi-dimensional image features of the first image to be compared and the second multi-dimensional image features of the second image to be compared are determined; further, the first comprehensive image sharpness of the first image to be compared is determined according to the first multi-dimensional image features, and the second comprehensive image sharpness of the second image to be compared is determined according to the second multi-dimensional image features; finally, according to the first comprehensive image sharpness and the second comprehensive image sharpness, the sharpness comparison result of the pair of images to be compared is determined, without performing sharpness comparison based on edge detection, thereby significantly reducing the problem of low accuracy of the sharpness comparison result caused by noise influence, and reducing the problem of low sharpness comparison efficiency caused by sharpness comparison based on frequency domain analysis, bringing a better experience to users. BRIEF DESCRIPTION OF THE DRAWINGS

[0124] By reading the following detailed description with reference to the accompanying drawings, the above and other objects, features and advantages of the exemplary embodiments of the present disclosure will become readily understood. In the drawings, several embodiments of the present disclosure are shown by way of illustration and not limitation, wherein:

[0125] Figure 1 Schematically shows a flowchart of a method for comparing image sharpness according to an exemplary embodiment of the present disclosure;

[0126] Figure 2 Schematically shows an example diagram of a sub-region of an image obtained according to an exemplary embodiment of the present disclosure;

[0127] Figure 3 Schematically shows an example diagram of a gray-level co-occurrence matrix obtained according to an exemplary embodiment of the present disclosure;

[0128] Figure 4 Schematically shows a flowchart of a method for specifically determining a first multi-dimensional image feature according to an exemplary embodiment of the present disclosure;

[0129] Figure 5 Schematically shows an example diagram of the value direction of a gray-level co-occurrence matrix according to an exemplary embodiment of the present disclosure;

[0130] Figure 6 Schematically shows a block diagram of a device for comparing image sharpness according to an exemplary embodiment of the present disclosure;

[0131] Figure 7 Schematically shows a computer-readable storage medium for a method of comparing image sharpness according to an exemplary embodiment of the present disclosure;

[0132] Figure 8 Schematically shows an electronic device for implementing a method of comparing image sharpness according to an exemplary embodiment of the present disclosure.

[0133] In the drawings, the same or corresponding reference numerals denote the same or corresponding parts. Detailed implementation manners

[0134] Hereinafter, the principles and spirit of the present disclosure will be described with reference to several exemplary embodiments. It should be understood that these embodiments are provided only to enable those skilled in the art to better understand and then implement the present disclosure, and do not limit the scope of the present disclosure in any way. On the contrary, these embodiments are provided to make the present disclosure more thorough and complete, and to be able to convey the scope of the present disclosure completely to those skilled in the art.

[0135] Those skilled in the art know that the embodiments of the present disclosure can be implemented as a system, a device, an equipment, a method, or a computer program product. Therefore, the present disclosure can be specifically implemented in the following forms, namely: completely hardware, completely software (including firmware, resident software, microcode, etc.), or a combination of hardware and software.

[0136] According to an embodiment of the present disclosure, a method for comparing image sharpness, an apparatus for comparing image sharpness, a computer-readable storage medium, and an electronic device are provided.

[0137] In this article, any number of elements in the drawings is used for illustration rather than limitation, and any naming is only for distinction and does not have any limiting meaning.

[0138] Hereinafter, with reference to several representative embodiments of the present disclosure, the principles and spirit of the present disclosure will be elaborated in detail.

[0139] Exemplary method

[0140] The exemplary embodiment of the present disclosure first provides a method for comparing image sharpness, which can run on a terminal device, a server, a cloud server, or a server cluster, etc.; of course, those skilled in the art can also run the method of the present disclosure on other platforms according to requirements, and no special limitation is made in this exemplary embodiment. Specifically, referring to Figure 1 as shown, the method for comparing image sharpness may include the following steps:

[0141] Step S110. Obtain the image pair to be compared; the image pair to be compared includes a first image to be compared and a second image to be compared;

[0142] Step S120. Determine the first multi-dimensional image feature of the first image to be compared and the second multi-dimensional image feature of the second image to be compared;

[0143] Step S130. Determine the first comprehensive image sharpness of the first image to be compared according to the first multi-dimensional image feature, and determine the second comprehensive image sharpness of the second image to be compared according to the second multi-dimensional image feature;

[0144] Step S140. Determine the sharpness comparison result of the image pair to be compared according to the first comprehensive image sharpness and the second comprehensive image sharpness.

[0145] In the above-described method for comparing image sharpness, an image pair to be compared can be obtained; then, the first multi-dimensional image feature of the first image to be compared and the second multi-dimensional image feature of the second image to be compared can be determined; furthermore, the first comprehensive image sharpness of the first image to be compared can be determined according to the first multi-dimensional image feature, and the second comprehensive image sharpness of the second image to be compared can be determined according to the second multi-dimensional image feature; finally, the sharpness comparison result of the image pair to be compared can be determined according to the first comprehensive image sharpness and the second comprehensive image sharpness, without the need to perform sharpness comparison based on edge detection, thereby significantly reducing the problem of low accuracy of the sharpness comparison result caused by noise interference, and reducing the problem of low sharpness comparison efficiency caused by sharpness comparison based on frequency domain analysis, bringing a better experience to users.

[0146] Hereinafter, the method for comparing image sharpness recorded in the exemplary embodiments of the present disclosure will be explained and described in detail with reference to the accompanying drawings.

[0147] First, the application scenario of the exemplary embodiments of the present disclosure will be explained and described. Specifically, the method for comparing image sharpness recorded in the exemplary embodiments of the present disclosure can be used to compare and identify the sharpness of an image pair. Specifically, the identification of the sharpness of an image pair recorded herein refers to a relative judgment of which of the two given images is clearer in terms of sharpness, which belongs to a calculation of a relative sharpness value rather than an absolute sharpness value. For example, given a combination of two pictures, if pictures 1 and 2 are compared, then picture 2 is clearer; however, if pictures 2 and 3 are compared, then the sharpness of picture 2 is not as high as that of picture 3.

[0148] Secondly, the technical implementation principles of the exemplary embodiments of the present disclosure are explained and described. Specifically, the method for comparing image sharpness recorded in the exemplary embodiments of the present disclosure can be elaborated from the following aspects: On the one hand, multi-feature fusion; specifically, the present disclosure adopts a fusion method of edge features, texture features, and multi-scale features to comprehensively reflect the information of the image, thereby achieving the purpose of improving the accuracy of the obtained sharpness comparison results. At the same time, the edge features recorded here can reflect the detailed information of the image, the texture features recorded here can reflect the texture structure of the image, and the multi-scale features recorded here can reflect the information of the image at different scales; by fusing these features, the accuracy and comprehensiveness of sharpness evaluation can be improved. On the other hand, weighted summation evaluation; specifically, the present disclosure adopts a weighted summation method to comprehensively consider various sharpness evaluation indicators, avoiding the limitations of a single indicator; at the same time, by reasonably setting the weight coefficients, the importance of different indicators can be adjusted according to different application scenarios and requirements, improving the reliability and flexibility of sharpness evaluation; On the other hand, efficient algorithm design; specifically, the present disclosure has been optimized in algorithm design to improve the calculation efficiency and real-time performance. For example, in the edge detection algorithm, fast Sobel operators and Canny operators are adopted; in the calculation of the gray-level co-occurrence matrix, a method of block calculation and averaging is adopted; in wavelet transform, wavelet basis functions with higher calculation efficiency are selected, etc. These optimization measures enable the present invention to meet the requirements in practical applications.

[0149] Furthermore, the gray-level co-occurrence matrix involved in the exemplary embodiments of the present disclosure is explained and described. Specifically, the gray-level co-occurrence matrix is a matrix used to describe the texture features of an image, which is obtained by statistically counting the frequency of the combination of gray values of two pixel points with a certain distance and direction in the image. Among them, the specific calculation process of the gray-level co-occurrence matrix is as follows: First, the gray-scale image is divided into several sub-regions of the same size; then, for each sub-region, the gray-level co-occurrence matrix in different distances and directions is calculated; finally, the gray-level co-occurrence matrices of all sub-regions are averaged to obtain the gray-level co-occurrence matrix of the entire image. Among them, taking the gray-level co-occurrence matrix at a distance of 1 and 90 degrees as an example, the sub-regions of the divided image can be as Figure 2 shown, and the gray-level co-occurrence matrix obtained based on Figure 2 the 201 part in Figure 3 can be referred to as shown in 301 in

[0150] Hereinafter, in combination with Figure 2 and Figure 3 the comparison method of image sharpness shown in Figure 1 is further explained and described. Specifically:

[0151] In step S110, obtain the image pair to be compared; the image pair to be compared includes a first image to be compared and a second image to be compared.

[0152] Specifically, the first image to be compared and the second image to be compared in the image pair to be compared recorded here can be two images with the same image content; for example, they can be two identical portrait images or landscape images taken by the same photographer; or, they can also be two identical portrait images or landscape images taken by different photographers, etc. This example does not make special restrictions on this.

[0153] In step S120, determine the first multi-dimensional image feature of the first image to be compared and the second multi-dimensional image feature of the second image to be compared.

[0154] Specifically, the first multi-dimensional image feature recorded here can include a first edge image feature, a first image texture feature matrix, and multi-scale first sub-band images, etc.; the second multi-dimensional image feature recorded here can include a second edge image feature, a second image texture feature matrix, and multi-scale second sub-band images, etc. On this premise, referring to Figure 4 as shown, the specific determination process of the first multi-dimensional image feature of the first image to be compared can include the following steps:

[0155] Step S410, perform edge detection processing on the first image to be compared to obtain the first edge image feature.

[0156] Specifically, the specific determination process of the first edge image feature can be implemented in the following manner: perform grayscale processing on the first image to be compared to obtain a first grayscale image, and perform Gaussian filtering on the first grayscale image to obtain a first filtered image; calculate the first horizontal image gradient of the first filtered image in the horizontal coordinate direction, and calculate the first vertical image gradient of the first filtered image in the vertical coordinate direction; determine the first gradient direction of the first filtered image based on the first horizontal gradient and the first vertical gradient, and determine the first maximum gradient value and the first minimum gradient value according to the first gradient direction; determine the first image boundary points of the first filtered image according to the first maximum gradient value and the first minimum gradient value, and determine the first edge image feature according to the first image boundary points. That is to say, in the actual application process, the first edge image feature can be determined based on the Canny operator edge detection method; among them, in the process of determining the first edge image feature based on the Canny edge detection operator, the first gradient amplitude and the first gradient direction of each pixel point in the first grayscale image can be calculated, and then methods such as non-maximum suppression and double-threshold detection can be used to determine the edge points (that is, the first image boundary points); it should be added here that the reason for using the Canny operator edge detection method to determine the first edge image feature is that the Canny operator has a strong ability to suppress noise and can detect more accurate first edge image features, so as to achieve the purpose of improving the accuracy of the first multi-dimensional image feature.

[0157] Step S420, determine the first sub-region gray-level co-occurrence matrix of the first sub-region image in the first image to be compared, and determine the first image texture feature matrix according to the first sub-region gray-level co-occurrence matrix.

[0158] In this exemplary embodiment, first, determine the first sub-region gray-level co-occurrence matrix of the first sub-region image in the first image to be compared; specifically, it can be implemented in the following manner: perform image region division on the first grayscale image corresponding to the first image to be processed to obtain a plurality of first sub-region images with the same first region area, and obtain the first sub-region pixel values of the first sub-region pixel points in the first sub-region image; calculate the first joint probability of the first sub-region pixel pairs composed of the first sub-region pixel values in different first pixel distances and different first pixel directions among the first sub-region pixel points, and generate the first sub-region gray-level co-occurrence matrix of the first sub-region image according to the first joint probability.

[0159] Further, the specific calculation process of the first joint probability involved in the generation process of the first sub-region gray-level co-occurrence matrix can be implemented in the following manner: Determine the first gray level according to the first sub-region pixel value of the first sub-region pixel points in the first sub-region image, and construct a first initial matrix according to the first gray level; Select any pixel point from the first sub-region pixel points as the first target pixel point, and traverse the first other pixel points except the first target pixel point in the first sub-region pixel points based on different first pixel distances and different first pixel directions, so as to construct a first sub-region pixel point pair according to the first target pixel point and the first other pixel points; Determine the first placement position of the first sub-region pixel point pair in the first initial matrix according to the region pixel values included in the first sub-region pixel point pair, and place the first sub-region pixel point pair into the first initial matrix based on the first placement position to obtain a first pixel point square matrix of the first sub-region pixel point pair; Calculate the first pixel point pair numbers of the first sub-region pixel point pairs at different positions in the first pixel point square matrix, and perform normalization processing on the first pixel point pair numbers to obtain the first joint probability.

[0160] Hereinafter, the specific generation process of the first sub-region gray-level co-occurrence matrix will be further explained and described. Specifically, in the actual application process, first, divide the first gray-level image corresponding to the first image to be processed into a plurality of sub-regions of the same size (i.e., the first sub-region image); Then, obtain the first sub-region pixel values of the first sub-region pixel points in the first sub-region image; Furthermore, calculate the first joint probability of the first sub-region pixel pairs composed of the first sub-region pixel values in different first pixel distances and different first pixel directions among the first sub-region pixel points, and generate the first sub-region gray-level co-occurrence matrix of the first sub-region image in different distances and directions according to the first joint probability.

[0161] Secondly, determine the first image texture feature matrix according to the first sub-region gray-level co-occurrence matrix. Specifically, it can be achieved in the following way: perform mean processing on the first sub-region gray-level co-occurrence matrix to obtain the first mean processing result, and perform normalization processing on the first mean processing result to obtain the first image texture feature matrix. That is to say, after obtaining the first sub-region gray-level co-occurrence matrix, the first sub-region gray-level co-occurrence matrices of all sub-regions can be averaged to obtain the gray-level co-occurrence matrix of the entire image (i.e., the first image texture feature matrix). It should be supplemented here that since various different texture features can be extracted from the gray-level co-occurrence matrix, such as contrast, correlation, and energy, etc., and these features can reflect information such as the texture structure and roughness of the image; therefore, by extracting the first image texture feature matrix, the accuracy of the obtained first multi-dimensional image features can be further improved, and thus the purpose of improving the accuracy of the obtained clarity comparison result can be achieved. Further, it should also be supplemented here that in the actual application process, combinations of three different distances such as different distance values 1, 5, 9, etc. and three different angles such as 0 degrees, 90 degrees, 180 degrees, and 270 degrees (specifically, reference can be made to Figure 5 as shown) can be selected, a total of 12 different gray-level co-occurrence matrices. Calculate the mean of these 12 different gray-level co-occurrence matrices, and use the average matrix obtained by normalizing the sum of the gray-level co-occurrence matrices to the range [0-1] as the final gray-level co-occurrence probability matrix P (i.e., the first image texture feature matrix).

[0162] Step S430, construct a multi-scale first wavelet coefficient matrix, and perform wavelet transform processing on the first image to be compared according to the multi-scale first wavelet coefficient matrix to obtain a multi-scale first sub-band image.

[0163] In this exemplary embodiment, first, construct a multi-scale first wavelet coefficient matrix. Specifically, it can be achieved in the following way: obtain the first overall pixel point coordinates of the first overall pixel points included in the first grayscale image corresponding to the first image to be processed, and determine the first scale value range of the first scale factor and the first position value range of the first position factor according to the first overall pixel point coordinates; determine the first scale parameter values and the first position parameter values with multiple different scales according to the first scale value range and the first position value range; determine the first wavelet transform coefficients at the first scale parameter values and the first position parameter values, and generate a multi-scale first wavelet coefficient matrix according to the first wavelet transform coefficients.

[0164] Specifically, the wavelet transform described herein is a multi-scale analysis method, which can extract the multi-scale features of an image by decomposing the image into sub-bands of different scales. In the actual application process, the core idea of the wavelet transform is to perform multi-scale decomposition on the image through a wavelet function with adjustable scale and variable position, so as to analyze the different frequency components and local features of the signal; different from the globalization characteristics of the Fourier transform, the wavelet transform has localization characteristics in both the time domain and the frequency domain. Specifically, the wavelet transform described herein can be divided into two different methods, namely continuous wavelet transform or discrete wavelet transform. The wavelet basis functions described herein can include Haar wavelet (the simplest wavelet, often used for the fast decomposition of signals; at the same time, the Haar wavelet has the characteristic of discontinuity and is suitable for processing some simple signals and applications), Daubechies wavelet (with better smoothness and orthogonality, widely used in signal analysis and image compression), Symlet wavelet (an improved version of the Daubechies wavelet, with symmetry, often used in image processing), Coiflet wavelet (similar to the Daubechies wavelet, but with higher smoothness, suitable for high-precision signal analysis), and Morlet wavelet (often used in time-frequency analysis, especially with good results in processing biological signals), etc. In the actual application process, it can be selected according to actual needs, and this example does not make special restrictions on this. Further, after the wavelet basis function is determined, the corresponding wavelet function can be determined based on the wavelet basis function, and then the first wavelet coefficient matrix of multiple scales can be determined based on the wavelet function; in the process of determining the first wavelet coefficient matrix, the image can be subjected to multi-level wavelet decomposition based on the determined wavelet function to obtain the first sub-band images of different scales.

[0165] In an exemplary embodiment, the specific determination process of the second multi-dimensional image feature of the second image to be compared may include the following steps: First, perform edge detection processing on the second image to be compared to obtain the second edge image feature; Second, determine the second sub-region gray-level co-occurrence matrix of the second sub-region image in the second image to be compared, and determine the second image texture feature matrix according to the second sub-region gray-level co-occurrence matrix; Then, construct the second wavelet coefficient matrix of multiple scales, and perform wavelet transform processing on the second image to be compared according to the second wavelet coefficient matrix of multiple scales to obtain the second sub-band images of multiple scales.

[0166] In an exemplary embodiment, edge detection processing is performed on the second image to be compared to obtain the second edge image feature, which can be achieved in the following manner: grayscale processing is performed on the second image to be compared to obtain a second grayscale image, and Gaussian filtering is performed on the second grayscale image to obtain a second filtered image; the second transverse image gradient of the second filtered image on the horizontal axis is calculated, and the second longitudinal image gradient of the second filtered image on the vertical axis is calculated; the second gradient direction of the second filtered image is determined based on the second transverse gradient and the second longitudinal gradient, and the second maximum gradient value and the second minimum gradient value are determined according to the second gradient direction; the second image boundary point of the second filtered image is determined according to the second maximum gradient value and the second minimum gradient value, and the second edge image feature is determined according to the second image boundary point.

[0167] In an exemplary embodiment, determining the second sub-region grayscale co-occurrence matrix of the second sub-region image in the second image to be compared, and determining the second image texture feature matrix based on the second sub-region grayscale co-occurrence matrix, can be achieved in the following manner: first, determining the second sub-region grayscale co-occurrence matrix of the second sub-region image in the second image to be compared; specifically, it can be achieved in the following manner: performing image region division on the second grayscale image corresponding to the second image to be processed to obtain a plurality of second sub-region images having the same second region area, and obtaining second sub-region pixel values ​​of second sub-region pixel points in the second sub-region image; calculating the second joint probability of second sub-region pixel pairs composed of second sub-region pixel values ​​at different second pixel distances and different second pixel directions in the second sub-region pixel points, and generating the second sub-region grayscale co-occurrence matrix of the second sub-region image based on the second joint probability.

[0168] Furthermore, the specific calculation process of the second joint probability involved in the generation process of the second sub-region gray level co-occurrence matrix can be implemented in the following manner: determine the second gray level according to the second sub-region pixel value of the second sub-region pixel point in the second sub-region image, and construct a second initial matrix according to the second gray level; select any pixel point from the second sub-region pixel points as the second target pixel point, and traverse the second other pixel points in the second sub-region pixel points except the second target pixel point based on different second pixel distances and different second pixel directions, so as to construct a second sub-region pixel point pair according to the second target pixel point and the second other pixel points; determine the second placement position of the second sub-region pixel point pair in the second initial matrix according to the regional pixel value included in the second sub-region pixel point pair, and place the second sub-region pixel point pair in the second initial matrix based on the second placement position to obtain a second pixel point matrix of the second sub-region pixel point pair; calculate the number of second pixel point pairs of the second sub-region pixel point pairs at different positions in the second pixel point matrix, and normalize the number of the second pixel point pairs to obtain a second joint probability.

[0169] In an exemplary embodiment, constructing a multi-scale second wavelet coefficient matrix can be achieved in the following manner: obtaining second overall pixel coordinates of second overall pixels included in a second grayscale image corresponding to the second image to be processed, and determining a second scale value range of a second scale factor and a second position value range of a second position factor based on the second overall pixel coordinates; determining second scale parameter values ​​and second position parameter values ​​having multiple different scales based on the second scale value range and the second position value range; determining second wavelet transform coefficients at the second scale parameter value and the second position parameter value based on the second scale parameter value and the second position parameter value, and generating a multi-scale second wavelet coefficient matrix based on the second wavelet transform coefficients.

[0170] In step S130, a first comprehensive image clarity of the first image to be compared is determined according to the first multi-dimensional image feature, and a second comprehensive image clarity of the second image to be compared is determined according to the second multi-dimensional image feature.

[0171] In this example embodiment, first, the first comprehensive image clarity of the first image to be compared is determined according to the first multi-dimensional image feature; specifically, it can be implemented in the following ways: according to the first edge image feature in the first multi-dimensional image feature, the first edge clarity evaluation value of the first image to be compared is determined; according to the first image texture feature matrix in the first multi-dimensional image feature, the first texture clarity evaluation value of the first image to be compared is determined; according to the multi-scale first sub-band image in the first multi-dimensional image feature, the first multi-scale clarity evaluation value of the first image to be compared is determined; according to the first edge clarity evaluation value, the first texture clarity evaluation value and the first multi-scale clarity evaluation value, the first comprehensive image clarity is determined. That is to say, in the actual application process, the clarity evaluation of the image can be implemented from multiple different dimensions such as image edge clarity, texture clarity and clarity of multi-scale sub-band images.

[0172] In an exemplary embodiment, determining the first edge clarity evaluation value of the first image to be compared according to the first edge image feature in the first multidimensional image feature can be achieved in the following manner: determining the first edge pixel intensity value of the first image to be compared according to the first edge image feature in the first multidimensional image feature; determining the first edge pixel clarity value of the first image to be compared according to the first edge image feature; determining the first edge clarity evaluation value of the first image to be compared according to the first edge pixel intensity value and the first edge pixel clarity value. That is, in the specific determination process of edge clarity evaluation, comprehensive consideration can be given to both edge intensity and edge clarity; wherein, in the process of calculating the first edge pixel intensity value, it can be achieved by counting the sum of the grayscale values ​​of the edge pixels in the first edge image feature in the first multidimensional image feature; after obtaining the sum of the grayscale values, the sum of the grayscale values ​​of the edge pixels can be divided by the total number of pixels in the image, thereby obtaining the first edge pixel intensity value. Further, in the process of calculating the first edge pixel clarity value, the sum of the gradient amplitudes of the edge pixels in the first edge image feature in the first multidimensional image feature can be calculated to obtain the first edge pixel clarity value.

[0173] In an exemplary embodiment, determining the first texture clarity evaluation value of the first image to be compared according to the first image texture feature matrix in the first multidimensional image feature can be achieved in the following manner: determining the first pixel texture contrast value and the first pixel correlation value of the first image to be compared according to the first image texture feature matrix in the first multidimensional image feature; determining the first texture clarity evaluation value of the first image to be compared according to the first pixel texture contrast value and the first pixel correlation value. That is, in actual application, the first texture clarity evaluation value of the first image to be compared can be determined from two aspects, namely, the image contrast (i.e., the first pixel texture contrast value) and the image correlation (first pixel correlation value) of the first image to be compared; wherein the image contrast recorded here is an important feature in the grayscale co-occurrence matrix, which reflects the texture contrast of the image; in actual application, the greater the texture contrast, the clearer the texture of the image. wherein the specific calculation formula of the first pixel texture contrast value can be shown as the following formula (1):

[0174]

[0175] Among them, P(i,j) is the probability value of the gray value in the i-th row and j-th column of the normalized gray-level co-occurrence matrix.

[0176] Furthermore, the image correlation recorded above is another important feature in the gray level co-occurrence matrix, which reflects the texture correlation of the image; wherein, the greater the texture correlation, the more regular the texture of the image; at the same time, the specific calculation formula of the image correlation (that is, the first pixel correlation value) is shown in the following formula (2):

[0177]

[0178] in: It represents the average value of P(i,j) on the i-th row, It represents the average value of P(i,j) in the jth column, It represents the similarity value of P(i,j) on the i-th row, It represents the similarity value of P(i,j) on the jth column.

[0179] In an exemplary embodiment, determining the first multi-scale clarity evaluation value of the first image to be compared according to the multi-scale first sub-band image in the first multi-dimensional image feature can be achieved in the following manner: determining the first image energy, the first image mean and the first image standard deviation of the first sub-band image at the scale according to the first wavelet coefficient matrix corresponding to the multi-scale first sub-band image in the first multi-dimensional image feature; determining the first sub-definition evaluation value of the first sub-band image at the scale according to the first image energy, the first image mean and the first image standard deviation; determining the first multi-scale clarity evaluation value of the first image to be compared according to the first sub-definition evaluation values ​​of the first sub-band images at different scales. That is, in the process of actual application, the first multi-scale clarity evaluation value of the first image to be compared can be measured from three aspects: image energy, image mean and image standard deviation. Among them, the image energy recorded here is an important feature of the sub-band image after wavelet decomposition, which reflects the energy distribution of the image at different scales; in the process of actual application, the larger the energy, the richer the information of the image at the scale. At the same time, the specific calculation process of the first image energy can be shown in the following formula (3):

[0180]

[0181] Among them, C is the first wavelet coefficient matrix, C ij is the value of the i-th row and j-th column in the first wavelet coefficient matrix.

[0182] Secondly, the first image mean value recorded above is also another important feature of the first sub-band image after wavelet decomposition, which reflects the average gray value of the image at different scales. In practical applications, the calculation formula of the first image mean value can be shown as follows:

[0183]

[0184] Among them, M and N are the total number of rows and columns of the first wavelet coefficient matrix, C ij is the value of the i-th row and j-th column in the first wavelet coefficient matrix.

[0185] Furthermore, the standard deviation of the first image recorded above is another important feature of the sub-band image after wavelet decomposition, which reflects the discrete degree of the grayscale value of the image at different scales; in the process of practical application, the larger the standard deviation, the higher the contrast of the image at this scale. In the process of determining the standard deviation of the first image, first calculate the overall average value μ of the wavelet coefficients included in the first wavelet coefficient matrix; wherein the specific calculation formula of μ can be shown as the following formula (5):

[0186]

[0187] After obtaining the overall average value, the first image standard deviation can be calculated based on the overall average value. The calculation formula of the first image standard deviation can be shown as the following formula (6):

[0188]

[0189] At this point, the first edge clarity evaluation value, the first texture clarity evaluation value and the first multi-scale clarity evaluation value required to determine the clarity of the first comprehensive image have all been calculated. Under this premise, the specific determination process of the clarity of the first comprehensive image can be implemented in the following manner: based on a preset weight value prediction model, determine the first edge weight value corresponding to the first edge clarity evaluation value, the first texture weight value corresponding to the first texture clarity evaluation value and the first multi-scale weight value corresponding to the first multi-scale clarity evaluation value; perform weighted summation on the first edge clarity evaluation value and the first edge weight value, the first texture clarity evaluation value and the first texture weight value, the first multi-scale clarity evaluation value and the first multi-scale weight value to obtain the first comprehensive image clarity. Among them, the weight value prediction model recorded here can be a deep neural network model (such as a convolutional neural network and a recurrent neural network), or a large language model, and this example does not impose special restrictions on this; of course, the first edge weight value, the first texture weight value and the first multi-scale weight value can also be determined based on empirical values, and this example does not impose special restrictions on this. Furthermore, the specific calculation formula of the first comprehensive image clarity can be shown as the following formula (7):

[0190] First comprehensive image clarity = w 1 *First edge definition evaluation value + w 2 *First texture clarity evaluation value + w 3 *First multi-scale clarity evaluation value; Formula (7)

[0191] Among them, w 1 is the first edge weight value, w 2 is the first texture weight value, w 3 is the first multi-scale weight value.

[0192] In an exemplary embodiment, determining the second comprehensive image clarity of the second image to be compared based on the second multidimensional image feature can be achieved in the following manner: determining the second edge clarity evaluation value of the second image to be compared based on the second edge image feature in the second multidimensional image feature; determining the second texture clarity evaluation value of the second image to be compared based on the second image texture feature matrix in the second multidimensional image feature; determining the second multiscale clarity evaluation value of the second image to be compared based on the multi-scale second sub-band image in the second multidimensional image feature; determining the second comprehensive image clarity based on the second edge clarity evaluation value, the second texture clarity evaluation value and the second multiscale clarity evaluation value.

[0193] In an exemplary embodiment, determining the second edge clarity evaluation value of the second image to be compared based on the second edge image feature in the second multidimensional image feature can be achieved in the following manner: determining the second edge pixel intensity value of the second image to be compared based on the second edge image feature in the second multidimensional image feature; determining the second edge pixel clarity value of the second image to be compared based on the second edge image feature; determining the second edge clarity evaluation value of the second image to be compared based on the second edge pixel intensity value and the second edge pixel clarity value.

[0194] In an exemplary embodiment, determining a second texture clarity evaluation value of a second image to be compared based on a second image texture feature matrix in a second multidimensional image feature can be achieved in the following manner: determining a second pixel texture contrast value and a second pixel correlation value of the second image to be compared based on the second image texture feature matrix in the second multidimensional image feature; determining a second texture clarity evaluation value of the second image to be compared based on the second pixel texture contrast value and the second pixel correlation value.

[0195] In an exemplary embodiment, determining a second multi-scale clarity evaluation value of a second image to be compared based on a multi-scale second sub-band image in a second multi-dimensional image feature can be achieved in the following manner: determining a second image energy, a second image mean and a second image standard deviation of the second sub-band image at the scale based on a second wavelet coefficient matrix corresponding to the multi-scale second sub-band image in the second multi-dimensional image feature; determining a second sub-clarity evaluation value of the second sub-band image at the scale based on the second image energy, the second image mean and the second image standard deviation; determining a second multi-scale clarity evaluation value of the second image to be compared based on the second sub-clarity evaluation values ​​of second sub-band images at different scales.

[0196] In an exemplary embodiment, determining the second comprehensive image clarity based on the second edge clarity evaluation value, the second texture clarity evaluation value and the second multi-scale clarity evaluation value can be achieved in the following manner: determining the second edge weight value corresponding to the second edge clarity evaluation value, the second texture weight value corresponding to the second texture clarity evaluation value and the second multi-scale weight value corresponding to the second multi-scale clarity evaluation value based on a preset weight value prediction model; performing weighted summation of the second edge clarity evaluation value and the second edge weight value, the second texture clarity evaluation value and the second texture weight value, the second multi-scale clarity evaluation value and the second multi-scale weight value to obtain the second comprehensive image clarity.

[0197] In step S140, a clarity comparison result of the image pair to be compared is determined according to the first comprehensive image clarity and the second comprehensive image clarity.

[0198] Specifically, the specific determination process of the clarity comparison result can be achieved in the following manner: calculating the clarity difference between the clarity of the first integrated image and the clarity of the second integrated image, and determining the clarity comparison result of the image pair to be compared according to the clarity difference; wherein, if the absolute value of the clarity difference is greater than a preset threshold, then the clarity comparison result is determined to be that there is an obvious difference in clarity between the first image to be compared and the second image to be compared; if the absolute value of the clarity difference is less than or equal to the preset threshold, then the clarity comparison result is determined to be that the clarity between the first image to be compared and the second image to be compared is consistent. Specifically, the specific calculation formula for the clarity difference can be shown as the following formula (8):

[0199] Definition difference = |first comprehensive image definition - second comprehensive image definition|; Formula (8)

[0200] After obtaining the clarity difference, the clarity difference between the first image to be compared and the second image to be compared can be judged; specifically, if the clarity difference is greater than a set threshold, it is considered that the clarity of the two images is significantly different; otherwise, it is considered that the clarity of the two images is similar.

[0201] In an exemplary embodiment, after obtaining the clarity difference, the method further includes: selecting a target image from the first image to be compared and the second image to be compared according to the clarity comparison result. Specifically, the target image selection process can be implemented based on the following method: if the clarity comparison result is that there is an obvious difference in clarity between the first image to be compared and the second image to be compared, then determine whether the clarity difference between the clarity of the first comprehensive image and the clarity of the second comprehensive image is a positive number; if the clarity difference is a positive number, then determine that the first image to be compared is the target image; if the clarity difference is a negative number, then determine that the second image to be compared is the target image. Of course, if the clarity comparison result is that there is no obvious difference in clarity between the first image to be compared and the second image to be compared, then any image can be randomly selected as the target image.

[0202] Exemplary device

[0203] After introducing the image definition comparison method of the exemplary embodiment of the present disclosure, next, refer to Figure 6 The image definition comparison device of the exemplary embodiment of the present disclosure is explained and illustrated. Specifically, refer to Figure 6 As shown, the image definition comparison device may include an image acquisition module 610, a multi-dimensional image feature determination module 620, a comprehensive image definition determination module 630, and an image definition comparison module 640. Among them:

[0204] The image pair acquisition module 610 may be used to acquire an image pair to be compared; the image pair to be compared includes a first image to be compared and a second image to be compared;

[0205] The multi-dimensional image feature determination module 620 may be used to determine a first multi-dimensional image feature of the first image to be compared and a second multi-dimensional image feature of the second image to be compared;

[0206] The integrated image definition determination module 630 may be configured to determine a first integrated image definition of a first image to be compared according to the first multi-dimensional image feature, and to determine a second integrated image definition of a second image to be compared according to the second multi-dimensional image feature;

[0207] The image definition comparison module 640 may be configured to determine a definition comparison result of the image pair to be compared according to the first comprehensive image definition and the second comprehensive image definition.

[0208] In an exemplary embodiment of the present disclosure, the first multidimensional image features include at least one of a first edge image feature, a first image texture feature matrix and a multi-scale first sub-band image; wherein, determining the first multidimensional image features of the first image to be compared includes: performing edge detection processing on the first image to be compared to obtain the first edge image feature; determining the first sub-region grayscale co-occurrence matrix of the first sub-region image in the first image to be compared, and determining the first image texture feature matrix based on the first sub-region grayscale co-occurrence matrix; constructing a multi-scale first wavelet coefficient matrix, and performing wavelet transform processing on the first image to be compared based on the multi-scale first wavelet coefficient matrix to obtain a multi-scale first sub-band image.

[0209] In an exemplary embodiment of the present disclosure, edge detection processing is performed on the first image to be compared to obtain the first edge image feature, including: performing grayscale processing on the first image to be compared to obtain a first grayscale image, and performing Gaussian filtering on the first grayscale image to obtain a first filtered image; calculating a first transverse image gradient of the first filtered image on the horizontal axis, and calculating a first longitudinal image gradient of the first filtered image on the vertical axis; determining a first gradient direction of the first filtered image based on the first transverse gradient and the first longitudinal gradient, and determining a first maximum gradient value and a first minimum gradient value according to the first gradient direction; determining a first image boundary point of the first filtered image according to the first maximum gradient value and the first minimum gradient value, and determining the first edge image feature according to the first image boundary point.

[0210] In an exemplary embodiment of the present disclosure, determining a first sub-region grayscale co-occurrence matrix of a first sub-region image in the first image to be compared includes: performing image region division on the first grayscale image corresponding to the first image to be processed to obtain a plurality of first sub-region images having the same first region area, and obtaining first sub-region pixel values ​​of first sub-region pixel points in the first sub-region image; calculating a first joint probability in the first sub-region pixel points of first sub-region pixel pairs composed of first sub-region pixel values ​​at different first pixel distances and in different first pixel directions, and generating a first sub-region grayscale co-occurrence matrix of the first sub-region image based on the first joint probability.

[0211] In an exemplary embodiment of the present disclosure, a first joint probability of a first sub-region pixel pair composed of first sub-region pixel values ​​at different first pixel distances and different first pixel directions in a first sub-region pixel point is calculated, including: determining a first grayscale level according to the first sub-region pixel value of the first sub-region pixel point in the first sub-region image, and constructing a first initial matrix according to the first grayscale level; selecting any pixel point from the first sub-region pixel points as a first target pixel point, and traversing the first sub-region pixel points except the first target pixel point based on different first pixel distances and different first pixel directions. a first other pixel point, to construct a first sub-region pixel point pair according to the first target pixel point and the first other pixel point; determine a first placement position of the first sub-region pixel point pair in the first initial matrix according to the regional pixel value included in the first sub-region pixel point pair, and place the first sub-region pixel point pair into the first initial matrix based on the first placement position to obtain a first pixel point matrix of the first sub-region pixel point pair; calculate the number of first pixel point pairs of the first sub-region pixel point pairs at different positions in the first pixel point matrix, and normalize the number of the first pixel point pairs to obtain a first joint probability.

[0212] In an exemplary embodiment of the present disclosure, the first image texture feature matrix is ​​determined based on the first sub-region grayscale co-occurrence matrix, including: performing mean processing on the first sub-region grayscale co-occurrence matrix to obtain a first mean processing result, and normalizing the first mean processing result to obtain the first image texture feature matrix.

[0213] In an exemplary embodiment of the present disclosure, constructing a multi-scale first wavelet coefficient matrix includes: obtaining first overall pixel coordinates of first overall pixel points included in a first grayscale image corresponding to the first image to be processed, and determining a first scale value range of a first scale factor and a first position value range of a first position factor according to the first overall pixel coordinates; determining first scale parameter values ​​and first position parameter values ​​having multiple different scales according to the first scale value range and the first position value range; determining a first wavelet transform coefficient under the first scale parameter value and the first position parameter value according to the first scale parameter value and the first position parameter value, and generating a multi-scale first wavelet coefficient matrix according to the first wavelet transform coefficient.

[0214] In an exemplary embodiment of the present disclosure, determining a first comprehensive image sharpness of a first image to be compared according to the first multi-dimensional image feature includes: determining a first edge sharpness evaluation value of the first image to be compared according to the first edge image feature in the first multi-dimensional image feature; determining a first texture sharpness evaluation value of the first image to be compared according to the first image texture feature matrix in the first multi-dimensional image feature; determining a first multi-scale sharpness evaluation value of the first image to be compared according to the multi-scale first sub-band images in the first multi-dimensional image feature; and determining the first comprehensive image sharpness according to the first edge sharpness evaluation value, the first texture sharpness evaluation value, and the first multi-scale sharpness evaluation value.

[0215] In an exemplary embodiment of the present disclosure, determining a first edge sharpness evaluation value of a first image to be compared according to the first edge image feature in the first multi-dimensional image feature includes: determining a first edge pixel intensity value of the first image to be compared according to the first edge image feature in the first multi-dimensional image feature; determining a first edge pixel sharpness value of the first image to be compared according to the first edge image feature; and determining the first edge sharpness evaluation value of the first image to be compared according to the first edge pixel intensity value and the first edge pixel sharpness value.

[0216] In an exemplary embodiment of the present disclosure, determining a first texture sharpness evaluation value of a first image to be compared according to the first image texture feature matrix in the first multi-dimensional image feature includes: determining a first pixel texture contrast value and a first pixel correlation value of the first image to be compared according to the first image texture feature matrix in the first multi-dimensional image feature; and determining the first texture sharpness evaluation value of the first image to be compared according to the first pixel texture contrast value and the first pixel correlation value.

[0217] In an exemplary embodiment of the present disclosure, determining a first multi-scale sharpness evaluation value of a first image to be compared according to the multi-scale first sub-band images in the first multi-dimensional image feature includes: determining a first image energy, a first image mean, and a first image standard deviation of the first sub-band image at this scale according to the first wavelet coefficient matrix corresponding to the multi-scale first sub-band images in the first multi-dimensional image feature; determining a first sub-sharpness evaluation value of the first sub-band image at this scale according to the first image energy, the first image mean, and the first image standard deviation; and determining the first multi-scale sharpness evaluation value of the first image to be compared according to the first sub-sharpness evaluation values of the first sub-band images at different scales.

[0218] In an exemplary embodiment of the present disclosure, determining the first comprehensive image sharpness according to the first edge sharpness evaluation value, the first texture sharpness evaluation value, and the first multi-scale sharpness evaluation value includes: determining a first edge weight value corresponding to the first edge sharpness evaluation value, a first texture weight value corresponding to the first texture sharpness evaluation value, and a first multi-scale weight value corresponding to the first multi-scale sharpness evaluation value based on a preset weight value prediction model; performing weighted summation on the first edge sharpness evaluation value and the first edge weight value, the first texture sharpness evaluation value and the first texture weight value, and the first multi-scale sharpness evaluation value and the first multi-scale weight value to obtain the first comprehensive image sharpness.

[0219] In an exemplary embodiment of the present disclosure, determining the sharpness comparison result of the image pair to be compared according to the first comprehensive image sharpness and the second comprehensive image sharpness includes: calculating the sharpness difference between the first comprehensive image sharpness and the second comprehensive image sharpness, and determining the sharpness comparison result of the image pair to be compared according to the sharpness difference; wherein, if the absolute value of the sharpness difference is greater than a preset threshold, it is determined that there is an obvious difference in sharpness between the first image to be compared and the second image to be compared; if the absolute value of the sharpness difference is less than or equal to the preset threshold, it is determined that the sharpness of the first image to be compared and the second image to be compared is consistent.

[0220] In an exemplary embodiment of the present disclosure, the apparatus for comparing the sharpness of images further includes:

[0221] A target image selection module, configured to select a target image from the first image to be compared and the second image to be compared according to the sharpness comparison result.

[0222] In an exemplary embodiment of the present disclosure, selecting a target image from the first image to be compared and the second image to be compared according to the sharpness comparison result includes: if the sharpness comparison result is that there is an obvious difference in sharpness between the first image to be compared and the second image to be compared, determining whether the sharpness difference between the first comprehensive image sharpness and the second comprehensive image sharpness is a positive number; if the sharpness difference is a positive number, determining the first image to be compared as the target image, and if the sharpness difference is a negative number, determining the second image to be compared as the target image.

[0223] Exemplary storage medium

[0224] After introducing the method for comparing the sharpness of images and the apparatus for comparing the sharpness of images in the exemplary embodiments of the present disclosure, next, reference is made to Figure 7 to describe the storage medium of the exemplary embodiments of the present disclosure.

[0225] Reference Figure 7 As shown, a program product 700 for implementing the above method according to an embodiment of the present disclosure is described. It can be a portable compact disc read-only memory (CD-ROM), include program code, and can run on a terminal device, such as a personal computer. However, the program product of the present disclosure is not limited to this.

[0226] The program product can adopt any combination of one or more readable media. The readable media can be a readable signal medium or a readable storage medium. The readable storage medium can be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination of the above. More specific examples (non-exhaustive list) of the readable storage medium include: an electrical connection with one or more wires, a portable disc, 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 above.

[0227] The computer-readable signal medium can include a data signal propagated in a baseband or as part of a carrier wave, in which the readable program code is carried. Such a propagated data signal can take various forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination of the above. The readable signal medium can also be any readable medium other than the readable storage medium.

[0228] The program code for performing the operations of the present disclosure can be written in any combination of one or more programming languages, including object-oriented programming languages - such as Java, C++, etc., and also including conventional procedural programming languages - such as the "C" language or similar programming languages. The program code can be executed entirely on the user computing device, partially on the user device, partially on a remote computing device, or entirely on a remote computing device or server. In the case of a remote computing device, the remote computing device can be connected to the user computing device through any type of network, including a local area network (LAN) or a wide area network (WAN).

[0229] Exemplary electronic device

[0230] After introducing the storage medium of the exemplary embodiment of the present disclosure, next, reference Figure 8 is made to illustrate the electronic device of the exemplary embodiment of the present disclosure.

[0231] Figure 8The illustrated electronic device 800 is merely an example and should not impose any limitation on the functionality and scope of use of the embodiments of the present disclosure.

[0232] As Figure 8 shown, the electronic device 800 is presented in the form of a general-purpose computing device. The components of the electronic device 800 may include, but are not limited to: at least one of the above-mentioned processing units 810, at least one of the above-mentioned storage units 820, a bus 830 connecting different system components (including the storage unit 820 and the processing unit 810), and a display unit 840.

[0233] Among them, the storage unit 820 stores program code, and the program code can be executed by the processing unit 810, so that the processing unit 810 executes the steps according to various exemplary embodiments of the present disclosure described in the "Exemplary Method" section of the present specification above. For example, the processing unit 810 may execute steps S110 - S140 as Figure 1 shown in.

[0234] The storage unit 820 may include a volatile storage unit, such as a random access storage unit (RAM) 8201 and / or a cache storage unit 8202, and may further include a read-only storage unit (ROM) 8203.

[0235] The storage unit 820 may further include a program / utilities 8204 having a set (at least one) of program modules 8205. Such program modules 8205 include, but are not limited to: an operating system, one or more application programs, other program modules, and program data. The implementation of a network environment may be included in each or some combination of these examples.

[0236] The bus 830 may include a data bus, an address bus, and a control bus.

[0237] The electronic device 800 may also communicate with one or more external devices 900 (such as a keyboard, a pointing device, a Bluetooth device, etc.) through an input / output (I / O) interface 850. And, the electronic device 800 may also communicate with one or more networks (such as a local area network (LAN), a wide area network (WAN), and / or a public network, such as the Internet) through a network adapter 860. As shown in the figure, the network adapter 860 communicates with other modules of the electronic device 800 through the bus 830. It should be understood that, although not shown in the figure, other hardware and / or software modules may be used in conjunction with the electronic device 800, including but not limited to: microcode, device drivers, redundant processing units, external disk drive arrays, RAID systems, tape drives, and data backup storage systems, etc.

[0238] It should be noted that although several modules or sub - modules of the pop - up window processing device are mentioned in the above - detailed description, this division is merely exemplary and not mandatory. In fact, according to the embodiments of the present disclosure, the features and functions of two or more of the above - described units / modules can be embodied in one unit / module. Conversely, the features and functions of one unit / module described above can be further divided and embodied by multiple units / modules.

[0239] In addition, although the operations of the method of the present disclosure are described in a specific order in the drawings, this does not require or imply that these operations must be performed in that specific order, or that all of the illustrated operations must be performed to achieve the desired result. Additionally or alternatively, some steps may be omitted, multiple steps may be combined into one step for execution, and / or one step may be decomposed into multiple steps for execution.

[0240] Although the spirit and principles of the present disclosure have been described with reference to several specific embodiments, it should be understood that the present disclosure is not limited to the specific embodiments disclosed, and the division of each aspect does not mean that the features in these aspects cannot be combined for benefit. This division is only for the convenience of expression. The present disclosure aims to cover various modifications and equivalent arrangements included within the spirit and scope of the appended claims.

Claims

1. A method for comparing image clarity, characterized in that: include: Acquire a pair of images to be compared; the pair of images to be compared includes a first image to be compared and a second image to be compared; Determining a first multi-dimensional image feature of the first image to be compared and a second multi-dimensional image feature of the second image to be compared; Determine a first comprehensive image clarity of a first image to be compared according to the first multi-dimensional image feature, and determine a second comprehensive image clarity of a second image to be compared according to the second multi-dimensional image feature; A clarity comparison result of the image pair to be compared is determined according to the first comprehensive image clarity and the second comprehensive image clarity.

2. The image definition comparison method according to claim 1, characterized in that: The first multi-dimensional image feature includes at least one of a first edge image feature, a first image texture feature matrix, and a multi-scale first sub-band image; wherein determining the first multi-dimensional image feature of the first image to be compared includes: Performing edge detection processing on the first image to be compared to obtain the first edge image feature; Determine a first sub-region gray level co-occurrence matrix of a first sub-region image in the first image to be compared, and determine the first image texture feature matrix according to the first sub-region gray level co-occurrence matrix; A multi-scale first wavelet coefficient matrix is ​​constructed, and wavelet transform processing is performed on the first image to be compared according to the multi-scale first wavelet coefficient matrix to obtain a multi-scale first sub-band image.

3. The image definition comparison method according to claim 2, characterized in that: Performing edge detection processing on the first image to be compared to obtain the first edge image feature includes: Performing grayscale processing on the first image to be compared to obtain a first grayscale image, and performing Gaussian filtering on the first grayscale image to obtain a first filtered image; Calculating a first transverse image gradient of the first filtered image on the abscissa, and calculating a first longitudinal image gradient of the first filtered image on the ordinate; determining a first gradient direction of the first filtered image based on the first transverse gradient and the first longitudinal gradient, and determining a first maximum gradient value and a first minimum gradient value according to the first gradient direction; A first image boundary point of the first filtered image is determined according to the first maximum gradient value and the first minimum gradient value, and the first edge image feature is determined according to the first image boundary point.

4. The image definition comparison method according to claim 2, characterized in that: Determining a first sub-region gray level co-occurrence matrix of a first sub-region image in the first image to be compared includes: Performing image region division on a first grayscale image corresponding to the first image to be processed to obtain a plurality of first sub-region images having the same first region area, and acquiring first sub-region pixel values ​​of first sub-region pixel points in the first sub-region images; Calculate the first joint probability of first sub-region pixel pairs consisting of first sub-region pixel values ​​at different first pixel distances and different first pixel directions in the first sub-region pixel points, and generate a first sub-region grayscale co-occurrence matrix of the first sub-region image according to the first joint probability.

5. The image definition comparison method according to claim 4, characterized in that: Calculating a first joint probability of a first sub-region pixel pair consisting of first sub-region pixel values ​​at different first pixel distances and in different first pixel directions in the first sub-region pixel points includes: Determine a first grayscale level according to first sub-region pixel values ​​of first sub-region pixel points in the first sub-region image, and construct a first initial matrix according to the first grayscale level; Select any pixel point from the first sub-region pixel points as the first target pixel point, and traverse first other pixel points in the first sub-region pixel points except the first target pixel point based on different first pixel distances and different first pixel directions, so as to construct a first sub-region pixel point pair according to the first target pixel point and the first other pixel points; Determine a first placement position of the first sub-region pixel pair in the first initial matrix according to the regional pixel values ​​included in the first sub-region pixel pair, and place the first sub-region pixel pair in the first initial matrix based on the first placement position to obtain a first pixel matrix of the first sub-region pixel pair; The number of first pixel pairs of the first sub-region pixel pairs at different positions in the first pixel matrix is ​​calculated, and the number of the first pixel pairs is normalized to obtain a first joint probability.

6. The image definition comparison method according to claim 2, characterized in that: Determining the first image texture feature matrix according to the first sub-region gray level co-occurrence matrix includes: The gray level co-occurrence matrix of the first sub-region is averaged to obtain a first averaged processing result, and the first averaged processing result is normalized to obtain the first image texture feature matrix.

7. The image definition comparison method according to claim 2, characterized in that: Construct a multi-scale first wavelet coefficient matrix, including: Acquire first global pixel coordinates of a first global pixel included in a first grayscale image corresponding to the first image to be processed, and determine a first scale value range of a first scale factor and a first position value range of a first position factor according to the first global pixel coordinates; Determining first scale parameter values ​​and first position parameter values ​​having a plurality of different scales according to the first scale value range and the first position value range; A first wavelet transform coefficient under the first scale parameter value and the first position parameter value is determined according to the first scale parameter value and the first position parameter value, and a multi-scale first wavelet coefficient matrix is ​​generated according to the first wavelet transform coefficient.

8. An image clarity comparison device, characterized in that: include: An image pair acquisition module, used to acquire an image pair to be compared; the image pair to be compared includes a first image to be compared and a second image to be compared; a multi-dimensional image feature determination module, configured to determine a first multi-dimensional image feature of the first image to be compared and a second multi-dimensional image feature of the second image to be compared; a comprehensive image clarity determination module, configured to determine a first comprehensive image clarity of a first image to be compared according to the first multi-dimensional image feature, and to determine a second comprehensive image clarity of a second image to be compared according to the second multi-dimensional image feature; The image definition comparison module is used to determine the definition comparison result of the image pair to be compared according to the first comprehensive image definition and the second comprehensive image definition.

9. A computer-readable storage medium having a computer program stored thereon, wherein the computer program, when executed by a processor, implements the image clarity comparison method according to any one of claims 1 to 7.

10. An electronic device comprising: processor; as well as A memory, configured to store executable instructions of the processor; Wherein, the processor is configured to execute the image clarity comparison method described in any one of claims 1-7 by executing the executable instructions.