Image quality evaluation method, device, equipment and storage medium

By calculating the global and local quality scores of pollen images and combining the two to evaluate image quality, the problem that the prior art cannot accurately evaluate pollen image quality is solved, and a more accurate pollen particle quality evaluation is achieved.

CN113724196BActive Publication Date: 2025-05-06BEIJING UNIV OF TECH
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202110807424.9
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-07-16
Publication Date
2025-05-06
Estimated Expiration
2041-07-16

AI Technical Summary

Technical Problem

The prior art cannot accurately evaluate the quality of pollen images, especially when the pollen particles are small and the background information is huge.

Method used

By obtaining the image to be detected including pollen particles, the global mass score is calculated, and the pollen particles area is determined, the image is segmented to obtain the object detection image, the local mass score of the object detection image is calculated, and the image quality is finally evaluated based on the combination of the two.

Benefits of technology

The accurate evaluation of pollen image quality is achieved, the problem of inaccurate quality evaluation caused by the existing technology relying on a global perspective is solved, and the attention and evaluation accuracy are improved on the quality of pollen particles.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN113724196B_ABST
    Figure CN113724196B_ABST
Patent Text Reader

Abstract

The present invention provides an image quality evaluation method, device, equipment and storage medium, the method comprising obtaining an image to be detected including pollen particles; calculating a first quality score of the image to be detected; determining the pollen particles in the image to be detected; segmenting the image to be detected based on the pollen particles to obtain at least one target detection image; calculating a second quality score corresponding to the at least one target detection image; and evaluating the quality of the image to be detected based on the first quality score and the second quality score. The present invention is used to solve the defect that the prior art cannot accurately evaluate the quality of pollen images, so as to achieve accurate evaluation of the quality of pollen images.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of computer technology, and in particular to an image quality evaluation method, device, equipment and storage medium. Background Art

[0002] Pollen detection of collected pollen samples helps to predict the concentration of allergenic pollen in the air in advance and ensure the normal life of pollen allergy patients. However, the collected pollen images may have quality problems such as out-of-focus blur. Therefore, it is necessary to evaluate the quality of pollen images to help carry out subsequent pollen recognition tasks. Among them, pollen images include images of pollen particles.

[0003] The existing image quality evaluation methods are used for image data where the objects are usually large, occupying more than 80% of the entire image. For such datasets, quality evaluation is relatively simple, and the quality score of the entire image can represent the quality score of the local object. It can be seen that the existing technology only evaluates the quality of the image from a global perspective.

[0004] However, pollen image data has the following characteristics: 1) The entire image obtained by scanning the pollen slide with an optical microscope is very large, and the gray background information occupies a large area, but we are not concerned about the background information; 2) The pollen grain area is small, and the proportion is very different from the entire image, which is the area we focus on; 3) The entire pollen image contains more bubbles and impurities, which will have a great impact on quality prediction.

[0005] Based on the characteristics of pollen image data, it can be seen that the existing image quality evaluation methods can no longer be applied to pollen images. Therefore, how to accurately evaluate the quality of pollen images is an urgent problem to be solved in the industry. Summary of the invention

[0006] The present invention provides an image quality evaluation method, device, equipment and storage medium, which are used to solve the defect that the prior art cannot accurately evaluate the quality of pollen images, so as to achieve accurate evaluation of the quality of pollen images.

[0007] The present invention provides an image quality evaluation method, comprising:

[0008] Acquiring an image to be detected including pollen grains;

[0009] Calculating a first quality score of the image to be detected;

[0010] Determining the pollen particles in the image to be detected;

[0011] Based on the pollen particles, segment the image to be detected to obtain at least one target detection image;

[0012] Calculating a second quality score corresponding to the at least one target detection image;

[0013] The quality of the image to be detected is evaluated based on the first quality score and the second quality score.

[0014] According to an image quality evaluation method provided by the present invention, the step of calculating the first quality score of the image to be detected includes:

[0015] Inputting the image to be detected into an image quality assessment model, and outputting the first quality score through the image quality assessment model;

[0016] The image quality assessment model is trained based on the sample image to be detected including the pollen particles and the corresponding sample quality score. The sample quality score is predetermined based on the sample image to be detected and corresponds one-to-one to the sample image to be detected.

[0017] According to an image quality evaluation method provided by the present invention, the step of determining the pollen particles in the image to be detected includes:

[0018] Performing a first preprocessing operation on the image to be detected to obtain a first image, wherein the first preprocessing operation includes: image smoothing processing and image blurring processing;

