Method, device, equipment and medium for fuzzy judgment of face image

Through the detection of face key points and corner points combined with the fuzzy value detection algorithm, the problem of traditional fuzzy judgment algorithm is not very accurate when judging face images of different blurred degrees, and more accurate fuzzy and clear judgment is achieved.

CN113256586BActive Publication Date: 2025-02-28SHENZHEN SHULIAN TIANXIA INTELLIGENT TECH CO LTD
View PDF 5 Cites 0 Cited by

Patent Information

Application Number
CN202110594002.8
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-05-28
Publication Date
2025-02-28
Estimated Expiration
2041-05-28

AI Technical Summary

Technical Problem

Traditional fuzzy judgment algorithms based on gradient functions are not very accurate when judging face images of different degrees of blur, and it is easy to have errors in the fact that slightly blurred images are judged as clear images or clearer images are judged as blurred images.

Method used

The face key point detection algorithm is used to detect the eye and mouth key points, and the corner point detection algorithm is used to determine the corner points in the target key points, and several corner points areas containing corner points are intercepted in the face image. The blur value detection algorithm (such as the Laplace operator) is used to calculate the total blur value of the corner point area, and determine whether the face image is blurred based on the total blur value.

Benefits of technology

It improves the accuracy of judging face images of different degrees of blur, can more accurately distinguish blurred and clear images, and reduces misjudgment.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN113256586B_ABST
    Figure CN113256586B_ABST
Patent Text Reader

Abstract

The present invention discloses a method for blur judgment of a face image, the method comprising: firstly, detecting eye key points and mouth key points as target key points in a face image according to a face key point detection algorithm, and then determining corner points in the target key points according to a corner point detection algorithm. Since the features of the eye area and the mouth area are relatively obvious, and the corresponding corner points are relatively numerous, and the corner points are points with particularly prominent attributes in certain aspects, targeted feature extraction can be performed on images with a low degree of blur, so as to achieve the purpose of accurately judging whether they are blurry or not. Furthermore, a plurality of corner point areas containing corner points are intercepted from the face image, and the total blur values ​​of the plurality of corner point areas are detected by a blur value detection algorithm, and finally, whether the face image is blurry is judged according to the total blur value, so as to judge whether images with different degrees of blur are blurry or not. In addition, a blur judgment device, equipment and storage medium are also proposed.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of face image detection, and in particular to a method, device, equipment and medium for determining blurriness of face images. Background Art

[0002] In recent years, face recognition technology has developed rapidly, and various algorithms based on data, models, and loss functions have emerged. However, in some specific application scenarios, such as in automatic face registration systems or identity recognition systems, it is necessary to exclude blurred face images first, otherwise it is very easy to cause errors in subsequent face recognition.

[0003] The traditional gradient function-based blur judgment algorithm has low accuracy for facial images with different blur levels. This algorithm can effectively identify most images with high blur levels, but it is very easy to make mistakes when judging images with low blur levels. For example, it may judge some slightly blurred images as clear images and some relatively clear images as blurred images. Summary of the invention

[0004] Based on this, it is necessary to provide a method, device, equipment and medium for blur judgment of facial images to solve the problem of low accuracy in judging facial images with different blur levels.

[0005] A method for determining blurriness of a face image, characterized in that the method comprises:

[0006] Acquire a face image, and detect target key points in the face image according to a preset face key point detection algorithm, wherein the target key points include eye key points and mouth key points;

[0007] Determine the corner points among the target key points according to the preset corner point detection algorithm;

[0008] A plurality of corner point regions are intercepted from the face image, each of which contains a corner point, and the total fuzziness values ​​of the plurality of corner point regions are detected by a fuzzy value detection algorithm, and whether the face image is blurred is determined according to the total fuzziness values.

[0009] In one embodiment, the face image is a grayscale image, and determining the corner points in the target key points according to a preset corner point detection algorithm includes:

[0010] At each of the target key points, the grayscale value of each pixel in a preset window is obtained, and the preset window takes the target key point as the window center;

