Image quality evaluation method and device, and lens blocking determination method

By performing blur processing and difference information analysis on the images from the monitoring system, and using grayscale histograms and singular value features to evaluate image quality, the blurring problem caused by the camera's protective film not being removed was solved, and the accurate detection of lens occlusion and the improvement of image clarity were achieved.

CN114359183BActive Publication Date: 2025-10-21ZHEJIANG DAHUA TECH CO LTD
View PDF 4 Cites 0 Cited by

Patent Information

Application Number
CN202111553475.X
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-12-17
Publication Date
2025-10-21
Estimated Expiration
2041-12-17

AI Technical Summary

Technical Problem

In video surveillance systems, image blurring caused by the failure to remove the protective film from camera lenses reduces the interpretability of the video and poses potential risks, which are difficult to detect and resolve effectively with existing technologies.

Method used

By blurring the original image, the difference between the blurred image and the original image is calculated. The image quality is evaluated using grayscale histogram similarity, singular value features, edge features, etc., to determine whether the lens is occluded.

Benefits of technology

It enables effective assessment of image blur in monitoring systems, accurately determines whether camera lenses are obstructed, avoids image blur caused by protective films, and improves video interpretability and security.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114359183B_ABST
    Figure CN114359183B_ABST
Patent Text Reader

Abstract

The application discloses an image quality evaluation method and device and a lens shielding determination method, which are used for carrying out blur detection on an image shot in a monitoring system, so as to determine whether a lens is shielded according to a blur degree, and avoid an image blur phenomenon caused by a protective film on a camera lens. The method comprises the following steps: carrying out blur processing on an original image to obtain a blurred image; and determining a quality evaluation value of the original image according to difference information of the blurred image and the original image.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of image processing, and in particular to an image quality assessment method and device, and a lens occlusion determination method. Background Art

[0002] With the widespread development of "Smart City" and "Safe City" initiatives in recent years, every city has installed numerous security cameras, generating a massive amount of video surveillance data. Because video surveillance systems typically operate over large areas and require long operating times, installers often forget to remove the protective film from camera lenses, resulting in degraded image quality. In practice, unremoved film can create blurring artifacts, reducing the interpretability of the video and potentially leading to unpredictable risks. Therefore, detecting blur in images captured by surveillance systems has become a pressing technical challenge. Summary of the Invention

[0003] The present invention provides an image quality assessment method and device, and a lens occlusion determination method, which are used to perform blur detection on images captured in a monitoring system, thereby determining whether the lens is blocked based on the degree of blur, and avoiding image blur caused by a protective film on the camera lens.

[0004] In a first aspect, an embodiment of the present invention provides a method for image quality assessment, the method comprising:

[0005] Perform blur processing on the original image to obtain a blurred image;

[0006] A quality evaluation value of the original image is determined according to difference information between the blurred image and the original image.

[0007] This embodiment can determine the blur degree of the original image based on the difference information between the original image and the blurred image obtained by blurring the original image, and thus determine whether the lens is blocked according to the blur degree, thereby avoiding image blur caused by the protective film on the camera lens.

[0008] As an optional implementation manner, determining the quality assessment value of the original image according to difference information between the blurred image and the original image includes:

[0009] Determining a first grayscale histogram of the original image and a second grayscale histogram of the blurred image;

[0010] A quality evaluation value of the original image is determined according to a similarity between the first grayscale histogram and the second grayscale histogram.

[0011] As an optional implementation, the method further includes:

[0012] determining at least one reference feature of the original image, wherein the reference feature is used to characterize texture information of the original image;

[0013] According to the at least one reference feature, a reference blur evaluation value of the original image corresponding to the at least one reference feature is determined.

[0014] As an optional implementation manner, after determining the reference blur evaluation value of the original image corresponding to the at least one reference feature according to the at least one reference feature, the method further includes:

[0015] The quality evaluation value is corrected according to the reference fuzzy evaluation value corresponding to the at least one reference feature to obtain a new quality evaluation value.

[0016] As an optional implementation manner, the correcting the quality assessment value according to the reference fuzzy assessment value corresponding to the at least one reference feature to obtain a new quality assessment value includes:

[0017] The target weight corresponding to the quality evaluation value and the reference weights corresponding to the reference fuzzy evaluation values ​​are used to perform a weighted summation on the quality evaluation value and the reference fuzzy evaluation values ​​to obtain the new quality evaluation value.

[0018] As an optional implementation manner, the target weight and the reference weight are determined according to texture features of the original image.

[0019] As an optional implementation manner, the reference feature includes a singular value feature, and determining at least one reference feature of the original image and determining, based on the at least one reference feature, a reference blur evaluation value of the original image corresponding to the at least one reference feature includes:

[0020] Determining a singular value sequence corresponding to the original image according to a singular value decomposition method, wherein a plurality of singular values ​​in the singular value sequence are arranged in a preset order;

[0021] Calculating a first sum of at least one target singular value and a second sum of the singular values ​​in the singular value sequence, wherein the target singular value is a singular value in a preset arrangement order in the singular value sequence;

[0022] The ratio of the first sum to the second sum is determined as a reference fuzzy evaluation value corresponding to the singular value feature.

[0023] As an optional implementation manner, the reference feature includes an edge feature, and determining at least one reference feature of the original image and determining, based on the at least one reference feature, a reference blur evaluation value of the original image corresponding to the at least one reference feature includes:

[0024] Determining edge features of the original image according to an edge detection method, and determining texture feature values ​​of the original image according to the edge features;

[0025] The texture feature value is determined as a reference blur evaluation value corresponding to the edge feature.

[0026] In a second aspect, an embodiment of the present invention provides a method for determining lens occlusion, the method comprising:

[0027] Determine N frames of original images according to N frames of images captured by the camera device within a preset time period;

[0028] Obtaining quality assessment values ​​corresponding to the N frames of original images respectively through the image quality assessment method described in the first aspect;

[0029] According to the obtained N quality evaluation values, it is determined whether the lens of the camera device is blocked within the preset time period.

[0030] As an optional implementation manner, determining whether the lens of the camera device is blocked within the preset period according to the obtained N quality evaluation values ​​includes:

[0031] It is determined whether the lens of the camera device is blocked within the preset period according to an average of the N quality evaluation values.

[0032] In a third aspect, an embodiment of the present invention further provides a device for evaluating the blur level of an image, the device comprising a processor and a memory, the memory being configured to store a program executable by the processor, the processor being configured to read the program in the memory and perform the following steps:

[0033] Perform blur processing on the original image to obtain a blurred image;

[0034] A quality evaluation value of the original image is determined according to difference information between the blurred image and the original image.

[0035] As an optional implementation, the processor is specifically configured to execute:

[0036] Determining a first grayscale histogram of the original image and a second grayscale histogram of the blurred image;

[0037] A quality evaluation value of the original image is determined according to a similarity between the first grayscale histogram and the second grayscale histogram.

[0038] As an optional implementation manner, the processor is further configured to execute:

[0039] determining at least one reference feature of the original image, wherein the reference feature is used to characterize texture information of the original image;

[0040] According to the at least one reference feature, a reference blur evaluation value of the original image corresponding to the at least one reference feature is determined.

[0041] As an optional implementation manner, after determining, based on the at least one reference feature, the reference blur evaluation value of the original image corresponding to the at least one reference feature, the processor is further configured to execute:

[0042] The quality evaluation value is corrected according to the reference fuzzy evaluation value corresponding to the at least one reference feature to obtain a new quality evaluation value.

[0043] As an optional implementation, the processor is specifically configured to execute:

[0044] The target weight corresponding to the quality evaluation value and the reference weights corresponding to the reference fuzzy evaluation values ​​are used to perform a weighted summation on the quality evaluation value and the reference fuzzy evaluation values ​​to obtain the new quality evaluation value.

[0045] As an optional implementation manner, the target weight and the reference weight are determined according to texture features of the original image.

[0046] As an optional implementation manner, the reference feature includes a singular value feature, and the processor is specifically configured to execute:

[0047] Determining a singular value sequence corresponding to the original image according to a singular value decomposition method, wherein a plurality of singular values ​​in the singular value sequence are arranged in a preset order;

[0048] Calculating a first sum of at least one target singular value and a second sum of the singular values ​​in the singular value sequence, wherein the target singular value is a singular value in a preset arrangement order in the singular value sequence;

[0049] The ratio of the first sum to the second sum is determined as a reference fuzzy evaluation value corresponding to the singular value feature.

[0050] As an optional implementation manner, the reference feature includes an edge feature, and the processor is specifically configured to execute:

[0051] Determining edge features of the original image according to an edge detection method, and determining texture feature values ​​of the original image according to the edge features;

[0052] The texture feature value is determined as a reference blur evaluation value corresponding to the edge feature.

[0053] In a fourth aspect, an embodiment of the present invention further provides a device for evaluating the blur level of an image, the device comprising:

[0054] A blur processing unit, used for blurring the original image to obtain a blurred image;

[0055] The difference evaluation unit is configured to determine a quality evaluation value of the original image according to difference information between the blurred image and the original image.

[0056] As an optional implementation manner, the difference assessment unit is specifically configured to:

[0057] Determining a first grayscale histogram of the original image and a second grayscale histogram of the blurred image;

[0058] A quality evaluation value of the original image is determined according to a similarity between the first grayscale histogram and the second grayscale histogram.

[0059] As an optional embodiment, the system further includes a reference evaluation unit for:

[0060] determining at least one reference feature of the original image, wherein the reference feature is used to characterize texture information of the original image;

[0061] According to the at least one reference feature, a reference blur evaluation value of the original image corresponding to the at least one reference feature is determined.

[0062] As an optional embodiment, after determining the reference blur evaluation value of the original image corresponding to the at least one reference feature based on the at least one reference feature, the method further includes a blur correction unit specifically configured to:

[0063] The quality evaluation value is corrected according to the reference fuzzy evaluation value corresponding to the at least one reference feature to obtain a new quality evaluation value.

[0064] As an optional implementation manner, the blur correction unit is specifically configured to:

[0065] The target weight corresponding to the quality evaluation value and the reference weights corresponding to the reference fuzzy evaluation values ​​are used to perform a weighted summation on the quality evaluation value and the reference fuzzy evaluation values ​​to obtain the new quality evaluation value.

[0066] As an optional implementation manner, the target weight and the reference weight are determined according to texture features of the original image.

[0067] As an optional implementation manner, the reference feature includes a singular value feature, and the reference evaluation unit is specifically configured to:

[0068] Determining a singular value sequence corresponding to the original image according to a singular value decomposition method, wherein a plurality of singular values ​​in the singular value sequence are arranged in a preset order;

[0069] Calculating a first sum of at least one target singular value and a second sum of the singular values ​​in the singular value sequence, wherein the target singular value is a singular value in a preset arrangement order in the singular value sequence;

[0070] The ratio of the first sum to the second sum is determined as a reference fuzzy evaluation value corresponding to the singular value feature.

[0071] As an optional implementation manner, the reference feature includes an edge feature, and the reference evaluation unit is specifically configured to:

[0072] Determining edge features of the original image according to an edge detection method, and determining texture feature values ​​of the original image according to the edge features;

[0073] The texture feature value is determined as a reference blur evaluation value corresponding to the edge feature.

[0074] In a fifth aspect, an embodiment of the present invention further provides a computer storage medium on which a computer program is stored, and when the program is executed by a processor, it is used to implement the steps of the method described in the first aspect above.

[0075] These and other aspects of the present application will be more clearly understood in the description of the following embodiments. BRIEF DESCRIPTION OF THE DRAWINGS

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

[0077] Figure 1 A flowchart of an implementation method of an image quality assessment method provided by an embodiment of the present invention;

[0078] Figure 2 A complete quality assessment method implementation flow chart provided by an embodiment of the present invention;

[0079] Figure 3 A flowchart of a method for determining lens occlusion provided by an embodiment of the present invention;

[0080] Figure 4 A schematic diagram of an image quality assessment device provided by an embodiment of the present invention;

