Method and apparatus for rendering image
AssigneeBeijing Baidu Netcom Science Technology Co., Ltd.
InventorsRuizhi Chen, Xinhang Yang
Life of this patent
Estimating the term…
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.
Claims15
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.
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.
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.
Dependencies are inferred from the claim text.