[0011] Calculate the sum of the grayscale values ​​of each pixel in the preset window, and use the sum of the grayscale values ​​as the original grayscale value;

[0012] Moving the preset window to a plurality of preset directions, and recording the grayscale change value of the preset window during the moving process according to the original grayscale value;

[0013] Determine the corner points in the target key points according to the grayscale change value.

[0014] In one embodiment, the detecting the total fuzzy values ​​of the plurality of corner point regions by using a fuzzy value detection algorithm comprises:

[0015] The Laplace operator is used to detect the pixel Laplace gradient value at each corner point area, and the sum of all the pixel Laplace gradient values ​​is calculated, where the sum of the pixel Laplace gradient values ​​is the total blur value of the several corner point areas.

[0016] In one embodiment, obtaining a facial image includes:

[0017] Acquire an image to be detected, extract Haar features of the image to be detected, and obtain a feature image corresponding to the image to be detected;

[0018] Scanning the feature image according to a sliding window of a preset size to obtain a plurality of sub-window feature images, using a forest-type decision tree algorithm to determine whether each sub-window feature image includes a human face, and obtaining a target feature image including a human face from the plurality of sub-window feature images;

[0019] The coordinate position of the target feature image is recorded, and the face image in the image to be detected is determined according to the coordinate position.

[0020] In one of the embodiments, before detecting the target key points in the face image according to the preset face key point detection algorithm, the method further includes:

[0021] The face image is scaled to a preset target size.

[0022] In one embodiment, detecting target key points in the face image according to a preset face key point detection algorithm includes:

[0023] Extract key points in the face image using the Dlib library, wherein the key points include feature points of the whole face area with different numbers, left eyebrow feature points, right eyebrow feature points, nose feature points, left eye feature points, right eye feature points and mouth feature points;

[0024] The eye key points and the mouth key points are obtained according to the numbers of the key points.

[0025] In one embodiment, judging whether the face image is blurred according to the total blur value includes:

[0026] Obtaining a preset blur threshold, determining whether the total blur value is greater than the blur threshold, and determining that the face image is blurred when the total blur value is greater than the blur threshold;

[0027] When the total blur value is less than or equal to the blur threshold, it is determined that the facial image is clear.

[0028] A fuzzy judgment device, comprising:

[0029] A key point acquisition module, used to acquire a face image, and detect target key points in the face image according to a preset face key point detection algorithm, wherein the target key points include eye key points and mouth key points;

[0030] A corner point acquisition module is used to determine the corner points in the target key points according to a preset corner point detection algorithm;

[0031] The fuzzy judgment module is used to intercept a number of corner point areas in the face image, each of which contains a corner point, detect the total fuzzy values ​​of the several corner point areas through a fuzzy value detection algorithm, and judge whether the face image is blurred according to the total fuzzy value.

[0032] A computer-readable storage medium stores a computer program, which, when executed by a processor, causes the processor to perform the following steps:

[0033] Acquire a face image, and detect target key points in the face image according to a preset face key point detection algorithm, wherein the target key points include eye key points and mouth key points;

[0034] Determine the corner points among the target key points according to the preset corner point detection algorithm;

[0035] A plurality of corner point regions are intercepted from the face image, each of which contains a corner point, and the total fuzziness values ​​of the plurality of corner point regions are detected by a fuzzy value detection algorithm, and whether the face image is blurred is determined according to the total fuzziness values.

[0036] A terminal device includes a memory and a processor, wherein the memory stores a computer program, and when the computer program is executed by the processor, the processor performs the following steps:

[0037] Acquire a face image, and detect target key points in the face image according to a preset face key point detection algorithm, wherein the target key points include eye key points and mouth key points;

[0038] Determine the corner points among the target key points according to the preset corner point detection algorithm;

[0039] A plurality of corner point regions are intercepted from the face image, each of which contains a corner point, and the total fuzziness values ​​of the plurality of corner point regions are detected by a fuzzy value detection algorithm, and whether the face image is blurred is determined according to the total fuzziness values.