[0019] Performing a color space conversion operation on the first image to obtain a second image in HSV format;

[0020] Performing a second preprocessing operation on the second image to obtain a third image, wherein the second preprocessing operation includes: image binarization, image opening operation, and image closing operation;

[0021] The pollen grains in the third image are determined.

[0022] According to an image quality evaluation method provided by the present invention, before determining the pollen particles in the third image, the method further includes:

[0023] extracting contour information from the third image;

[0024] Based on the preset contour information, the extracted contour information is screened to obtain the contour information of the pollen particle;

[0025] The determining the pollen grains in the third image includes:

[0026] Determining the pollen grain based on the profile information of the pollen grain;

[0027] The step of segmenting the image to be detected based on the pollen particles to obtain at least one target detection image includes:

[0028] Based on the contour information of the pollen grain, draw at least one minimum bounding rectangle, wherein one of the minimum bounding rectangles includes one of the pollen grains;

[0029] The third image is segmented based on the minimum circumscribed rectangle to obtain at least one target detection image.

[0030] According to an image quality assessment method provided by the present invention, the calculating of a second quality score corresponding to the at least one target detection image includes:

[0031] detecting impurities in the at least one target detection image, and filtering the detected impurities to obtain at least one fourth image;

[0032] For each of the fourth images, the following processing is performed:

[0033] Locating the contour information and texture information of the pollen grains in the fourth image; highlighting the contour information and the texture information to obtain a fifth image; obtaining a first number of pixels highlighted in the fifth image and a second number of all pixels in the fifth image; determining a first weight of the target detection image based on the first number and the second number; inputting the target detection image into the image quality assessment model and outputting a third quality score;

[0034] The second quality score corresponding to the at least one object detection image is calculated based on each of the first weights and the corresponding third quality score.

[0035] According to an image quality evaluation method provided by the present invention, the quality of the image to be detected is evaluated based on the first quality score and the second quality score, including:

[0036] Calculating a first area of ​​the at least one target detection image and a second area of ​​the image to be detected;

[0037] Determining a second weight of the first mass fraction according to a ratio of the first area to the second area;

[0038] Determining a third weight of the second quality score based on a preset weight and the second weight;

[0039] The quality of the to-be-detected image is evaluated based on the second weight, the first quality score, the third weight, and the second quality score.

[0040] According to an image quality evaluation method provided by the present invention, the step of acquiring an image to be detected including pollen particles comprises:

[0041] Get the original image;

[0042] Based on a preset size, segment the original image to obtain at least two images to be processed;

[0043] Classification processing is performed on the at least two images to be processed to obtain the image to be detected.

[0044] The present invention also provides an image quality evaluation device, comprising:

[0045] An acquisition module, used for acquiring an image to be detected including pollen particles;

[0046] A first calculation module, used to calculate a first quality score of the image to be detected;

[0047] A determination module, used for determining the pollen particles in the image to be detected;

[0048] A segmentation module, used for segmenting the image to be detected based on the pollen particles to obtain at least one target detection image;

[0049] A second calculation module, used to calculate a second quality score corresponding to the at least one target detection image;

[0050] An evaluation module is used to evaluate the quality of the image to be detected based on the first quality score and the second quality score.

[0051] The present invention also provides an electronic device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the program, the steps of any of the above-described image quality evaluation methods are implemented.

[0052] The present invention also provides a non-transitory computer-readable storage medium on which a computer program is stored. When the computer program is executed by a processor, the steps of any of the above-mentioned image quality assessment methods are implemented.

[0053] The image quality evaluation method, device, equipment and storage medium provided by the present invention obtain an image to be detected including pollen particles, and calculate the first quality score of the image to be detected. It can be seen that the present invention calculates the first quality score of the image to be detected from the global perspective of the image to be detected; then, the pollen particles in the image to be detected are determined, and the image to be detected is segmented based on the pollen particles to obtain at least one target detection image, and the second quality score corresponding to the at least one target detection image is calculated. It can be seen that the present invention segments the image to be detected by pollen particles to obtain multiple target detection images, and calculates the second quality score of the target detection image from the local perspective of the image to be detected. Finally, based on the first quality score and the second quality score, the quality of the image to be detected is evaluated. It can be seen that the present invention adopts a combination of global perspective and local perspective to evaluate the quality of the image to be detected, which solves the problem that the prior art evaluates the quality of the image only based on the global perspective, resulting in inaccurate image quality evaluation results. In addition, the present invention evaluates the quality of the image to be detected by the local perspective, which has the effect of paying more attention to the quality of the pollen particles, and the evaluation result obtained is more accurate than that of only considering the overall image. BRIEF DESCRIPTION OF THE DRAWINGS

