CN111161281A - Face region identification method and device and storage medium - Google Patents

Face region identification method and device and storage medium Download PDF

Info

Publication number
CN111161281A
CN111161281A CN201911365510.8A CN201911365510A CN111161281A CN 111161281 A CN111161281 A CN 111161281A CN 201911365510 A CN201911365510 A CN 201911365510A CN 111161281 A CN111161281 A CN 111161281A
Authority
CN
China
Prior art keywords
face
image
face region
region
area
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN201911365510.8A
Other languages
Chinese (zh)
Inventor
张秋镇
林凡
刘经豪
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
GCI Science and Technology Co Ltd
Original Assignee
GCI Science and Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by GCI Science and Technology Co Ltd filed Critical GCI Science and Technology Co Ltd
Priority to CN201911365510.8A priority Critical patent/CN111161281A/en
Publication of CN111161281A publication Critical patent/CN111161281A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/10Segmentation; Edge detection
    • G06T7/11Region-based segmentation
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/10Segmentation; Edge detection
    • G06T7/13Edge detection
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/10Segmentation; Edge detection
    • G06T7/155Segmentation; Edge detection involving morphological operators
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/90Determination of colour characteristics
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2207/00Indexing scheme for image analysis or image enhancement
    • G06T2207/20Special algorithmic details
    • G06T2207/20036Morphological image processing
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2207/00Indexing scheme for image analysis or image enhancement
    • G06T2207/30Subject of image; Context of image processing
    • G06T2207/30196Human being; Person
    • G06T2207/30201Face

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Theoretical Computer Science (AREA)
  • Image Analysis (AREA)

Abstract

The invention discloses a face region identification method, a face region identification device and a storage medium, wherein the method comprises the following steps: acquiring an image to be identified, and preprocessing the image to be identified to obtain a preprocessed image; processing the preprocessed image by adopting an improved edge detection algorithm and Gaussian smoothing to obtain a plurality of face candidate regions; the improved edge detection algorithm integrates the traditional eight templates corresponding to the boundary direction according to the direction of a symmetry axis, makes maximum response by taking an axis as a specific edge direction, and forms four outputs by taking the maximum value of the four templates as an edge amplitude image; performing mathematical morphology processing on the face candidate region to determine the initial position of the face region; and judging the initial position according to the geometric characteristics of the face region to determine the position of the face region. The invention can effectively reduce the calculated amount and improve the recognition efficiency and accuracy by adopting the improved edge detection algorithm, the Gaussian smoothing filtering technology and the human face geometric characteristics for positioning.

Description