[0040] The present invention provides a method, device, equipment and medium for judging blur of a face image. First, eye key points and mouth key points are detected as target key points in a face image according to a face key point detection algorithm, and then the corner points in the target key points are determined according to a corner point detection algorithm. Since the features of the eye area and the mouth area are relatively obvious, and there are relatively many corresponding corner points, and the corner points are points with particularly prominent attributes in certain aspects, targeted feature extraction can be performed on images with a low degree of blur, so as to achieve the purpose of accurately judging whether they are blurry or not. Furthermore, several corner point areas containing corner points are intercepted in the face image, and the total blur values ​​of several corner point areas are detected by a blur value detection algorithm. Finally, whether the face image is blurred is judged according to the total blur value, so as to judge whether images with different degrees of blur are blurred or not. BRIEF DESCRIPTION OF THE DRAWINGS

[0041] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. 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 creative work.

[0042] in:

[0043] Figure 1 Schematic diagram of a flow chart of a method for determining blur of a face image in one embodiment;

[0044] Figure 2 A schematic diagram of capturing a plurality of corner point regions in a face image in one embodiment;

[0045] Figure 3 is a schematic diagram of the structure of a fuzzy judgment device in one embodiment;

[0046] Figure 4 FIG. 4 is a structural block diagram of a terminal device in an embodiment. DETAILED DESCRIPTION

[0047] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only 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.

[0048] like Figure 1 As shown, Figure 1 FIG. 1 is a flow chart of a method for determining blur of a face image in an embodiment. The method for determining blur of a face image in this embodiment includes the following steps:

[0049] Step 102: Acquire a face image and detect target key points in the face image according to a preset face key point detection algorithm.

[0050] The face image is an image with human face as the main content, which is obtained by face detection based on the real-time acquisition or pre-stored image to be detected. When performing face detection on the image to be detected, the image to be detected is first processed into a grayscale image, and then the Haar feature (Haar feature) of the image to be detected after grayscale processing is extracted. The Haar feature includes edge feature, linear feature, center feature and diagonal feature, which are combined into a feature template. There are two kinds of rectangles, white and black, in the feature template, and the feature value of the template is defined as the sum of white rectangle pixels minus the sum of black rectangle pixels. Finally, the feature image corresponding to the image to be detected is extracted. The feature value in the feature image reflects the grayscale change of the image. For example, the eyes are darker than the cheeks, and the mouth is darker than the surrounding color. Therefore, the feature values ​​around the eyes and the mouth are larger than the feature values ​​of the cheeks. Then the feature image is scanned according to a sliding window of a preset size, for example, a 20×20 sliding window is used to scan with a step size of 2 to obtain several sub-window feature images. A forest-type decision tree algorithm (AdaBoost) is used to determine whether a face is included in each sub-window feature image. Adaboost uses the idea of ​​iteration for training. Only one weak classifier is trained each time. The trained weak classifier will participate in the use of the next iteration. The generation of the latter weak classifier depends on the error of the previous weak classifier, and the weight of the currently trained weak classifier is adjusted according to this error. Adaboost votes for the classification output of the sub-window feature image based on the weighted results of all classifiers. For example, classifier 1 determines that the sub-window feature image with a feature value less than threshold a is the target feature image, and the weight is 0.5 (greater than -0.5); classifier 2 determines that the sub-window feature image with a feature value greater than threshold b (b>a) is the target feature image, and the weight is 0.3 (less than -0.3). Since the weighted result of the sub-window feature image less than threshold a is 0.2 (0.5-0.3), the result is greater than 0, so the sub-window feature image of this type is determined to be the target feature image. Similarly, the weighted result greater than threshold a and less than threshold b is -0.8, which is less than 0, and it is determined that this type of sub-window feature image is not the target feature image. The weighted result greater than threshold b is -0.2, which is less than 0, and it is determined that this type of sub-window feature image is not the target feature image. The coordinate positions of these target feature images are recorded, and after the scan is completed, the target feature images at these coordinate positions are retained to obtain the face image in the image to be detected.

[0051] In addition, in order to reduce the size differences between different images, the face image can be scaled to a preset target size, such as (256×256) before detecting the target key points in the face image.