[0054] In order to more clearly illustrate the technical solutions in the present invention or the prior art, the following briefly introduces the drawings required for use in the embodiments or the description of the prior art. Obviously, the drawings described below are some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.

[0055] Figure 1 This is one of the flow charts of the picture quality evaluation method provided by the present invention;

[0056] Figure 2 This is the second flow chart of the picture quality evaluation method provided by the present invention;

[0057] Figure 3 This is the third flow chart of the picture quality evaluation method provided by the present invention;

[0058] Figure 4 is a schematic diagram of an image to be detected provided by the present invention;

[0059] Figure 5 This is the fourth flow chart of the picture quality evaluation method provided by the present invention;

[0060] Figure 6 This is the fifth flow chart of the picture quality evaluation method provided by the present invention;

[0061] Figure 7 It is a structural schematic diagram of the image quality evaluation device provided by the present invention;

[0062] Figure 8 It is a structural schematic diagram of the electronic device provided by the present invention. DETAILED DESCRIPTION

[0063] In order to make the purpose, technical solution and advantages of the present invention clearer, the technical solution of the present invention will be clearly and completely described below in conjunction with the drawings of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.

[0064] Combine the following Figure 1-Figure 6 The image quality evaluation method of the present invention is described.

[0065] The embodiment of the present invention provides an image quality evaluation method, which can be applied to smart terminals, such as mobile phones, computers, tablets, etc., and can also be applied to servers. Below, the method is applied to a server as an example for explanation, but it should be noted that it is only an example and is not used to limit the scope of protection of the present invention. Some other descriptions in the embodiments of the present invention are also examples and are not used to limit the scope of protection of the present invention, and will not be described one by one. The specific implementation of the method is as follows Figure 1 As shown:

[0066] Step 101: Acquire an image to be detected including pollen particles.

[0067] In a specific embodiment, the specific implementation of obtaining the image to be detected including pollen particles is as follows: Figure 2 As shown:

[0068] Step 201, obtaining an original image.

[0069] Specifically, an optical microscope is used to obtain an original image including pollen grains, for example, a digital slide scanner is used to obtain the original image.

[0070] Step 202: segment the original image based on a preset size to obtain at least two images to be processed.

[0071] Specifically, the image size obtained by using a digital slice scanner is very large, and the size of the original image is usually larger than 20,000*20,000 pixels. However, the oversized original image is very unfavorable for model training and prediction. Among them, the diameter of pollen particles is usually 50 pixels to 120 pixels, and pollen particles are very sparse in the original image. Therefore, the original image needs to be segmented to obtain the optimal size of the image to be processed.

[0072] The preset size may be 512*512 pixels, which is obtained through multiple experiments and can retain as many pollen particles as possible, reduce information loss of the original image, and facilitate program processing.

[0073] Step 203: classify at least two images to be processed to obtain an image to be detected.

[0074] Specifically, after the original image is cropped, the image to be processed is subjected to binary classification to obtain an image to be detected including pollen particles. For example, a pre-trained image screening model is used to remove invalid images to be processed to obtain an image to be detected. The image screening model may be a classification model (AlexNet), which is easy to train and has a higher image screening accuracy, and can achieve a good balance between speed and accuracy.

[0075] Step 102: Calculate a first quality score of the image to be detected.

[0076] In a specific embodiment, after obtaining the image to be detected, the image to be detected is input into an image quality assessment model, and a first quality score is output by the image quality assessment model; wherein the image quality assessment model is trained based on a sample image to be detected including pollen particles and a corresponding sample quality score, and the sample quality score is predetermined based on the sample image to be detected and corresponds one-to-one to the sample image to be detected.

[0077] Specifically, the image quality assessment module may be an image quality assessment model based on natural scene statistics (NSS for short), wherein NSS may estimate the quality of an image by extracting image features. For example, a BRISQUE quality assessment method based on an NSS model may be used, wherein after the image to be detected is input into the BRISQUE model, the specific implementation inside the BRISQUE model is as follows:

[0078] Step 1: Calculate the correlation coefficient of the image to be detected.

[0079] The local normalized brightness coefficient (MSCN) of the image to be detected is calculated by formula (1).

[0080]

