IP Library › Granted Patent US 11,636,646
Granted Patent B2
US 11,636,646 · App. 17/211,600 · Granted Apr 25, 2023

Method and apparatus for rendering image

Inventors: Ruizhi Chen (Beijing, CN); Xinhang Yang (Beijing, CN)
Assignee: BEIJING BAIDU NETCOM SCIENCE AND TECHNOLOGY CO., LTD.
G06T15/506G06T7/90G06T2207/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 11,636,646
App. No.
17/211,600
Granted
Apr 25, 2023
Kind
B2
Abstract

Embodiments of the present disclosure discloses a method and apparatus for rendering an image, an electronic device and a computer readable storage medium. An example implementation of the method includes: acquiring a real color parameter and a face skin color parameter in a real user image including a face image area, determining lighting parameter information based on the real color parameter and the face skin color parameter, acquiring a to-be-rendered image obtained based on the real user image, and generating a texture parameter based on the lighting parameter information, and using the texture parameter to perform lighting rendering on the to-be-rendered image to obtain a rendered image.

Claims (59)

1. A method for rendering an image, the method comprising:

acquiring a real color parameter and a face skin color parameter in a real user image, the real user image comprising a face image area;

determining lighting parameter information based on the real color parameter and the face skin color parameter;

acquiring a to-be-rendered image obtained based on the real user image; and

generating a texture parameter based on the lighting parameter information, and using the texture parameter to perform lighting rendering on the to-be-rendered image to obtain a rendered image, wherein the using the texture parameter to perform lighting rendering on the to-be-rendered image to obtain the rendered image, comprises:

using the texture parameter as an updated face skin color parameter;

determining updated lighting parameter information based on the real color parameter and the updated face skin color parameter; and

determining an updated texture parameter based on the updated lighting parameter information, and using the updated texture parameter to perform the lighting rendering on the to-be-rendered image to obtain the rendered image.

2. The method according to claim 1 , wherein the determining lighting parameter information based on the real color parameter and the face skin color parameter, comprises:

determining the lighting parameter information using a spherical harmonic lighting algorithm based on the real color parameter and the face skin color parameter.

3. The method according to claim 2 , wherein the determining the lighting parameter information using a spherical harmonic lighting algorithm based on the real color parameter and the face skin color parameter, comprises:

determining an estimated conversion coefficient based on a historical real user image;

constructing a spherical harmonic lighting equation related to the lighting parameter information based on the estimated conversion coefficient, the real color parameter, and the face skin color parameter; and

determining the lighting parameter information based on the spherical harmonic lighting equation.

4. The method according to claim 1 , wherein the determining the updated texture parameter based on the updated lighting parameter information, and using the updated texture parameter to perform the lighting rendering on the to-be-rendered image to obtain the rendered image, comprises:

re-determining the updated texture parameter as the updated face skin color parameter, and jumping to execution of the determining the updated lighting parameter information based on the real color parameter and the updated face skin color parameter; and

determining, in response to a number of execution of the jumping meeting a predetermined threshold condition, a final updated texture parameter, and using the final updated texture parameter to perform the lighting rendering on the to-be-rendered image to obtain the rendered image.

5. The method according to claim 4 , wherein the acquiring the real color parameter and the face skin color parameter in the real user image, comprises:

acquiring the real color parameter and a predetermined face skin color parameter in the real user image.

6. An electronic device, comprising:

at least one processor; and

a memory, communicatively connected to the at least one processor, wherein, the memory, storing instructions executable by the at least one processor, the instructions, when executed by the at least one processor, cause the at least one processor to perform operations comprising:

acquiring a real color parameter and a face skin color parameter in a real user image, the real user image comprising a face image area;

determining lighting parameter information based on the real color parameter and the face skin color parameter;

acquiring a to-be-rendered image obtained based on the real user image; and

generating a texture parameter based on the lighting parameter information, and using the texture parameter to perform lighting rendering on the to-be-rendered image to obtain a rendered image, wherein the using the texture parameter to perform lighting rendering on the to-be-rendered image to obtain the rendered image, comprises:

using the texture parameter as an updated face skin color parameter;

determining updated lighting parameter information based on the real color parameter and the updated face skin color parameter; and

determining an updated texture parameter based on the updated lighting parameter information, and using the updated texture parameter to perform the lighting rendering on the to-be-rendered image to obtain the rendered image.