[0052] Then, the 68 key points in the face image are extracted using the Dlib library's 68-point landmark model. These key points include: 17 feature points in the overall face area, with feature point numbers from 0 to 16; 5 feature points of the right eyebrow, with feature point numbers from 17 to 21; 5 feature points of the left eyebrow, with feature point numbers from 22 to 26; 9 feature points of the nose, with feature point numbers from 27 to 35; 6 feature points of the right eye, with feature point numbers from 36 to 41; 6 feature points of the left eye, with feature point numbers from 42 to 47; 20 feature points of the mouth, with feature point numbers from 48 to 67. Since the features of the eye and mouth areas are more obvious and have more corresponding corner points, the eye and mouth key points are obtained as the target key points in the face image according to the key point numbers, and the facial features can be more significantly reflected based on the target feature points.

[0053] Step 104: determine the corner points in the target key points according to a preset corner point detection algorithm.

[0054] Among them, the corner point is the extreme point, that is, a point with particularly outstanding attributes in some aspect. It can be the intersection of two lines, or it can be a point on two adjacent objects with different main directions.

[0055] The corner detection algorithm determines the corner points based on the obvious changes in the grayscale of the corner points in all directions. Specifically, first at each target key point, the grayscale value of each pixel in the preset window is obtained, and this preset window takes the target key point as the window center. Then calculate the sum of the grayscale values ​​of each pixel in the preset window, and use the sum of the grayscale values ​​as the original grayscale value at the corresponding target key point. Then move the preset window to multiple preset directions at each target key point, such as up, down, left, right, upper left, lower left, upper right, lower right, etc. The grayscale change value E(u, v) of the preset window during the movement is calculated according to the following formula:

[0056]

[0057] Wherein, w(x, y) represents the window function, in which the window is translated (u, v), I(x+u, y+v) is the grayscale value of the translated image, and I(x, y) is the original grayscale value.

[0058] If the grayscale change value E(u, v) is greater than the preset grayscale threshold E0 during the movement, then the target key point is determined to be a corner point. If the grayscale change value E(u, v) is always less than the grayscale threshold E0 during the movement, then the target key point is determined not to be a corner point.

[0059] Step 106, intercepting a number of corner point regions in the face image, detecting the total fuzziness values ​​of the corner point regions using a fuzzy value detection algorithm, and determining whether the face image is blurred based on the total fuzziness values.

[0060] The shape of the corner point area is not specifically limited, and can be circular or rectangular, such as Figure 2 As shown, several corner point regions of the circle are intercepted, but each corner point region is limited to contain only one corner point, and the sizes of different corner point regions are kept consistent as much as possible.

[0061] Specifically, the blur value detection algorithm includes: using the Laplace operator to detect the pixel Laplace gradient value D(f) at each corner point area, which is defined as follows:

[0062] D(f)=∑ y ∑ x |G(x,y)|,(G(x,y)>T)

[0063] Among them, G(x,y) is the convolution of the Laplacian operator at the pixel point (x,y), and the Laplacian operator used is defined as:

[0064]

[0065] Calculate the sum of all pixel Laplace gradient values ​​D(f). The sum of all pixel Laplace gradient values ​​D(f) is the total blur value.

[0066] Finally, a preset blur threshold is obtained, which can be determined based on the size of the corner point area. It is determined whether the total blur value is greater than the blur threshold. When the total blur value is greater than the blur threshold, the face image is determined to be blurred; when the total blur value is less than or equal to the blur threshold, the face image is determined to be clear.

[0067] The above-mentioned method for judging blur of face images first detects the eye key points and mouth key points as target key points in the face image according to the face key point detection algorithm, and then determines the corner points in the target key points according to the corner point detection algorithm. Since the features of the eye area and the mouth area are more obvious, and there are more corresponding corner points, and the corner points are points with particularly prominent attributes in certain aspects, targeted feature extraction can be performed on images with a low degree of blur, so as to achieve the purpose of accurately judging whether they are blurry or not. Furthermore, several corner point areas containing corner points are intercepted in the face image, and the total blur value of several corner point areas is detected by the blur value detection algorithm. Finally, whether the face image is blurred is judged according to the total blur value, so as to judge whether the images with different degrees of blur are blurred or not.