[0081] Figure 5 A schematic diagram of an image quality assessment device provided by an embodiment of the present invention. DETAILED DESCRIPTION

[0082] To make the objectives, technical solutions, and advantages of the present invention more apparent, the present invention will be further described in detail below with reference to the accompanying drawings. It is apparent that the embodiments described are only some, not all, of the present invention. All other embodiments derived by persons of ordinary skill in the art based on the embodiments of the present invention without creative effort are intended to fall within the scope of protection of the present invention.

[0083] In embodiments of the present invention, the term "and / or" describes the association relationship between associated objects, indicating that three possible relationships exist. For example, "A and / or B" can represent three situations: A exists alone, A and B exist simultaneously, and B exists alone. The character " / " generally indicates that the associated objects are in an "or" relationship.

[0084] The application scenarios described in the embodiments of the present invention are intended to more clearly illustrate the technical solutions of the embodiments of the present invention and do not constitute a limitation on the technical solutions provided by the embodiments of the present invention. Persons skilled in the art will appreciate that as new application scenarios emerge, the technical solutions provided by the embodiments of the present invention will also be applicable to similar technical problems. In the description of the present invention, unless otherwise specified, "multiple" means two or more.

[0085] With the widespread implementation of "Smart City" and "Safe City" initiatives across China in recent years, numerous security cameras have been installed in every city, generating a massive amount of video surveillance data. Efficiently analyzing this data has become a pressing challenge. Manually evaluating and analyzing such a large amount of data is impractical, not only resulting in a significant waste of manpower but also incurring high costs. Automatic detection algorithms for camera lens film retention can significantly address this issue. Because video surveillance systems often operate over large areas and require long operating hours, installers often forget to remove the film from camera lenses, resulting in degraded image quality. In practice, the resulting blurring not only reduces video interpretability but also creates unpredictable potential risks. Therefore, detecting film retention in surveillance systems is crucial.

[0086] The most notable sign of interference in surveillance videos caused by an untorn protective film on a camera lens is noticeable blurring and the loss of significant texture detail. Therefore, the presence of untorn protective film can be determined by assessing image clarity and texture detail. However, due to the complexity of real-world scenes and interference from foreground elements, detecting untorn protective film in surveillance videos presents several difficulties: 1) The image blur caused by untorn protective film is relatively subtle, sometimes difficult to detect with the naked eye; 2) Normal, lossless surveillance videos can produce similar blurring in certain situations; and 3) Complex image textures can significantly impact the detection of blurring interference caused by untorn protective film in surveillance videos.

[0087] Example 1: In order to solve the problem of whether there is a protective film on the camera of the current camera equipment, this example proposes an image quality assessment method, which is applied to various image blur assessment scenarios. It can effectively evaluate the blur degree of the image captured by the protective film on the camera lens in the monitoring system, and thus determine whether the lens is blocked according to the blur degree, thereby avoiding the image blur phenomenon caused by the protective film on the camera lens.

[0088] This embodiment provides an image quality assessment method whose core concept is to determine the blurriness of the original image by using the degree of difference between the blurred image and the original image. The principle of implementation is that since a clear image has richer texture details than a blurred image, the grayscale value of the clear image in a small local area may vary greatly. Therefore, the clear image will undergo a large change before and after the blurring operation is applied. On the other hand, the local small area of ​​the blurred image will be smoother, which is reflected in the smaller change in grayscale value. Therefore, the difference between the blurred image before and after the blurring operation is applied will be smaller. Therefore, this embodiment can determine the blurriness of the original image based on the degree of difference between the original image and the blurred image obtained by blurring the original image.

[0089] like Figure 1 As shown, the implementation process of an image quality assessment method provided by this embodiment is as follows:

[0090] Step 100: blurring the original image to obtain a blurred image;

[0091] The original image is determined based on the captured frame image;

[0092] In some embodiments, the original image in this embodiment is a grayscale image of a frame image obtained by grayscale extraction of the captured frame image. Alternatively, the original image can be a Y channel image obtained by grayscale extraction of the captured frame image.

[0093] In some embodiments, before grayscale extraction is performed on the captured frame image, the present embodiment may further perform denoising on the captured frame image to remove noise in the frame image to prevent the noise from significantly affecting the subsequent blur estimation algorithm. In implementation, Gaussian filtering may be used to remove noise in the frame image, that is, Gaussian filtering is performed on the captured frame image to obtain a denoised frame image. The denoised frame image is then used for grayscale extraction.

[0094] In some embodiments, after grayscale extraction is performed on the captured frame image, the obtained grayscale image or Y channel image can also be denoised to avoid the noise from having a significant impact on the subsequent blur evaluation algorithm. During implementation, Gaussian filtering can be used to remove noise from the frame image, that is, Gaussian filtering is performed on the captured frame image to obtain a denoised Y channel image, and then the denoised Y channel image is used as the original image for blur degree evaluation.

[0095] In some embodiments, the original image in this embodiment is at least one of a grayscale image, a gradient image, and a frame difference image. The specific image can be determined based on actual needs and is not limited in this embodiment. Among them, the grayscale image is obtained by grayscale conversion of the captured frame image, the gradient image is obtained by gradient calculation of the captured frame image, and the frame difference image is obtained by frame difference processing of adjacent captured frame images.

[0096] In some embodiments, the mathematical expression for blurring an image is as follows:

[0097]

[0098] Among them, y is the blurred image, x is the original image, k is the blur kernel, and n is random noise.

[0099] During implementation, different blurring methods can be selected based on actual conditions, specifically by selecting different blur kernels. For example, a blur kernel with an all-one matrix can be selected, resulting in a mean blurring method. Alternatively, a Gaussian blur can be used. Specifically, the pixel values ​​of any pixel in the original image within a 4- or 8-neighborhood are weighted averaged according to a Gaussian curve to remove details from the original image, blurring it. The mathematical form of the Gaussian blur function is as follows:

[0100]

[0101] Where k(h, v) represents the blur kernel; σ is the standard deviation, a configurable parameter; h and v represent the row and column coordinates (i.e., relative coordinates) of the pixel in the surrounding area of ​​any pixel. For example, the relative coordinates of the pixel (0, 0) in the 8-dimensional area are shown in the following table:

[0102] (-1,1) (0,1) (1,1) (-1,0) (0,0) (1,0) (-1,-1) (0,-1) (1,-1)

[0103] Step 101: Determine a quality evaluation value of the original image according to difference information between the blurred image and the original image.

[0104] The quality evaluation value in this embodiment is used to evaluate the blurriness of the original image.

[0105] In some embodiments, after obtaining the blurred image, the histogram similarity method can be used to evaluate the difference between the image before and after blurring (difference information). In implementation, the quality evaluation value can be determined as follows:

[0106] Determine a first grayscale histogram of the original image and a second grayscale histogram of the blurred image; wherein, the original image is grayscale processed to obtain a grayscale map of the original image, and the number of pixels corresponding to different grayscale levels in the grayscale map of the original image is counted to obtain a first grayscale histogram; similarly, the blurred image is grayscale processed to obtain a grayscale map of the blurred image, and the number of pixels corresponding to different grayscale levels in the grayscale map of the blurred image is counted to obtain a second grayscale histogram; it should be noted that the horizontal axis in the grayscale histogram represents the grayscale level, and the vertical axis represents the number of pixels corresponding to different grayscale levels.

[0107] A quality evaluation value of the original image is determined according to a similarity between the first grayscale histogram and the second grayscale histogram.

[0108] In some embodiments, the similarity between grayscale histograms may be determined by any of the following methods:

[0109] Method (1) determines the similarity d(H1, H2) by chi-square distance.

[0110]

[0111] Wherein, H1 represents the first grayscale histogram, H2 represents the second grayscale histogram, i represents the pixel number, and i is a positive integer.

[0112] Method (2) determines the similarity d(H1, H2) through correlation.

[0113]

[0114] Among them, H1 represents the first grayscale histogram, H2 represents the second grayscale histogram, represents the grayscale mean in the first grayscale histogram, represents the grayscale mean in the second grayscale histogram, i represents the pixel number, and i is a positive integer.

[0115] Method (3) determines the similarity d(H1, H2) by cross-intersection.

[0116]

[0117] Wherein, H1 represents the first grayscale histogram, H2 represents the second grayscale histogram, i represents the pixel number, and i is a positive integer.

[0118] Method (4) determines the similarity d(H1, H2) by Bhattacharyya distance.

[0119]

[0120] Wherein, H1 represents the first grayscale histogram, H2 represents the second grayscale histogram, i represents the pixel number, i is a positive integer, N is the total number of pixels in the first grayscale histogram or the second grayscale histogram, and the total number of pixels in the first grayscale histogram and the second grayscale histogram is the same.

[0121] In actual use, the method for determining the similarity can be determined according to the specific scenario, and this embodiment does not impose too many restrictions on this.

[0122] In implementation, the similarity between the first grayscale histogram and the second grayscale histogram may be determined as the quality evaluation value of the original image.

[0123] In implementation, if the difference information between the blurred image and the original image is greater than a threshold, the original image is determined to be a clear image; if the difference information between the blurred image and the original image is less than or equal to the threshold, the original image is determined to be a blurred image.

[0124] In some embodiments, the present embodiment may also use reference features to determine a reference fuzzy evaluation value for use in correcting the quality evaluation value to improve the accuracy of the fuzzy degree evaluation. The specific steps for determining the reference fuzzy evaluation value are as follows:

[0125] Step 1) determining at least one reference feature of the original image, wherein the reference feature is used to characterize texture information of the original image;

[0126] In some embodiments, the reference features in this embodiment include at least one of singular value features and edge features, wherein both the singular value features and the edge features can be used to characterize the texture degree of the details of the original image. Therefore, based on at least one of the singular value features and the edge features, a reference blur evaluation value can be determined as a reference feature to correct the quality evaluation value.

[0127] Step 2) Determine a reference blur evaluation value of the original image corresponding to the at least one reference feature based on the at least one reference feature.

[0128] It should be noted that the reference features and reference fuzzy evaluation values ​​are one-to-one corresponding, that is, one reference feature can determine one reference fuzzy evaluation value, for example, the edge feature can determine the reference fuzzy evaluation value corresponding to the edge feature, and the singular value feature can determine the reference fuzzy evaluation value corresponding to the singular value feature.

[0129] In some embodiments, the quality assessment value may be modified by the following steps:

[0130] Step 3) According to the reference fuzzy evaluation value corresponding to the at least one reference feature, the quality evaluation value is corrected to obtain a new quality evaluation value.

[0131] In some embodiments, the correction is performed by weighted summation, and the specific implementation method is as follows:

[0132] The target weight corresponding to the quality evaluation value and the reference weights corresponding to the reference fuzzy evaluation values ​​are used to perform a weighted summation on the quality evaluation value and the reference fuzzy evaluation values ​​to obtain the new quality evaluation value.

[0133] During implementation, if there is one reference fuzzy evaluation value, the target weight corresponding to the quality evaluation value and the reference weight corresponding to the reference fuzzy evaluation value are used to perform weighted summation on the quality evaluation value and the reference fuzzy evaluation value to obtain the new quality evaluation value.

[0134] If the reference fuzzy evaluation values ​​include two, namely the reference fuzzy evaluation value corresponding to the edge feature and the reference fuzzy evaluation value corresponding to the singular value feature, for the convenience of description, the reference fuzzy evaluation value corresponding to the singular value feature is referred to as the first reference fuzzy evaluation value, and the reference fuzzy evaluation value corresponding to the edge feature is referred to as the second reference fuzzy evaluation value.

[0135] During implementation, the target weight corresponding to the quality assessment value, the reference weight corresponding to the first reference fuzzy assessment value, and the reference weight corresponding to the second reference fuzzy assessment value are used to perform weighted summation on the quality assessment value, the first reference fuzzy assessment value, and the second reference fuzzy assessment value, respectively, to obtain the new quality assessment value.