Face region identification method and device and storage medium
Technical Field
The present invention relates to the field of face recognition technologies, and in particular, to a face region recognition method, a face region recognition device, and a storage medium.
Background
The face recognition system is an emerging biological recognition technology, is a high-precision technology for the current international scientific and technological field and has wide development prospect. The human face area recognition and extraction is a difficult problem in a human face recognition system, the essence of the human face area recognition is image segmentation, and the aim of the human face area recognition is to extract a human face area from an original image for the next character segmentation and recognition. The identification method is various, but many methods have the defects of large calculation amount, long identification time and low positioning accuracy to different degrees.
Disclosure of Invention
The embodiment of the invention aims to provide a face region identification method, a face region identification device and a storage medium.
In order to achieve the above object, an embodiment of the present invention provides a face region identification method, including the following steps:
acquiring an image to be identified, and preprocessing the image to be identified to obtain a preprocessed image;
processing the preprocessed image by adopting an improved edge detection algorithm and Gaussian smoothing to obtain a plurality of face candidate regions; the improved edge detection algorithm integrates the traditional eight templates corresponding to the boundary direction according to the direction of a symmetry axis, makes maximum response by taking an axis as a specific edge direction, and forms four outputs by taking the maximum value of the four templates as an edge amplitude image;
performing mathematical morphology processing on the face candidate region to determine a preliminary position of the face region;
and judging the initial position according to the geometric characteristics of the face region to determine the position of the face region.
Preferably, the method further comprises:
and judging the initial position according to the skin color characteristics of the human face, and determining the position of the human face area.
Preferably, the determining the preliminary position according to the face skin color feature to determine the face region position specifically includes:
selecting a central area of the face candidate area, and converting a color model of the central area into an HSV (hue, saturation and value) model;
dividing according to color intervals, and counting the number of pixel points falling into each color interval;
carrying out color statistics on the central area, and classifying the pixel points;
and deleting the pseudo face area to determine the position of the face area.
Preferably, the acquiring an image to be identified and preprocessing the image to be identified to obtain a preprocessed image specifically include:
acquiring an image to be recognized, and carrying out weighted average on RGB three components of the image to be recognized to obtain a gray image; wherein, gray is 0.3R +0.59G +0.11B, gray represents gray, R represents red, G represents green, and B represents blue;
and carrying out histogram equalization processing on the gray level image to obtain a preprocessed image.
Preferably, the algorithm of gaussian smoothing is specifically:
Figure BDA0002335902790000021
wherein i and j are constants corresponding to two different projection positions,
Figure BDA0002335902790000022
t (i) is the projection value, T' (i) is the projection value after smoothing, w is the single-sided width of the smoothing region, h (j, σ) is a gaussian function, and σ is a parameter of the gaussian function.
Preferably, the mathematical morphology processing comprises the steps of:
selecting any point of the face candidate area, pressing the point into a stack, and performing recursion;
judging whether the stack is empty or not, if not, popping up the point as a current point, and labeling;
continuously searching left, lower, right and upper adjacent points of the current point in the corresponding face candidate area, judging whether each adjacent point is marked or not, and sequentially pressing the adjacent points without marks into a stack;
and repeating the steps until the stack is empty.
Preferably, the determining the preliminary position according to the geometric features of the face region to determine the position of the face region specifically includes:
and deleting the pseudo face area according to the size and the length-width ratio of the candidate face area, the pixel distribution relation of the candidate face area and the position of the face candidate area in the image to be recognized, and determining the position of the face area.
Another embodiment of the present invention provides a face region recognition apparatus, including:
the system comprises a preprocessing module, a storage module and a processing module, wherein the preprocessing module is used for acquiring an image to be identified and preprocessing the image to be identified to obtain a preprocessed image;
the candidate region determining module is used for processing the preprocessed image by adopting an improved edge detection algorithm and Gaussian smoothing to obtain a plurality of face candidate regions; the improved edge detection algorithm integrates the traditional eight templates corresponding to the boundary direction according to the direction of a symmetry axis, makes maximum response by taking an axis as a specific edge direction, and forms four outputs by taking the maximum value of the four templates as an edge amplitude image;
the preliminary positioning module is used for performing mathematical morphology processing on the face candidate region to determine a preliminary position of the face region;
and the judging module is used for judging the preliminary position according to the geometric characteristics of the face region and determining the position of the face region.
Another embodiment of the present invention correspondingly provides an apparatus using a face region recognition method, including a processor, a memory, and a computer program stored in the memory and configured to be executed by the processor, where the processor implements the face region recognition method according to any one of the above descriptions when executing the computer program.
A further embodiment of the present invention provides a computer-readable storage medium, which includes a stored computer program, wherein when the computer program runs, the apparatus where the computer-readable storage medium is located is controlled to execute the face region identification method according to any one of the above items.
Compared with the prior art, the face region identification method, the face region identification device and the storage medium provided by the embodiment of the invention can effectively reduce the calculated amount, improve the face identification efficiency and accuracy and achieve the purpose of quickly positioning the face region by adopting the improved edge detection algorithm, the Gaussian smooth filtering technology and the face geometric characteristics for positioning.
Drawings
Fig. 1 is a schematic flow chart of a face region recognition method according to an embodiment of the present invention;
fig. 2 is a schematic structural diagram of a face region recognition apparatus according to an embodiment of the present invention.
Fig. 3 is a schematic diagram of an apparatus using a face region recognition method according to an embodiment of the present invention.
Detailed Description
The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
Referring to fig. 1, which is a schematic flow chart of a face region recognition method according to an embodiment of the present invention, the method includes steps S1 to S4:
s1, acquiring an image to be identified, and preprocessing the image to be identified to obtain a preprocessed image;
s2, processing the preprocessed image by adopting an improved edge detection algorithm and Gaussian smoothing to obtain a plurality of face candidate regions; the improved edge detection algorithm integrates the traditional eight templates corresponding to the boundary direction according to the direction of a symmetry axis, makes maximum response by taking an axis as a specific edge direction, and forms four outputs by taking the maximum value of the four templates as an edge amplitude image;
s3, performing mathematical morphology processing on the face candidate region to determine the initial position of the face region;
and S4, judging the preliminary position according to the geometric characteristics of the face region, and determining the position of the face region.
Specifically, an image to be recognized is acquired, and the image to be recognized is preprocessed to obtain a preprocessed image, which is to reduce the amount of calculation of subsequent image processing and prepare for subsequent upper layer operations.
Processing the preprocessed image by adopting an improved edge detection algorithm and Gaussian smoothing to obtain a plurality of face candidate regions; the improved edge detection algorithm is improved on the basis of a classical edge detection algorithm, and mainly integrates the traditional eight templates corresponding to the boundary direction according to the direction of a symmetry axis, makes the maximum response by taking an axis as a specific edge direction, and forms four outputs by taking the maximum value of the four templates as an edge amplitude image. The improved edge detection algorithm has stronger capability of smoothing noise. Setting a center point qqHas a gray value of 0 and has gray values of 255 for the surrounding points, i.e., the center point is a black point and the surrounding points are white points, such that point q is a pointqTypically noise points.
And performing mathematical morphology processing on the face candidate region to determine the initial position of the face region. Generally, after mathematical morphology processing, many connected regions, that is, possible face regions, appear in an image to be recognized, and possible face region sub-images are segmented from the image to be recognized according to position information provided by the regions, that is, the face region of interest is separated from the image to be recognized, so that it is necessary to mark each connected region, which is a preliminary position of the face region that can be determined, and the positions of the pseudo face regions need to be detected and deleted one by one in the following steps.
And judging the initial position according to the geometric characteristics of the face region to determine the position of the face region. Generally, the position of the face region of the image to be recognized is in the center of the image, the judgment can be performed according to the feature, and meanwhile, the real face region can be extracted from the face candidate region by utilizing the geometric features of the face region which are different from other regions.
According to the face region identification method provided by the embodiment 1 of the invention, the improved edge detection algorithm and the Gaussian smooth filtering technology are adopted, and the geometric features of the face are adopted for positioning, so that the calculated amount can be effectively reduced, the face identification efficiency and accuracy are improved, and the purpose of quickly positioning the face region is achieved.
As an improvement of the above, the method further comprises:
and judging the initial position according to the skin color characteristics of the human face, and determining the position of the human face area.
Specifically, for a common face region position, that is, a face region with moderate contrast and clearness, the above steps S1 to S4 can be used to accurately and effectively locate the face region position, but for some special face images, for example, an image with overexcited facial expression or affected by many factors such as illumination intensity, so that different face regions are difficult to achieve stable unification.
As an improvement of the above scheme, the determining the preliminary position according to the face skin color feature to determine the face region position specifically includes:
selecting a central area of the face candidate area, and converting a color model of the central area into an HSV (hue, saturation and value) model;
dividing according to color intervals, and counting the number of pixel points falling into each color interval;
carrying out color statistics on the central area, and classifying the pixel points;
and deleting the pseudo face area to determine the position of the face area.
Specifically, the central region of the face candidate region is selected, and the color model of the face candidate region is converted into the HSV model, which utilizes the high independence of the HSV color model to judge the face region.
After the HSV model is converted, dividing according to the color interval, and counting the number of pixel points falling into each color interval; and performing color statistics on the central region, classifying all pixel points to obtain a classification result, and finally deleting the pseudo face region according to the classification result so as to determine the position of the face region.
As an improvement of the above scheme, the acquiring an image to be recognized and preprocessing the image to be recognized to obtain a preprocessed image specifically includes:
acquiring an image to be recognized, and carrying out weighted average on RGB three components of the image to be recognized to obtain a gray image; wherein, gray is 0.3R +0.59G +0.11B, gray represents gray, R represents red, G represents green, and B represents blue;
and carrying out histogram equalization processing on the gray level image to obtain a preprocessed image.
Specifically, an image to be recognized is obtained, and weighted average is carried out on RGB three components of the image to be recognized to obtain a gray level image; the gray is gray, R is red, G is green, and B is blue, and the RGB three-component weights are set such that human eyes have the highest sensitivity to green and the lowest sensitivity to blue, so that the green weight is higher and the blue weight is lower, and thus a reasonable gray image can be obtained after weighted average processing.
And carrying out histogram equalization processing on the gray level image to obtain a preprocessed image. In particular, the image is non-linearly stretched, and image pixel values are redistributed, so that the number of pixel values in a certain gray scale range is approximately equal. Thus, the contrast of the top part of the peak in the middle of the original histogram is enhanced, the contrast of the bottom part of the valley at the two sides is reduced, and the histogram of the output image is a flatter segmented histogram.
The histogram equalization reassigns the image pixel values to perform certain mapping transformation on the pixel gray scale of the original image, so that the probability density of the transformed image gray scale is uniformly distributed, the dynamic range of the image gray scale is increased, the contrast of the image is improved, and preparation is made for the subsequent upper layer operation.
In summary, the preprocessing is to facilitate subsequent positioning and identification environment of the system, and since the image to be identified is mostly photographed by a digital product and is restricted by the photographing environment, the image is often underexposed, the image is blurred, and the contrast and the signal-to-noise ratio are low, the image to be identified is subjected to image graying and histogram equalization processing.
As an improvement of the above scheme, the algorithm of gaussian smoothing specifically includes:
Figure BDA0002335902790000071
wherein i and j are constants corresponding to two different projection positions,
Figure BDA0002335902790000072
t (i) is the projection value, T' (i) is the projection value after smoothing, w is the single-sided width of the smoothing region, h (j, σ) is a gaussian function, and σ is a parameter of the gaussian function.
Specifically, in order to pursue a more ideal edge extraction effect, the obtained preprocessed image is smoothed, and the most direct and effective method for achieving the effect is to use gaussian balance filtering, i.e., a gaussian function. Since the gaussian waveform has a unimodal, smooth shape, the gaussian waveform can be convolved with the projection image to smooth the burrs in the projection image.
In this embodiment, a discrete gaussian smoothing algorithm is used to smooth the projection, and the algorithm specifically includes:
Figure BDA0002335902790000073
wherein i and j are constants corresponding to two different projection positions,
Figure BDA0002335902790000074
t (i) is the projection value, T' (i) is the projection value after smoothing, w is the single-sided width of the smoothing region, h (j, σ) is a gaussian function, and σ is a parameter of the gaussian function. Preferably, the value of w is 8 and the value of σ is 0.05.
It is noted that σ is a parameter of the gaussian function, and its choice has an important role in the smoothing effect of the horizontal projection. Sigma is too large, although the projected fine burrs can be completely fused, the relative positions of the wave crests and the wave troughs of the image can be changed, and therefore the accurate positioning of the positions of the face regions is not facilitated. If σ is too small, many fine burrs will not be fused, and the algorithm will find the wrong position when finding the peaks and valleys.
As an improvement of the above scheme, the mathematical morphology processing comprises the following steps:
selecting any point of the face candidate area, pressing the point into a stack, and performing recursion;
judging whether the stack is empty or not, if not, popping up the point as a current point, and labeling;
continuously searching left, lower, right and upper adjacent points of the current point in the corresponding face candidate area, judging whether each adjacent point is marked or not, and continuously pressing the adjacent points without marks into a stack;
and repeating the steps until the stack is empty.
Specifically, the fixed form factor SE in the conventional mathematical morphology method has poor adaptability, and once the size of the face region exceeds the specified range, the required effect after expansion cannot be achieved, even a pseudo face region is generated, which brings inconvenience to subsequent positioning work.
In this embodiment, the mathematical morphology processing can improve the above disadvantages, and the specific method is as follows: selecting any point of the face candidate area, pressing the point into a stack, and performing recursion; judging whether the stack is empty or not, if not, popping up the point as a current point, and labeling; continuously searching left, lower, right and upper adjacent points of the current point in the corresponding face candidate area, judging whether each adjacent point is marked or not, and sequentially pressing the adjacent points without marks into a stack; and repeating the steps until the stack is empty.
To enhance the understanding of the present embodiment, the following description will be made using an example:
(1) assuming that the point A is any point selected in the face candidate region, and the points B, C, D and E are respectively corresponding to the adjacent points of the point A on the left, the lower, the right and the upper sides in the face candidate region, firstly, pressing the point A into a stack;
(2) judging whether the stack is empty or not, popping up the point A and marking the point A, then searching corresponding left, lower, right and upper adjacent points which are the point B, the point C, the point D and the point E, wherein the point B, the point C, the point D and the point E are not marked, so the point B, the point C, the point D and the point E need to be sequentially pressed into the stack, each operation is the same as the operation corresponding to the point E, and only the point E is described for more concise expression. Point E is the last point and is pushed onto the stack;
(3) judging whether the stack is empty or not, if so, popping up a point E, if the point E has no other adjacent points and A is a marked point, not pressing the stack, continuously judging whether the stack is empty or not, and repeating the steps until the stack is empty.
As an improvement of the above scheme, the determining the preliminary position according to the geometric features of the face region to determine the position of the face region specifically includes:
and deleting the pseudo face area according to the size and the length-width ratio of the candidate face area, the pixel distribution relation of the candidate face area and the position of the face candidate area in the image to be recognized, and determining the position of the face area.
Specifically, the length and width of the candidate face region are checked, and an excessively small region is removed according to a preset threshold, but an excessively large region generally has to be reserved because it may be formed by partial adhesion of the face region and the surrounding environment. And then extracting real face regions from all the candidate face regions by using the geometric characteristics of the face regions which are different from other regions. The pseudo face area is deleted to determine the position of the face area according to the three aspects of the size and the length-width ratio of the candidate face area, the pixel distribution relation of the candidate face area and the position of the face candidate area in the image to be recognized.
Preferably, the candidate face area in the center of the image to be recognized and the candidate face area with the aspect ratio of [ 0.40-0.95 ] are selected as the position of the face area, because the false face area can be deleted according to the geometric features, so that the position of the face area can be determined.
Referring to fig. 2, which is a schematic structural diagram of a face region recognition apparatus according to an embodiment of the present invention, the apparatus includes:
the system comprises a preprocessing module 11, a storage module and a display module, wherein the preprocessing module 11 is used for acquiring an image to be identified and preprocessing the image to be identified to obtain a preprocessed image;
a candidate region determining module 12, configured to process the preprocessed image by using an improved edge detection algorithm and gaussian smoothing to obtain a plurality of face candidate regions; the improved edge detection algorithm integrates the traditional eight templates corresponding to the boundary direction according to the direction of a symmetry axis, makes maximum response by taking an axis as a specific edge direction, and forms four outputs by taking the maximum value of the four templates as an edge amplitude image;
a preliminary positioning module 13, configured to perform mathematical morphology processing on the face candidate region to determine a preliminary position of the face region;
and the judging module 14 is configured to judge the preliminary position according to the geometric features of the face region, and determine the position of the face region.
Preferably, the apparatus further comprises:
and the skin color judging module is used for judging the preliminary position according to the skin color characteristics of the face to determine the position of the face area.
Preferably, the skin color determination module specifically includes:
the conversion unit is used for selecting a central area of the face candidate area and converting a color model of the central area into an HSV model;
the dividing unit is used for dividing according to color intervals and counting the number of pixel points falling into each color interval;
the classification unit is used for carrying out color statistics on the central area and classifying the pixel points;
and the deleting unit is used for deleting the pseudo face area and determining the position of the face area.
Preferably, the preprocessing module 11 specifically includes:
the device comprises a graying unit, a processing unit and a control unit, wherein the graying unit is used for acquiring an image to be identified and carrying out weighted average on RGB three components of the image to be identified to obtain a grayscale image; wherein, gray is 0.3R +0.59G +0.11B, gray represents gray, R represents red, G represents green, and B represents blue;
and the histogram equalization unit is used for performing histogram equalization processing on the gray level image to obtain a preprocessed image.
Preferably, the algorithm of gaussian smoothing is specifically:
Figure BDA0002335902790000101
wherein i and j are constants corresponding to two different projection positions,
Figure BDA0002335902790000111
t (i) is the projection value, T' (i) is the projection value after smoothing, w is the single-sided width of the smoothing region, h (j, σ) is a gaussian function, and σ is a parameter of the gaussian function.
Preferably, the mathematical morphology processing comprises the steps of:
selecting any point of the face candidate area, pressing the point into a stack, and performing recursion;
judging whether the stack is empty or not, if not, popping up the point as a current point, and labeling;
continuously searching left, lower, right and upper adjacent points of the current point in the corresponding face candidate area, judging whether each adjacent point is marked or not, and sequentially pressing the adjacent points without marks into a stack;
and repeating the steps until the stack is empty.
Preferably, the judging module 14 is specifically configured to:
and deleting the pseudo face area according to the size and the length-width ratio of the candidate face area, the pixel distribution relation of the candidate face area and the position of the face candidate area in the image to be recognized, and determining the position of the face area.
The face region identification device provided in the embodiment of the present invention can implement all the processes of the face region identification method described in any one of the above embodiments, and the functions and implemented technical effects of each module and unit in the device are respectively the same as those of the face region identification method described in the above embodiment, and are not described herein again.
Referring to fig. 3, the apparatus using the face region recognition method according to an embodiment of the present invention is schematically illustrated, and the apparatus using the face region recognition method includes a processor 10, a memory 20, and a computer program stored in the memory 20 and configured to be executed by the processor 10, where the processor 10 implements the face region recognition method according to any one of the above embodiments when executing the computer program.
Illustratively, the computer program may be divided into one or more modules/units, which are stored in the memory 20 and executed by the processor 10 to implement the present invention. One or more of the modules/elements may be a series of computer program instruction segments capable of performing certain functions, which are used to describe the execution of a computer program in a face region recognition method. For example, the computer program may be divided into a preprocessing module, a candidate region determination module, a preliminary positioning module, and a determination module, each module having the following specific functions:
the system comprises a preprocessing module 11, a storage module and a display module, wherein the preprocessing module 11 is used for acquiring an image to be identified and preprocessing the image to be identified to obtain a preprocessed image;
a candidate region determining module 12, configured to process the preprocessed image by using an improved edge detection algorithm and gaussian smoothing to obtain a plurality of face candidate regions; the improved edge detection algorithm integrates the traditional eight templates corresponding to the boundary direction according to the direction of a symmetry axis, makes maximum response by taking an axis as a specific edge direction, and forms four outputs by taking the maximum value of the four templates as an edge amplitude image;
a preliminary positioning module 13, configured to perform mathematical morphology processing on the face candidate region to determine a preliminary position of the face region;
and the judging module 14 is configured to judge the preliminary position according to the geometric features of the face region, and determine the position of the face region.
The device using the face region identification method can be a desktop computer, a notebook computer, a palm computer, a cloud server and other computing equipment. The device using the face region recognition method may include, but is not limited to, a processor and a memory. It will be understood by those skilled in the art that the schematic diagram of fig. 3 is merely an example of an apparatus using the face region recognition method, and does not constitute a limitation of the apparatus using the face region recognition method, and may include more or less components than those shown in the drawings, or combine some components, or different components, for example, the apparatus using the face region recognition method may further include an input and output device, a network access device, a bus, and the like.
The Processor 10 may be a Central Processing Unit (CPU), other general purpose Processor, a Digital Signal Processor (DSP), an Application Specific Integrated Circuit (ASIC), an off-the-shelf Programmable Gate Array (FPGA) or other Programmable logic device, discrete Gate or transistor logic, discrete hardware components, etc. The general purpose processor may be a microprocessor or the processor 10 may be any conventional processor or the like, and the processor 10 is a control center of the apparatus using the face region recognition method, and various interfaces and lines are used to connect various parts of the entire apparatus using the face region recognition method.
The memory 20 may be used to store the computer programs and/or modules, and the processor 10 implements various functions of the apparatus using the face region recognition method by operating or executing the computer programs and/or modules stored in the memory 20 and calling data stored in the memory 20. The memory 20 may mainly include a storage program area and a storage data area, wherein the storage program area may store an operating system, an application program required for at least one function, and the like; the storage data area may store data created according to program use, and the like. In addition, the memory 20 may include high speed random access memory, and may also include non-volatile memory, such as a hard disk, a memory, a plug-in hard disk, a Smart Media Card (SMC), a Secure Digital (SD) Card, a Flash memory Card (Flash Card), at least one magnetic disk storage device, a Flash memory device, or other volatile solid state storage device.
Wherein, the module integrated by the device using the face region recognition method can be stored in a computer readable storage medium if the module is realized in the form of a software functional unit and sold or used as an independent product. Based on such understanding, all or part of the flow of the method according to the embodiments of the present invention may also be implemented by a computer program, which may be stored in a computer-readable storage medium and can implement the steps of the embodiments of the method when the computer program is executed by a processor. The computer program includes computer program code, and the computer program code may be in a source code form, an object code form, an executable file or some intermediate form. The computer readable medium may include: any entity or device capable of carrying computer program code, recording medium, U.S. disk, removable hard disk, magnetic disk, optical disk, computer Memory, Read-Only Memory (ROM), Random Access Memory (RAM), electrical carrier wave signals, telecommunications signals, software distribution media, and the like. It should be noted that the computer readable medium may contain other components which may be suitably increased or decreased as required by legislation and patent practice in jurisdictions, for example, in some jurisdictions, in accordance with legislation and patent practice, the computer readable medium does not include electrical carrier signals and telecommunications signals.
The embodiment of the present invention further provides a computer-readable storage medium, where the computer-readable storage medium includes a stored computer program, and when the computer program runs, the apparatus where the computer-readable storage medium is located is controlled to execute the face region identification method according to any of the above embodiments.
To sum up, according to the face region identification method, the face region identification device and the storage medium provided by the embodiment of the invention, when an image to be identified is obtained, the image is subjected to graying and histogram equalization preprocessing, so that the calculation amount of a subsequent image is effectively reduced, and preparation is also made for later upper-layer operation; the method adopts an edge detection algorithm and Gaussian smooth filtering in the generation link of the face candidate region, so that the edge extraction effect is better, and simultaneously deletes the fake face region by using the geometric features and the skin color features of the face, so that the accurate positioning of the face region position is realized.
While the foregoing is directed to the preferred embodiment of the present invention, it will be understood by those skilled in the art that various changes and modifications may be made without departing from the spirit and scope of the invention.