[0068] In one embodiment, Figure 3 As shown, a fuzzy judgment device is proposed, which includes:

[0069] The key point acquisition module 302 is used to acquire a face image and detect target key points in the face image according to a preset face key point detection algorithm, wherein the target key points include eye key points and mouth key points;

[0070] A corner point acquisition module 304 is used to determine corner points in target key points according to a preset corner point detection algorithm;

[0071] The blur judgment module 306 is used to intercept a number of corner point areas in the face image, each corner point area includes a corner point, detect the total blur values ​​of the corner point areas through a blur value detection algorithm, and judge whether the face image is blurred according to the total blur value.

[0072] The above-mentioned blur judgment device first detects the eye key points and mouth key points as target key points in the face image according to the face key point detection algorithm, and then determines the corner points in the target key points according to the corner point detection algorithm. Since the features of the eye area and the mouth area are more obvious, and the corresponding corner points are more, and the corner points are points with particularly prominent attributes in some aspects, targeted feature extraction can be performed on images with a low degree of blur, so as to achieve the purpose of accurately judging whether they are blurry or not. Furthermore, several corner point areas containing corner points are intercepted in the face image, and the total blur value of several corner point areas is detected by the blur value detection algorithm. Finally, whether the face image is blurred is judged according to the total blur value, so as to judge whether the images with different degrees of blur are blurred or not.

[0073] In one embodiment, the corner point acquisition module 304 is specifically used to: at each target key point, obtain the grayscale value of each pixel point in a preset window, the preset window takes the target key point as the window center; calculate the sum of the grayscale values ​​of each pixel point in the preset window, and use the sum of the grayscale values ​​as the original grayscale value; move the preset window to multiple preset directions, and record the grayscale change value of the preset window during the movement according to the original grayscale value; determine the corner point in the target key point according to the grayscale change value.

[0074] In one embodiment, the blur judgment module 306 is specifically used to: use the Laplace operator to detect the pixel Laplace gradient value at each corner point area, and calculate the sum of all pixel Laplace gradient values, where the sum of the pixel Laplace gradient values ​​is the total blur value of several corner point areas.

[0075] In one embodiment, the key point acquisition module 302 is specifically used to: acquire an image to be detected, extract the Haar features of the image to be detected, and obtain a feature image corresponding to the image to be detected; scan the feature image according to a sliding window of a preset size to obtain a number of sub-window feature images, use a forest-type decision tree algorithm to determine whether each sub-window feature image includes a face, and obtain a target feature image that includes a face in the sub-window feature images; record the coordinate position of the target feature image, and determine the face image in the image to be detected based on the coordinate position.

[0076] In one embodiment, the fuzzy judgment device further includes a normalization module, which is used to scale the facial image to a preset target size.

[0077] In one embodiment, the key point acquisition module 302 is specifically used to: use the Dlib library to extract key points in the face image, the key points include feature points of the overall face area with different numbers, left eyebrow feature points, right eyebrow feature points, nose feature points, left eye feature points, right eye feature points and mouth feature points; obtain eye key points and mouth key points according to the key point numbers.

[0078] In one embodiment, the blur judgment module 306 is specifically used to: obtain a preset blur threshold, determine whether the total blur value is greater than the blur threshold, and when the total blur value is greater than the blur threshold, determine that the face image is blurred; when the total blur value is less than or equal to the blur threshold, determine that the face image is clear.

[0079] Figure 4 FIG. 2 shows an internal structure diagram of a terminal device in an embodiment. Figure 4 As shown, the terminal device includes a processor, a memory and a network interface connected via a system bus. The memory includes a non-volatile storage medium and an internal memory. The non-volatile storage medium of the terminal device stores an operating system and may also store a computer program. When the computer program is executed by the processor, the processor may implement the method for determining the blur of a face image. The internal memory may also store a computer program. When the computer program is executed by the processor, the processor may implement the method for determining the blur of a face image. Those skilled in the art will appreciate that Figure 4 The structure shown in the figure is only a block diagram of a partial structure related to the scheme of the present application, and does not constitute a limitation on the terminal device to which the scheme of the present application is applied. The specific terminal device may include more or fewer components than those shown in the figure, or combine certain components, or have a different arrangement of components.