[0136] In some embodiments, the target weight and each reference weight are determined based on texture features of the original image. For example, the reference weight for the quality assessment value and the target weight for the first reference blur assessment value can be constructed based on the texture features of the original image. This embodiment does not impose any specific restrictions on how the reference weights and target weights are constructed.

[0137] In some embodiments, if it is determined that the second reference blur evaluation value (i.e., the texture degree of the original image determined by edge features) is greater than a threshold, it indicates that the original image has rich detailed texture features, and the weight of the second reference blur evaluation value is directly set to 1, and the weights of the quality evaluation value and the first reference blur evaluation value are both 0. Alternatively, it is directly determined that the original image is a clear image, and there is no lens occlusion (the protective film is not torn off).

[0138] If it is determined that the second reference fuzzy evaluation value is less than or equal to the threshold, a reference weight of the first reference fuzzy evaluation value and a target weight of the quality evaluation value are constructed according to the second reference fuzzy evaluation value, and the reference weight of the second reference fuzzy evaluation value is set to 0, wherein the method of constructing the weight is as follows:

[0139]

[0140] Among them, α and β are hyperparameters that can be defined in advance, CS represents the second reference blur evaluation value, w1 represents the target weight, and w2 represents the reference weight of the first reference blur evaluation value (i.e., the texture degree of the original image determined by the singular value feature).

[0141] Optionally, the formula for determining a new quality assessment value using the constructed weight is as follows:

[0142] w1·d(H1,H2)+w2·Γ Formula (8);

[0143] Where w1 represents the target weight, d(H1, H2) represents the quality evaluation value, w2 represents the reference weight of the first reference fuzzy evaluation value, and Γ represents the first reference fuzzy evaluation value. Here, the new quality evaluation value = w1·d(H1, H2)+w2·Γ.

[0144] In some embodiments, the method of determining the reference fuzzy evaluation value based on the singular value feature in this embodiment is specifically as follows:

[0145] (1) determining a singular value sequence corresponding to the original image according to a singular value decomposition method, wherein a plurality of singular values ​​in the singular value sequence are arranged in a preset order;

[0146] In the implementation, based on the singular value decomposition algorithm in the field of image compression, the compression factor is controlled by selecting the number of singular values. The number of singular values ​​can also affect the degree of loss of detail texture of the original image. In this embodiment, the singular value statistical characteristics of a single channel (the Y channel image of the original image) can be used to measure the detail texture of the image after covering the protective film. If the Y channel image matrix is ​​recorded as I, it is assumed that I is an m×n matrix, and all the elements in it belong to the domain K, that is, the real number domain or the complex number domain. In this way, there is a decomposition such that I=UΣV*;

[0147] Here, U is an m×m unitary matrix; Σ is a positive semidefinite m×n diagonal matrix; and V*, the conjugate transpose of V, is an n×n unitary matrix. This decomposition is called the singular value decomposition of I. The diagonal elements Σi in Σ are the singular values ​​of I.

[0148] In some embodiments, the singular values ​​may be arranged in descending order to obtain a singular value sequence; or the singular values ​​may be arranged in descending order to obtain a singular value sequence.

[0149] (2) calculating a first sum of at least one target singular value and a second sum of the singular values ​​in the singular value sequence, wherein the target singular value is a singular value in a preset arrangement order in the singular value sequence;

[0150] In some embodiments, the first M singular values ​​in the singular value sequence are determined as target singular values, or the last M singular values ​​in the singular value sequence are determined as target singular values, or the M singular values ​​in the middle of the singular value sequence are determined as target singular values, where M is a positive integer. This embodiment does not impose any restrictions on the specific method for determining the target singular value, and the specific method can be determined according to actual needs.

[0151] (3) Determine the ratio of the first sum to the second sum as the reference fuzzy evaluation value corresponding to the singular value feature (ie, the first reference fuzzy evaluation value).

[0152] In the implementation, the ratio of the sum of all target singular values ​​to the sum of all singular values ​​in the singular value sequence is used as a reference blur evaluation value determined based on the singular value features to measure the detail texture of the original image. The larger the ratio, the more blurred the original image. If the first reference blur evaluation value is set to Γ, the calculation formula is:

[0153]

[0154] Where N represents the number of singular values ​​in the singular value sequence, M represents the number of target singular values, and λ i Represents the singular value in the singular value sequence, i represents the order of arrangement in the singular value sequence, where N and M are both positive integers.

[0155] In some embodiments, the method of determining the reference blur evaluation value based on edge features in this embodiment is specifically as follows:

[0156] (1) determining edge features of the original image according to an edge detection method, and determining texture feature values ​​of the original image according to the edge features;

[0157] (2) Determine the texture feature value as the reference fuzzy evaluation value corresponding to the edge feature.

[0158] In implementation, the canny edge detection method can be used to extract the edge features of the original image. The specific steps for edge detection are as follows:

[0159] a) Calculate the gradient strength and direction of the original image. If the original image has not been denoised, it is necessary to denoise the original image first and then calculate the gradient strength and direction.

[0160]

[0161]

[0162] Among them, G(i,j) is the gradient strength; θ is the gradient direction; g x (i,j) and g y (i, j) are the gradients in the x and y directions respectively, g x represents the gradient in the x direction, g y Represents the gradient in the y direction; i represents the position of the pixel in the original image in the x direction, and j represents the position of the pixel in the original image in the y direction.

[0163] b) Obtain edge features based on the gradient direction using the non-maximum suppression method. It should be noted that the edge features obtained here can actually be understood as images, that is, the edge features of the original image are extracted to obtain the edge feature image of the original image. After obtaining the edge features, the texture degree of the original image, that is, the texture feature value, can be calculated using the following formula:

[0164]

[0165] Where CS represents the texture feature value, M and N are the width and height of the edge feature image, respectively. C(x, y) represents the pixel point in the edge feature image, and x and y represent the coordinate value of the pixel point in the X direction and the Y direction, respectively. If the texture feature value exceeds the threshold, it means that the original image has rich detailed texture features and the protective film is usually not torn. If the texture feature value does not exceed the threshold, the texture feature value can be used to construct the weight of the quality assessment value and the first reference fuzzy assessment value.

