CN110232351A - A kind of electronic equipment, asic chip and its method for detecting human face and device - Google Patents
A kind of electronic equipment, asic chip and its method for detecting human face and device Download PDFInfo
- Publication number
- CN110232351A CN110232351A CN201910506988.1A CN201910506988A CN110232351A CN 110232351 A CN110232351 A CN 110232351A CN 201910506988 A CN201910506988 A CN 201910506988A CN 110232351 A CN110232351 A CN 110232351A
- Authority
- CN
- China
- Prior art keywords
- area
- skin color
- boundary
- human face
- image
- 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
Links
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06V—IMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
- G06V40/00—Recognition of biometric, human-related or animal-related patterns in image or video data
- G06V40/10—Human or animal bodies, e.g. vehicle occupants or pedestrians; Body parts, e.g. hands
- G06V40/16—Human faces, e.g. facial parts, sketches or expressions
- G06V40/161—Detection; Localisation; Normalisation
- G06V40/162—Detection; Localisation; Normalisation using pixel segmentation or colour matching
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06V—IMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
- G06V40/00—Recognition of biometric, human-related or animal-related patterns in image or video data
- G06V40/10—Human or animal bodies, e.g. vehicle occupants or pedestrians; Body parts, e.g. hands
- G06V40/16—Human faces, e.g. facial parts, sketches or expressions
- G06V40/172—Classification, e.g. identification
Landscapes
- Engineering & Computer Science (AREA)
- Health & Medical Sciences (AREA)
- General Health & Medical Sciences (AREA)
- Oral & Maxillofacial Surgery (AREA)
- Human Computer Interaction (AREA)
- Physics & Mathematics (AREA)
- General Physics & Mathematics (AREA)
- Multimedia (AREA)
- Theoretical Computer Science (AREA)
- Image Analysis (AREA)
- Image Processing (AREA)
Abstract
The invention discloses a kind of electronic equipment, asic chip and its method for detecting human face and devices, which comprises the area of skin color in identification image to be detected;Human face region is filtered out from the area of skin color identified;After the normalization for carrying out direction and size to the human face region, Face datection is carried out using characteristics algorithm.Using the present invention while application characteristics algorithm guarantees face accuracy in detection, the calculation amount and required storage resource in detection process are reduced.
Description
Technical field
The present invention relates to technical field of image processing, particularly relate to a kind of electronic equipment, asic chip and its Face datection
Method and apparatus.
Background technique
Application is unfolded in face recognition technology in many fields at present, and Face datection is as most critical in face recognition process
A step, the accuracy of detection can directly affect the result of recognition of face.
Traditional Haar (Ha Er) characteristics algorithm can preferably realize Face datection purpose.Haar feature is that one kind is used for
Target detection or the image feature descriptor of identification, Haar feature are usually used with AdaBoost classifiers combination, and due to
The accuracy rate of real-time and the AdaBoost classification of Haar feature extraction becomes Face datection and identification field more
Classical algorithm.
However, in practical applications, Haar characteristics algorithm needs very big calculation amount when to complicated Face datection,
Traditional PC (personal computer, individual based on CPU (central processing unit, Central Processing Unit)
Computer) platform realizes that Face datection algorithm can seriously affect the speed of Face datection, and if collocation GPU (graphics processor,
Graphics Processing Unit) realize Face datection algorithm, although Face datection speed can improved to a certain degree
Degree, but the heterogeneous platform of CPU+GPU cannot achieve miniaturization and power consumption is higher.Therefore, it is necessary to provide a kind of calculation amount and
The required less method for detecting human face of storage resource.
Summary of the invention
In view of this, it is an object of the invention to propose a kind of electronic equipment, asic chip and its method for detecting human face and
Device reduces the calculation amount and required in detection process while application characteristics algorithm guarantees face accuracy in detection
Storage resource.
A kind of method for detecting human face is provided based on the above-mentioned purpose present invention, comprising:
Identify the area of skin color in image to be detected;
Human face region is filtered out from the area of skin color identified;
After the normalization for carrying out direction and size to the human face region, Face datection is carried out using characteristics algorithm.
Preferably, before the area of skin color in described identification image to be detected, further includes:
White balance processing is carried out to described image to be detected;And
Area of skin color in described identification image to be detected, specifically:
Area of skin color is identified from by white balance treated image to be detected.
Preferably, described filter out human face region from the area of skin color identified, specifically include:
For the bianry image generated according to the recognition result of area of skin color, each colour of skin area in the bianry image is determined
The boundary point number in domain and the length-width ratio of boundary rectangle;
The area of skin color that the length-width ratio of boundary point number and boundary rectangle meets preset condition is screened as human face region.
Preferably, the boundary point number of each area of skin color and the length and width of boundary rectangle in the determination bianry image
Than specifically including:
The boundary that each area of skin color is marked from the bianry image generates boundary image;
It is traversed since the pixel of first, the upper left corner of the boundary image, when detecting value is 1 pixel, is determined
Search the new boundary point of the connected region on the boundary of an area of skin color;
For each connected region searched: to each current search of the connected region to new boundary point mark
The judgement of fixed, 8 neighborhood search and search result;Wherein, the calibration of boundary point includes: to record its coordinate, its value is set to 0,
The boundary point sum of the connected region is added 1;If described search result judge include: in described search result existence value be 1
Pixel, then use the pixel as the new boundary point that current search arrives, continue calibration, 8 neighborhood search and search result
Judgement;Otherwise, the boundary point for exporting the connected region of statistics is total, after the coordinate of each boundary point of the connected region,
The connected region on the boundary of next area of skin color is searched for from the boundary image;
For each connected region searched, by the boundary point sum of the connected region, as the connected region, institute is right
The boundary point number for the area of skin color answered;According to the coordinate of each boundary point of the connected region, coordinate extreme point, root are counted
The boundary rectangle of area of skin color corresponding to the connected region is determined according to coordinate extreme point, and then the boundary rectangle is calculated
Length-width ratio.
Preferably, the area of skin color screening that the length-width ratio by boundary point number and boundary rectangle meets preset condition is
Human face region specifically includes:
Area of skin color sieve by boundary point number greater than given threshold and the length-width ratio of boundary rectangle within the set range
It is selected as meeting the human face region of preset condition.
Preferably, the normalization for carrying out direction to the human face region, specifically includes:
Hough straight-line detection is carried out to the human face region filtered out in the bianry image, judges the master of the human face region
Direction;
By human face region corresponding in described image to be detected, according to the angle between the principal direction and direction initialization of judgement
It is rotated.
The present invention also provides a kind of human face detection devices, comprising:
Area of skin color detection module, for identification area of skin color in image to be detected;
Human face region screening module, for filtering out human face region from the area of skin color identified;
Normalized module, for carrying out the normalized in direction and size to the human face region;
Face detection module, for carrying out Face datection to the human face region after normalized using characteristics algorithm.
Further, described device further include: white balance processing module, for being carried out at white balance to described image to be detected
Reason;And
The area of skin color detection module is specifically used for identifying the colour of skin from by white balance treated image to be detected
Region.
The present invention also provides a kind of electronic equipment, comprising:
At least one processor;And
The memory being connect at least one described processor communication;Wherein,
The memory is stored with the instruction that can be performed, and described instruction is executed by least one described processor, so that
At least one described processor is able to carry out method for detecting human face as described above.
The present invention also provides a kind of asic chips, comprising: each mould in human face detection device Hardware, as described above
Block.
In the technical solution of the embodiment of the present invention, area of skin color is identified from image to be detected, and from the skin identified
After filtering out human face region in color region, the normalization in direction and size is carried out to the human face region filtered out, for example, will screening
Human face region out rotates to be vertical direction, and the human face region filtered out is scaled uniform sizes;And then to by normalizing
The human face region of change carries out Face datection using characteristics algorithm.Since normalized human face region size, angle are all consistent, because
This, there is no need to use a large amount of different sizes and angle when carrying out Face datection using characteristics algorithm for technical solution of the present invention
Image feature descriptor traversal detection carried out to image, and several characteristics of image for being suitble to unified direction and size are used only
Description carries out traversal detection to image, greatly reduces the calculation amount and required storage money of Face datection process
Source.
More preferably, in the technical solution of the embodiment of the present invention, white balance processing is carried out to image to be detected of input in advance,
The influence that external environment illumination condition identifies area of skin color is reduced, the subsequent color characteristic based on image is improved and carries out skin
The accuracy of color region detection.
It more preferably, is to the two-value generated according to the recognition result of area of skin color in the technical solution of the embodiment of the present invention
During the boundary of the area of skin color of image is demarcated, the boundary point number of area of skin color and the length and width of boundary rectangle are completed
The determination of ratio;And then human face region is filtered out according to the boundary point number of area of skin color and the length-width ratio of boundary rectangle;Due to inciting somebody to action
It is not inhuman in the area of skin color screening of proper range that given threshold or the length-width ratio of boundary rectangle, which is not achieved, in boundary point number
Face region can mitigate subsequent computational throughput to weed out a part of area of skin color.
More preferably, in the technical solution of the embodiment of the present invention, due to being carried out on the boundary of the area of skin color to bianry image
During calibration, the boundary image of the two-value of storage need to only be operated, be greatly saved for stored boundary image
RAM resource reduces consumption of the scheme for storage resource, more conducively the technology of the present invention side compared to existing face screening technique
The Hardware of case, the customization towards ASIC.
Detailed description of the invention
Fig. 1 is a kind of method for detecting human face flow chart provided in an embodiment of the present invention;
Fig. 2 is the determination of the length-width ratio of the boundary point number and boundary rectangle provided in an embodiment of the present invention to area of skin color
The flow chart of method;
Fig. 3 is the boundary image schematic diagram in the boundary point calibration process of connected region provided in an embodiment of the present invention;
Fig. 4 is a kind of 8 neighborhood search template schematic diagram provided in an embodiment of the present invention;
Fig. 5 determines area of skin color corresponding to connected region according to four coordinate extreme points to be provided in an embodiment of the present invention
Boundary rectangle schematic diagram;
Fig. 6 be it is provided in an embodiment of the present invention by screened in image to be detected for human face region area of skin color carry out direction
Normalized method flow diagram;
Fig. 7 is the schematic illustration of the principal direction of Hough straight-line detection human face region provided in an embodiment of the present invention;
Fig. 8 is the hardware plan figure of Hough straight-line detection provided in an embodiment of the present invention;
Fig. 9 is that the effect after the normalization provided in an embodiment of the present invention that human face region is carried out to direction and size is illustrated
Figure;
Figure 10 is a kind of internal structure block diagram of human face detection device provided in an embodiment of the present invention.
Specific embodiment
To make the objectives, technical solutions, and advantages of the present invention clearer, below in conjunction with specific embodiment, and reference
Attached drawing, the present invention is described in more detail.
The embodiment of the present invention is described below in detail, examples of the embodiments are shown in the accompanying drawings, wherein from beginning to end
Same or similar label indicates same or similar element or element with the same or similar functions.Below with reference to attached
The embodiment of figure description is exemplary, and for explaining only the invention, and is not construed as limiting the claims.
Those skilled in the art of the present technique are appreciated that unless expressly stated, singular " one " used herein, " one
It is a ", " described " and "the" may also comprise plural form.Wording "and/or" used herein includes one or more associated
The whole for listing item or any cell and all combination.
It should be noted that all statements for using " first " and " second " are for differentiation two in the embodiment of the present invention
The non-equal entity of a same names or non-equal parameter, it is seen that " first " " second " only for the convenience of statement, does not answer
It is interpreted as the restriction to the embodiment of the present invention, subsequent embodiment no longer illustrates this one by one.
The present inventor carries out analysis to existing tradition Haar characteristics algorithm and finds, although traditional Haar feature
Algorithm can preferably realize Face datection purpose, it is contemplated that there may be the people of different sizes, different angle in image
Face, in order to guarantee can detecte the face location of various sizes of face and different angle in image, it is necessary to using a large amount of
Image feature descriptor traversal detection is carried out to image, this is also directly resulted in, and the calculation amount of Face datection process is very big, processing
Time is very long.
As a result, in technical solution of the present invention, area of skin color is identified from image to be detected, and from the colour of skin identified
After filtering out human face region in region, the normalization in direction and size is carried out to the human face region filtered out, for example, will filter out
Human face region rotate to be vertical direction, the human face region filtered out is scaled uniform sizes;And then to by normalizing
Human face region utilize characteristics algorithm carry out Face datection.Since normalized human face region size, angle are all consistent,
There is no need to use a large amount of different sizes and angle when carrying out Face datection using characteristics algorithm for technical solution of the present invention
Image feature descriptor carries out traversal detection to image, and is used only and several characteristics of image in unified direction and size is suitble to retouch
It states son and traversal detection is carried out to image, greatly reduce the calculation amount and required storage resource of Face datection process.
Technical solution that the invention will now be described in detail with reference to the accompanying drawings.
A kind of method for detecting human face provided in an embodiment of the present invention, detailed process is as shown in Figure 1, include the following steps:
Step S101: white balance processing is carried out to image to be detected.
The present inventor is it is considered that the image of actual photographed will receive many factors such as environment light in many cases
Influence, and there is misalignment, for example, phenomena such as color of general image is partially red;This will lead to passes through in the next steps
Color characteristic come identify the area of skin color in image accuracy rate decline;It therefore, can be pre- as a kind of more preferably embodiment
White balance algorithm first based on maximum value or color mean value carries out white balance processing to image to be detected of input, to color of image
It is corrected, reduces the influence that external environment illumination condition identifies area of skin color, improve subsequent step based on image
The accuracy of color characteristic progress area of skin color detection.
Step S102: the area of skin color in identification image to be detected.
Specifically, area of skin color can be identified from the image to be detected handled by white balance: judging to be detected
Whether each pixel color component in image meets colour of skin section;The pixel that color component meets colour of skin section is identified as skin
The pixel in color region;Further, the bianry image of image to be detected can be also generated according to the recognition result of area of skin color: by color
The gray value that component meets the pixel in colour of skin section is set as 1, and the gray value of rest of pixels is set as zero, to generate to be detected
The bianry image of image, to be extracted all area of skin color in image by complexion model binaryzation.
Step S103: human face region is filtered out from the area of skin color identified.
Face area is screened using according to the bianry image that the recognition result of area of skin color generates the present invention provides a kind of
The method in domain, this method do not need caching full frame images, it is only necessary to cache boundary bianry image, reduce hardware plan
Consumption for storage resource.This method is, from the bianry image generated according to the recognition result of area of skin color, determines each
The boundary point number of area of skin color and the length-width ratio of boundary rectangle, and then the length-width ratio of boundary point number and boundary rectangle is met
The area of skin color screening of preset condition is human face region.
Wherein it is possible to complete area of skin color during the boundary of the area of skin color to bianry image is demarcated
The determination of boundary point number and the length-width ratio of boundary rectangle: the boundary that each area of skin color is marked from the bianry image is raw
At boundary image;It is traversed since the pixel of first, the upper left corner of the boundary image, when detecting value is 1 pixel,
Determine the new boundary point for searching the connected region on boundary of an area of skin color;For each connected region searched: right
Each current search of the connected region to new boundary point demarcated, the judgement of 8 neighborhood search and search result;Its
In, the calibration of boundary point includes: to record its coordinate, its value is set to 0, and the boundary point sum of the connected region is added 1;It is described to search
If hitch fruit judge include: in described search result existence value as 1 pixel, use the pixel as current search arrive it is new
Boundary point continues the judgement of calibration, 8 neighborhood search and search result;Otherwise, the side of the connected region of statistics is exported
Boundary's point is total, and after the coordinate of each boundary point of the connected region, the side of next area of skin color is searched for from the boundary image
The connected region on boundary;For each connected region searched, by the boundary point sum of the connected region, as the connected region
The boundary point number of corresponding area of skin color;According to the coordinate of each boundary point of the connected region, coordinate extreme value is counted
Point, according to coordinate extreme point determine the connected region corresponding to area of skin color boundary rectangle, and then it is external that this is calculated
The length-width ratio of rectangle.Detailed process is as shown in Fig. 2, include following sub-step:
Sub-step S201: the boundary that each area of skin color is marked from above-mentioned bianry image generates boundary image.
Specifically, it after generating boundary image from the boundary for marking each area of skin color in above-mentioned bianry image, generates
Boundary image be also binaryzation image, as shown in Figure 3.Boundary image can spell the mode of position into being stored in RAM;Due to
Boundary image as follow-up calibration boundary is also the image of binaryzation, and each pixel only has 1bit, therefore, use is greatly saved
In the RAM resource of stored boundary image, consumption of the hardware plan for storage resource is reduced compared to existing method.
Sub-step S202: being traversed since the pixel of first, the upper left corner of the boundary image, when detecting that value is 1
When pixel, the new boundary point for searching a new connected region is determined.
Specifically, as shown in figure 3, being traversed since the pixel of first, the upper left corner of the boundary image, when detecting
When the pixel that value is 1, the boundary for searching an area of skin color, i.e. a new connected region, by the new connected region are determined
The initial value of the boundary point sum in domain is set as 0, and will test value be 1 pixel as currently new boundary point.
Sub-step S203: current new boundary point is demarcated.
Specifically, for current new boundary point, the position (i.e. coordinate) in the boundary image of the boundary point is recorded,
And the boundary point sum of the connected region is added 1, the value of the new boundary point of this in the boundary image is set to 0, as shown in Figure 3.
Sub-step S204: 8 neighborhood search are carried out to current new boundary point.
Specifically, it as shown in figure 3, for current new boundary point, is searched in 8 neighborhoods of the boundary point according to setting sequence
Other pixels that rope value is 1;For example it can be scanned for by the sequence in 8 neighborhood search templates as shown in Figure 4.
Sub-step S205: judge to whether there is in search result value for 1 pixel;If so, being 1 by the value searched
Pixel jumps to sub-step S203 as current new boundary point, continues new boundary point is marked and 8 neighborhood search;It is no
Then, sub-step S206 is jumped to, the boundary demarcation process of the connected region is terminated.
Sub-step S206: terminate the boundary demarcation process of the connected region.
Specifically, when terminating the boundary demarcation of the connected region, as shown in figure 3, each of the connected region is searched
To boundary point be set to 0;In this sub-step, the boundary point sum of the connected region of statistics is exported, as the connection
The boundary point number of area of skin color corresponding to region;According to the coordinate of each boundary point of the connected region, coordinate is counted
Extreme point, for example, as shown in figure 5, after counting four, upper and lower, left and right coordinate extreme point, it is true according to four coordinate extreme points
The boundary rectangle of area of skin color corresponding to the fixed connected region;And then after calculating the length of the boundary rectangle, width, it is somebody's turn to do
The length-width ratio of boundary rectangle.
Later, it jumps to sub-step S202 and continues searching next connected region, i.e., the boundary of next area of skin color.
In this step, the boundary point number of each area of skin color and the length and width of boundary rectangle in determining the bianry image
Than after, boundary point number can be specifically greater than to the colour of skin of the length-width ratio of given threshold and boundary rectangle within the set range
Region screening is the human face region for meeting preset condition.Wherein, above-mentioned given threshold and setting range can be by those skilled in the art
Member is rule of thumb arranged.
Since boundary point number to be not achieved to the length-width ratio of given threshold or boundary rectangle not in the colour of skin of proper range
Region screening can mitigate subsequent computational throughput to weed out a part of area of skin color for non-face region.
Step S104: the normalized in direction and size is carried out to the human face region filtered out.
It is that the area of skin color of human face region carries out the normalizing in direction and size for screening in image to be detected in this step
The processing of change;Wherein, the normalized in direction is, the area of skin color for screening as human face region is rotated to be consistent direction;Ruler
Very little normalized is, the area of skin color for screening as human face region is scaled uniform sizes.
By screened in described image to be detected for human face region area of skin color carry out direction normalized it is specific
Process is as shown in fig. 6, include following sub-step:
Sub-step S601: Hough straight-line detection carried out to the human face region that filters out in the bianry image, described in judgement
The principal direction of human face region.
Specifically, Hough straight-line detection is carried out to each human face region filtered out in bianry image, then judges face
The principal direction in region.
As shown in fig. 7, the principle of Hough straight-line detection is, detection constitutes the angle of each straight line on the boundary of human face region
Degree, the average angle angle value of these straight lines, the principal direction as the human face region are calculated using weighted average method.Hough straight line
The hardware plan of detection is as shown in figure 8, due to the scheme that the program is well known to those skilled in the art, and and will not be described here in detail.
Sub-step S602: by human face region corresponding in described image to be detected, according to the principal direction of judgement and setting side
Angle between is rotated.
Specifically, the human face region that principal direction will be judged in bianry image is determined in described image to be detected and is corresponded to
Human face region, and then according to the angle between the principal direction and direction initialization of judgement, to what is determined in described image to be detected
Human face region is rotated.
For example, direction initialization is vertical direction, then can according to the principal direction of the human face region of judgement and vertical direction it
Between angle, human face region is rotated, as shown in Figure 9.
In addition, uniform sizes can be also scaled in this step to human face region, as shown in Figure 9.
Step S105: to the human face region after normalized, Face datection is carried out using characteristics algorithm.
Since normalized human face region size, angle are all consistent, technical solution of the present invention is calculated using feature
Method, such as Haar characteristics algorithm, there is no need to use the characteristics of image of a large amount of different sizes and angle to retouch when carrying out Face datection
It states son and traversal detection is carried out to image, and be used only and be suitble to several image feature descriptors in unified direction and size to image
Traversal detection is carried out, the calculation amount and required storage resource of Face datection process are greatly reduced.
Based on above-mentioned method for detecting human face, a kind of human face detection device provided in an embodiment of the present invention, internal structure is such as
Shown in Figure 10, comprising: area of skin color detection module 1001, human face region screening module 1002, normalized module 1003, people
Face detection module 1004.
Wherein, the area of skin color in image to be detected for identification of area of skin color detection module 1001.
Human face region screening module 1002 is for filtering out human face region from the area of skin color identified.
Normalized module 1003 is used to carry out the human face region normalized in direction and size.
Face detection module 1004 is used to carry out Face datection to the human face region after normalized using characteristics algorithm.
Further, a kind of human face detection device provided in an embodiment of the present invention may also include that white balance processing module 1005;
Wherein, white balance processing module 1005 is used to carry out white balance processing to described image to be detected;
And above-mentioned area of skin color detection module 1001 is specifically used for from by white balance treated image to be detected
Middle identification area of skin color.
Specifically, above-mentioned human face region screening module 1002 can for generated according to the recognition result of area of skin color two
It is worth image, determines the boundary point number of each area of skin color in the bianry image and the length-width ratio of boundary rectangle;By boundary point
The area of skin color screening that number and the length-width ratio of boundary rectangle meet preset condition is human face region.
Preferably, what human face region screening module 1002 can be demarcated on the boundary of the area of skin color to bianry image
In the process, the determination of the boundary point number of area of skin color and the length-width ratio of boundary rectangle: human face region screening module 1002 is completed
The boundary that each area of skin color is marked from the bianry image generates boundary image;From the upper left corner of the boundary image first
A pixel starts to be traversed, and when detecting value is 1 pixel, determines the connected region for searching the boundary of an area of skin color
The new boundary point in domain;For each connected region searched: the new boundary point arrived to each current search of the connected region
It is demarcated, the judgement of 8 neighborhood search and search result;Wherein, the calibration of boundary point includes: to record its coordinate, by its value
It is set to 0, the boundary point sum of the connected region is added 1;If the judgement of described search result includes: to exist in described search result
The pixel that value is 1, then use the pixel as the new boundary point that current search arrives, and continues calibration, 8 neighborhood search and search
As a result judgement;Otherwise, the boundary point sum of the connected region of statistics, the coordinate of each boundary point of the connected region are exported
Afterwards, the connected region on the boundary of next area of skin color is searched for from the boundary image;For each connected region searched,
Boundary point number by the boundary point sum of the connected region, as area of skin color corresponding to the connected region;According to the company
The coordinate of each boundary point in logical region, counts coordinate extreme point, which is determined according to coordinate extreme point corresponding to
Area of skin color boundary rectangle, and then the length-width ratio of the boundary rectangle is calculated.
Specifically, above-mentioned normalized module 1003 is when carrying out the normalization in direction to the human face region, to institute
It states the human face region filtered out in bianry image and carries out Hough straight-line detection, judge the principal direction of the human face region;It will be described
Corresponding human face region in image to be detected is rotated according to the angle between the principal direction and direction initialization of judgement.
Based on above-mentioned method for detecting human face, a kind of electronic equipment provided in an embodiment of the present invention, comprising: at least one
Manage device;And the memory being connect at least one described processor communication;
Wherein, the memory is stored with the instruction that can be performed, and described instruction is executed by least one described processor,
So that at least one described processor is able to carry out method for detecting human face as described above.
Since there is no need to use a large amount of differences when carrying out Face datection using characteristics algorithm for technical solution of the present invention
The image feature descriptor of size and angle carries out traversal detection to image, and if being used only and being suitble to unified direction and size
Dry image feature descriptor carries out traversal detection to image, greatly reduces the calculation amount of Face datection process and required
Storage resource;Therefore, be suitble to Hardware, can be towards ASIC (Application Specific Integrated
Circuit, specialized application integrated circuit) customization Face datection scheme, can be in FPGA (Field- using the program
Programmable Gate Array, field programmable gate array) or customization IC (Integrated Circuit, integrated electricity
Road) Face datection is realized in chip, Face datection processing speed and accuracy are improved, relative to the heterogeneous platform of CPU+GPU, this
Scheme realizes that the power consumption of Face datection is very low, and may be implemented to minimize.
A kind of asic chip that the embodiment of the present invention can also be provided as a result, including Hardware, above-mentioned human face detection device
In each module.
In the technical solution of the embodiment of the present invention, area of skin color is identified from image to be detected, and from the skin identified
After filtering out human face region in color region, the normalization in direction and size is carried out to the human face region filtered out, for example, will screening
Human face region out rotates to be vertical direction, and the human face region filtered out is scaled uniform sizes;And then to by normalizing
The human face region of change carries out Face datection using characteristics algorithm.Since normalized human face region size, angle are all consistent, because
This, there is no need to use a large amount of different sizes and angle when carrying out Face datection using characteristics algorithm for technical solution of the present invention
Image feature descriptor traversal detection carried out to image, and several characteristics of image for being suitble to unified direction and size are used only
Description carries out traversal detection to image, greatly reduces the calculation amount and required storage money of Face datection process
Source.
More preferably, in the technical solution of the embodiment of the present invention, white balance processing is carried out to image to be detected of input in advance,
The influence that external environment illumination condition identifies area of skin color is reduced, the subsequent color characteristic based on image is improved and carries out skin
The accuracy of color region detection.
It more preferably, is to the two-value generated according to the recognition result of area of skin color in the technical solution of the embodiment of the present invention
During the boundary of the area of skin color of image is demarcated, the boundary point number of area of skin color and the length and width of boundary rectangle are completed
The determination of ratio;And then human face region is filtered out according to the boundary point number of area of skin color and the length-width ratio of boundary rectangle;Due to inciting somebody to action
It is not inhuman in the area of skin color screening of proper range that given threshold or the length-width ratio of boundary rectangle, which is not achieved, in boundary point number
Face region can mitigate subsequent computational throughput to weed out a part of area of skin color.
More preferably, in the technical solution of the embodiment of the present invention, due to being carried out on the boundary of the area of skin color to bianry image
During calibration, the boundary image of the two-value of storage need to only be operated, be greatly saved for stored boundary image
RAM resource reduces consumption of the scheme for storage resource, more conducively the technology of the present invention side compared to existing face screening technique
The Hardware of case, the customization towards ASIC.
Those skilled in the art of the present technique have been appreciated that in the present invention the various operations crossed by discussion, method, in process
Steps, measures, and schemes can be replaced, changed, combined or be deleted.Further, each with having been crossed by discussion in the present invention
Kind of operation, method, other steps, measures, and schemes in process may also be alternated, changed, rearranged, decomposed, combined or deleted.
Further, in the prior art to have and the step in various operations, method disclosed in the present invention, process, measure, scheme
It may also be alternated, changed, rearranged, decomposed, combined or deleted.
It should be understood by those ordinary skilled in the art that: the discussion of any of the above embodiment is exemplary only, not
It is intended to imply that the scope of the present disclosure (including claim) is limited to these examples;Under thinking of the invention, above embodiments
Or can also be combined between the technical characteristic in different embodiments, step can be realized with random order, and be existed such as
Many other variations of the upper different aspect of the invention, for simplicity, they are not provided in details.Therefore, it is all
Within the spirit and principles in the present invention, any omission, modification, equivalent replacement, improvement for being made etc. be should be included in of the invention
Within protection scope.
Claims (10)
1. a kind of method for detecting human face characterized by comprising
Identify the area of skin color in image to be detected;
Human face region is filtered out from the area of skin color identified;
After the normalization for carrying out direction and size to the human face region, Face datection is carried out using characteristics algorithm.
2. the method according to claim 1, wherein it is described identification image to be detected in area of skin color it
Before, further includes:
White balance processing is carried out to described image to be detected;And
Area of skin color in described identification image to be detected, specifically:
Area of skin color is identified from by white balance treated image to be detected.
3. method according to claim 1 or 2, which is characterized in that described to filter out people from the area of skin color identified
Face region, specifically includes:
For the bianry image generated according to the recognition result of area of skin color, each area of skin color in the bianry image is determined
The length-width ratio of boundary point number and boundary rectangle;
The area of skin color that the length-width ratio of boundary point number and boundary rectangle meets preset condition is screened as human face region.
4. according to the method described in claim 3, it is characterized in that, each area of skin color in the determination bianry image
The length-width ratio of boundary point number and boundary rectangle, specifically includes:
The boundary that each area of skin color is marked from the bianry image generates boundary image;
It is traversed since the pixel of first, the upper left corner of the boundary image, when detecting value is 1 pixel, determines search
To the new boundary point of the connected region on the boundary of an area of skin color;
For each connected region searched: to each current search of the connected region to new boundary point demarcated, 8
The judgement of neighborhood search and search result;Wherein, the calibration of boundary point includes: to record its coordinate, its value is set to 0, by this
The boundary point sum of connected region adds 1;If described search result judge include: in described search result existence value as 1 picture
Element then uses the pixel as the new boundary point that current search arrives, and continues sentencing for calibration, 8 neighborhood search and search result
It is disconnected;Otherwise, the boundary point for exporting the connected region of statistics is total, after the coordinate of each boundary point of the connected region, from institute
State the connected region that boundary image searches for the boundary of next area of skin color;
For each connected region searched, by the boundary point sum of the connected region, as corresponding to the connected region
The boundary point number of area of skin color;According to the coordinate of each boundary point of the connected region, coordinate extreme point is counted, according to seat
Mark extreme point determines the boundary rectangle of area of skin color corresponding to the connected region, and then the length and width of the boundary rectangle are calculated
Than.
5. according to the method described in claim 3, it is characterized in that, described accord with boundary point number and the length-width ratio of boundary rectangle
The area of skin color screening for closing preset condition is human face region, is specifically included:
It is greater than the area of skin color screening of given threshold and the length-width ratio of boundary rectangle within the set range by boundary point number
Meet the human face region of preset condition.
6. according to the method described in claim 3, it is characterized in that, it is described to the human face region carry out direction normalization,
It specifically includes:
Hough straight-line detection is carried out to the human face region filtered out in the bianry image, judges the main side of the human face region
To;
By human face region corresponding in described image to be detected, carried out according to the angle between the principal direction and direction initialization of judgement
Rotation.
7. a kind of human face detection device characterized by comprising
Area of skin color detection module, for identification area of skin color in image to be detected;
Human face region screening module, for filtering out human face region from the area of skin color identified;
Normalized module, for carrying out the normalized in direction and size to the human face region;
Face detection module, for carrying out Face datection to the human face region after normalized using characteristics algorithm.
8. device according to claim 7, which is characterized in that further include:
White balance processing module, for carrying out white balance processing to described image to be detected;And
The area of skin color detection module is specifically used for identifying area of skin color from by white balance treated image to be detected.
9. a kind of electronic equipment characterized by comprising
At least one processor;And
The memory being connect at least one described processor communication;Wherein,
The memory is stored with the instruction that can be performed, and described instruction is executed by least one described processor, so that described
At least one processor is able to carry out the method for detecting human face as described in claim 1-6 is any.
10. a kind of asic chip characterized by comprising Hardware, the Face datection dress as described in claim 6-8 is any
Each module in setting.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201910506988.1A CN110232351A (en) | 2019-06-12 | 2019-06-12 | A kind of electronic equipment, asic chip and its method for detecting human face and device |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201910506988.1A CN110232351A (en) | 2019-06-12 | 2019-06-12 | A kind of electronic equipment, asic chip and its method for detecting human face and device |
Publications (1)
Publication Number | Publication Date |
---|---|
CN110232351A true CN110232351A (en) | 2019-09-13 |
Family
ID=67858931
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201910506988.1A Pending CN110232351A (en) | 2019-06-12 | 2019-06-12 | A kind of electronic equipment, asic chip and its method for detecting human face and device |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN110232351A (en) |
Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN107220624A (en) * | 2017-05-27 | 2017-09-29 | 东南大学 | A kind of method for detecting human face based on Adaboost algorithm |
CN107833251A (en) * | 2017-11-13 | 2018-03-23 | 京东方科技集团股份有限公司 | Pupil positioning device and method, the display driver of virtual reality device |
US20180330479A1 (en) * | 2016-01-30 | 2018-11-15 | Samsung Electronics Co., Ltd. | Device for and method of enhancing quality of an image |
CN108985249A (en) * | 2018-07-26 | 2018-12-11 | 京东方科技集团股份有限公司 | Method for detecting human face, device, electronic equipment and storage medium |
-
2019
- 2019-06-12 CN CN201910506988.1A patent/CN110232351A/en active Pending
Patent Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20180330479A1 (en) * | 2016-01-30 | 2018-11-15 | Samsung Electronics Co., Ltd. | Device for and method of enhancing quality of an image |
CN107220624A (en) * | 2017-05-27 | 2017-09-29 | 东南大学 | A kind of method for detecting human face based on Adaboost algorithm |
CN107833251A (en) * | 2017-11-13 | 2018-03-23 | 京东方科技集团股份有限公司 | Pupil positioning device and method, the display driver of virtual reality device |
CN108985249A (en) * | 2018-07-26 | 2018-12-11 | 京东方科技集团股份有限公司 | Method for detecting human face, device, electronic equipment and storage medium |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CA2867365C (en) | Method, system and computer storage medium for face detection | |
CN110006907A (en) | A kind of die casting detection method of surface flaw and system based on machine vision | |
WO2019033572A1 (en) | Method for detecting whether face is blocked, device and storage medium | |
US20110274314A1 (en) | Real-time clothing recognition in surveillance videos | |
CN105844242A (en) | Method for detecting skin color in image | |
JP6351243B2 (en) | Image processing apparatus and image processing method | |
CN111476849B (en) | Object color recognition method, device, electronic equipment and storage medium | |
WO2020248848A1 (en) | Intelligent abnormal cell determination method and device, and computer readable storage medium | |
CN109598298B (en) | Image object recognition method and system | |
KR20050060799A (en) | System and method for detecting face using symmetric axis | |
Hadid et al. | Color-based face detection using skin locus model and hierarchical filtering | |
WO2020038312A1 (en) | Multi-channel tongue body edge detection device and method, and storage medium | |
CN110415212A (en) | Abnormal cell detection method, device and computer readable storage medium | |
CN106815587B (en) | Image processing method and device | |
CN103218615B (en) | Face judgment method | |
CN111191521A (en) | Face living body detection method and device, computer equipment and storage medium | |
CN115620066B (en) | Article detection method and device based on X-ray image and electronic equipment | |
CN110032946A (en) | A kind of aluminium based on machine vision/aluminium blister package tablet identification and localization method | |
CN113283405A (en) | Mask detection method and device, computer equipment and storage medium | |
CN114119489A (en) | Automatic detection method for excess of electric connector and needle retracting and needle reversing defects | |
KR101343623B1 (en) | adaptive color detection method, face detection method and apparatus | |
CN104636728B (en) | A kind of image processing method | |
CN113743199A (en) | Tool wearing detection method and device, computer equipment and storage medium | |
CN108985249A (en) | Method for detecting human face, device, electronic equipment and storage medium | |
CN110232351A (en) | A kind of electronic equipment, asic chip and its method for detecting human face and device |
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 |