[0080] A terminal device comprises a memory, a processor and a computer program stored in the memory and executable on the processor. When the processor executes the computer program, the following steps are implemented: acquiring a face image, detecting target key points in the face image according to a preset face key point detection algorithm, the target key points including eye key points and mouth key points; determining corner points in the target key points according to a preset corner point detection algorithm; intercepting a number of corner point areas in the face image, each corner point area containing a corner point, detecting the total fuzzy values ​​of the several corner point areas by a fuzzy value detection algorithm, and judging whether the face image is blurred according to the total fuzzy value.

[0081] In one embodiment, the corner points in the target key points are determined according to a preset corner point detection algorithm, including: at each target key point, obtaining the grayscale value of each pixel point in a preset window, the preset window taking the target key point as the window center; calculating the sum of the grayscale values ​​of each pixel point in the preset window, and taking the sum of the grayscale values ​​as the original grayscale value; moving the preset window to multiple preset directions, and recording the grayscale change value of the preset window during the movement according to the original grayscale value; and determining the corner points in the target key points according to the grayscale change value.

[0082] In one embodiment, the total blur value of several corner point areas is detected by a blur value detection algorithm, including: using a Laplace operator to detect the pixel Laplace gradient value at each corner point area, calculating the sum of all pixel Laplace gradient values, and the sum of the pixel Laplace gradient values ​​is the total blur value of several corner point areas.

[0083] In one embodiment, obtaining a facial image includes: obtaining an image to be detected, extracting Haar features of the image to be detected, and obtaining a feature image corresponding to the image to be detected; scanning the feature image according to a sliding window of a preset size to obtain a plurality of sub-window feature images, using a forest-type decision tree algorithm to determine whether each sub-window feature image includes a face, and obtaining a target feature image including a face from the plurality of sub-window feature images; recording the coordinate position of the target feature image, and determining the facial image in the image to be detected according to the coordinate position.

[0084] In one embodiment, before detecting target key points in a face image according to a preset face key point detection algorithm, the method further includes: scaling the face image to a preset target size.

[0085] In one embodiment, target key points in a face image are detected according to a preset face key point detection algorithm, including: using the Dlib library to extract key points in the face image, the key points including feature points of the overall face area with different numbers, left eyebrow feature points, right eyebrow feature points, nose feature points, left eye feature points, right eye feature points and mouth feature points; obtaining eye key points and mouth key points according to the key point numbers.

[0086] In one embodiment, judging whether a facial image is blurred based on a total blur value includes: obtaining a preset blur threshold, judging whether the total blur value is greater than the blur threshold, and when the total blur value is greater than the blur threshold, determining that the facial image is blurred; when the total blur value is less than or equal to the blur threshold, determining that the facial image is clear.

[0087] A computer-readable storage medium stores a computer program, which implements the following steps when executed by a processor: acquiring a face image, detecting target key points in the face image according to a preset face key point detection algorithm, the target key points including eye key points and mouth key points; determining corner points in the target key points according to a preset corner point detection algorithm; intercepting a number of corner point areas in the face image, each corner point area containing a corner point, detecting the total fuzzy values ​​of the several corner point areas by a fuzzy value detection algorithm, and judging whether the face image is blurred according to the total fuzzy value.

[0088] In one embodiment, the corner points in the target key points are determined according to a preset corner point detection algorithm, including: at each target key point, obtaining the grayscale value of each pixel point in a preset window, the preset window taking the target key point as the window center; calculating the sum of the grayscale values ​​of each pixel point in the preset window, and taking the sum of the grayscale values ​​as the original grayscale value; moving the preset window to multiple preset directions, and recording the grayscale change value of the preset window during the movement according to the original grayscale value; and determining the corner points in the target key points according to the grayscale change value.