[0166] In some embodiments, because overly bright or dark scenes can easily affect the accuracy of image blur assessment, the global pixel mean can be used to filter out overly bright or dark scenes in the original image, or in the resulting image obtained from the image blur assessment of the original image. This can be selectively filtered for scenes such as textureless roads and glass doors.

[0167] In some embodiments, as Figure 2As shown, this embodiment also provides a complete fuzzy degree evaluation method, and the implementation process is as follows:

[0168] Step 200: grayscale the captured frame image to obtain a Y channel image;

[0169] Step 201: De-noise the Y channel image to obtain the original image;

[0170] Step 202: blur the original image to obtain a blurred image;

[0171] Step 203: determining a first grayscale histogram of the original image and a second grayscale histogram of the blurred image; and determining a quality evaluation value of the original image based on a similarity between the first grayscale histogram and the second grayscale histogram.

[0172] Step 204: Determine a singular value sequence corresponding to the original image according to a singular value decomposition method;

[0173] Step 205: Calculate a first sum of at least one target singular value and a second sum of the singular values ​​in the singular value sequence, and determine a ratio of the first sum to the second sum as a first reference fuzzy evaluation value corresponding to the singular value feature;

[0174] Step 206: Determine edge features of the original image based on an edge detection method;

[0175] Step 207: Determine a texture feature value of the original image according to the edge feature, and determine the texture feature value as a second reference fuzzy evaluation value corresponding to the edge feature.

[0176] The above steps 202 - 203 , 204 - 205 , and 206 - 207 are three parallel execution processes. This embodiment does not limit the execution order of these three parallel execution processes.

[0177] Step 208: Determine whether the second reference fuzzy evaluation value is greater than a threshold value. If yes, proceed to step 209; otherwise, proceed to step 210.

[0178] Step 209: Determine whether the original image is clear;

[0179] Step 210: construct a target weight of the quality evaluation value and a reference weight of the first reference fuzzy evaluation value according to the second reference fuzzy evaluation value, perform weighted summation on the quality evaluation value and the first reference fuzzy evaluation value to obtain a new quality evaluation value.

[0180] In practice, the weights can be constructed using the above formula (8), which will not be described in detail here.

[0181] Example 2: Based on the same inventive concept, an embodiment of the present invention also provides a method for determining lens occlusion. The principle of solving the problem by this method is similar to that of an image quality assessment method. Therefore, the implementation of this method can refer to the implementation of an image quality assessment method, and the repeated parts will not be repeated.

[0182] like Figure 3 As shown, an embodiment of the present invention provides a method for determining lens occlusion, and the implementation process is as follows:

[0183] Step 300: Determine N frames of original images based on N frames of images captured by a camera device within a preset time period;

[0184] In some embodiments, grayscale processing is performed on each frame image to obtain a grayscale image or a Y-channel image, and denoising is performed on the grayscale image or the Y-channel image to obtain the original image corresponding to the frame image. The above process is performed on any one frame image among N frames of images to obtain N frames of original images.

[0185] Optionally, the N frames of images may be N consecutive frames of images captured within a preset time period, or may be N frames of images acquired according to a preset cycle, and this embodiment does not impose any further restrictions on this.

[0186] Step 301: Obtain quality assessment values ​​corresponding to the N frames of original images respectively through an image quality assessment method in an embodiment;

[0187] For each frame of original image, the image quality assessment method determined in the above embodiment 1 is used to obtain a quality assessment value corresponding to the frame of original image. The specific implementation method can be found in the above description and will not be repeated here.

[0188] Step 302: Determine whether the lens of the camera device is blocked within the preset time period based on the obtained N quality evaluation values.

[0189] In some embodiments, whether the lens of the camera device is blocked within the preset period is determined according to the average of the N quality evaluation values.

[0190] In some embodiments, the quality assessment value corresponding to each frame of the original image is determined by:

[0191] Performing blur processing on the original image to obtain a blurred image;

[0192] A quality evaluation value of the original image is determined according to difference information between the blurred image and the original image.

[0193] In some embodiments, determining the quality assessment value of the original image based on difference information between the blurred image and the original image includes:

[0194] Determining a first grayscale histogram of the original image and a second grayscale histogram of the blurred image;

[0195] A quality evaluation value of the original image is determined according to a similarity between the first grayscale histogram and the second grayscale histogram.

[0196] In some embodiments, the method further comprises:

[0197] determining at least one reference feature of the original image, wherein the reference feature is used to characterize texture information of the original image;

[0198] According to the at least one reference feature, a reference blur evaluation value of the original image corresponding to the at least one reference feature is determined.

[0199] In some embodiments, after determining the reference blur evaluation value of the original image corresponding to the at least one reference feature based on the at least one reference feature, the method further includes:

[0200] The quality evaluation value is corrected according to the reference fuzzy evaluation value corresponding to the at least one reference feature to obtain a new quality evaluation value.

[0201] In some embodiments, the modifying the quality assessment value according to the reference fuzzy assessment value corresponding to the at least one reference feature to obtain a new quality assessment value includes:

[0202] The target weight corresponding to the quality evaluation value and the reference weights corresponding to the reference fuzzy evaluation values ​​are used to perform a weighted summation on the quality evaluation value and the reference fuzzy evaluation values ​​to obtain the new quality evaluation value.

[0203] In some embodiments, the target weight and the reference weight are determined according to texture features of the original image.

[0204] In some embodiments, the reference feature includes a singular value feature, and determining at least one reference feature of the original image and determining, based on the at least one reference feature, a reference blur evaluation value of the original image corresponding to the at least one reference feature includes:

[0205] Determining a singular value sequence corresponding to the original image according to a singular value decomposition method, wherein a plurality of singular values ​​in the singular value sequence are arranged in a preset order;

[0206] Calculating a first sum of at least one target singular value and a second sum of the singular values ​​in the singular value sequence, wherein the target singular value is a singular value in a preset arrangement order in the singular value sequence;

[0207] The ratio of the first sum to the second sum is determined as a reference fuzzy evaluation value corresponding to the singular value feature.