Claims (10)

1. A face region identification method is characterized by comprising the following steps:
acquiring an image to be identified, and preprocessing the image to be identified to obtain a preprocessed image;
processing the preprocessed image by adopting an improved edge detection algorithm and Gaussian smoothing to obtain a plurality of face candidate regions; the improved edge detection algorithm integrates the traditional eight templates corresponding to the boundary direction according to the direction of a symmetry axis, makes maximum response by taking an axis as a specific edge direction, and forms four outputs by taking the maximum value of the four templates as an edge amplitude image;
performing mathematical morphology processing on the face candidate region to determine a preliminary position of the face region;
and judging the initial position according to the geometric characteristics of the face region to determine the position of the face region.
2. The face region recognition method of claim 1, wherein the method further comprises:
and judging the initial position according to the skin color characteristics of the human face, and determining the position of the human face area.
3. The method for recognizing a face region according to claim 2, wherein the determining the preliminary position according to the face skin color feature to determine the face region position specifically comprises:
selecting a central area of the face candidate area, and converting a color model of the central area into an HSV (hue, saturation and value) model;
dividing according to color intervals, and counting the number of pixel points falling into each color interval;
carrying out color statistics on the central area, and classifying the pixel points;
and deleting the pseudo face area to determine the position of the face area.
4. The method for recognizing a face region according to claim 1, wherein the acquiring an image to be recognized and preprocessing the image to be recognized to obtain a preprocessed image specifically comprises:
acquiring an image to be recognized, and carrying out weighted average on RGB three components of the image to be recognized to obtain a gray image; wherein, gray is 0.3R +0.59G +0.11B, gray represents gray, R represents red, G represents green, and B represents blue;
and carrying out histogram equalization processing on the gray level image to obtain a preprocessed image.
5. The face region recognition method according to claim 1, wherein the gaussian smoothing algorithm specifically comprises:
Figure FDA0002335902780000021
wherein i and j are constants corresponding to two different projection positions,
Figure FDA0002335902780000022
t (i) is the projection value, T' (i) is the projection value after smoothing, w is the single-sided width of the smoothing region, h (j, σ) is a gaussian function, and σ is a parameter of the gaussian function.
6. The face region recognition method of claim 1, wherein the mathematical morphology process comprises the steps of:
selecting any point of the face candidate area, pressing the point into a stack, and performing recursion;
judging whether the stack is empty or not, if not, popping up the point as a current point, and labeling;
continuously searching left, lower, right and upper adjacent points of the current point in the corresponding face candidate area, judging whether each adjacent point is marked or not, and sequentially pressing the adjacent points without marks into a stack;
and repeating the steps until the stack is empty.
7. The method for recognizing a face region according to claim 1, wherein the determining the preliminary position according to the geometric features of the face region to determine the position of the face region specifically comprises:
and deleting the pseudo face area according to the size and the length-width ratio of the candidate face area, the pixel distribution relation of the candidate face area and the position of the face candidate area in the image to be recognized, and determining the position of the face area.
8. A face region recognition apparatus, comprising:
the system comprises a preprocessing module, a storage module and a processing module, wherein the preprocessing module is used for acquiring an image to be identified and preprocessing the image to be identified to obtain a preprocessed image;
the candidate region determining module is used for processing the preprocessed image by adopting an improved edge detection algorithm and Gaussian smoothing to obtain a plurality of face candidate regions; the improved edge detection algorithm integrates the traditional eight templates corresponding to the boundary direction according to the direction of a symmetry axis, makes maximum response by taking an axis as a specific edge direction, and forms four outputs by taking the maximum value of the four templates as an edge amplitude image;
the preliminary positioning module is used for performing mathematical morphology processing on the face candidate region to determine a preliminary position of the face region;
and the judging module is used for judging the preliminary position according to the geometric characteristics of the face region and determining the position of the face region.
9. An apparatus using a face region recognition method, comprising a processor, a memory, and a computer program stored in the memory and configured to be executed by the processor, the processor implementing the face region recognition method according to any one of claims 1 to 7 when executing the computer program.
10. A computer-readable storage medium, comprising a stored computer program, wherein when the computer program runs, the computer-readable storage medium controls a device to execute the face region recognition method according to any one of claims 1 to 7.
CN201911365510.8A 2019-12-25 2019-12-25 Face region identification method and device and storage medium Pending CN111161281A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201911365510.8A CN111161281A (en) 2019-12-25 2019-12-25 Face region identification method and device and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201911365510.8A CN111161281A (en) 2019-12-25 2019-12-25 Face region identification method and device and storage medium