[0081] For example, a 3×3 image block is used as the current local area, I(m,n) represents the brightness of the central pixel of the current local area, μ represents the mean of the current local area, σ represents the variance of the current local area, and C=1 is a constant to prevent the denominator from being zero.

[0082] Calculate the adjacent inner product of MSCN. Specifically, use formulas (2), (3), (4), and (5) in sequence to calculate the inner product of adjacent coefficient values ​​of MSCN in the horizontal, vertical, main diagonal, and secondary diagonal directions.

[0083]

[0084] Step 2: Extract image features of the image to be detected.

[0085] First, the generalized Gaussian model (GGD) is used to estimate the empirical distribution between the MSCN of the distorted image and the MSCN of the original image according to formula (6).

[0086]

[0087] Among them, α controls the shape of the distribution, σ controls the variance of the distribution, β is a function of α and σ, x is a variable, and the final estimated parameter is (α, σ). Therefore, two image intensity features can be extracted.

[0088] Then, the inner product of adjacent coefficients is estimated using the asymmetric generalized Gaussian model (AGGD) according to equations (7) and (8).

[0089]

[0090] where v controls the shape of the distribution, and They are used to control the distribution on both sides of the Gaussian model. The parameters for the best AGGD fitting effect are Four features are obtained in each direction, so 16 structural features of the image can be extracted.

[0091] Finally, the image to be detected is downsampled using bilinear interpolation to reduce the image to half of its original size, and the same process of extracting image features of the image to be detected is repeated to perform dual-scale parameter estimation. Finally, we obtain 36 feature vectors of the image to be detected.

[0092] Step 3: Obtain a first quality score of the image to be detected.

[0093] The obtained 36 feature vectors are input into the pre-trained regression model to predict the first quality score. The prediction can be made using formula (9):

[0094] S global =IQAR(I) (9)

[0095] Among them, S global represents the first quality score, and I represents 36 eigenvectors.

[0096] Step 103: determine the pollen particles in the image to be detected.

[0097] In a specific embodiment, determining the pollen particles in the image to be detected is specifically implemented as follows: Figure 3 As shown:

[0098] Step 301: perform a first preprocessing operation on the image to be detected to obtain a first image.

[0099] Wherein, the first preprocessing operation includes: image smoothing processing and image blurring processing;

[0100] Specifically, the image to be detected is smoothed by using the OpenCV implementation of the mean shift algorithm to reduce the noise points in the image to be detected and remove the sharp points. Then, a Gaussian blur with a kernel of 11×11 is applied to the image to be detected after image smoothing to blur the artifacts in the background and achieve the effect of removing noise.

[0101] Step 302: Perform a color space conversion operation on the first image to obtain a second image in HSV format.

[0102] Specifically, in order to avoid the threshold division problem caused by the high dispersion and high correlation of the RGB model, the function in OpenCV is used to convert the RGB image into an HSV image.

[0103] Step 303: Perform a second preprocessing operation on the second image to obtain a third image.

[0104] The second preprocessing operation includes: image binarization, image opening operation and image closing operation;

[0105] Specifically, in order to facilitate the extraction of pollen particles in the image to be detected, a binarization operation is used to separate the pollen particles from the background. Specifically, the second image is binarized using the maximum inter-class variance method (Otsu) according to formula (10).

[0106] I binary = {I HSV (i,j)|(H min ≤I H (i,j)≤H max )∩(S min ≤

[0107] I S (i,j)≤S max )∩(V min ≤I V (i,j)≤V max )} (10)

[0108] Where i∈{1,2,…,M},j∈{1,2,…,N}, M and N are the width and height of the second image respectively. min ,H max ,S min ,S max ,V min ,V max They represent the thresholds of the H channel, S channel, and V channel when binarizing the image.

[0109] Furthermore, in order to reduce the noise generated by the above-mentioned image binarization, we perform secondary denoising on the second image, that is, use the method in OpenCV to perform image closing operations with a kernel of 30×30 and image opening operations with a kernel of 10×10 on the second image after the image binarization processing.

[0110] Step 304: determine the pollen grains in the third image.

[0111] In a specific embodiment, before determining the pollen grains in the third image, contour information in the third image is extracted; based on preset contour information, the extracted contour information is filtered to obtain contour information of the pollen grains; finally, the pollen grains are determined based on the contour information of the pollen grains.

