IP Library › Granted Patent US 10,929,646
Granted Patent B2
US 10,929,646 · App. 16/155,593 · Granted Feb 23, 2021

Method and apparatus for image processing, and computer-readable storage medium

Inventor: Huichao Wang (Dongguan, CN)
Assignee: GUANGDONG OPPO MOBILE TELECOMMUNICATIONS CORP., LTD.
G06K9/00234G06K9/00268G06K9/00281G06K9/00604G06K9/6288G06T5/005G06T5/50G06T7/13G06T7/70G06T2207/10024G06T2207/30201
View Patent ↗
Loading inventors, assignments & file history…
Monitor This Case
Get email alerts when status or documents change.
Order Certified Copies
Most orders are placed with the USPTO same day — all within 24 business hours.
Order via The Patent Place →
Pre-filled with this patent's details
Quick Facts
Patent No.
US 10,929,646
App. No.
16/155,593
Granted
Feb 23, 2021
Kind
B2
Abstract

The present disclosure relates to a method and apparatus for image processing, and a computer-readable storage medium. The method includes the following actions. Face recognition is performed on an image to be processed to recognize a face region in the image to be processed. Facial feature recognition points in the face region are acquired. Coordinate values of the facial feature recognition points in a coordinate system are acquired. Distances between the facial feature recognition points and angles of a coordinate axis of the coordinate system relative to lines each connecting two of the facial feature recognition points are determined according to the coordinate values. A deviation angle of the face region is determined according to the distances between the facial feature recognition points and the angles of the coordinate axis relative to the lines each connecting two of the facial feature recognition points. A retouching template corresponding to the deviation angle is acquired. The face region is retouched according to the retouching template.

Claims (99)

1. A method for image processing, comprising:

performing face recognition on an image to be processed to recognize a face region in the image to be processed and acquire facial feature recognition points in the face region;

acquiring coordinate values of the facial feature recognition points in a coordinate system;

determining, according to the coordinate values, distances between the facial feature recognition points and angles of a coordinate axis of the coordinate system relative to lines each connecting two of the facial feature recognition points;

determining a deviation angle of the face region relative to a front face image, according to the distances between the facial feature recognition points and the angles of the coordinate axis relative to the lines each connecting two of the facial feature recognition points, the deviation angle being a rotation angle of the face region relative to the front face image on a plane; and

acquiring a retouching template corresponding to the deviation angle; and

retouching the face region according to the retouching template,

the method further comprising:

recognizing a skin color region in the face region, and performing edge extraction on the skin color region to acquire edge information;

determining a first skin color region according to the edge information; and

performing image fusion on the retouched face region and the first skin color region.

2. The method according to claim 1 , wherein the deviation angle comprises:

a first angle that represents a rotation angle of the face region on a first plane relative to the front face image;

a second angle that represents a rotation angle of the face region on a second plane relative to the front face image;

a third angle that represents a rotation angle of the face region on a third plane relative to the front face image; and

wherein every two planes of the first plane, the second plane and the third plane are perpendicular to each other.

3. The method according to claim 1 , wherein acquiring the retouching template corresponding to the deviation angle comprises any one of the following actions:

rotating, according to the deviation angle, a pre-stored standard retouching template, to obtain the retouching template corresponding to the deviation angle;

searching stored retouching templates for the retouching template corresponding to the deviation angle; or

uploading the deviation angle to a server, and receiving, from the server, the retouching template corresponding to the deviation angle.

4. The method according to claim 1 , wherein retouching the face region according to the retouching template comprises:

acquiring a skin color and skin type of the face region and a sex corresponding to the face region;

acquiring a retouching parameter corresponding to the face region according to the skin color, the skin type and the sex;

regulating the retouching template according to the retouching parameter; and

retouching the face region according to the regulated retouching template.

5. The method according to claim 1 , wherein determining the first skin color region according to the edge information comprises:

determining first edge information according to a shape and color corresponding to the edge information,

acquiring a skin color region corresponding to the first edge information as the first skin color region,

recording position information of the first skin color region;

performing image fusion on the retouched face region and the first skin color region comprises:

determining a corresponding skin color region of the first skin color region in the processed face region according to the position information, and

performing fusion processing on the first skin color region and the corresponding skin color region.

6. The method according to claim 1 , before performing face recognition on the image to be processed, further comprising:

selecting one or more eye-opened images from a plurality of continuously shot images, according to eye states in the plurality of continuously shot images;

when two or more eye-opened images are selected, synthesizing the two or more eye-opened images to generate a synthesized image, and determining the synthesized image as the image to be processed; and

when one eye-opened image is selected, determining the one eye-opened image as the image to be processed.

7. An apparatus for image processing, comprising a processor and one or more modules stored on a memory and executable by the processor, the one or more modules comprising:

a recognition module, configured to perform face recognition on an image to be processed to recognize a face region in the image to be processed;

an acquisition module, configured to acquire facial feature recognition points in the face region and acquire coordinate values of the facial feature recognition points in a coordinate system;

a determination module, configured to determine distances between the facial feature recognition points and angles of a coordinate axis of the coordinate system relative to lines each connecting two of the facial feature recognition points according to the coordinate values,

the determination module being further configured to determine a deviation angle of the face region relative to a front face image according to the distances between the facial feature recognition points and the angles of the coordinate axis relative to the lines each connecting two of the facial feature recognition points, the deviation angle being a rotation angle of the face region relative to the front face image on a plane; and

a retouching module, configured to acquire a retouching template corresponding to the deviation angle and retouch the face region according to the retouching template,

wherein the recognition module is further configured to recognize a skin color region in the face region, and perform edge extraction on the skin color region to acquire edge information;

the determination module is further configured to determine a first skin color region according to the edge information; and

the retouching module is further configured to perform image fusion on the retouched face region and the first skin color region.

8. The apparatus according to claim 7 , wherein the deviation angle comprises:

a first angle that represents a rotation angle of the face region on a first plane relative to the front face image;

a second angle that represents a rotation angle of the face region on a second plane relative to the front face image;

a third angle that represents a rotation angle of the face region on a third plane relative to the front face image; and

wherein every two planes of the first plane, the second plane and the third plane are perpendicular to each other.

9. The apparatus according to claim 7 , wherein the retouching module is further configured to perform any one of the following actions:

rotating, according to the deviation angle, a pre-stored standard retouching template, to obtain the retouching template corresponding to the deviation angle;

searching stored retouching templates for the retouching template corresponding to the deviation angle; or

uploading the deviation angle to a server, and receiving, from the server, the retouching template corresponding to the deviation angle.

10. The apparatus according to claim 7 , wherein the retouching module is further configured to:

acquire a skin color and skin type of the face region and a sex corresponding to the face region;

acquire a retouching parameter corresponding to the face region according to the skin color, the skin type and the sex; and

regulate the retouching template according to the retouching parameter, and retouching the face region according to the regulated retouching template.

11. The apparatus according to claim 7 , wherein

the determination module is further configured to: determine first edge information according to a shape and color corresponding to the edge information; acquire a skin color region corresponding to the first edge information as the first skin color region; and record position information of the first skin color region; and

the retouching module is further configured to: determine a corresponding skin color region of the first skin color region in the processed face region according to the position information, and perform fusion processing on the first skin color region and the corresponding skin color region.

12. The apparatus according to claim 7 , wherein the one or more modules further comprises a selection module configured to:

select one or more eye-opened images from a plurality of continuously shot images, according to eye states in the plurality of continuously shot images;

when two or more eye-opened images are selected, synthesize the two or more eye-opened images to generate a synthesized image, and determine the synthesized image as the image to be processed; and

when one eye-opened image is selected, determine the eye-opened image as the image to be processed.

13. A non-transitory computer-readable storage medium, storing a computer program, which, when executed by a processor, causes the processor to implement a method comprising the following actions:

performing face recognition on an image to be processed to recognize a face region in the image to be processed, and acquire facial feature recognition points in the face region;

acquiring coordinate values of the facial feature recognition points in a coordinate system;

determining distances between the facial feature recognition points and angles of a coordinate axis of the coordinate system relative to lines each connecting two of the facial feature recognition points according to the coordinate values;

determining a deviation angle of the face region relative to a front face image, according to the distances between the facial feature recognition points and the angles of the coordinate axis relative to the lines each connecting two of the facial feature recognition points, the deviation angle being a rotation angle of the face region relative to the front face image on a plane; and

acquiring a retouching template corresponding to the deviation angle, and retouching the face region according to the retouching template,

wherein the method further comprises:

recognizing a skin color region in the face region, and performing edge extraction on the skin color region to acquire edge information;

determining a first skin color region according to the edge information; and

performing image fusion on the retouched face region and the first skin color region.

14. The non-transitory computer-readable storage medium according to claim 13 , wherein the deviation angle comprises:

a first angle that represents a rotation angle of the face region on a first plane relative to the front face image;

a second angle that represents a rotation angle of the face region on a second plane relative to the front face image;

a third angle that represents a rotation angle of the face region on a third plane relative to the front face image; and

wherein every two planes of the first plane, the second plane and the third plane are perpendicular to each other.

15. The non-transitory computer-readable storage medium according to claim 13 , wherein acquiring the retouching template corresponding to the deviation angle comprises any one of the following actions:

rotating, according to the deviation angle, a pre-stored standard retouching template, to obtain the retouching template corresponding to the deviation angle;

searching stored retouching templates for the retouching template corresponding to the deviation angle; or

uploading the deviation angle to a server, and receiving, from the server, the retouching template corresponding to the deviation angle.

16. The non-transitory computer-readable storage medium according to claim 13 , wherein retouching the face region according to the retouching template comprises:

acquiring a skin color and skin type of the face region and a sex corresponding to the face region;

acquiring a retouching parameter corresponding to the face region according to the skin color, the skin type and the sex; and

regulating the retouching template according to the retouching parameter, and retouching the face region according to the regulated retouching template.

17. The non-transitory computer-readable storage medium according to claim 13 , wherein, before performing face recognition on the image to be processed, further comprising:

selecting one or more eye-opened images from a plurality of continuously shot images, according to eye states in the plurality of continuously shot images;

when two or more eye-opened images are selected, synthesizing the two or more eye-opened images to generate a synthesized image, and determining the synthesized image as the image to be processed; and

when one eye-opened image is selected, determining the one eye-opened image as the image to be processed.

18. The non-transitory computer-readable storage medium according to claim 13 , wherein determining the first skin color region according to the edge information comprises:

determining first edge information according to a shape and color corresponding to the edge information,

acquiring a skin color region corresponding to the first edge information as the first skin color region,

recording position information of the first skin color region;

performing image fusion on the retouched face region and the first skin color region comprises:

determining a corresponding skin color region of the first skin color region in the processed face region according to the position information, and

performing fusion processing on the first skin color region and the corresponding skin color region.

Assignments (1)
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded Oct 12, 2018
From: WANG, HUICHAO
To: GUANGDONG OPPO MOBILE TELECOMMUNICATIONS CORP., LTD
Reel/Frame 047153/0685 →
Priority Claims (1)
CN 201711040533.2 · Oct 31, 2017 · national
Continuity (1)
Related Publication 20190130166A1 · May 2, 2019
Cited By (1)
US 12,684,237