[0089] In one embodiment, the total blur value of several corner point areas is detected by a blur value detection algorithm, including: using a Laplace operator to detect the pixel Laplace gradient value at each corner point area, calculating the sum of all pixel Laplace gradient values, and the sum of the pixel Laplace gradient values ​​is the total blur value of several corner point areas.

[0090] In one embodiment, obtaining a facial image includes: obtaining an image to be detected, extracting Haar features of the image to be detected, and obtaining a feature image corresponding to the image to be detected; scanning the feature image according to a sliding window of a preset size to obtain a plurality of sub-window feature images, using a forest-type decision tree algorithm to determine whether each sub-window feature image includes a face, and obtaining a target feature image including a face from the plurality of sub-window feature images; recording the coordinate position of the target feature image, and determining the facial image in the image to be detected according to the coordinate position.

[0091] In one embodiment, before detecting target key points in a face image according to a preset face key point detection algorithm, the method further includes: scaling the face image to a preset target size.

[0092] In one embodiment, target key points in a face image are detected according to a preset face key point detection algorithm, including: using the Dlib library to extract key points in the face image, the key points including feature points of the overall face area with different numbers, left eyebrow feature points, right eyebrow feature points, nose feature points, left eye feature points, right eye feature points and mouth feature points; obtaining eye key points and mouth key points according to the key point numbers.

[0093] In one embodiment, judging whether a facial image is blurred based on a total blur value includes: obtaining a preset blur threshold, judging whether the total blur value is greater than the blur threshold, and when the total blur value is greater than the blur threshold, determining that the facial image is blurred; when the total blur value is less than or equal to the blur threshold, determining that the facial image is clear.

[0094] It should be noted that the above-mentioned method, device, equipment and computer-readable storage medium for blur judgment of facial images belong to a general inventive concept, and the contents in the embodiments of the method, device, equipment and computer-readable storage medium for blur judgment of facial images can be applied to each other.

[0095] Those skilled in the art can understand that all or part of the processes in the above-mentioned embodiment methods can be completed by instructing the relevant hardware through a computer program, and the program can be stored in a non-volatile computer-readable storage medium. When the program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to memory, storage, database or other media used in the embodiments provided in this application can include non-volatile and / or volatile memory. Non-volatile memory may include read-only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM) or flash memory. Volatile memory may include random access memory (RAM) or external cache memory. As an illustration and not limitation, RAM is available in many forms, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double data rate SDRAM (DDRSDRAM), enhanced SDRAM (ESDRAM), synchronous link (Synchlink) DRAM (SLDRAM), memory bus (Rambus) direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM).

[0096] The technical features of the above embodiments may be combined arbitrarily. To make the description concise, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.

[0097] The above embodiments only express several implementation methods of the present application, and the descriptions thereof are relatively specific and detailed, but they cannot be understood as limiting the scope of the present application. It should be pointed out that, for a person of ordinary skill in the art, several modifications and improvements can be made without departing from the concept of the present application, and these all belong to the protection scope of the present application. Therefore, the protection scope of the present application shall be subject to the attached claims.

Claims

1. A fuzzy judgment method for a face image, characterized in that: The method comprises: Acquire a face image, and detect target key points in the face image according to a preset face key point detection algorithm, wherein the target key points include eye key points and mouth key points; Determine the corner points among the target key points according to the preset corner point detection algorithm; intercepting a plurality of corner point regions in the face image, each of the corner point regions including a corner point, detecting the total fuzziness values ​​of the plurality of corner point regions by a fuzziness value detection algorithm, and judging whether the face image is blurred according to the total fuzziness values; The face image is a grayscale image, and the method of determining the corner points in the target key points according to a preset corner point detection algorithm includes: obtaining the grayscale value of each pixel point in a preset window at each target key point, wherein the preset window takes the target key point as the window center; calculating the sum of the grayscale values ​​of each pixel point in the preset window, and taking the sum of the grayscale values ​​as the original grayscale value; moving the preset window to multiple preset directions, and recording the grayscale change value of the preset window during the movement according to the original grayscale value; and determining the corner points in the target key points according to the grayscale change value; The method of detecting target key points in the face image according to a preset face key point detection algorithm includes: using a Dlib library to extract key points in the face image, the key points including feature points of the overall face area with different numbers, left eyebrow feature points, right eyebrow feature points, nose feature points, left eye feature points, right eye feature points and mouth feature points; and obtaining the eye key points and the mouth key points according to the numbers of the key points.