[0112] Specifically, the contour information of pollen particles is extracted using OpenCV. According to the diameter of pollen particles, the contour information corresponding to the diameter less than 50 pixels is removed. Specifically, Figure 4 As shown, the image to be detected includes some other elements besides pollen grains, such as bubbles, impurities, etc.

[0113] Step 104: segment the image to be detected based on the pollen particles to obtain at least one target detection image.

[0114] In a specific embodiment, at least one minimum bounding rectangle is drawn based on the contour information of the pollen grain, wherein a minimum bounding rectangle includes a pollen grain; based on the minimum bounding rectangle, the third image is segmented to obtain at least one target detection image.

[0115] Among them, multiple target detection images constitute a coarse-grained pollen grain image set.

[0116] Step 105: Calculate a second quality score corresponding to at least one target detection image.

[0117] In a specific embodiment, the specific implementation of calculating the second quality score is as follows: Figure 5 As shown:

[0118] Step 501 , detecting impurities in at least one target detection image, and filtering the detected impurities to obtain at least one fourth image.

[0119] Specifically, there may be impurities in the target detection image, so the impurities need to be detected and filtered out so that each target detection image only includes pollen particles, that is, the fourth image.

[0120] Step 502, for each fourth image, perform the following processing: locate the contour information and texture information of the pollen particles in the fourth image; highlight the contour information and texture information to obtain a fifth image; obtain a first number of highlighted pixels in the fifth image and a second number of all pixels in the fifth image; determine a first weight of the target detection image based on the first number and the second number; input the target detection image into the image quality assessment model, and output a third quality score through the image quality model.

[0121] Specifically, first, a deep screening network is used to filter out impurity images in a coarse-grained pollen grain image set to obtain a fine-grained pollen grain image set. The deep screening network may be an AlexNet model.

[0122] Furthermore, the pollen area is located using a weakly supervised localization network, and then the fifth image is obtained according to formula (11).

[0123]

[0124] Among them, n means that the last convolutional layer of the AlexNet network has n feature maps, F i refers to the i-th feature map, a i Refers to the weight of the i-th feature map.

[0125] Then, based on the fifth image, score weights are calculated for the Q pollen grains according to formula (12), where one target detection image corresponds to one pollen grain, and Q target detection images correspond to Q pollen grains.

[0126]

[0127] Among them, α q represents the weight of the qth pollen particle, P cam represents the first number of pixels highlighted in the fifth image, W q and H q Respectively represent the number of pixels of the width and height of the qth fifth image, W q ×H q A second number representing all pixels in the fifth image.

[0128] Then, to ensure that the range of local and global quality scores is consistent, we perform secondary processing on the score weight of each pollen grain according to formula (13) so that the sum of Q weights is 1.

[0129]

[0130] Finally, based on formula (14), the target detection image is input into the image quality assessment model to obtain the third quality score.

[0131] S q =IQAR(I q ),1≤q≤Q (14)

[0132] Among them, q represents the qth target detection image.

[0133] Step 503: Calculate a second quality score corresponding to at least one target detection image based on each first weight and the corresponding third quality score.

[0134] Specifically, the quality scores of all target detection images are weighted and summed to obtain the second quality score. The second quality score S under the local perspective is calculated according to formula (15): local .

[0135]

[0136] Step 106: Evaluate the quality of the image to be detected based on the first quality score and the second quality score.

[0137] Specifically, a final quality score is obtained based on the first quality score and the second quality score, and the quality of the image to be detected is evaluated using the final quality score.

[0138] In a specific embodiment, based on the first quality score and the second quality score, the specific implementation of evaluating the quality of the image to be detected is as follows: Figure 6 As shown:

[0139] Step 601, calculating a first area of ​​at least one target detection image and a second area of ​​an image to be detected.

[0140] Step 602: Determine a second weight of the first mass fraction according to the ratio of the first area to the second area.

[0141] Specifically, the second weight of the first mass fraction is calculated according to the first area and the second area using formula (16).

[0142]

[0143] Among them, W i and H i They represent the width and height of the i-th target detection image, and W and H represent the width and height of the image to be detected, respectively.

[0144] Step 603: Determine a third weight of the second quality score based on the preset weight and the second weight.

[0145] Specifically, to ensure the mutual influence and constraint relationship between the first quality score and the second quality score, different control strengths are given according to different image contents. We make the sum of the weights of the first quality score and the second quality score equal to 1. Therefore, the third weight of the second quality score is obtained by formula (17):

[0146] λ2=1-λ1 (17)

