Image quality assessment method, device, equipment and storage medium
By comparing the feature data of the target image and the high-quality reference image, the image quality is quickly and accurately judged, and the problem of imbalance in the image quality evaluation speed and accuracy in the prior art is solved.
Patent Information
- Application Number
- CN202111111417.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-09-18
- Publication Date
- 2025-04-11
- Estimated Expiration
- 2041-09-18
AI Technical Summary
The prior art is difficult to quickly and accurately evaluate image quality, affecting the accuracy and reliability of image recognition.
By obtaining the feature data of the reference image that meets the preset high-quality image standards, determining its quality evaluation data, and comparing the feature data of the target image with it, we can determine whether the target image is a high-quality image.
Fast and accurate image quality evaluation is achieved, ensuring a balance between speed and accuracy of evaluation.
Smart Images

Figure CN113870210B_ABST
Abstract
Description
Technical Field
[0001] The embodiments of the present application relate to the field of image processing technology, and in particular to an image quality assessment method, apparatus, device and storage medium. Background Art
[0002] With the widespread application of image information technology, the evaluation of image quality has become a broad and fundamental issue. The meaning of image quality includes image fidelity and image readability. The so-called image fidelity refers to the degree of deviation between the evaluated image and the standard image. The smaller the deviation, the higher the fidelity; while image readability refers to the ability of the image to provide information to people or machines. It is not only related to the application requirements of the image system, but also often related to the subjective perception of the human eye. Therefore, image quality indicators include resolution, color depth, image distortion and other aspects.
[0003] Given that image information has incomparable advantages over other information, reasonable judgment of image information has become an indispensable means in various fields. In the process of image acquisition, processing, transmission and recording, the realism and readability of the image are inevitably affected due to the imperfections of the imaging system, processing methods, transmission media and recording equipment, as well as reasons such as object movement and noise pollution.
[0004] In image recognition, the quality of the collected images directly affects the accuracy and reliability of the recognition results. Therefore, the reasonable evaluation of image quality has very important application value, especially the balance between the speed and accuracy of the evaluation. Summary of the invention
[0005] The purpose of the present invention is to overcome the shortcomings of the prior art, meet the actual needs, and disclose an image quality assessment method, device, equipment and storage medium to achieve image quality assessment that is easy to implement and can be performed quickly while ensuring the accuracy of the assessment.
[0006] In a first aspect, an embodiment of the present application provides an image quality assessment method, the method comprising:
[0007] Acquire first feature data of a reference image, and determine first quality assessment data of the reference image according to the first feature data, wherein the reference image is an image that meets a preset high-quality image standard;
[0008] Acquire second feature data of the target image, and determine second quality assessment data of the target image according to the second feature data;
[0009] The second quality assessment data is compared with the first quality assessment data, and it is determined whether the target image is a high-quality image according to a result of the comparison.
[0010] In a second aspect, an embodiment of the present application further provides an image quality assessment device, the device comprising:
[0011] a first quality assessment data determination module, configured to obtain first feature data of a reference image, and determine first quality assessment data of the reference image according to the first feature data, wherein the reference image is an image that meets a preset high-quality image standard;
[0012] A second quality assessment data module, used for acquiring second feature data of a target image, and determining second quality assessment data of the target image according to the second feature data;
[0013] The high-quality image judgment module is used to compare the second quality assessment data with the first quality assessment data, and determine whether the target image is a high-quality image according to the comparison result.
[0014] In a third aspect, an embodiment of the present application further provides an electronic device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the above method when executing the program.
[0015] In a fourth aspect, an embodiment of the present application further provides a computer-readable storage medium having a computer program stored thereon, which implements the above-mentioned method when executed by a processor.
[0016] This application has the following beneficial effects:
[0017] By acquiring first feature data of a reference image and determining first quality assessment data of the reference image based on the first feature data, wherein the reference image is an image that meets a preset high-quality image standard, acquiring second feature data of a target image and determining second quality assessment data of the target image based on the second feature data, comparing the second quality assessment data with the first quality assessment data, and determining whether the target image is a high-quality image based on a result of the comparison, an image quality assessment that is easy to implement and can be performed quickly while ensuring the accuracy of the assessment is achieved. BRIEF DESCRIPTION OF THE DRAWINGS
[0018] Figure 1 is a flowchart of an image quality assessment method embodiment provided in Embodiment 1 of the present application;
[0019] Figure 2 is a structural block diagram of an embodiment of an image quality assessment device provided in Embodiment 2 of the present application;
[0020] Figure 3 It is a structural schematic diagram of an electronic device provided in Example 3 of the present application. DETAILED DESCRIPTION
[0021] The present application will be further described in detail below in conjunction with the accompanying drawings and embodiments. It is to be understood that the specific embodiments described herein are only used to explain the present application, rather than to limit the present application. It should also be noted that, for ease of description, only the parts related to the present application, rather than all structures, are shown in the accompanying drawings.
[0022] Embodiment 1
[0023] Figure 1 This is a flowchart of an image quality assessment method embodiment provided in Embodiment 1 of the present application.
[0024] When evaluating image quality and distinguishing and screening high-quality and low-quality images, images that meet the preset high-quality image standards can be used as reference images. By comparing the reference image with the target image, it is possible to determine whether the target image belongs to the category of high-quality or low-quality images.
[0025] like Figure 1 As shown, this embodiment may include the following steps:
[0026] Step 110: Acquire first feature data of a reference image, and determine first quality assessment data of the reference image according to the first feature data, wherein the reference image is an image that meets a preset high-quality image standard.
[0027] In this step, the first feature data of the reference image may include noise intensity, gradient pixels, etc. of the image.
[0028] In one implementation, the reference image may be a high-quality image randomly selected from a high-quality image database, and then feature data is extracted based on the randomly selected high-quality image to obtain the first feature data.
[0029] After acquiring the first feature data, one or more feature parameters may be selected from the first feature data, and the selected feature parameters may constitute first quality evaluation data. The size of the first quality evaluation data may reflect the quality of the image.
[0030] In one embodiment, step 110 includes:
[0031] The first feature data is input into a pre-generated quality assessment model, and the quality assessment model processes the first feature data to output first quality assessment data.
[0032] In this step, the pre-generated quality assessment model can be trained in advance through a large number of test images. Multiple quality assessment models will be generated during the training process, and these quality assessment models can be tested. The quality assessment models are input with already determined high-quality images and low-quality images, and the evaluation results of each quality assessment model are collected. The evaluation results output by each quality assessment model are compared with the pre-known standard answers. The quality assessment model with an accuracy rate exceeding a certain threshold or with the highest accuracy rate can be determined as the final quality assessment model.
[0033] In one embodiment, the first feature data includes first gradient feature data and first noise feature data, the quality assessment model includes a gradient assessment sub-model and a noise assessment sub-model, and processing the first feature data according to the quality assessment model includes:
[0034] Inputting the first noise characteristic data into the noise assessment sub-model, and obtaining the noise intensity data output by the noise assessment sub-model;
[0035] The noise intensity data and the first gradient feature data are input into the gradient evaluation sub-model, and the first quality evaluation data output by the gradient evaluation sub-model is obtained.
[0036] In this step, the quality assessment model includes a gradient assessment submodel and a noise assessment submodel. The quality assessment model can be a neural network model based on machine learning. The first noise feature data and the first gradient feature data are input into the neural network model for convolution processing, and a feature data extraction layer can be included. After obtaining the first feature data, the first gradient feature data and the first noise feature data in the first feature data can be extracted separately. The extracted first noise feature data can be first input into the noise assessment submodel to obtain noise intensity data, and then the obtained noise intensity data and the extracted first gradient feature data are input into the gradient assessment submodel to obtain the first quality assessment data.
[0037] In another implementation, the noise assessment submodel may include a first noise feature data extraction layer, and the first noise feature data of the image feature data input to the quality assessment model is identified and obtained through the first noise feature data extraction layer of the noise assessment submodel, and then the first noise feature data is input into the noise intensity data determination layer, and in the noise intensity data determination layer, the noise intensity is calculated for the first noise feature data, and finally the noise intensity data is output. Noise often appears on the image as isolated pixels or pixel blocks that cause strong visual effects. The calculation of noise intensity belongs to the conventional algorithm of the prior art. For example, from the perspective of the probability distribution of noise, it can be divided into Gaussian noise, Rayleigh noise, gamma noise, exponential noise and uniform noise. Here, the noise intensity calculation process in the noise intensity data determination layer is not described in detail.
[0038] The noise intensity data and the first gradient feature data are input into the gradient evaluation sub-model, and the first quality evaluation data output by the gradient evaluation sub-model is obtained. The gradient evaluation sub-model can first calculate the first gradient feature data. During the calculation, the image can be regarded as a two-dimensional discrete function, and the first gradient feature data can be the derivative of the two-dimensional discrete function. The calculation formula is:
[0039] G(x,y)=dx(i,j)+dy(i,j);
[0040] dx(i,j)=I(i+1,j)-I(i,j);
[0041] dy(i,j)=I(i,j+1)-I(i,j);
[0042] Among them, I is the value of the image pixel (such as RGB value), and (i, j) is the coordinate of the pixel.
[0043] Step 120: Acquire second feature data of the target image, and determine second quality assessment data of the target image according to the second feature data.
[0044] In this step, the second quality assessment data may correspond to the first quality assessment data, and the second feature data of the target image may be input into the same quality assessment model to obtain the second quality assessment data of the target image.
[0045] Step 130: Compare the second quality assessment data with the first quality assessment data, and determine whether the target image is a high-quality image based on the comparison result.
[0046] The quality assessment model outputs first quality assessment data and second quality assessment data for the first feature data and the second feature data, respectively, and compares the first quality assessment data and the second quality assessment data. In implementation, the comparison process can set corresponding weights for different feature data to obtain a quality assessment value of the target image. When the quality assessment value is greater than a set threshold, it can be judged as a high-quality image.
[0047] In another implementation, after setting corresponding weights for different feature data, the quality assessment values of the acquired reference image and target image can be determined respectively, and then the quality assessment values of the two can be compared. If the quality assessment value of the target image is greater than the quality assessment value of the reference image, or is less than the quality assessment value of the reference image, and the difference is within the set error tolerance range, the target image can also be judged as a high-quality image.
[0048] In one embodiment, step 130 includes the following steps:
[0049] calculating the similarity between the second quality assessment data and the first quality assessment data as a comparison result;
[0050] When the similarity is greater than a preset threshold, the target image is determined to be a high-quality image.
[0051] In a method of comparing the second quality assessment data with the first quality assessment data, the similarity between the second quality assessment data and the first quality assessment data can be calculated as a comparison result. After the similarity calculation, the greater the similarity, the closer the quality of the target image is to the reference image, that is, to the high-quality image. Therefore, when the similarity is greater than a preset threshold, the target image can be determined to be a high-quality image.
[0052] When calculating the similarity, the second quality assessment data and the first quality assessment data can be converted into vector data through cosine similarity, and the cosine value of the angle between the two vectors in the vector space is used as a measure of the difference between the two quality assessment data. The closer the value is to 1, the closer the angle is to 0°, that is, the more similar the two vectors are.
[0053] In one embodiment, the first quality assessment data of the reference image includes first gradient data and first noise data, and the second quality assessment data of the target image includes second gradient data and second noise data. Step 130 may further include:
[0054] When the second noise data is smaller than the first noise data, and the second gradient data is larger than the first gradient data, the target image is determined to be a high-quality image.
[0055] In this step, the first quality evaluation data includes the first gradient data and the first noise data, and the second quality evaluation data of the target image includes the second gradient data and the second noise data. When comparing the second quality evaluation data with the first quality evaluation data, the first noise data and the second noise data may also be compared. If the second noise data is smaller than the first noise data and the second gradient data is larger than the first gradient data, the target image may be determined to be a high-quality image.
[0056] In a specific implementation, before comparing the first noise data with the second noise data, and the first gradient data with the second gradient data, a preliminary judgment may be performed. The preliminary judgment may be performed by comparing the first pixel feature of the reference image with the second pixel feature of the target image. The pixel feature may include any of the following parameters or any combination of parameters: original image size, original color matrix or grayscale matrix, transformed color matrix or grayscale matrix, image brightness distribution information, image special effect statistical parameters, and original image format and embedded information. When comparing the first pixel feature with the second pixel feature, it may be accomplished through the directional gradient histogram feature, and the specific steps are as follows:
[0057] Grayscale the target image and the reference image. The grayscale data can quickly determine the difference between the reference image and the target image.
[0058] Normalize the color space of the target image and the reference image to adjust the contrast of the image, reduce the impact of shadows and lighting changes on the image, and suppress noise interference;
[0059] Calculating the gradient of each pixel in the reference image and the target image respectively, wherein the gradient of each pixel includes magnitude and direction, and captures contour information while further weakening the interference of illumination;
[0060] The reference image and the target image are divided into a number of cell units, for example, 8*8 pixels / cell unit;
[0061] By counting the gradient histogram of each unit, the feature descriptor of each cell unit can be constructed;
[0062] Grouping units of the same image into one or more pixel blocks;
[0063] According to the gradient histograms of all units in the same pixel block, the gradient histogram feature descriptors of the pixel blocks are determined respectively;
[0064] The gradient histogram feature descriptors of all pixel blocks of the same image are connected in series to determine the gradient histogram feature descriptors of the reference image and the target image respectively.
[0065] Compare the gradient histogram feature descriptors of the target image and the reference image. If the gradient histogram feature descriptor of the target image is larger than that of the reference image, the target image is judged to be a qualified image. The qualified image is used for further comparison of the first noise data with the second noise data, and the first gradient data with the second gradient data to determine whether it is a high-quality image. If the gradient histogram feature descriptor of the target image is smaller than that of the reference image, it is a failed image. The failed image can be directly judged as a low-quality image without further judgment.
[0066] In one embodiment, it may also include:
[0067] If the target image is a high-quality image, the target image is added to a preset high-quality image database, and the high-quality image database is used to provide a reference image, or to optimize a quality assessment model.
[0068] In this step, when the target image is a high-quality image, it can be used for the application scenario. In addition, the target image can be added to the preset high-quality image database and become an alternative reference image when a reference image is randomly selected from the high-quality image database next time. In addition, it can also be used to optimize the quality assessment model, provide a high-quality data basis for downstream data processing, and make it a quality assessment model with higher accuracy in judging high-quality images.
[0069] In one embodiment, it may also include:
[0070] If the target image is determined to be a low-quality image, the target image is discarded or stored in a low-quality image database.
[0071] When the target image is a low-quality image, different operations such as discarding, deleting, or storing in a low-quality image database can be performed on the low-quality image according to the corresponding application scenario.
[0072] In an embodiment of the present invention, by acquiring first feature data of a reference image and determining first quality assessment data of the reference image based on the first feature data, wherein the reference image is an image that meets a preset high-quality image standard, acquiring second feature data of a target image, and determining second quality assessment data of the target image based on the second feature data, the second quality assessment data is compared with the first quality assessment data, and determining whether the target image is a high-quality image based on a result of the comparison, an image quality assessment is achieved that is easy to implement, can be performed quickly, and at the same time ensures the accuracy of the assessment.
[0073] Embodiment 2
[0074] Figure 2 A second embodiment of the present invention provides an image quality assessment device, the device comprising:
[0075] A first quality assessment data determination module 210, configured to obtain first feature data of a reference image, and determine first quality assessment data of the reference image according to the first feature data, wherein the reference image is an image that meets a preset high-quality image standard;
[0076] A second quality assessment data module 220, configured to obtain second feature data of a target image, and determine second quality assessment data of the target image according to the second feature data;
[0077] The high-quality image determination module 230 is used to compare the second quality assessment data with the first quality assessment data, and determine whether the target image is a high-quality image according to the comparison result.
[0078] In one embodiment, the first quality assessment data determination module 210 includes:
[0079] The first quality assessment data output submodule is used to input the first feature data into a pre-generated quality assessment model, and the quality assessment model processes the first feature data to output first quality assessment data.
[0080] In one embodiment, the first feature data includes first gradient feature data and first noise feature data, and the quality assessment model includes a gradient assessment sub-model and a noise assessment sub-model;
[0081] The first quality assessment data output submodule includes:
[0082] A noise intensity data output unit, used for inputting the first noise characteristic data into the noise assessment sub-model, and obtaining the noise intensity data output by the noise assessment sub-model;
[0083] The first quality assessment data output unit is used to input the noise intensity data and the first gradient feature data into the gradient assessment sub-model, and obtain the first quality assessment data output by the gradient assessment sub-model.
[0084] In one embodiment, the high-quality image determination module 230 includes:
[0085] a similarity calculation submodule, used for calculating the similarity between the second quality assessment data and the first quality assessment data as the comparison result;
[0086] The high-quality image determination submodule is used to determine that the target image is a high-quality image when the similarity is greater than a preset threshold.
[0087] In one embodiment, the first quality assessment data of the reference image includes first gradient data and first noise data, the second quality assessment data of the target image includes second gradient data and second noise data, and the high-quality image determination module 230 may also be used to:
[0088] When the second noise data is smaller than the first noise data, and the second gradient data is larger than the first gradient data, the target image is determined to be a high-quality image.
[0089] In one embodiment, it also includes:
[0090] The target image destination module is used to add the target image to a preset high-quality image database if the target image is a high-quality image. The high-quality image database is used to provide the reference image, or to optimize the quality assessment model.
[0091] In one embodiment, it also includes:
[0092] The low-quality image destination module is used to discard the target image or store the target image in a low-quality image database if the target image is determined to be a low-quality image.
[0093] Embodiment 3
[0094] Figure 3 A schematic diagram of the structure of an electronic device provided in Embodiment 3 of the present application is shown in FIG. Figure 3 As shown, the electronic device includes a processor 310, a memory 320, an input device 330 and an output device 340; the number of the processor 310 in the electronic device can be one or more. Figure 3 A processor 310 is taken as an example; the processor 310, the memory 320, the input device 330 and the output device 340 in the electronic device can be connected via a bus or other means. Figure 3 The example of connecting through bus is taken in the following.
[0095] The memory 320 is a computer-readable storage medium that can be used to store software programs, computer executable programs and modules, such as program instruction modules corresponding to the method embodiments in the embodiments of the present application. The processor 310 executes various functional applications and data processing of the electronic device by running the software programs, instructions and modules stored in the memory 320, that is, implementing the above method.
[0096] The memory device 320 may mainly include a program storage area and a data storage area, wherein the program storage area may store an operating system, an application required for at least one function; the data storage area may store data created according to the use of the terminal, etc. In addition, the memory 320 may include a high-speed random access memory, and may also include a non-volatile memory, such as at least one disk storage device, a flash memory device, or other non-volatile solid-state storage device. In some instances, the memory 320 may further include a memory remotely arranged relative to the processor 310, and these remote memories may be connected to the electronic device via a network. Examples of the above-mentioned network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.
[0097] The input device 330 may be used to receive input digital or character information and generate key signal input related to user settings and function control of an electronic device. The output device 340 may include a display device such as a display screen.
[0098] Embodiment 4
[0099] Embodiment 4 of the present application also provides a storage medium containing computer executable instructions, and the computer executable instructions are used to execute the method in the method embodiment when executed by a computer processor.
[0100] Through the above description of the implementation method, the technicians in the relevant field can clearly understand that the present application can be implemented with the help of software and necessary general hardware, and of course it can also be implemented by hardware, but in many cases the former is a better implementation method. Based on this understanding, the technical solution of the present application can be essentially or the part that contributes to the current technology can be embodied in the form of a software product, and the computer software product can be stored in a computer-readable storage medium, such as a computer floppy disk, read-only memory (ROM), random access memory (RAM), flash memory (FLASH), hard disk or optical disk, etc., including a number of instructions for a computer device (which can be a personal computer, server, or network device, etc.) to execute the methods described in each embodiment of the present application.
[0101] It is worth noting that in the embodiment of the above-mentioned device, the various modules and modules included are only divided according to functional logic, but are not limited to the above-mentioned division, as long as the corresponding functions can be achieved; in addition, the specific names of the functional modules are only for the convenience of distinguishing each other, and are not used to limit the scope of protection of this application.
[0102] Note that the above are only preferred embodiments of the present application and the technical principles used. Those skilled in the art will understand that the present application is not limited to the specific embodiments described herein, and that various obvious changes, readjustments and substitutions can be made by those skilled in the art without departing from the scope of protection of the present application. Therefore, although the present application is described in more detail through the above embodiments, the present application is not limited to the above embodiments, and may include more other equivalent embodiments without departing from the concept of the present application, and the scope of the present application is determined by the scope of the appended claims.
Claims
1. A method for evaluating image quality, characterized in that: The method comprises: Acquire first feature data of a reference image, and determine first quality assessment data of the reference image according to the first feature data, wherein the reference image is an image that meets a preset high-quality image standard; Acquire second feature data of the target image, and determine second quality assessment data of the target image according to the second feature data; comparing the second quality assessment data with the first quality assessment data, and determining whether the target image is a high-quality image according to a result of the comparison; Wherein, determining the first quality assessment data of the reference image according to the first feature data includes: Inputting the first feature data into a pre-generated quality assessment model, allowing the quality assessment model to process the first feature data and output first quality assessment data; The first feature data includes first gradient feature data and first noise feature data, and the quality assessment model includes a gradient assessment sub-model and a noise assessment sub-model; The processing of the first feature data by the quality assessment model includes: Inputting the first noise characteristic data into the noise assessment sub-model, and obtaining noise intensity data output by the noise assessment sub-model; Inputting the noise intensity data and the first gradient feature data into the gradient evaluation sub-model, and obtaining first quality evaluation data output by the gradient evaluation sub-model; The first quality assessment data of the reference image includes first gradient data and first noise data, and the second quality assessment data of the target image includes second gradient data and second noise data; The comparing the second quality assessment data with the first quality assessment data, and determining whether the target image is a high-quality image according to a result of the comparison, further includes: When the second noise data is smaller than the first noise data, and the second gradient data is larger than the first gradient data, determining that the target image is a high-quality image; Before comparing the second quality assessment data with the first quality assessment data and determining whether the target image is a high-quality image according to a result of the comparison, the method further includes: Performing a pre-judgment operation on the reference image and the target image; The performing a pre-judgment operation on the reference image and the target image comprises: Performing grayscale processing on the target image and the reference image respectively; If the grayscale processing is completed, the reference image and the target image are subjected to color space normalization conditioning to generate a reference image normalized image and a target image normalized image; Respectively calculating the gradient magnitude and direction of each pixel in the reference image normalized image and the target image normalized image, generating gradient data and capturing image contour information of the reference image normalized image and the target image normalized image; Dividing the reference image normalized image and the target image normalized image into a plurality of cell units of predefined sizes; Counting the gradient direction histogram of each cell unit to generate a cell unit feature descriptor; Combining a plurality of the cell units of the same image into a pixel block, and generating a pixel block feature descriptor based on the cell unit feature descriptor; Connecting all the pixel block feature descriptors of the same target image in series to generate a gradient histogram feature descriptor of the target image; Connecting all the pixel block feature descriptors of the same reference image in series to generate a gradient histogram feature descriptor of the reference image; If the gradient histogram feature descriptor of the target image is greater than the gradient histogram feature descriptor of the reference image, the target image is determined to be a qualified image, and a process of determining whether the qualified image is a high-quality image based on noise data and gradient data is initiated; If the gradient histogram feature descriptor of the target image is less than or equal to the gradient histogram feature descriptor of the reference image, the target image is directly determined to be a low-quality image.
2. The method according to claim 1, characterized in that The comparing the second quality assessment data with the first quality assessment data, and determining whether the target image is a high-quality image according to a result of the comparison, includes: calculating the similarity between the second quality assessment data and the first quality assessment data as the comparison result; When the similarity is greater than a preset threshold, the target image is determined to be a high-quality image.
3. The method according to claim 2, characterized in that Also includes: If the target image is a high-quality image, the target image is added to a preset high-quality image database, and the high-quality image database is used to provide the reference image, or to optimize the quality assessment model.
4. The method according to claim 1, characterized in that: Also includes: If the target image is determined to be a low-quality image, the target image is discarded or stored in a low-quality image database.
5. An image quality assessment device, characterized in that: The device comprises: a first quality assessment data determination module, configured to obtain first feature data of a reference image, and determine first quality assessment data of the reference image according to the first feature data, wherein the reference image is an image that meets a preset high-quality image standard; A second quality assessment data module, used for acquiring second feature data of a target image, and determining second quality assessment data of the target image according to the second feature data; a high-quality image judgment module, configured to compare the second quality assessment data with the first quality assessment data, and determine whether the target image is a high-quality image according to a result of the comparison; Wherein, the first quality assessment data determination module includes: A first quality assessment data output submodule, used for inputting the first feature data into a pre-generated quality assessment model, allowing the quality assessment model to process the first feature data and output first quality assessment data; The first feature data includes first gradient feature data and first noise feature data, and the quality assessment model includes a gradient assessment sub-model and a noise assessment sub-model; The first quality assessment data output submodule includes: A noise intensity data output unit, used for inputting the first noise characteristic data into the noise assessment sub-model, and obtaining the noise intensity data output by the noise assessment sub-model; A first quality assessment data output unit, used for inputting the noise intensity data and the first gradient feature data into the gradient assessment sub-model, and obtaining first quality assessment data output by the gradient assessment sub-model; The first quality assessment data of the reference image includes first gradient data and first noise data, and the second quality assessment data of the target image includes second gradient data and second noise data; The high-quality image judgment module is also used for: When the second noise data is smaller than the first noise data, and the second gradient data is larger than the first gradient data, determining that the target image is a high-quality image; Before comparing the second quality assessment data with the first quality assessment data and determining whether the target image is a high-quality image according to a result of the comparison, Performing a pre-judgment operation on the reference image and the target image; The performing a pre-judgment operation on the reference image and the target image comprises: Performing grayscale processing on the target image and the reference image respectively; If the grayscale processing is completed, the reference image and the target image are subjected to color space normalization conditioning to generate a reference image normalized image and a target image normalized image; Respectively calculating the gradient magnitude and direction of each pixel in the reference image normalized image and the target image normalized image, generating gradient data and capturing image contour information of the reference image normalized image and the target image normalized image; Dividing the reference image normalized image and the target image normalized image into a plurality of cell units of predefined sizes; Counting the gradient direction histogram of each cell unit to generate a cell unit feature descriptor; Combining a plurality of the cell units of the same image into a pixel block, and generating a pixel block feature descriptor based on the cell unit feature descriptor; Connecting all the pixel block feature descriptors of the same target image in series to generate a gradient histogram feature descriptor of the target image; Connecting all the pixel block feature descriptors of the same reference image in series to generate a gradient histogram feature descriptor of the reference image; If the gradient histogram feature descriptor of the target image is greater than the gradient histogram feature descriptor of the reference image, the target image is determined to be a qualified image, and a process of determining whether the qualified image is a high-quality image based on noise data and gradient data is initiated; If the gradient histogram feature descriptor of the target image is less than or equal to the gradient histogram feature descriptor of the reference image, the target image is directly determined to be a low-quality image.
6. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that: When the processor executes the program, the method according to any one of claims 1 to 4 is implemented.
7. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the program is executed by a processor, the method according to any one of claims 1 to 4 is implemented.
Citation Information
Patent Citations
Image quality judgment method and device and storage medium
CN111798421A