CN109948397A - A kind of face image correcting method, system and terminal device - Google Patents
A kind of face image correcting method, system and terminal device Download PDFInfo
- Publication number
- CN109948397A CN109948397A CN201711382208.4A CN201711382208A CN109948397A CN 109948397 A CN109948397 A CN 109948397A CN 201711382208 A CN201711382208 A CN 201711382208A CN 109948397 A CN109948397 A CN 109948397A
- Authority
- CN
- China
- Prior art keywords
- face
- image
- characteristic point
- original image
- coordinate
- 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
Landscapes
- Image Analysis (AREA)
Abstract
The present invention is suitable for technical field of face recognition, provides a kind of face image correcting method, system and terminal device, wherein face image correcting method includes: acquisition original image;The original image is pre-processed, the face location coordinate of all faces in the original image is obtained;Human face characteristic point coordinate is extracted according to the face location coordinate;Affine transformation is carried out according to original image described in the human face characteristic point coordinate pair, obtains target image.The present invention accurately extracts human face characteristic point coordinate by obtaining face location coordinate, affine transformation is carried out further according to human face characteristic point coordinate pair image to be processed, and then obtain target image, effectively all faces in original image can be corrected, the accuracy of face image correcting is improved, efficiently solving existing face image correcting method has that accuracy is low.
Description
Technical field
The invention belongs to technical field of face recognition more particularly to a kind of face image correcting method, system and terminal to set
It is standby.
Background technique
Face recognition technology is a kind of biological identification technology for carrying out identification based on facial feature information of people, with
The rapid development of artificial intelligence technology, face recognition technology be more applied in commercially produced product, such as: enterprise staff door
Prohibit management and member management etc..Face normalization technology can be improved people as technology indispensable in face recognition technology
The accuracy of face recognition result.When the existing progress recognition of face in mass picture and classification, unsupervised face is used mostly
Classification learning algorithm handles picture.It can be improved the efficiency of picture recognition, can also identify the personage not trained.
However, the classification accuracy of unsupervised face classification learning algorithm is lower, such as the face of the different angle of the same person is known
The image of the same person is divided into multiple and different files by people that Wei be not different.It can be enhanced by face normalization technology
The accuracy of classification.However, existing face normalization technology, mostly uses greatly open source computer vision library (Open Source
Computer Vision Library, OpenCV) included face normalization module, accuracy is very low, can not be accurately to people
Face characteristic point is accurately extracted.If extracting facial 68 characteristic points by machine learning algorithm kit (Dlib kit)
Then can more accurately locating human face position, however, the testing result of Dlib kit is poor, if there are certain angles for face
It can not just detected when inclination, due to that can not detect face, face can not be also corrected, and then lead to face
The accuracy of correction is not high.
In conclusion existing face image correcting method has that accuracy is low.
Summary of the invention
In view of this, the embodiment of the invention provides a kind of face image correcting method, system and terminal device, to solve
Face image correcting method has that accuracy is low in the prior art.
The first aspect of the embodiment of the present invention provides a kind of face image correcting method, comprising:
Obtain original image;
The original image is pre-processed, the face location coordinate of all faces in the original image is obtained;
Human face characteristic point coordinate is extracted according to the face location coordinate;
Affine transformation is carried out according to original image described in the human face characteristic point coordinate pair, obtains target image.
The second aspect of the embodiment of the present invention provides a kind of face normalization system, comprising:
Module is obtained, for obtaining original image;
Face location obtains module, for pre-processing to the original image, obtains in the original image and owns
The face location coordinate of face;
Characteristic point coordinate extraction module, for extracting human face characteristic point coordinate according to the face location coordinate;
Affine transformation module carries out affine transformation for the original image according to the human face characteristic point coordinate pair, obtains
To target image.
The third aspect of the embodiment of the present invention provides a kind of terminal device, including memory, processor and is stored in
In the memory and the computer program that can run on the processor, when the processor executes the computer program
It performs the steps of
Obtain original image;
The original image is pre-processed, the face location coordinate of all faces in the original image is obtained;
Human face characteristic point coordinate is extracted according to the face location coordinate;
Affine transformation is carried out according to original image described in the human face characteristic point coordinate pair, obtains target image.
The fourth aspect of the embodiment of the present invention provides a kind of computer readable storage medium, the computer-readable storage
Media storage has computer program, and the computer program performs the steps of when being executed by processor
Obtain original image;
The original image is pre-processed, the face location coordinate of all faces in the original image is obtained;
Human face characteristic point coordinate is extracted according to the face location coordinate;
Affine transformation is carried out according to original image described in the human face characteristic point coordinate pair, obtains target image.
A kind of face image correcting method, system and terminal device provided by the invention by obtain face location coordinate into
And human face characteristic point coordinate is accurately extracted, affine transformation is carried out further according to human face characteristic point coordinate pair image to be processed, into
And target image is obtained, effectively all faces in original image can be corrected, improve the standard of face image correcting
True property, efficiently solving existing face image correcting method has that accuracy is low.
Detailed description of the invention
It to describe the technical solutions in the embodiments of the present invention more clearly, below will be to embodiment or description of the prior art
Needed in attached drawing be briefly described, it should be apparent that, the accompanying drawings in the following description is only of the invention some
Embodiment for those of ordinary skill in the art without any creative labor, can also be according to these
Attached drawing obtains other attached drawings.
Fig. 1 is a kind of implementation process schematic diagram for face image correcting method that the embodiment of the present invention one provides;
When Fig. 2 a is that 100 images of personage 1 do not pass through the face normalization method of embodiment one and are corrected, pass through people
The histogram for the Euclidean distance that face deep learning is got;
When Fig. 2 b is that face normalization method of 100 images of personage 1 Jing Guo embodiment one is corrected, pass through face depth
The histogram for the Euclidean distance that degree study is got;
When Fig. 2 c is that 100 images of personage 2 do not pass through the face normalization method of embodiment one and are corrected, pass through people
The histogram for the Euclidean distance that face deep learning is got;
When Fig. 2 d is that face normalization method of 100 images of personage 2 Jing Guo embodiment one is corrected, pass through face depth
The histogram for the Euclidean distance that degree study is got;
Fig. 3 is the implementation process schematic diagram of one step S102 of corresponding embodiment provided by Embodiment 2 of the present invention;
Fig. 4 is the implementation process schematic diagram for the one step S103 of corresponding embodiment that the embodiment of the present invention three provides;
Fig. 5 is the implementation process schematic diagram for the one step S104 of corresponding embodiment that the embodiment of the present invention four provides;
Fig. 6 is the people that an a kind of face image correcting method provided carries out face normalization acquisition through the embodiment of the present invention
Face image;
Fig. 7 is a kind of structural schematic diagram for face image correcting system that the embodiment of the present invention five provides;
Fig. 8 is the structural representation that face location obtains module 102 in the corresponding embodiment five of the offer of the embodiment of the present invention six
Figure;
Fig. 9 is the structural schematic diagram of feature point extraction module 103 in the corresponding embodiment five of the offer of the embodiment of the present invention seven;
Figure 10 is 104 structural representation of result affine transformation module in the corresponding embodiment five that the embodiment of the present invention eight provides
Figure;
Figure 11 is the schematic diagram for the terminal device that the embodiment of the present invention nine provides.
Specific embodiment
In being described below, for illustration and not for limitation, the tool of such as particular system structure, technology etc is proposed
Body details, to understand thoroughly the embodiment of the present invention.However, it will be clear to one skilled in the art that there is no these specific
The present invention also may be implemented in the other embodiments of details.In other situations, it omits to well-known system, device, electricity
The detailed description of road and method, in case unnecessary details interferes description of the invention.
That there are accuracys in order to solve the problems, such as existing face image correcting method is low for the embodiment of the present invention, provides one
Kind face image correcting method, system and terminal device accurately extract face characteristic by obtaining face location coordinate
Point coordinate carries out affine transformation further according to human face characteristic point coordinate pair image to be processed, and then obtains target image, Neng Gouyou
Effect ground is corrected all faces in original image, improves the accuracy of face image correcting, efficiently solves existing
Face image correcting method has that accuracy is low.
In order to illustrate technical solutions according to the invention, the following is a description of specific embodiments.
Embodiment one:
As shown in Figure 1, being specifically included the present embodiment provides a kind of face image correcting method:
Step S101: original image is obtained.
In a particular application, obtaining original image is the picture of input by being read out to the high-volume picture of input
As original image.Specifically, the picture of input can be the picture of each frame stored from video, in original image
One or more personages comprising any movement, any face's angle.In a particular application, obtaining original image is in OpenCV
It is realized under frame, when obtaining original image, can first obtain the address link of picture, be read using OpenCV globe batch
Picture is taken, and then gets original image.
Step S102: pre-processing the original image, obtains the face position of all faces in the original image
Set coordinate.
In a particular application, by calling the Face datection model of seetaface to carry out Face detection to pretreatment image,
It can be accurately obtained the face location coordinate of all faces in pretreatment image, get pretreatment specifically, can be
The face box position coordinates of all faces of image.Pass through the face location coordinate energy of all faces in pretreatment image again
Enough accurately obtain the face location coordinate of all faces in original image.It should be noted that the Face datection of seetaface
Model may be implemented less face and lack the facial image maximumlly detected in original image.
In a particular application, carrying out pretreatment to original image is the pretreatment image satisfaction in order to make acquisition
The input interface parameter of seetaface.
Step S103: human face characteristic point coordinate is extracted according to the face location coordinate.
In a particular application, the face location coordinate of all faces in the original image that will acquire is incited somebody to action as parameter
The face position coordinates extract the coordinate of human face characteristic point by the human face characteristic point extraction module of Dlib kit.It needs
It is noted that the human face characteristic point extraction module of Dlib kit can accurately extract the coordinate of human face characteristic point, into
And more accurately reflect the coordinate of the human face characteristic point of all faces in original image, and in a particular application, above-mentioned face characteristic
The coordinate number of point is 68, and above-mentioned human face characteristic point coordinate includes several left eye characteristic point coordinates and several right eye features
Point coordinate.
Step S104: affine transformation is carried out according to original image described in the human face characteristic point coordinate pair, obtains target figure
Picture.
In a particular application, affine transformation is carried out to human face characteristic point coordinate using the affine transformation function of OpenCV.It is logical
Cross the human face characteristic point coordinate pair original image that gets and carry out affine transformation, including to original image carry out rotation transformation and
Self adaptive pantographic is carried out to original image, the characteristic point coordinate of target image can be obtained, and then obtain target image, realization pair
Facial image in original image is corrected.It should be noted that obtained target image is each face in original image
Image, wherein the line of the two of each of target image face is in horizontal position.And the target image of output
The distance between two of each face are equal.Specifically, if the face of target image is face image, obtained target figure
As the image for not tilt angle, if the face in target image is side face image, obtained target image is only vertical
The angle tilt in direction, the not angle tilt of horizontal direction.
It can be effectively to all in original image in order to which the face normalization method of the present embodiment is further illustrated
Face is corrected, and improves the accuracy of face image correcting, passes through 100 images of the same personage of face deep learning
The Euclidean distance of 512 characteristic points shows the classifying quality of recognition of face.
As shown in Figure 2 a, 100 images that Fig. 2 a shows personage 1 do not pass through the face normalization method of the present embodiment into
Row timing passes through the histogram for the Euclidean distance that face deep learning is got.
When 100 images that Fig. 2 b shows personage 1 are corrected by the face normalization method of the present embodiment, pass through people
The histogram for the Euclidean distance that face deep learning is got.
When the face normalization method that 100 images that Fig. 2 c shows personage 2 do not pass through the present embodiment is corrected, lead to
Cross the histogram for the Euclidean distance that face deep learning is got.
When 100 images that Fig. 2 d shows personage 2 are corrected by the face normalization method of the present embodiment, pass through people
The histogram for the Euclidean distance that face deep learning is got.
It should be noted that recognition of face classifying quality is better, the histogram of above-mentioned Euclidean distance can be more compact.
By Fig. 2 a, Fig. 2 b, Fig. 2 c and Fig. 2 d it is found that carrying out people using face image correcting method provided in this embodiment
The classifying quality of face identification is obviously since the face image correcting method for not having Application Example to provide carries out point of recognition of face
Class effect, therefore face normalization method provided in this embodiment effectively can carry out school to all faces in original image
Just, the accuracy of face image correcting is improved, and then improves the classifying quality of recognition of face.
In one embodiment, above-mentioned face image correcting method further include:
Step S105: the face in target image is stored according to default memory module.
It in a particular application, include the people having corrected that in the target image for obtain after affine transformation by original image
Face image stores the facial image having corrected that according to the memory module of reading order, specifically, can will read
The face normalization image of first face be stored as first face.
A kind of face image correcting method provided in this embodiment, by maximumlly detecting the face in original image
Image, and the face location coordinate of all faces in original image is obtained, then accurately extract by the face position coordinates
Human face characteristic point coordinate carries out affine transformation according to human face characteristic point coordinate pair image to be processed and obtains the feature of target image
Point coordinate, and then target image is obtained, effectively all faces in original image can be corrected, improve facial image
The accuracy of correction, efficiently solving existing face image correcting method has that accuracy is low.
Embodiment two:
As shown in figure 3, in the present embodiment, the step S102 in embodiment one is specifically included:
Step S201: compression processing and gray proces are carried out to obtain pretreatment image to the original image.
In a particular application, compression processing is carried out to original image and carries out gray proces, obtained and meet open source face knowledge
The pretreatment image of the input interface parameter of other engine (seetaface).Pretreatment image is i.e. by pressing original image
The image got after the pretreatment operations such as contracting processing and gray proces.
Step S202: Face detection is carried out by Face datection model, obtains the face of all faces in pretreatment image
Position coordinates.
In a particular application, by calling the Face datection model of seetaface to carry out Face detection to pretreatment image,
It is accurately obtained the face location coordinate of all faces in pretreatment image.
Step S203: decompression processing is carried out to the pretreatment image, obtains the face position of all faces in original image
Set coordinate.
In a particular application, it gets after the face location coordinate of all faces in pretreatment image again to pretreatment image
It carries out decompression processing and obtains original picture size, and then get the face location coordinate of all faces in original image.
In a particular application, the face location coordinate for getting all faces in pretreatment image, which can be, gets pre- place
The face box position coordinates for managing all faces in image, accurately position all faces in original image.
Embodiment three:
As shown in figure 4, in the present embodiment, the step S103 in embodiment one is specifically included:
Step S301: the first preset quantity in the face location coordinate is extracted by human face characteristic point extraction module
Human face characteristic point coordinate;Wherein, the human face characteristic point coordinate of first preset quantity includes that the left eye of the second preset quantity is special
The right eye characteristic point coordinate of sign point coordinate and third preset quantity.
In a particular application, the face location coordinate of all faces in the original image that will acquire passes through as parameter
The human face characteristic point extraction module of Dlib kit extracts the face characteristic of the first preset quantity in the face location coordinate
Point coordinate.Specifically, above-mentioned first preset quantity is 68.The human face characteristic point coordinate of first preset quantity includes the second present count
The left eye characteristic point coordinate of amount and the right eye characteristic point coordinate of third preset quantity.
In a particular application, above-mentioned second preset quantity can be equal with third preset quantity or differs, as this
A kind of implementation of embodiment, above-mentioned second preset quantity is equal with third preset quantity, specifically, above-mentioned second present count
Amount and third preset quantity are 6.68 faces are accurately extracted by the human face characteristic point extraction module of Dlib kit
Characteristic point coordinate, and record 6 left eye characteristic point coordinates and 6 right eye characteristic point coordinates.
Example IV:
As shown in figure 5, in embodiment, the step S104 in embodiment one is specifically included:
Step S401: transformation matrix is calculated according to the human face characteristic point coordinate.
In one embodiment, above-mentioned steps S401 includes:
Step S4011: characteristic point center-of-mass coordinate, rotation angle and adaptive are calculated by the human face characteristic point coordinate
Zoom factor.
In a particular application, human face characteristic point coordinate includes several left eye characteristic point coordinates and several right eye characteristic points
Coordinate.Left eye center-of-mass coordinate and right eye are obtained respectively by several left eye characteristic point coordinates and several right eye characteristic point coordinates
Center-of-mass coordinate.Specifically, obtaining left eye center-of-mass coordinate by 6 left eye characteristic point coordinates, obtained by 6 right eye characteristic point coordinates
Take right eye center-of-mass coordinate.By the included angle of the line and horizontal position of left eye mass center and right eye mass center as current face's
Rotate angle.
In the present embodiment, it is calculated by the following formula rotation angle:
Dy=rightEyeCenter.y-leftEyeCenter.y;
Dx=rightEyeCenter.x-leftEyeCenter.x;
Wherein, angle indicates rotation angle, and rightEyeCenter.y indicates the ordinate of right eye mass center,
LeftEyeCenter.y indicates that the ordinate of left eye mass center, rightEyeCenter.x indicate the abscissa of right eye mass center,
The abscissa of leftEyeCenter.x expression right eye mass center.
In the present embodiment, the self adaptive pantographic factor is set to the left eye mass center and right eye matter of face in pretreatment image
Distance is divided by distance between the left eye mass center and right eye mass center of the face in original image between the heart.
In the present embodiment, it is calculated by the following formula rotation angle:
Original_eye_distance=sqrt (dx^2+dy^2);
Output_eye_distance=(rightEyeOfset_x-LeftEyeOfsfet.x) * outputImage.x;
RightEyeOfset_x=1.0-LeftEyeOffset.x;
Wherein, scale indicates the self adaptive pantographic factor, and original_eye_distance indicates face in original image
Left eye mass center and right eye mass center between distance, output_eye_distance indicate pretreatment image in face left eye matter
Distance between the heart and right eye mass center in a particular application sets LeftEyeOffset to (0.3,0.3), will
OutputImage is set as (224,224).Step S4022: according to characteristic point center-of-mass coordinate, rotation angle and adaptive contracting
It puts the factor and obtains transformation matrix.
In a particular application, using getRotationMatrix2D () function in OpenCV, pass through input feature vector point mass center
Coordinate, rotation angle and the self adaptive pantographic factor can obtain transformation matrix.
For the effect after clearer expression face image correcting, Fig. 6 shows the face provided through this embodiment
The facial image that bearing calibration obtains after handling original image.As shown in fig. 6, being obtained via 68 human face characteristic point coordinates
The line for getting left eye mass center Yu right eye mass center, by the line of left eye mass center and right eye mass center in the target image of affine transformation
For horizontal line.The left eye mass center of facial image in Fig. 6 and the line of right eye mass center are horizontal line, show the face image correcting
Success.
Step S402: the original image is mapped according to the transformation matrix, obtains target image.
In a particular application, after original image being carried out rotation transformation and self adaptive pantographic according to obtained transformation matrix
It can obtain target image.
Embodiment five:
As shown in fig. 7, the present embodiment provides a kind of face image correcting systems 100, for executing the side in embodiment one
Method step comprising:
Module 101 is obtained for obtaining original image.
Face location obtains module 102 for pre-processing to original image, obtains all faces in original image
Face location coordinate.
Characteristic point coordinate extraction module 103 is used to extract human face characteristic point coordinate according to face location coordinate.
Affine transformation module 104 is used to carry out affine transformation according to human face characteristic point coordinate pair original image, obtains target
Image.
In one embodiment, above-mentioned face image correcting system 100 further includes memory module 105.
Memory module 105 is for storing the face in target image according to default memory module.
It should be noted that face image correcting system provided in an embodiment of the present invention, as with side shown in Fig. 1 of the present invention
Method embodiment is based on same design, and bring technical effect is identical as embodiment of the method shown in Fig. 1 of the present invention, and particular content can
Referring to the narration in embodiment of the method shown in Fig. 1 of the present invention, details are not described herein again.
Embodiment six:
As shown in figure 8, in embodiment, it includes for executing Fig. 3 institute that the face location in embodiment five, which obtains module 102,
The structure of method and step in corresponding embodiment comprising:
Pretreatment unit 201 is used to carry out compression processing and gray proces to the original image to obtain pretreatment figure
Picture.
First position coordinate acquiring unit 202 is used to carry out Face detection by Face datection model, obtains pretreatment figure
The face location coordinate of all faces as in.
Second position coordinate acquiring unit 203 is used to carry out decompression processing to the pretreatment image, obtains original image
In all faces face location coordinate.
Embodiment seven:
As shown in figure 9, in embodiment, the characteristic point coordinate extraction module 103 in embodiment five includes for executing Fig. 4
The structure of method and step in corresponding embodiment comprising:
Characteristic point coordinate extraction unit 301, for extracting the face location coordinate by human face characteristic point extraction module
In the first preset quantity human face characteristic point coordinate;Wherein, the human face characteristic point coordinate of first preset quantity includes the
The left eye characteristic point coordinate of two preset quantities and the right eye characteristic point coordinate of third preset quantity.
Embodiment eight:
As shown in Figure 10, in embodiment, the affine transformation module 104 in embodiment five includes right for executing Fig. 5 institute
The structure for the method and step in embodiment answered comprising:
Transformation matrix computing unit 401, for calculating transformation matrix according to the human face characteristic point coordinate;
Target image acquiring unit 402 obtains mesh for mapping according to the transformation matrix the original image
Logo image.
In one embodiment, above-mentioned transformation matrix computing unit 401 includes:
Computing unit, for by the human face characteristic point coordinate calculate characteristic point center-of-mass coordinate, rotation angle and oneself
Adapt to zoom factor.
Acquiring unit, for obtaining transformation square according to characteristic point center-of-mass coordinate, rotation angle and the self adaptive pantographic factor
Battle array.
Embodiment nine:
Figure 11 is the schematic diagram for the terminal device that one embodiment of the invention provides.As shown in figure 11, the terminal of the embodiment
Equipment 11 includes: processor 110, memory 111 and is stored in the memory 111 and can be on the processor 110
The computer program 112 of operation, such as program.The processor 110 is realized above-mentioned each when executing the computer program 112
Step in video searching method embodiment, such as step S101 to S104 shown in FIG. 1.Alternatively, the processor 110 executes
The function of each module/unit in above-mentioned video searching system embodiment is realized when the computer program 112, such as shown in Fig. 7
The function of module 101 to 104.
Illustratively, the computer program 112 can be divided into one or more module/units, it is one or
Multiple module/the units of person are stored in the memory 111, and are executed by the processor 110, to complete the present invention.Institute
Stating one or more module/units can be the series of computation machine program instruction section that can complete specific function, the instruction segment
For describing implementation procedure of the computer program 112 in the terminal device 11.For example, the computer program 112
It can be divided into and obtain module, face location acquisition module, characteristic point coordinate extraction module and affine transformation module, each mould
Block concrete function is as follows:
Module is obtained, for obtaining original image;
Face location obtains module, for pre-processing to the original image, obtains in the original image and owns
The face location coordinate of face;
Characteristic point coordinate extraction module, for extracting human face characteristic point coordinate according to the face location coordinate;
Affine transformation module carries out affine transformation for the original image according to the human face characteristic point coordinate pair, obtains
To target image.
The terminal device 11 can be the calculating such as desktop PC, notebook, palm PC and cloud server and set
It is standby.The terminal device may include, but be not limited only to, processor 110, memory 111.It will be understood by those skilled in the art that
Figure 11 is only the example of terminal device 11, does not constitute the restriction to terminal device 11, may include more or more than illustrating
Few component perhaps combines certain components or different components, such as the terminal device can also be set including input and output
Standby, network access equipment, bus etc..
Alleged processor 110 can be central processing unit (Central Processing Unit, CPU), can also be
Other general processors, digital signal processor (Digital Signal Processor, DSP), specific integrated circuit
(Application Specific Integrated Circuit, ASIC), ready-made programmable gate array (Field-
Programmable Gate Array, FPGA) either other programmable logic device, discrete gate or transistor logic,
Discrete hardware components etc..General processor can be microprocessor or the processor is also possible to any conventional processor
Deng.
The memory 111 can be the internal storage unit of the terminal device 11, such as the hard disk of terminal device 11
Or memory.The memory 111 is also possible to the External memory equipment of the terminal device 11, such as on the terminal device 11
The plug-in type hard disk of outfit, intelligent memory card (Smart Media Card, SMC), secure digital (Secure Digital, SD)
Card, flash card (Flash Card) etc..Further, the memory 111 can also be both interior including the terminal device 11
Portion's storage unit also includes External memory equipment.The memory 111 is for storing the computer program and the terminal
Other programs and data needed for equipment.The memory 111, which can be also used for temporarily storing, have been exported or will be defeated
Data out.
It is apparent to those skilled in the art that for convenience of description and succinctly, only with above-mentioned each function
Can unit, module division progress for example, in practical application, can according to need and by above-mentioned function distribution by different
Functional unit, module are completed, i.e., the internal structure of described device is divided into different functional unit or module, more than completing
The all or part of function of description.Each functional unit in embodiment, module can integrate in one processing unit, can also
To be that each unit physically exists alone, can also be integrated in one unit with two or more units, it is above-mentioned integrated
Unit both can take the form of hardware realization, can also realize in the form of software functional units.In addition, each function list
Member, the specific name of module are also only for convenience of distinguishing each other, the protection scope being not intended to limit this application.Above system
The specific work process of middle unit, module, can refer to corresponding processes in the foregoing method embodiment, and details are not described herein.
In the above-described embodiments, it all emphasizes particularly on different fields to the description of each embodiment, is not described in detail or remembers in some embodiment
The part of load may refer to the associated description of other embodiments.
Those of ordinary skill in the art may be aware that list described in conjunction with the examples disclosed in the embodiments of the present disclosure
Member and algorithm steps can be realized with the combination of electronic hardware or computer software and electronic hardware.These functions are actually
It is implemented in hardware or software, the specific application and design constraint depending on technical solution.Professional technician
Each specific application can be used different methods to achieve the described function, but this realization is it is not considered that exceed
The scope of the present invention.
In embodiment provided by the present invention, it should be understood that disclosed device/terminal device and method, it can be with
It realizes by another way.For example, device described above/terminal device embodiment is only schematical, for example, institute
The division of module or unit is stated, only a kind of logical function partition, there may be another division manner in actual implementation, such as
Multiple units or components can be combined or can be integrated into another system, or some features can be ignored or not executed.Separately
A bit, shown or discussed mutual coupling or direct-coupling or communication connection can be through some interfaces, device
Or the INDIRECT COUPLING or communication connection of unit, it can be electrical property, mechanical or other forms.
The unit as illustrated by the separation member may or may not be physically separated, aobvious as unit
The component shown may or may not be physical unit, it can and it is in one place, or may be distributed over multiple
In network unit.It can select some or all of unit therein according to the actual needs to realize the mesh of this embodiment scheme
's.
It, can also be in addition, the functional units in various embodiments of the present invention may be integrated into one processing unit
It is that each unit physically exists alone, can also be integrated in one unit with two or more units.Above-mentioned integrated list
Member both can take the form of hardware realization, can also realize in the form of software functional units.
If the integrated module/unit be realized in the form of SFU software functional unit and as independent product sale or
In use, can store in a computer readable storage medium.Based on this understanding, the present invention realizes above-mentioned implementation
All or part of the process in example method, can also instruct relevant hardware to complete, the meter by computer program
Calculation machine program can be stored in a computer readable storage medium, the computer program when being executed by processor, it can be achieved that on
The step of stating each embodiment of the method.Wherein, the computer program includes computer program code, the computer program
Code can be source code form, object identification code form, executable file or certain intermediate forms etc..Computer-readable Jie
Matter may include: can carry the computer program code any entity or device, recording medium, USB flash disk, mobile hard disk,
Magnetic disk, CD, computer storage, read-only memory (ROM, Read-Only Memory), random access memory (RAM,
Random Access Memory), electric carrier signal, telecommunication signal and software distribution medium etc..It should be noted that described
The content that computer-readable medium includes can carry out increasing appropriate according to the requirement made laws in jurisdiction with patent practice
Subtract, such as in certain jurisdictions, according to legislation and patent practice, computer-readable medium do not include be electric carrier signal and
Telecommunication signal.
Embodiment described above is merely illustrative of the technical solution of the present invention, rather than its limitations;Although referring to aforementioned reality
Applying example, invention is explained in detail, those skilled in the art should understand that: it still can be to aforementioned each
Technical solution documented by embodiment is modified or equivalent replacement of some of the technical features;And these are modified
Or replacement, the spirit and scope for technical solution of various embodiments of the present invention that it does not separate the essence of the corresponding technical solution should all
It is included within protection scope of the present invention.
Claims (10)
1. a kind of face image correcting method, which is characterized in that the described method includes:
Obtain original image;
The original image is pre-processed, the face location coordinate of all faces in the original image is obtained;
Human face characteristic point coordinate is extracted according to the face location coordinate;
Affine transformation is carried out according to original image described in the human face characteristic point coordinate pair, obtains target image.
2. face image correcting method according to claim 1, which is characterized in that described to be carried out in advance to the original image
Processing, obtains the face location coordinate of all faces in the original image, comprising:
Compression processing and gray proces are carried out to obtain pretreatment image to the original image;
Face detection is carried out by Face datection model, obtains the face location coordinate of all faces in pretreatment image;
Decompression processing is carried out to the pretreatment image, obtains the face location coordinate of all faces in original image.
3. face image correcting method according to claim 1, which is characterized in that described according to the face location coordinate
Extract human face characteristic point coordinate, comprising:
It is sat by the human face characteristic point that human face characteristic point extraction module extracts the first preset quantity in the face location coordinate
Mark;Wherein, the human face characteristic point coordinate of first preset quantity includes the left eye characteristic point coordinate and of the second preset quantity
The right eye characteristic point coordinate of three preset quantities.
4. face image correcting method according to claim 1, which is characterized in that according to the human face characteristic point coordinate pair
The original image carries out affine transformation, obtains target image, comprising:
Transformation matrix is calculated according to the human face characteristic point coordinate;
The original image is mapped according to the transformation matrix, obtains target image.
5. face image correcting method according to claim 4, which is characterized in that described to be sat according to the human face characteristic point
Mark calculates transformation matrix, comprising:
Characteristic point center-of-mass coordinate, rotation angle and the self adaptive pantographic factor are calculated by the human face characteristic point coordinate;
Transformation matrix is obtained according to characteristic point center-of-mass coordinate, rotation angle and the self adaptive pantographic factor.
6. a kind of face image correcting system, which is characterized in that the system comprises:
Module is obtained, for obtaining original image;
Face location obtains module and obtains all faces in the original image for pre-processing to the original image
Face location coordinate;
Characteristic point coordinate extraction module, for extracting human face characteristic point coordinate according to the face location coordinate;
Affine transformation module carries out affine transformation for the original image according to the human face characteristic point coordinate pair, obtains mesh
Logo image.
7. face image correcting system according to claim 6, which is characterized in that the face location obtains module packet
It includes:
Pretreatment unit, for carrying out compression processing and gray proces to the original image to obtain pretreatment image;
First position coordinate acquiring unit obtains institute in pretreatment image for carrying out Face detection by Face datection model
There is the face location coordinate of face;
Second position coordinate acquiring unit obtains in original image and owns for carrying out decompression processing to the pretreatment image
The face location coordinate of face.
8. face image correcting system according to claim 6, which is characterized in that the affine transformation module includes:
Transformation matrix computing unit, for calculating transformation matrix according to the human face characteristic point coordinate;
Target image acquiring unit obtains target image for mapping according to the transformation matrix the original image.
9. a kind of terminal device, including memory, processor and storage are in the memory and can be on the processor
The computer program of operation, which is characterized in that the processor realizes such as claim 1 to 5 when executing the computer program
The step of any one the method.
10. a kind of computer readable storage medium, the computer-readable recording medium storage has computer program, and feature exists
In when the computer program is executed by processor the step of any one of such as claim 1 to 5 of realization the method.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201711382208.4A CN109948397A (en) | 2017-12-20 | 2017-12-20 | A kind of face image correcting method, system and terminal device |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201711382208.4A CN109948397A (en) | 2017-12-20 | 2017-12-20 | A kind of face image correcting method, system and terminal device |
Publications (1)
Publication Number | Publication Date |
---|---|
CN109948397A true CN109948397A (en) | 2019-06-28 |
Family
ID=67005022
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201711382208.4A Pending CN109948397A (en) | 2017-12-20 | 2017-12-20 | A kind of face image correcting method, system and terminal device |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN109948397A (en) |
Cited By (14)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN110738122A (en) * | 2019-09-18 | 2020-01-31 | 平安银行股份有限公司 | data checking method and device |
CN110889355A (en) * | 2019-11-19 | 2020-03-17 | 深圳市紫金支点技术股份有限公司 | Face recognition verification method, system and storage medium |
CN110956103A (en) * | 2019-11-20 | 2020-04-03 | 湖南检信智能科技有限公司 | Image feature extraction method based on face fuzzy judgment correction |
CN110956106A (en) * | 2019-11-20 | 2020-04-03 | 广州华多网络科技有限公司 | Processing method, device, storage medium and equipment for live broadcast |
CN111179174A (en) * | 2019-12-27 | 2020-05-19 | 成都品果科技有限公司 | Image stretching method and device based on face recognition points |
CN111259857A (en) * | 2020-02-13 | 2020-06-09 | 星宏集群有限公司 | Human face smile scoring method and human face emotion classification method |
CN111612688A (en) * | 2020-05-27 | 2020-09-01 | 努比亚技术有限公司 | Image processing method, device and computer readable storage medium |
CN111626240A (en) * | 2020-05-29 | 2020-09-04 | 歌尔科技有限公司 | Face image recognition method, device and equipment and readable storage medium |
CN112036317A (en) * | 2020-08-31 | 2020-12-04 | 成都新潮传媒集团有限公司 | Face image intercepting method and device and computer equipment |
CN112528986A (en) * | 2019-09-18 | 2021-03-19 | 马上消费金融股份有限公司 | Image alignment method, face recognition method and related device |
CN112541484A (en) * | 2020-12-28 | 2021-03-23 | 平安银行股份有限公司 | Face matting method, system, electronic device and storage medium |
WO2021114990A1 (en) * | 2019-12-09 | 2021-06-17 | Oppo广东移动通信有限公司 | Method and apparatus for correcting face distortion, electronic device, and storage medium |
CN113822927A (en) * | 2021-09-22 | 2021-12-21 | 易联众智鼎(厦门)科技有限公司 | Face detection method, device, medium and equipment suitable for weak-quality images |
CN118038474A (en) * | 2023-10-19 | 2024-05-14 | 北京十六进制科技有限公司 | Target detection-based job positioning method, device and medium |
Citations (8)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101377814A (en) * | 2007-08-27 | 2009-03-04 | 索尼株式会社 | Face image processing apparatus, face image processing method, and computer program |
US20100202696A1 (en) * | 2009-02-06 | 2010-08-12 | Seiko Epson Corporation | Image processing apparatus for detecting coordinate position of characteristic portion of face |
CN102542255A (en) * | 2011-12-06 | 2012-07-04 | Tcl集团股份有限公司 | Method, device and system for correcting face image |
CN106570459A (en) * | 2016-10-11 | 2017-04-19 | 付昕军 | Face image processing method |
CN106874861A (en) * | 2017-01-22 | 2017-06-20 | 北京飞搜科技有限公司 | A kind of face antidote and system |
CN107316020A (en) * | 2017-06-26 | 2017-11-03 | 司马大大(北京)智能系统有限公司 | Face replacement method, device and electronic equipment |
CN107358207A (en) * | 2017-07-14 | 2017-11-17 | 重庆大学 | A kind of method for correcting facial image |
CN107480621A (en) * | 2017-08-04 | 2017-12-15 | 深圳信息职业技术学院 | A kind of age recognition methods based on facial image |
-
2017
- 2017-12-20 CN CN201711382208.4A patent/CN109948397A/en active Pending
Patent Citations (8)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101377814A (en) * | 2007-08-27 | 2009-03-04 | 索尼株式会社 | Face image processing apparatus, face image processing method, and computer program |
US20100202696A1 (en) * | 2009-02-06 | 2010-08-12 | Seiko Epson Corporation | Image processing apparatus for detecting coordinate position of characteristic portion of face |
CN102542255A (en) * | 2011-12-06 | 2012-07-04 | Tcl集团股份有限公司 | Method, device and system for correcting face image |
CN106570459A (en) * | 2016-10-11 | 2017-04-19 | 付昕军 | Face image processing method |
CN106874861A (en) * | 2017-01-22 | 2017-06-20 | 北京飞搜科技有限公司 | A kind of face antidote and system |
CN107316020A (en) * | 2017-06-26 | 2017-11-03 | 司马大大(北京)智能系统有限公司 | Face replacement method, device and electronic equipment |
CN107358207A (en) * | 2017-07-14 | 2017-11-17 | 重庆大学 | A kind of method for correcting facial image |
CN107480621A (en) * | 2017-08-04 | 2017-12-15 | 深圳信息职业技术学院 | A kind of age recognition methods based on facial image |
Non-Patent Citations (2)
Title |
---|
吴延峰: "基于OpenCV的实时人脸识别系统研究与实现", 《中国优秀硕士学位论文全文数据库 信息科技辑》 * |
金忠等: "人脸图象的校准与特征抽取", 《小型微型计算机系统》 * |
Cited By (21)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN110738122A (en) * | 2019-09-18 | 2020-01-31 | 平安银行股份有限公司 | data checking method and device |
CN112528986A (en) * | 2019-09-18 | 2021-03-19 | 马上消费金融股份有限公司 | Image alignment method, face recognition method and related device |
CN110889355A (en) * | 2019-11-19 | 2020-03-17 | 深圳市紫金支点技术股份有限公司 | Face recognition verification method, system and storage medium |
CN110889355B (en) * | 2019-11-19 | 2023-09-19 | 深圳市紫金支点技术股份有限公司 | Face recognition verification method, face recognition verification system and storage medium |
CN110956103A (en) * | 2019-11-20 | 2020-04-03 | 湖南检信智能科技有限公司 | Image feature extraction method based on face fuzzy judgment correction |
CN110956106A (en) * | 2019-11-20 | 2020-04-03 | 广州华多网络科技有限公司 | Processing method, device, storage medium and equipment for live broadcast |
CN110956106B (en) * | 2019-11-20 | 2023-10-10 | 广州方硅信息技术有限公司 | Live broadcast on-demand processing method, device, storage medium and equipment |
WO2021114990A1 (en) * | 2019-12-09 | 2021-06-17 | Oppo广东移动通信有限公司 | Method and apparatus for correcting face distortion, electronic device, and storage medium |
CN111179174A (en) * | 2019-12-27 | 2020-05-19 | 成都品果科技有限公司 | Image stretching method and device based on face recognition points |
CN111179174B (en) * | 2019-12-27 | 2023-11-03 | 成都品果科技有限公司 | Image stretching method and device based on face recognition points |
CN111259857A (en) * | 2020-02-13 | 2020-06-09 | 星宏集群有限公司 | Human face smile scoring method and human face emotion classification method |
CN111612688A (en) * | 2020-05-27 | 2020-09-01 | 努比亚技术有限公司 | Image processing method, device and computer readable storage medium |
CN111612688B (en) * | 2020-05-27 | 2024-04-23 | 努比亚技术有限公司 | Image processing method, device and computer readable storage medium |
CN111626240B (en) * | 2020-05-29 | 2023-04-07 | 歌尔科技有限公司 | Face image recognition method, device and equipment and readable storage medium |
CN111626240A (en) * | 2020-05-29 | 2020-09-04 | 歌尔科技有限公司 | Face image recognition method, device and equipment and readable storage medium |
CN112036317A (en) * | 2020-08-31 | 2020-12-04 | 成都新潮传媒集团有限公司 | Face image intercepting method and device and computer equipment |
CN112541484A (en) * | 2020-12-28 | 2021-03-23 | 平安银行股份有限公司 | Face matting method, system, electronic device and storage medium |
CN112541484B (en) * | 2020-12-28 | 2024-03-19 | 平安银行股份有限公司 | Face matting method, system, electronic device and storage medium |
CN113822927A (en) * | 2021-09-22 | 2021-12-21 | 易联众智鼎(厦门)科技有限公司 | Face detection method, device, medium and equipment suitable for weak-quality images |
CN113822927B (en) * | 2021-09-22 | 2024-01-23 | 易联众智鼎(厦门)科技有限公司 | Face detection method, device, medium and equipment suitable for weak quality image |
CN118038474A (en) * | 2023-10-19 | 2024-05-14 | 北京十六进制科技有限公司 | Target detection-based job positioning method, device and medium |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN109948397A (en) | A kind of face image correcting method, system and terminal device | |
CN108509915B (en) | Method and device for generating face recognition model | |
Huang et al. | A coarse-to-fine algorithm for matching and registration in 3D cross-source point clouds | |
Ruan et al. | Evaluation of methods for generative modeling of cell and nuclear shape | |
CN111754396B (en) | Face image processing method, device, computer equipment and storage medium | |
CN110503076B (en) | Video classification method, device, equipment and medium based on artificial intelligence | |
CN111723691B (en) | Three-dimensional face recognition method and device, electronic equipment and storage medium | |
CN111597884A (en) | Facial action unit identification method and device, electronic equipment and storage medium | |
CN108229301B (en) | Eyelid line detection method and device and electronic equipment | |
CN111680678B (en) | Target area identification method, device, equipment and readable storage medium | |
CN110765882B (en) | Video tag determination method, device, server and storage medium | |
JP2013012190A (en) | Method of approximating gabor filter as block-gabor filter, and memory to store data structure for access by application program running on processor | |
CN112651333B (en) | Silence living body detection method, silence living body detection device, terminal equipment and storage medium | |
CN109299663A (en) | Hand-written script recognition methods, system and terminal device | |
CN111008935B (en) | Face image enhancement method, device, system and storage medium | |
CN110490959B (en) | Three-dimensional image processing method and device, virtual image generating method and electronic equipment | |
CN112132812B (en) | Certificate verification method and device, electronic equipment and medium | |
CN113570684A (en) | Image processing method, image processing device, computer equipment and storage medium | |
CN108388889B (en) | Method and device for analyzing face image | |
CN113298158B (en) | Data detection method, device, equipment and storage medium | |
CN112651380A (en) | Face recognition method, face recognition device, terminal equipment and storage medium | |
CN110648289A (en) | Image denoising processing method and device | |
CN111191582A (en) | Three-dimensional target detection method, detection device, terminal device and computer-readable storage medium | |
CN110163095B (en) | Loop detection method, loop detection device and terminal equipment | |
CN110866469A (en) | Human face facial features recognition method, device, equipment and medium |
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 | ||
RJ01 | Rejection of invention patent application after publication |
Application publication date: 20190628 |
|
RJ01 | Rejection of invention patent application after publication |