[0147] Step 604: Evaluate the quality of the image to be detected based on the second weight, the first quality score, the third weight, and the second quality score.

[0148] Specifically, the first quality score and the second quality score are weightedly summed using formula (18) to obtain the final quality score.

[0149] S=λ1S global +λ2S local (18)

[0150] Among them, λ1 and λ2 can better control the influence of the first mass score and the second mass score on the final mass score, so that global information and local information constrain each other, and suppress the influence of useless information in the image to be detected on the final result. Specifically, if the number of pollen grains extracted from an image to be detected is small, the corresponding λ1 becomes smaller, then the second weight of the first mass score decreases, and the third weight of the second mass score increases, thereby reducing the influence of the first mass score on the final mass score, increasing the influence of the second mass score, suppressing the influence of useless information such as background and impurities in the image to be detected, and making the final mass score more accurate.

[0151] The image quality evaluation method, device, equipment and storage medium provided by the present invention obtain an image to be detected including pollen particles, and calculate the first quality score of the image to be detected. It can be seen that the present invention calculates the first quality score of the image to be detected from the global perspective of the image to be detected; then, the pollen particles in the image to be detected are determined, and the image to be detected is segmented based on the pollen particles to obtain at least one target detection image, and the second quality score corresponding to the at least one target detection image is calculated. It can be seen that the present invention segments the image to be detected by pollen particles to obtain multiple target detection images, and calculates the second quality score of the target detection image from the local perspective of the image to be detected. Finally, based on the first quality score and the second quality score, the quality of the image to be detected is evaluated. It can be seen that the present invention adopts a combination of global perspective and local perspective to evaluate the quality of the image to be detected, which solves the problem that the prior art evaluates the quality of the image only based on the global perspective, resulting in inaccurate image quality evaluation results. In addition, the present invention evaluates the quality of the image to be detected by the local perspective, which has the effect of paying more attention to the quality of the pollen particles, and the evaluation result obtained is more accurate than that of only considering the overall image.

[0152] The image quality evaluation device provided by the present invention is described below. The image quality evaluation device described below and the image quality evaluation method described above can be referred to each other. Figure 7 As shown:

[0153] An acquisition module 701 is used to acquire an image to be detected including pollen particles;

[0154] A first calculation module 702, used to calculate a first quality score of the image to be detected;

[0155] A determination module 703 is used to determine pollen particles in the image to be detected;

[0156] A segmentation module 704 is used to segment the image to be detected based on pollen particles to obtain at least one target detection image;

[0157] A second calculation module 705, configured to calculate a second quality score corresponding to at least one target detection image;

[0158] The evaluation module 706 is used to evaluate the quality of the image to be detected based on the first quality score and the second quality score.

[0159] In a specific embodiment, the first calculation module 702 is specifically used to input the image to be detected into an image quality assessment model, and output a first quality score through the image quality assessment model; wherein the image quality assessment model is trained based on the sample image to be detected including pollen particles and the corresponding sample quality score, and the sample quality score is predetermined based on the sample image to be detected and corresponds one-to-one to the sample image to be detected.

[0160] In a specific embodiment, the determination module 703 is specifically used to perform a first preprocessing operation on the image to be detected to obtain a first image, and the first preprocessing operation includes: image smoothing and image blurring; performing a color space conversion operation on the first image to obtain a second image in HSV format; performing a second preprocessing operation on the second image to obtain a third image, and the second preprocessing operation includes: image binarization, image opening operation and image closing operation; and determining pollen particles in the third image.

[0161] In a specific embodiment, the determination module 703 is also used to extract contour information from the third image; based on the preset contour information, the extracted contour information is screened to obtain the contour information of the pollen particles; the determination module 703 is specifically used to determine the pollen particles based on the contour information of the pollen particles; the segmentation module 704 is specifically used to draw at least one minimum bounding rectangle based on the contour information of the pollen particles, wherein a minimum bounding rectangle includes a pollen grain; based on the minimum bounding rectangle, the third image is segmented to obtain at least one target detection image.

[0162] In a specific embodiment, the second computing module 705 is specifically used to detect impurities in at least one target detection image, and filter the detected impurities to obtain at least one fourth image; for each fourth image, perform the following processing: locate the contour information and texture information of the pollen particles in the fourth image; highlight the contour information and texture information to obtain a fifth image; obtain a first number of highlighted pixels in the fifth image, and a second number of all pixels in the fifth image; determine a first weight occupied by the target detection image based on the first number and the second number; input the target detection image into the image quality assessment model and output a third quality score; and calculate a second quality score corresponding to at least one target detection image based on each first weight and the corresponding third quality score.