Publications (1)

Publication Number Publication Date
CN111161281A true CN111161281A (en) 2020-05-15

Family

ID=70558270

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201911365510.8A Pending CN111161281A (en) 2019-12-25 2019-12-25 Face region identification method and device and storage medium

Country Status (1)

Country Link
CN (1) CN111161281A (en)

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111815653A (en) * 2020-07-08 2020-10-23 深圳市梦网视讯有限公司 Method, system and equipment for segmenting face and body skin color area
CN111898408A (en) * 2020-06-09 2020-11-06 广州杰赛科技股份有限公司 Rapid face recognition method and device
CN113128391A (en) * 2021-04-15 2021-07-16 广东便捷神科技股份有限公司 Goods loading and taking method of unmanned vending machine based on face recognition
CN113408440A (en) * 2021-06-24 2021-09-17 展讯通信(上海)有限公司 Video data jam detection method, device, equipment and storage medium

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2015076433A1 (en) * 2013-11-20 2015-05-28 (주)나노인사이드 Facial image analysis method using local micro-pattern
CN105893946A (en) * 2016-03-29 2016-08-24 中国科学院上海高等研究院 Front face image detection method

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2015076433A1 (en) * 2013-11-20 2015-05-28 (주)나노인사이드 Facial image analysis method using local micro-pattern
CN105893946A (en) * 2016-03-29 2016-08-24 中国科学院上海高等研究院 Front face image detection method

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
岳鹏等: "一种实用的多车牌快速定位***" *