2. The fuzzy judgment method according to claim 1, characterized in that: The detecting the total fuzzy values ​​of the plurality of corner point regions by using a fuzzy value detection algorithm comprises: The Laplace operator is used to detect the pixel Laplace gradient value at each corner point area, and the sum of all the pixel Laplace gradient values ​​is calculated, where the sum of the pixel Laplace gradient values ​​is the total blur value of the several corner point areas.

3. The fuzzy judgment method according to claim 1, characterized in that: The acquiring of a face image comprises: Acquire an image to be detected, extract Haar features of the image to be detected, and obtain a feature image corresponding to the image to be detected; Scanning the feature image according to a sliding window of a preset size to obtain a plurality of sub-window feature images, using a forest-type decision tree algorithm to determine whether each sub-window feature image includes a human face, and obtaining a target feature image including a human face from the plurality of sub-window feature images; The coordinate position of the target feature image is recorded, and the face image in the image to be detected is determined according to the coordinate position.

4. The fuzzy judgment method according to claim 1, characterized in that: Before detecting the target key points in the face image according to the preset face key point detection algorithm, the method further includes: The face image is scaled to a preset target size.

5. The fuzzy judgment method according to claim 1, characterized in that: The step of judging whether the face image is blurred according to the total blur value includes: Obtaining a preset blur threshold, determining whether the total blur value is greater than the blur threshold, and determining that the face image is blurred when the total blur value is greater than the blur threshold; When the total blur value is less than or equal to the blur threshold, it is determined that the facial image is clear.

6. A fuzzy judgment device, characterized in that: The device comprises: A key point acquisition module, used to acquire a face image, and detect target key points in the face image according to a preset face key point detection algorithm, wherein the target key points include eye key points and mouth key points; A corner point acquisition module is used to determine the corner points in the target key points according to a preset corner point detection algorithm; A blur judgment module is used to intercept a plurality of corner point regions in the face image, each of which includes a corner point, detect the total blur values ​​of the plurality of corner point regions by a blur value detection algorithm, and judge whether the face image is blurred according to the total blur value; The face image is a grayscale image, and the corner point acquisition module is specifically used to: obtain the grayscale value of each pixel in a preset window at each target key point, and the preset window takes the target key point as the window center; calculate the sum of the grayscale values ​​of each pixel in the preset window, and use the sum of the grayscale values ​​as the original grayscale value; move the preset window to multiple preset directions, and record the grayscale change value of the preset window during the movement according to the original grayscale value; determine the corner point in the target key point according to the grayscale change value; The key point acquisition module is specifically used to: use the Dlib library to extract the key points in the face image, the key points including feature points of the overall face area with different numbers, left eyebrow feature points, right eyebrow feature points, nose feature points, left eye feature points, right eye feature points and mouth feature points; obtain the eye key points and the mouth key points according to the numbers of the key points.

7. A computer-readable storage medium storing a computer program, characterized in that: When the computer program is executed by a processor, the processor is caused to perform the steps of the method according to any one of claims 1 to 5.

8. A terminal device, comprising a memory and a processor, characterized in that: The memory stores a computer program, and when the computer program is executed by the processor, the processor is caused to perform the steps of the method according to any one of claims 1 to 5.

Citation Information

Patent Citations

  • Highway monitoring video definition detection method based on corner features

    CN104182983A

  • Face detecting method and device

    CN105809123A

  • Face definition judgment method

    CN107977639A

  • Face analysis-based multi-person image scoring method, system and device and medium

    CN109978884A

  • Face fuzziness detection method and device, computer equipment and storage medium

    CN111368758A