[0163] In a specific embodiment, the evaluation module 706 is specifically used to calculate a first area of ​​at least one target detection image and a second area of ​​the image to be detected; determine a second weight of the first quality score based on the ratio of the first area to the second area; determine a third weight of the second quality score based on a preset weight and the second weight; and evaluate the quality of the image to be detected based on the second weight, the first quality score, the third weight and the second quality score.

[0164] In a specific embodiment, the acquisition module 701 is further used to acquire an original image; segment the original image based on a preset size to obtain at least two images to be processed; and classify the at least two images to be processed to obtain an image to be detected.

[0165] Figure 8An example of a physical structure diagram of an electronic device is shown in FIG. Figure 8 As shown, the electronic device may include: a processor 801, a communication interface 802, a memory 803 and a communication bus 804, wherein the processor 801, the communication interface 802 and the memory 803 communicate with each other through the communication bus 804. The processor 801 may call the logic instructions in the memory 803 to execute the image quality evaluation method, which includes: obtaining an image to be detected including pollen particles; calculating a first quality score of the image to be detected; determining pollen particles in the image to be detected; segmenting the image to be detected based on the pollen particles to obtain at least one target detection image; calculating a second quality score corresponding to the at least one target detection image; and evaluating the quality of the image to be detected based on the first quality score and the second quality score.

[0166] In addition, the logic instructions in the above-mentioned memory 803 can be implemented in the form of a software functional unit and can be stored in a computer-readable storage medium when it is sold or used as an independent product. Based on such an understanding, the technical solution of the present invention, in essence, or the part that contributes to the prior art or the part of the technical solution, can be embodied in the form of a software product, and the computer software product is stored in a storage medium, including several instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present invention. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), disk or optical disk and other media that can store program codes.

[0167] On the other hand, the present invention also provides a computer program product, which includes a computer program stored on a non-transitory computer-readable storage medium, and the computer program includes program instructions. When the program instructions are executed by a computer, the computer can execute the image quality evaluation method provided by the above-mentioned methods, and the method includes: obtaining an image to be detected including pollen particles; calculating a first quality score of the image to be detected; determining the pollen particles in the image to be detected; based on the pollen particles, segmenting the image to be detected to obtain at least one target detection image; calculating a second quality score corresponding to at least one target detection image; and evaluating the quality of the image to be detected based on the first quality score and the second quality score.

[0168] On the other hand, the present invention also provides a non-transitory computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, is implemented to perform the above-mentioned image quality evaluation methods, the methods comprising: acquiring an image to be detected including pollen particles; calculating a first quality score of the image to be detected; determining the pollen particles in the image to be detected; segmenting the image to be detected based on the pollen particles to obtain at least one target detection image; calculating a second quality score corresponding to the at least one target detection image; and evaluating the quality of the image to be detected based on the first quality score and the second quality score.

[0169] The device embodiments described above are merely illustrative, wherein the units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, they may be located in one place, or they may be distributed on multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the scheme of this embodiment. Ordinary technicians in this field can understand and implement it without paying creative labor.

[0170] Through the description of the above implementation methods, those skilled in the art can clearly understand that each implementation method can be implemented by means of software plus a necessary general hardware platform, and of course, it can also be implemented by hardware. Based on this understanding, the above technical solution is essentially or the part that contributes to the prior art 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 ROM / RAM, a disk, an optical disk, etc., including a number of instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to execute the methods described in each embodiment or some parts of the embodiments.

[0171] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit it. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present invention.

Claims

1. A method for evaluating image quality, characterized in that: include: Acquire an image to be detected including pollen particles; Calculating a first quality score of the image to be detected; Determining the pollen particles in the image to be detected; Based on the pollen particles, segment the image to be detected to obtain at least one target detection image; Calculating a second quality score corresponding to the at least one target detection image; Based on the first quality score and the second quality score, evaluating the quality of the image to be detected; The step of calculating a second quality score corresponding to the at least one target detection image includes: detecting impurities in the at least one target detection image, and filtering the detected impurities to obtain at least one fourth image; For each of the fourth images, the following processing is performed: Locating the contour information and texture information of the pollen grains in the fourth image; highlighting the contour information and the texture information to obtain a fifth image; obtaining a first number of pixels highlighted in the fifth image and a second number of all pixels in the fifth image; determining a first weight of the target detection image based on the first number and the second number; inputting the target detection image into an image quality assessment model and outputting a third quality score; Calculating the second quality score corresponding to the at least one target detection image based on each of the first weights and the corresponding third quality score; The step of evaluating the quality of the image to be detected based on the first quality score and the second quality score includes: Calculating a first area of ​​the at least one target detection image and a second area of ​​the image to be detected; Determining a second weight of the first mass fraction according to a ratio of the first area to the second area; Determining a third weight of the second quality score based on a preset weight and the second weight; The quality of the to-be-detected image is evaluated based on the second weight, the first quality score, the third weight, and the second quality score.