[0208] In some embodiments, the reference feature includes an edge feature, and determining at least one reference feature of the original image and determining, based on the at least one reference feature, a reference blur evaluation value of the original image corresponding to the at least one reference feature includes:

[0209] Determining edge features of the original image according to an edge detection method, and determining texture feature values ​​of the original image according to the edge features;

[0210] The texture feature value is determined as a reference blur evaluation value corresponding to the edge feature.

[0211] Example 3. Based on the same inventive concept, the embodiment of the present invention also provides a device for evaluating the blur degree of an image. Since the device is the device in the method in the embodiment of the present invention, and the principle of solving the problem by the device is similar to that of the method, the implementation of the device can refer to the implementation of the method, and the repeated parts will not be repeated.

[0212] like Figure 4 As shown, the device includes a processor 400 and a memory 401, wherein the memory 401 is used to store a program executable by the processor 400, and the processor 400 is used to read the program in the memory 401 and perform the following steps:

[0213] Perform blur processing on the original image to obtain a blurred image;

[0214] A quality evaluation value of the original image is determined according to difference information between the blurred image and the original image.

[0215] As an optional implementation manner, the processor 400 is specifically configured to execute:

[0216] Determining a first grayscale histogram of the original image and a second grayscale histogram of the blurred image;

[0217] A quality evaluation value of the original image is determined according to a similarity between the first grayscale histogram and the second grayscale histogram.

[0218] As an optional implementation manner, the processor 400 is further configured to execute:

[0219] determining at least one reference feature of the original image, wherein the reference feature is used to characterize texture information of the original image;

[0220] According to the at least one reference feature, a reference blur evaluation value of the original image corresponding to the at least one reference feature is determined.

[0221] As an optional implementation manner, after determining, based on the at least one reference feature, the reference blur evaluation value of the original image corresponding to the at least one reference feature, the processor 400 is further configured to execute:

[0222] The quality evaluation value is corrected according to the reference fuzzy evaluation value corresponding to the at least one reference feature to obtain a new quality evaluation value.

[0223] As an optional implementation manner, the processor 400 is specifically configured to execute:

[0224] The target weight corresponding to the quality evaluation value and the reference weights corresponding to the reference fuzzy evaluation values ​​are used to perform a weighted summation on the quality evaluation value and the reference fuzzy evaluation values ​​to obtain the new quality evaluation value.

[0225] As an optional implementation manner, the target weight and the reference weight are determined according to texture features of the original image.

[0226] As an optional implementation manner, the reference feature includes a singular value feature, and the processor 400 is specifically configured to execute:

[0227] Determining a singular value sequence corresponding to the original image according to a singular value decomposition method, wherein a plurality of singular values ​​in the singular value sequence are arranged in a preset order;

[0228] Calculating a first sum of at least one target singular value and a second sum of the singular values ​​in the singular value sequence, wherein the target singular value is a singular value in a preset arrangement order in the singular value sequence;

[0229] The ratio of the first sum to the second sum is determined as a reference fuzzy evaluation value corresponding to the singular value feature.

[0230] As an optional implementation manner, the reference feature includes an edge feature, and the processor 400 is specifically configured to execute:

[0231] Determining edge features of the original image according to an edge detection method, and determining texture feature values ​​of the original image according to the edge features;

[0232] The texture feature value is determined as a reference blur evaluation value corresponding to the edge feature.

[0233] Example 4. Based on the same inventive concept, the embodiment of the present invention also provides a device for evaluating the degree of blur of an image. Since the device is the device in the method in the embodiment of the present invention, and the principle of solving the problem by the device is similar to that of the method, the implementation of the device can refer to the implementation of the method, and the repeated parts will not be repeated.

[0234] like Figure 5 As shown, the device includes:

[0235] A blur processing unit 500 is used to blur the original image to obtain a blurred image;

[0236] The difference evaluation unit 501 is configured to determine a quality evaluation value of the original image according to difference information between the blurred image and the original image.

[0237] As an optional implementation manner, the difference evaluation unit 501 is specifically configured to:

[0238] Determining a first grayscale histogram of the original image and a second grayscale histogram of the blurred image;

[0239] A quality evaluation value of the original image is determined according to a similarity between the first grayscale histogram and the second grayscale histogram.

[0240] As an optional embodiment, the system further includes a reference evaluation unit for:

[0241] determining at least one reference feature of the original image, wherein the reference feature is used to characterize texture information of the original image;

[0242] According to the at least one reference feature, a reference blur evaluation value of the original image corresponding to the at least one reference feature is determined.

[0243] As an optional embodiment, after determining the reference blur evaluation value of the original image corresponding to the at least one reference feature based on the at least one reference feature, the method further includes a blur correction unit specifically configured to:

[0244] The quality evaluation value is corrected according to the reference fuzzy evaluation value corresponding to the at least one reference feature to obtain a new quality evaluation value.

[0245] As an optional implementation manner, the blur correction unit is specifically configured to:

[0246] The target weight corresponding to the quality evaluation value and the reference weights corresponding to the reference fuzzy evaluation values ​​are used to perform a weighted summation on the quality evaluation value and the reference fuzzy evaluation values ​​to obtain the new quality evaluation value.

[0247] As an optional implementation manner, the target weight and the reference weight are determined according to texture features of the original image.

[0248] As an optional implementation manner, the reference feature includes a singular value feature, and the reference evaluation unit is specifically configured to:

[0249] Determining a singular value sequence corresponding to the original image according to a singular value decomposition method, wherein a plurality of singular values ​​in the singular value sequence are arranged in a preset order;

[0250] Calculating a first sum of at least one target singular value and a second sum of the singular values ​​in the singular value sequence, wherein the target singular value is a singular value in a preset arrangement order in the singular value sequence;

[0251] The ratio of the first sum to the second sum is determined as a reference fuzzy evaluation value corresponding to the singular value feature.

[0252] As an optional implementation manner, the reference feature includes an edge feature, and the reference evaluation unit is specifically configured to:

[0253] Determining edge features of the original image according to an edge detection method, and determining texture feature values ​​of the original image according to the edge features;