7. The electronic device according to claim 6 , wherein the determining lighting parameter information based on the real color parameter and the face skin color parameter, comprises:

determining the lighting parameter information using a spherical harmonic lighting algorithm based on the real color parameter and the face skin color parameter.

8. The electronic device according to claim 7 , wherein the determining the lighting parameter information using a spherical harmonic lighting algorithm based on the real color parameter and the face skin color parameter, comprises:

determining an estimated conversion coefficient based on a historical real user image;

constructing a spherical harmonic lighting equation related to the lighting parameter information based on the estimated conversion coefficient, the real color parameter, and the face skin color parameter; and

determining the lighting parameter information based on the spherical harmonic lighting equation.

9. The electronic device according to claim 6 , wherein the determining the updated texture parameter based on the updated lighting parameter information, and using the updated texture parameter to perform the lighting rendering on the to-be-rendered image to obtain the rendered image, comprises:

re-determining the updated texture parameter as the updated face skin color parameter, and jumping to execution of the determining the updated lighting parameter information based on the real color parameter and the updated face skin color parameter; and

determining, in response to a number of execution of the jumping meeting a predetermined threshold condition, a final updated texture parameter, and using the final updated texture parameter to perform the lighting rendering on the to-be-rendered image to obtain the rendered image.

10. The electronic device according to claim 9 , wherein the acquiring the real color parameter and the face skin color parameter in the real user image, comprises:

acquiring the real color parameter and a predetermined face skin color parameter in the real user image.

11. A non-transitory computer readable storage medium, storing computer instructions thereon, wherein the computer instructions, when executed by a processor, cause the processor to perform operations comprising:

acquiring a real color parameter and a face skin color parameter in a real user image, the real user image comprising a face image area;

determining lighting parameter information based on the real color parameter and the face skin color parameter;

acquiring a to-be-rendered image obtained based on the real user image; and

generating a texture parameter based on the lighting parameter information, and using the texture parameter to perform lighting rendering on the to-be-rendered image to obtain a rendered image, wherein the using the texture parameter to perform lighting rendering on the to-be-rendered image to obtain the rendered image, comprises:

using the texture parameter as an updated face skin color parameter;

determining updated lighting parameter information based on the real color parameter and the updated face skin color parameter; and

determining an updated texture parameter based on the updated lighting parameter information, and using the updated texture parameter to perform the lighting rendering on the to-be-rendered image to obtain the rendered image.

12. The storage medium according to claim 11 , wherein the determining lighting parameter information based on the real color parameter and the face skin color parameter, comprises:

determining the lighting parameter information using a spherical harmonic lighting algorithm based on the real color parameter and the face skin color parameter.

13. The storage medium according to claim 12 , wherein the determining the lighting parameter information using a spherical harmonic lighting algorithm based on the real color parameter and the face skin color parameter, comprises:

determining an estimated conversion coefficient based on a historical real user image;

constructing a spherical harmonic lighting equation related to the lighting parameter information based on the estimated conversion coefficient, the real color parameter, and the face skin color parameter; and

determining the lighting parameter information based on the spherical harmonic lighting equation.

14. The storage medium according to claim 11 , wherein the determining the updated texture parameter based on the updated lighting parameter information, and using the updated texture parameter to perform the lighting rendering on the to-be-rendered image to obtain the rendered image, comprises:

re-determining the updated texture parameter as the updated face skin color parameter, and jumping to execution of the determining the updated lighting parameter information based on the real color parameter and the updated face skin color parameter; and

determining, in response to a number of execution of the jumping meeting a predetermined threshold condition, a final updated texture parameter, and using the final updated texture parameter to perform the lighting rendering on the to-be-rendered image to obtain the rendered image.

15. The storage medium according to claim 14 , wherein the acquiring the real color parameter and the face skin color parameter in the real user image, comprises:

acquiring the real color parameter and a predetermined face skin color parameter in the real user image.

Assignments (1)
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded Mar 25, 2021
From: CHEN, RUIZHI; YANG, XINHANG
To: BEIJING BAIDU NETCOM SCIENCE AND TECHNOLOGY CO., LTD.
Reel/Frame 055730/0716 →
Priority Claims (1)
CN 202011033517.2 · Sep 27, 2020 · national
Continuity (1)
Related Publication 20210209837A1 · Jul 8, 2021