2. The image quality evaluation method according to claim 1, characterized in that: The calculating the first quality score of the image to be detected includes: Inputting the image to be detected into an image quality assessment model, and outputting the first quality score through the image quality assessment model; The image quality assessment model is trained based on the sample image to be detected including the pollen particles and the corresponding sample quality score. The sample quality score is predetermined based on the sample image to be detected and corresponds one-to-one to the sample image to be detected.

3. The image quality evaluation method according to claim 2, characterized in that: The step of determining the pollen particles in the image to be detected includes: Performing a first preprocessing operation on the image to be detected to obtain a first image, wherein the first preprocessing operation includes: image smoothing processing and image blurring processing; Performing a color space conversion operation on the first image to obtain a second image in HSV format; Performing a second preprocessing operation on the second image to obtain a third image, wherein the second preprocessing operation includes: image binarization, image opening operation, and image closing operation; The pollen grains in the third image are determined.

4. The image quality evaluation method according to claim 3, characterized in that: Before determining the pollen grains in the third image, the method further includes: extracting contour information from the third image; Based on the preset contour information, the extracted contour information is screened to obtain the contour information of the pollen particle; The determining the pollen grains in the third image includes: Determining the pollen grain based on the profile information of the pollen grain; The step of segmenting the image to be detected based on the pollen particles to obtain at least one target detection image includes: Based on the contour information of the pollen grain, draw at least one minimum bounding rectangle, wherein one of the minimum bounding rectangles includes one of the pollen grains; The third image is segmented based on the minimum circumscribed rectangle to obtain at least one target detection image.

5. The image quality evaluation method according to any one of claims 1 to 4, characterized in that: The step of acquiring the image to be detected including pollen particles comprises: Get the original image; Based on a preset size, segment the original image to obtain at least two images to be processed; Classification processing is performed on the at least two images to be processed to obtain the image to be detected.

6. An image quality evaluation device, characterized in that: include: An acquisition module, used for acquiring an image to be detected including pollen particles; A first calculation module, used to calculate a first quality score of the image to be detected; A determination module, used for determining the pollen particles in the image to be detected; A segmentation module, used for segmenting the image to be detected based on the pollen particles to obtain at least one target detection image; A second calculation module, used to calculate a second quality score corresponding to the at least one target detection image; An evaluation module, configured to evaluate the quality of the image to be detected based on the first quality score and the second quality score; The step of calculating a second quality score corresponding to the at least one target detection image includes: detecting impurities in the at least one target detection image, and filtering the detected impurities to obtain at least one fourth image; For each of the fourth images, the following processing is performed: Locating the contour information and texture information of the pollen grains in the fourth image; highlighting the contour information and the texture information to obtain a fifth image; obtaining a first number of pixels highlighted in the fifth image and a second number of all pixels in the fifth image; determining a first weight of the target detection image based on the first number and the second number; inputting the target detection image into an image quality assessment model and outputting a third quality score; Calculating the second quality score corresponding to the at least one target detection image based on each of the first weights and the corresponding third quality score; The step of evaluating the quality of the image to be detected based on the first quality score and the second quality score includes: Calculating a first area of ​​the at least one target detection image and a second area of ​​the image to be detected; Determining a second weight of the first mass fraction according to a ratio of the first area to the second area; Determining a third weight of the second quality score based on a preset weight and the second weight; The quality of the to-be-detected image is evaluated based on the second weight, the first quality score, the third weight, and the second quality score.

7. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein: When the processor executes the program, the steps of the image quality evaluation method according to any one of claims 1 to 5 are implemented.

8. A non-transitory computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the image quality assessment method according to any one of claims 1 to 5 are implemented.

Citation Information

Patent Citations

  • Image quality detection method and device based on deep neural networks

    CN108389182A

  • Image processing method and device, electronic equipment and storage medium

    CN111696083A