[0254] The texture feature value is determined as a reference blur evaluation value corresponding to the edge feature.

[0255] Based on the same inventive concept, an embodiment of the present invention further provides a computer storage medium having a computer program stored thereon, which, when executed by a processor, implements the following steps:

[0256] Perform blur processing on the original image to obtain a blurred image;

[0257] A quality evaluation value of the original image is determined according to difference information between the blurred image and the original image.

[0258] Those skilled in the art will appreciate that embodiments of the present invention may be provided as methods, systems, or computer program products. Thus, the present invention may take the form of an entirely hardware embodiment, an entirely software embodiment, or an embodiment combining software and hardware. Furthermore, the present invention may take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to magnetic disk storage and optical storage, etc.) containing computer-usable program code.

[0259] The present invention is described with reference to flowcharts and / or block diagrams of methods, devices (systems), and computer program products according to embodiments of the present invention. It should be understood that each process and / or block in the flowcharts and / or block diagrams, as well as combinations of processes and / or blocks in the flowcharts and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to produce a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowcharts and / or block diagrams. Figure 1 a process or multiple processes and / or boxes Figure 1 A device that performs the functions specified in one or more boxes.

[0260] These computer program instructions may also be stored in a computer readable memory that can direct a computer or other programmable data processing device to work in a specific manner, so that the instructions stored in the computer readable memory produce an article of manufacture including an instruction device, which implements the process Figure 1 a process or multiple processes and / or boxes Figure 1 The function specified in one or more boxes.

[0261] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operational steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing the instructions executed on the computer or other programmable device for implementing the process. Figure 1 a process or multiple processes and / or boxes Figure 1 A step that specifies a function in one or more boxes.

[0262] Obviously, those skilled in the art may make various changes and modifications to the present invention without departing from the spirit and scope of the present invention. Thus, if such changes and modifications fall within the scope of the claims and their equivalents, the present invention is intended to include such changes and modifications.

Claims

1. A method for image quality assessment, characterized in that: The method includes: Perform blur processing on the original image to obtain a blurred image; determining a quality assessment value of the original image based on difference information between the blurred image and the original image; At least one reference feature of the original image is determined, wherein the reference feature is used to characterize texture information of the original image; a reference fuzzy evaluation value of the original image corresponding to the at least one reference feature is determined based on the at least one reference feature; and the quality evaluation value is corrected based on the reference fuzzy evaluation value corresponding to the at least one reference feature to obtain a new quality evaluation value, including: using a target weight corresponding to the quality evaluation value and reference weights corresponding to each reference fuzzy evaluation value to perform a weighted summation on the quality evaluation value and each reference fuzzy evaluation value to obtain the new quality evaluation value; the target weight and the reference weight are determined based on the texture feature of the original image; the reference fuzzy evaluation values ​​corresponding to the at least one reference feature include: a first reference fuzzy evaluation value corresponding to a singular value feature and a second reference fuzzy evaluation value corresponding to an edge feature; if the second reference fuzzy evaluation value is determined to be greater than a threshold, the reference weight of the second reference fuzzy evaluation value is set to 1, and the target weight and the reference weight of the first reference fuzzy evaluation value are both set to 0; if the second reference fuzzy evaluation value is determined to be less than or equal to the threshold, the reference weight of the first reference fuzzy evaluation value and the target weight of the quality evaluation value are constructed based on the second reference fuzzy evaluation value, and the reference weight of the second reference fuzzy evaluation value is set to 0.

2. The method according to claim 1, characterized in that The determining, based on difference information between the blurred image and the original image, a quality assessment value of the original image includes: Determining a first grayscale histogram of the original image and a second grayscale histogram of the blurred image; A quality evaluation value of the original image is determined according to a similarity between the first grayscale histogram and the second grayscale histogram.

3. The method according to claim 1 or 2, characterized in that The reference feature includes a singular value feature, and determining at least one reference feature of the original image and determining, based on the at least one reference feature, a reference blur evaluation value of the original image corresponding to the at least one reference feature includes: Determining a singular value sequence corresponding to the original image according to a singular value decomposition method, wherein a plurality of singular values ​​in the singular value sequence are arranged in a preset order; Calculating a first sum of at least one target singular value and a second sum of the singular values ​​in the singular value sequence, wherein the target singular value is a singular value in a preset arrangement order in the singular value sequence; The ratio of the first sum to the second sum is determined as a reference fuzzy evaluation value corresponding to the singular value feature.

4. The method according to claim 1 or 2, characterized in that The reference feature includes an edge feature, and determining at least one reference feature of the original image and determining, based on the at least one reference feature, a reference blur evaluation value of the original image corresponding to the at least one reference feature includes: Determining edge features of the original image according to an edge detection method, and determining texture feature values ​​of the original image according to the edge features; The texture feature value is determined as a reference blur evaluation value corresponding to the edge feature.

5. A method for determining lens occlusion, characterized in that: The method includes: Determine N frames of original images according to N frames of images captured by the camera device within a preset time period; Obtaining quality assessment values ​​corresponding to the N frames of original images respectively by the image quality assessment method according to any one of claims 1 to 4; According to the obtained N quality evaluation values, it is determined whether the lens of the camera device is blocked within the preset time period.

6. The method according to claim 5, characterized in that The determining, based on the obtained N quality evaluation values, whether the lens of the camera device is blocked within the preset time period includes: It is determined whether the lens of the camera device is blocked within the preset time period according to an average of the N quality evaluation values.

7. A device for evaluating the blur level of an image, characterized in that: The device includes a processor and a memory, wherein the memory is used to store a program executable by the processor, and the processor is used to read the program in the memory and execute the steps of any one of the methods of claims 1 to 4.

8. A computer storage medium having a computer program stored thereon, characterized in that: When the program is executed by a processor, the steps of the method according to any one of claims 1 to 4 are implemented.

Citation Information

Patent Citations

  • No-reference quality evaluation method for fuzzy images

    CN108109147A

  • A camera lens shielding detection method and system

    CN109598706A

  • Face image quality evaluation method and device

    CN110458792A

  • Similarity determination method and similarity determination device

    CN112183618A