Cited By (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111898408A (en) * 2020-06-09 2020-11-06 广州杰赛科技股份有限公司 Rapid face recognition method and device
CN111898408B (en) * 2020-06-09 2023-09-19 广州杰赛科技股份有限公司 Quick face recognition method and device
CN111815653A (en) * 2020-07-08 2020-10-23 深圳市梦网视讯有限公司 Method, system and equipment for segmenting face and body skin color area
CN111815653B (en) * 2020-07-08 2024-01-30 深圳市梦网视讯有限公司 Method, system and equipment for segmenting human face and body skin color region
CN113128391A (en) * 2021-04-15 2021-07-16 广东便捷神科技股份有限公司 Goods loading and taking method of unmanned vending machine based on face recognition
CN113128391B (en) * 2021-04-15 2024-02-06 广东便捷神科技股份有限公司 Face recognition-based method for loading and picking goods of vending machine
CN113408440A (en) * 2021-06-24 2021-09-17 展讯通信(上海)有限公司 Video data jam detection method, device, equipment and storage medium

Similar Documents

Publication Publication Date Title
CN109154978B (en) System and method for detecting plant diseases
CN109344701B (en) Kinect-based dynamic gesture recognition method
CN111161281A (en) Face region identification method and device and storage medium
US7457432B2 (en) Specified object detection apparatus
CN107038416B (en) Pedestrian detection method based on binary image improved HOG characteristics
KR101182173B1 (en) Method and system for recognizing vehicle plate
CN110838119B (en) Human face image quality evaluation method, computer device and computer readable storage medium
CN108197644A (en) A kind of image-recognizing method and device
CN109740572A (en) A kind of human face in-vivo detection method based on partial color textural characteristics
CN111695373B (en) Zebra stripes positioning method, system, medium and equipment
CN110866932A (en) Multi-channel tongue edge detection device and method and storage medium
CN108876795A (en) A kind of dividing method and system of objects in images
Huang et al. Text detection and recognition in natural scene images
CN104392211A (en) Skin recognition method based on saliency detection
JP2017102622A (en) Image processing device, image processing method and program
CN111709305B (en) Face age identification method based on local image block
CN109272001B (en) Structure training method and device of urine test recognition classifier and computer equipment
WO2011074014A2 (en) A system for lip corner detection using vision based approach
CN107729863B (en) Human finger vein recognition method
Youlian et al. Face detection method using template feature and skin color feature in rgb color space
CN108388898A (en) Character identifying method based on connector and template
CN112818983A (en) Method for judging character inversion by using picture acquaintance
JP3962517B2 (en) Face detection method and apparatus, and computer-readable medium
US10115195B2 (en) Method and apparatus for processing block to be processed of urine sediment image
CN108230409B (en) Image similarity quantitative analysis method based on multi-factor synthesis of color and content

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination