IP Library Granted Patent US 10,825,150
Granted Patent B2
US 10,825,150 · App. 16/142,272 · Granted Nov 3, 2020

Image processing method and device, electronic device and computer-readable storage medium

Inventor: Yuanqing Zeng (Dongguan, CN)
Assignee: GUANGDONG OPPO MOBILE TELECOMMUNICATIONS CORP., LTD.
G06T5/005G06K9/00228G06K9/00248G06K9/00268G06K9/00281G06T5/00G06T5/003G06T7/50H04N5/23219H04N5/23229G06T2207/20004G06T2207/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,825,150
App. No.
16/142,272
Granted
Nov 3, 2020
Kind
B2
Abstract

An image processing method and device, an electronic device and a computer-readable storage medium are provided. The method includes that: face recognition is performed on an image to be processed; responsive to detecting that the image to be processed includes a portrait, a shooting distance of the portrait is acquired; responsive to determining that the shooting distance meets a preset distance condition, a parameter relationship matched with the met distance condition is acquired; a beauty parameter corresponding to the shooting distance is selected according to the parameter relationship; and beauty processing is performed on the portrait according to the beauty parameter.

Claims (72)

1. An image processing method, comprising:

performing face recognition on an image to be processed;

responsive to detecting that the image to be processed comprises a portrait, acquiring a shooting distance of the portrait;

responsive to determining that the shooting distance meets a preset distance condition, acquiring a parameter relationship matched with the met distance condition;

selecting a beauty parameter corresponding to the shooting distance according to the parameter relationship; and

performing beauty processing on the portrait according to the beauty parameter,

wherein acquiring the parameter relationship matched with the met distance condition responsive to determining that the shooting distance meets the preset distance condition comprises:

responsive to determining that the shooting distance is smaller than a first distance threshold, acquiring a parameter relationship comprising a positive correlation between shooting distances and beauty parameters; and

responsive to determining that the shooting distance is larger than a second distance threshold, acquiring a parameter relationship comprising a negative correlation between shooting distances and beauty parameters;

wherein the first distance threshold is less than the second distance threshold.

2. The method according to claim 1 , wherein acquiring the shooting distance of the portrait comprises:

acquiring a face region of the portrait, and calculating a proportion of the face region in the image to be processed; and

acquiring the shooting distance corresponding to the calculated proportion according to a preset corresponding relationship between proportions of the face region and shooting distances.

3. The method according to claim 1 , wherein acquiring the shooting distance of the portrait comprises: acquiring the shooting distance of the portrait through a distance sensor.

4. The method according to claim 1 , wherein acquiring the shooting distance of the portrait comprises:

acquiring distance information of the image to be processed;

calculating an average distance of the face region of the portrait according to the distance information; and

determining the shooting distance of the portrait according to the average distance.

5. The method according to claim 1 , further comprising:

responsive to determining that the shooting distance meets the preset distance condition, acquiring an enhancement coefficient corresponding to the shooting distance; and

performing sharpening processing on the portrait according to the enhancement coefficient.

6. The method according to claim 1 , before acquiring the parameter relationship matched with the met distance condition responsive to determining that the shooting distance meets the preset distance condition, further comprising:

acquiring focal length information of a camera for acquiring the image to be processed, and determining the first distance threshold and the second distance threshold according to the focal length information.

7. The method according to claim 1 , wherein the beauty parameter comprises at least one of the following: a whitening parameter, a filtering parameter, an eye widening parameter or a face-lift parameter.

8. The method according to claim 1 , wherein performing face recognition on an image to be processed comprises:

extracting an image feature of the image to be processed;

analyzing the image feature through a preset face recognition model to determine whether the image to be processed includes a face;

responsive to determining that the image to be processed includes a face, determining that the image to be processed includes the portrait;

wherein the image feature comprises at least one of a shape feature, a spatial feature or an edge feature.

9. An electronic device, comprising a memory and a processor, the memory storing a computer program that, when executed by the processor, causes the processor to implement an image processing method, the method comprising:

performing face recognition on an image to be processed;

responsive to detecting that the image to be processed comprises a portrait, acquiring a shooting distance of the portrait;

responsive to determining that the shooting distance meets a preset distance condition, acquiring a parameter relationship matched with the met distance condition;

selecting a beauty parameter corresponding to the shooting distance according to the parameter relationship; and

performing beauty processing on the portrait according to the beauty parameter,

wherein acquiring the parameter relationship matched with the met distance condition responsive to determining that the shooting distance meets the preset distance condition comprises:

responsive to determining that the shooting distance is smaller than a first distance threshold, acquiring a parameter relationship comprising a positive correlation between shooting distances and beauty parameters; and

responsive to determining that the shooting distance is larger than a second distance threshold, acquiring a parameter relationship comprising a negative correlation between shooting distances and beauty parameters;

wherein the first distance threshold is less than the second distance threshold.

10. The electronic device according to claim 9 , wherein acquiring the shooting distance of the portrait comprises:

acquiring a face region of the portrait, and calculating a proportion of the face region in the image to be processed; and

acquiring the shooting distance corresponding to the calculated proportion according to a preset corresponding relationship between proportions of the face region and shooting distances.

11. The electronic device according to claim 9 , wherein acquiring the shooting distance of the portrait comprises: acquiring the shooting distance of the portrait through a distance sensor.

12. The electronic device according to claim 9 , wherein acquiring the shooting distance of the portrait comprises:

acquiring distance information of the image to be processed;

calculating an average distance of the face region of the portrait according to the distance information; and

determining the shooting distance of the portrait according to the average distance.

13. The electronic device according to claim 9 , wherein the method further comprises:

responsive to determining that the shooting distance meets the preset distance condition, acquiring an enhancement coefficient corresponding to the shooting distance; and

performing sharpening processing on the portrait according to the enhancement coefficient.

14. The electronic device according to claim 9 , wherein the method further comprises: before acquiring the parameter relationship matched with the met distance condition responsive to determining that the shooting distance meets the preset distance condition,

acquiring focal length information of a camera for acquiring the image to be processed, and determining the first distance threshold and the second distance threshold according to the focal length information.

15. The electronic device according to claim 9 , wherein the beauty parameter comprises at least one of the following: a whitening parameter, a filtering parameter, an eye widening parameter or a face-lift parameter.

16. The electronic device according to claim 9 , wherein performing face recognition on an image to be processed comprises:

extracting an image feature of the image to be processed;

analyzing the image feature through a preset face recognition model to determine whether the image to be processed includes a face;

responsive to determining that the image to be processed includes a face, determining that the image to be processed includes the portrait;

wherein the image feature comprises at least one of a shape feature, a spatial feature or an edge feature.

17. The electronic device according to claim 10 , wherein the method further comprises: after calculating the proportion of the face region in the image to be processed,

acquiring focal length information of a camera for acquiring the image to be processed;

acquiring a corresponding relationship matched with the focal length information; and

acquiring the shooting distance corresponding to the calculated proportion according to the matched corresponding relationship.

18. A non-transitory computer-readable storage medium, storing a computer program thereon, wherein the computer program is executed by a processor to implement an image processing method, the method comprising:

performing face recognition on an image to be processed;

responsive to detecting that the image to be processed comprises a portrait, acquiring a shooting distance of the portrait;

responsive to determining that the shooting distance meets a preset distance condition, acquiring a parameter relationship matched with the met distance condition;

selecting a beauty parameter corresponding to the shooting distance according to the parameter relationship; and

performing beauty processing on the portrait according to the beauty parameter,

wherein acquiring the parameter relationship matched with the met distance condition responsive to determining that the shooting distance meets the preset distance condition comprises:

responsive to determining that the shooting distance is smaller than a first distance threshold, acquiring a parameter relationship comprising a positive correlation between shooting distances and beauty parameters; and

responsive to determining that the shooting distance is larger than a second distance threshold, acquiring a parameter relationship comprising a negative correlation between shooting distances and beauty parameters;

wherein the first distance threshold is less than the second distance threshold.

Assignments (1)
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded Sep 26, 2018
From: ZENG, YUANQING
To: GUANGDONG OPPO MOBILE TELECOMMUNICATIONS CORP., LTD.
Reel/Frame 046976/0586 →
Priority Claims (1)
CN 2017 1 1045673 · Oct 31, 2017 · national
Continuity (1)
Related Publication 20190130538A1 · May 2, 2019
Cited By (1)
US 12,293,582