Virtual character generation method and device, computer-readable medium, and electronic device

By obtaining scene images to generate scene textures and performing light reflection processing, the problem that the pupils of virtual characters cannot reflect the optical phenomenon of real ambient is solved, and the authenticity and flexibility of virtual characters are improved.

CN115731326BActive Publication Date: 2025-08-26GUANGDONG OPPO MOBILE TELECOMMUNICATIONS CORP LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202111005210.6
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-08-30
Publication Date
2025-08-26
Estimated Expiration
2041-08-30

AI Technical Summary

Technical Problem

In the prior art, the pupils of virtual characters cannot simulate the optical phenomenon of reflecting the real environment, resulting in the generated virtual characters not real enough.

Method used

By obtaining the image of the current scene, generating the scene texture and performing texture lighting reflection processing to render the pupil texture of the virtual character, simulating the optical phenomenon of the real environment of the pupil reflecting.

Benefits of technology

Improves the authenticity and agility of virtual characters, and the pupils can naturally reflect optical phenomena according to environmental changes.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115731326B_ABST
    Figure CN115731326B_ABST
Patent Text Reader

Abstract

The present disclosure provides a method for generating a virtual character, a virtual character generating device, a computer-readable medium, and an electronic device, relating to the field of image processing technology. The method comprises: obtaining at least one first scene image corresponding to a current scene; generating a scene texture corresponding to the current scene based on the at least one first scene image; and performing texture illumination reflection processing on the scene texture to render the pupil of the generated virtual character to obtain a virtual character displaying the pupil texture. The present disclosure obtains the scene texture of the current real scene by obtaining the first scene image corresponding to the current scene to generate the scene texture, and then renders the scene texture in the pupil of the virtual character based on the texture illumination reflection processing, thereby solving the problem that the virtual character cannot simulate the optical phenomenon of the pupil in the eyeball reflecting the real environment, thereby improving the agility and authenticity of the virtual character.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present disclosure relates to the technical field of image processing, and in particular to a virtual character generation method, a virtual character generation device, a computer-readable medium, and an electronic device. Background Art

[0002] In real life, the pupils of both humans and animals usually reflect the real environment in front of them. For example, when a person observes a tree, the tree's appearance is usually reflected in the eyeball.

[0003] In related art, a fixed model is typically used to display the pupils of virtual characters. During model creation, only the size and shape of the eyes are typically edited. Once the editing is complete, the pupil texture remains fixed from all angles. However, this fixed pupil texture fails to simulate the optical phenomenon of the pupil reflecting the real environment, resulting in a less realistic virtual character. Summary of the Invention

[0004] The purpose of the present disclosure is to provide a virtual character generation method, a virtual character generation device, a computer-readable medium and an electronic device, which can successfully simulate the optical phenomenon of the pupil in the eyeball reflecting the real environment, thereby improving the realism of the virtual character at least to a certain extent.

[0005] According to a first aspect of the present disclosure, a method for generating a virtual character is provided, comprising: obtaining at least one first scene image corresponding to a current scene; generating a scene texture corresponding to the current scene based on the at least one first scene image, and performing texture lighting reflection processing on the scene texture to render the pupils of the generated virtual character to obtain a virtual character displaying the pupil texture.

[0006] According to a second aspect of the present disclosure, a virtual character generation device is provided, including: an image acquisition module for acquiring at least one first scene image corresponding to a current scene; a pupil rendering module for generating a scene texture corresponding to the current scene based on the at least one first scene image, and performing texture lighting reflection processing on the scene texture to render the pupil of the generated virtual character to obtain a virtual character displaying the pupil texture.

[0007] According to a third aspect of the present disclosure, a computer-readable medium is provided, on which a computer program is stored. When the computer program is executed by a processor, the above method is implemented.

[0008] According to a fourth aspect of the present disclosure, an electronic device is provided, characterized in that it includes: a processor; and a memory for storing one or more programs, which, when the one or more programs are executed by one or more processors, enables the one or more processors to implement the above-mentioned method.

[0009] An embodiment of the present disclosure provides a method for generating a virtual character. This method obtains at least one first scene image corresponding to the current scene, then generates a scene texture corresponding to the current scene based on the at least one first scene image, and uses the scene texture to render the virtual character's pupils, thereby achieving the purpose of displaying the pupil texture according to the scene. By obtaining the first scene image corresponding to the current scene and generating the scene texture, the scene texture of the current real scene can be obtained. Then, based on texture illumination reflection processing, the scene texture is rendered in the virtual character's pupils. This solves the problem that the virtual character cannot simulate the optical phenomenon of the pupil in the eye reflecting the real environment, thereby improving the agility and authenticity of the virtual character.

[0010] It is to be understood that the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the disclosure. BRIEF DESCRIPTION OF THE DRAWINGS

[0011] The accompanying drawings are incorporated into and constitute a part of the specification, illustrate embodiments consistent with the present disclosure, and together with the specification, are used to explain the principles of the present disclosure. Obviously, the drawings described below are only some embodiments of the present disclosure, and those skilled in the art can derive other drawings based on these drawings without inventive effort. In the drawings:

[0012] Figure 1 A schematic diagram showing an exemplary system architecture to which embodiments of the present disclosure may be applied;

[0013] Figure 2 A schematic diagram showing an electronic device to which the embodiments of the present disclosure may be applied;

[0014] Figure 3 Schematically illustrates the pupils of a virtual character produced using a fixed model in the related art;

[0015] Figure 4 A flowchart schematically illustrates a method for generating a virtual character in an exemplary embodiment of the present disclosure;

[0016] Figure 5 A schematic diagram schematically illustrates a method of displaying two virtual characters on a same terminal device in an exemplary embodiment of the present disclosure;

[0017] Figure 6 A schematic diagram schematically illustrates a stitched image with unstitched areas in an exemplary embodiment of the present disclosure;

[0018] Figure 7 A schematic diagram schematically illustrating pupils of a virtual character generated by an exemplary embodiment of the present disclosure;

[0019] Figure 8The following is a schematic diagram schematically showing the composition of a virtual character generating device in an exemplary embodiment of the present disclosure. DETAILED DESCRIPTION

[0020] Example embodiments will now be described more fully with reference to the accompanying drawings. However, example embodiments can be embodied in many forms and should not be construed as limited to the examples set forth herein; rather, these embodiments are provided so that this disclosure will be thorough and complete and will fully convey the concepts of the example embodiments to those skilled in the art. The described features, structures, or characteristics may be combined in any suitable manner in one or more embodiments.

[0021] In addition, the accompanying drawings are merely schematic illustrations of the present disclosure and are not necessarily drawn to scale. Identical reference numerals in the figures denote identical or similar parts, and thus repetitive descriptions thereof will be omitted. Some of the block diagrams shown in the accompanying drawings are functional entities that do not necessarily correspond to physically or logically separate entities. These functional entities may be implemented in software, in one or more hardware modules or integrated circuits, or in different networks and / or processor devices and / or microcontroller devices.

[0022] Figure 1 A schematic diagram shows a system architecture of an exemplary application environment in which a method and apparatus for generating a virtual character according to an embodiment of the present disclosure can be applied.

[0023] like Figure 1 As shown, the system architecture 100 may include one or more of terminal devices 101, 102, 103, a network 104, and a server 105. The network 104 is used to provide a medium for communication links between the terminal devices 101, 102, 103 and the server 105. The network 104 may include various connection types, such as wired or wireless communication links or fiber optic cables, etc. The terminal devices 101, 102, 103 may be various electronic devices with image processing functions, including but not limited to desktop computers, portable computers, smart phones, and tablet computers, etc. It should be understood that Figure 1 The number of terminal devices, networks and servers in the embodiment is merely illustrative. Any number of terminal devices, networks and servers may be provided as needed. For example, the server 105 may be a server cluster consisting of multiple servers.

[0024] The virtual character generation method provided in the embodiment of the present disclosure is generally executed by the terminal devices 101, 102, and 103, and accordingly, the virtual character generation device is generally provided in the terminal devices 101, 102, and 103. However, it is easy for those skilled in the art to understand that the virtual character generation method provided in the embodiment of the present disclosure can also be executed by the server 105, and accordingly, the virtual character generation device can also be provided in the server 105, and this is not particularly limited in this exemplary embodiment. For example, in an exemplary embodiment, the camera module in the terminal devices 101, 102, and 103 can obtain at least one first scene image, and then send it to the server 105 through the network 104. After obtaining the at least one first scene image, the server 105 generates a scene texture based on the first scene image, and then returns the scene texture to the terminal devices 101, 102, and 103 to render the pupils of the generated virtual character.

[0025] The exemplary embodiment of the present disclosure provides an electronic device for implementing a method for generating a virtual character, which may be Figure 1 The terminal device 101, 102, 103 or the server 105 in the embodiment of the present invention comprises at least a processor and a memory, wherein the memory is used to store executable instructions of the processor, and the processor is configured to execute the virtual character generation method by executing the executable instructions.

[0026] Below Figure 2 The structure of the electronic device is exemplarily described by taking the mobile terminal 200 in FIG. 1 as an example. It should be understood by those skilled in the art that, in addition to the components specifically used for mobile purposes, Figure 2 The structure in FIG. 2 can also be applied to fixed type devices. In other embodiments, the mobile terminal 200 may include more or fewer components than shown in the figure, or combine some components, or split some components, or arrange the components differently. The components shown in the figure can be implemented in hardware, software, or a combination of software and hardware. The interface connection relationship between the components is only shown schematically and does not constitute a structural limitation of the mobile terminal 200. In other embodiments, the mobile terminal 200 may also adopt the same Figure 2 Different interface connection methods, or a combination of multiple interface connection methods.

[0027] like Figure 2As shown, the mobile terminal 200 may specifically include: a processor 210, an internal memory 221, an external memory interface 222, a Universal Serial Bus (USB) interface 230, a charging management module 240, a power management module 241, a battery 242, an antenna 1, an antenna 2, a mobile communication module 250, a wireless communication module 260, an audio module 270, a speaker 271, a receiver 272, a microphone 273, an earphone interface 274, a sensor module 280, a display 290, a camera module 291, an indicator 292, a motor 293, a button 294, and a subscriber identification module (SIM) card interface 295. The sensor module 280 may include a depth sensor 2801, a gyroscope sensor 2802, a pressure sensor 2803, and the like.

[0028] The processor 210 may include one or more processing units, for example, the processor 210 may include an application processor (AP), a modem processor, a graphics processing unit (GPU), an image signal processor (ISP), a controller, a video codec, a digital signal processor (DSP), a baseband processor, and / or a neural network processing unit (NPU). Different processing units may be independent devices or integrated into one or more processors.

[0029] The NPU is a neural network (NN) computing processor that rapidly processes input information by drawing on the structure of biological neural networks, such as the transmission patterns between neurons in the human brain, and can also continuously self-learn. The NPU can implement intelligent cognitive applications such as image recognition, face recognition, voice recognition, and text comprehension on the mobile terminal 200. In some embodiments, the NPU can perform steps such as image completion.

[0030] The processor 210 is provided with a memory that can store instructions for implementing six modular functions: detection instructions, connection instructions, information management instructions, analysis instructions, data transmission instructions, and notification instructions, and the execution of the instructions is controlled by the processor 210.

[0031] Mobile terminal 200 implements display functions through a GPU, display screen 290, and application processor. The GPU is a microprocessor for image processing and is connected to the display screen 290 and application processor. The GPU is used to perform mathematical and geometric calculations for graphics rendering. Processor 210 may include one or more GPUs that execute program instructions to generate or change display information. In some embodiments, the process of displaying a virtual character can be implemented through the GPU, display screen 290, and application processor. The GPU can also be used to implement the process of rendering the virtual character's pupils using scene textures.

[0032] Mobile terminal 200 can implement camera functions through an ISP, camera module 291, video codec, GPU, display screen 290, and application processor. The ISP processes data fed back by camera module 291; camera module 291 captures still images or video; the digital signal processor processes digital signals, including digital image signals and other digital signals; and the video codec compresses or decompresses digital video. Mobile terminal 200 may also support one or more video codecs. In some embodiments, the camera module can be used to obtain a first scene image corresponding to the current scene.

[0033] The depth sensor 2801 is used to obtain depth information of the scene. In some embodiments, the depth sensor can be set in the camera module 291 to collect depth data corresponding to the first scene image, and then assist the generation process of the scene texture through the depth data.

[0034] The gyroscope sensor 2802 can be used to determine the motion posture of the mobile terminal 200. In some embodiments, the gyroscope sensor can also be set in the camera module 291 corresponding to the terminal device to obtain the motion posture when the camera module captures the first scene image, and then assist the scene texture generation process through the motion posture.

[0035] In addition, sensors with other functions can be set in the sensor module 280 according to actual needs, such as a pressure sensor 2803, an air pressure sensor, a magnetic sensor, an acceleration sensor, a distance sensor, a proximity light sensor, a fingerprint sensor, a temperature sensor, a touch sensor, an ambient light sensor, a bone conduction sensor, etc.

[0036] In related technologies, the pupils of virtual characters are usually made using fixed models. Even in some scenarios where the virtual character can be customized by pinching the face, usually only the size and shape of the eyes can be selected or adjusted. Moreover, after the face is pinched, the image of the virtual character will be fixed (refer to Figure 3At this point, no matter from which angle the virtual image's eyes are observed, the texture of the pupils will no longer change, and it is impossible to simulate the reflection of the real human eye pupils on the surrounding environment.

[0037] Based on one or more of the above problems, this exemplary embodiment provides a method for generating a virtual character. This method can be applied to the server 105 or to one or more of the terminal devices 101, 102, and 103, and this exemplary embodiment does not specifically limit this. Figure 4 As shown, the virtual character generation method may include the following steps S410 to S420:

[0038] In step S410, at least one first scene image corresponding to the current scene is acquired.

[0039] In an exemplary embodiment, when acquiring the first scene image corresponding to the current scene, it can be acquired through a camera module. Specifically, the camera module that acquires the first scene image may include a camera module specified by the user, or may include a camera module that determines the corresponding camera module based on the pre-settings for generating a virtual character according to an application, etc., and the present disclosure does not specifically limit this. For example, assuming that a virtual character needs to be generated on a certain terminal device, the camera module that acquires the first scene image can be set to the camera module configured by the terminal device itself, for rendering the pupils of the virtual character displayed on the terminal device; for another example, in a remote scenario such as video chatting through two terminal devices, terminal device A needs to display the virtual character B corresponding to the user of terminal device B. At this time, the camera module that acquires the first scene image for rendering the pupils of virtual character B can be set to the camera module configured by terminal device B according to the settings for the video chat application.

[0040] It should be noted that, in some embodiments, generating a virtual character itself may also require a camera module to capture user features. In this case, the camera module used to acquire the first scene image can also be set according to user specifications or application configuration, and does not necessarily have to be the same as the camera module that uses user features when generating the virtual character. For example, the user's features can be captured based on the front camera module to generate the virtual character, while the first scene image is captured by the rear camera module. This can make the pupil texture displayed by the virtual character's pupil consistent with the scene the user is currently facing.

[0041] Furthermore, the technical solution of the disclosed embodiments does not limit the number of camera modules corresponding to the same virtual character. For example, if a terminal device includes both front and rear camera modules, both modules can be used to capture a first scene image. These first scene images from different perspectives can then be processed to obtain scene textures for rendering.

[0042] It should be noted that the technical solution of the embodiment of the present disclosure does not limit the number of virtual characters that can be displayed on the same terminal device; at the same time, when the same terminal device includes multiple virtual characters, the settings of the camera modules corresponding to each virtual character can be the same or different, and the present disclosure does not impose any special restrictions. Figure 5 As shown, in a remote scenario such as video chatting through two terminal devices, terminal device A needs to simultaneously display two virtual characters, namely, the virtual character A of the user using terminal device A and the virtual character B of the user using terminal device B; for example, on terminal device A, the camera module corresponding to the virtual character of the user using terminal device A can be set to the camera module configured for terminal device A itself, while the camera module corresponding to the virtual character of the user using terminal device B can be set to the camera module configured for terminal device B.

[0043] In an exemplary embodiment, after obtaining the first scene image, to improve the quality of the first scene image, the first scene image may be preprocessed before generating a scene texture corresponding to the current scene based on at least one first scene image. Specifically, the preprocessing process may include one or a combination of processing processes such as histogram matching, smoothing filtering, and enhancement transformation.

[0044] When the acquired first scene image includes only one first scene image, histogram matching can be performed on the first scene image based on a custom image. When the acquired first scene image includes multiple images, histogram matching can be performed between the multiple first scene images, or histogram matching can be performed on each first scene image based on the custom image. The specific method of the histogram matching process can be set differently according to different needs and is not specifically limited in this disclosure.

[0045] Among them, the smoothing filter processing is used to remove noise in the first scene image; the enhancement transformation processing is used to enhance the useful information in the image. When performing the enhancement transformation, different enhancement transformation methods can be selected according to different types of scenes, and this disclosure does not make any special restrictions on this.

[0046] In step S420, a scene texture corresponding to the current scene is generated based on at least one first scene image, and texture illumination reflection processing is performed on the scene texture to render the pupils of the generated virtual character to obtain a virtual character displaying the pupil texture.

[0047] In an exemplary embodiment, when obtaining the first scene image, if there is only one first scene image, the first scene image can be directly used as the scene texture corresponding to the current scene.

[0048] Furthermore, multiple first scene images can be selected to obtain a more complete scene texture. In this case, since each first scene image is an image with a limited field of view, the multiple first scene images with limited field of view can be stitched together into a panoramic image to obtain a complete scene texture. Specifically, the multiple first scene images can be first registered, and then stitched together based on the registration results, and the resulting stitched image can be used as the scene texture.

[0049] For example, in the image registration stage, a change matrix for transforming the first scene image into a front view can be calculated based on the internal and external parameters of the camera module, and then a preliminary mapping of the first scene image into a panoramic image can be obtained based on the change matrix. After obtaining the preliminary mapping, for the overlapping areas of the images, feature point alignment under multiple angles can be performed, and the mean absolute error between the matching feature points can be quantitatively evaluated to determine the image superposition method to perform image superposition on the overlapping areas of the images; for the non-overlapping areas of the images, the vertex interpolation of the grid after homography transformation and similarity transformation can be used to correct the distortion of the non-overlapping areas. After processing the overlapping areas and the non-overlapping areas of the images, a stitching result with accurate stitching and less ghosting can be obtained.

[0050] Among them, when calculating the change matrix, the world coordinate system of the scene where the camera module that captures the first scene image is located can be used as a reference, and the coordinate systems of all first scene images can be converted into this world coordinate system to obtain a more accurate stitching result; when aligning feature points, multi-angle MovingDLT and other methods can be used.

[0051] It should be noted that when obtaining the first scene image corresponding to the current scene through the camera module, it is possible to directly collect the video of the current scene, and then perform the key frame screening process in the video frame, and use the selected key frame as the first scene image for subsequent processing. Among them, when selecting the key frame, different key frames can be selected according to different videos, so that the spliced ​​image obtained by splicing can reflect the complete current scene. For example, when collecting the first scene image, if the posture change between each frame of the camera module is large when collecting the video of the current scene, continuous video frames can be directly selected as key frames to avoid the absence of overlapping areas between adjacent key frames; conversely, if the posture change between each frame of the camera module is small when collecting the video of the current scene, a frame can be selected as a key frame every few frames to avoid excessive similarity between adjacent key frames.

[0052] In one exemplary embodiment, when stitching images, because the input multiple first scene images may not necessarily contain all objects within the current scene, the stitched image obtained after stitching the multiple first scene images may contain blank areas. In this case, to avoid blank areas in the scene texture, the stitched image can be first completed before being used as the scene texture corresponding to the current scene to obtain a completed stitched image. The completed stitched image can then be used as the scene texture corresponding to the current scene for subsequent processing.

[0053] Specifically, refer to Figure 6 As shown, when completing the spliced ​​image, the blank areas in the spliced ​​image can be identified first ( Figure 6 ), and then fill this area with a preset texture to obtain a mask to be completed. Image completion is then performed on the area contained in the mask to be completed to obtain a completed stitched image. The preset texture can be set based on the pupil color of the current avatar to avoid color abruptness and unreality caused by a large gap between the blank area and the pupil color. When performing image completion on the area contained in the mask to be completed, the blank area can be completed using methods such as deep learning networks to output a complete stitched image.

[0054] Furthermore, in one exemplary embodiment, a light source after reflection typically exhibits unique lighting characteristics, such as light spots. Therefore, after obtaining the scene texture, it can be subjected to lighting processing to simulate unique lighting characteristics, such as light spots, under reflective conditions in a real environment. The pupil texture can then be generated using the scene texture image that simulates the real environment.

[0055] In an exemplary embodiment, a reflected light source usually presents a light spot-like effect. For example, if a user is in a dark room and looks out a bright window, a bright light spot will usually appear in the pupil area that reflects the light outside the window. Based on the above situation, when performing lighting processing, the light source area where the light source is located can be determined in the scene texture, and a light source spot can be added to the light source area to simulate the light source spot under reflection conditions in a real environment. Among them, the size of the light source spot can usually be determined according to the size of the light source area. Specifically, the larger the light source area, the larger the corresponding light source spot; conversely, the smaller the light source, the smaller the corresponding light source spot.

[0056] In one exemplary embodiment, after obtaining a scene texture, texture illumination reflection processing can be performed on the scene texture to render the virtual character's pupils to display the pupil texture. Specifically, when implementing the above process, when creating the virtual character's pupils, the pupil model can be set to a model that can replace the pupil texture. After obtaining the scene texture, texture illumination reflection processing is performed on the scene texture to replace the pupil texture corresponding to the virtual character's pupil model, thereby achieving the purpose of the virtual character's pupil reflecting the real environment.

[0057] Texture lighting reflection processing can be implemented using models such as reflection probes to reflect scene textures. Furthermore, when rendering pupil textures based on scene textures, cubemaps, spherical texture mapping, skyboxes, and other methods can be used. Accordingly, before rendering, scene textures can be converted between different representations based on different rendering methods to facilitate subsequent rendering.

[0058] It should be noted that since the process of obtaining the first scene image and generating the scene texture takes time, you can first set a default pupil texture, render the pupil model with the default pupil texture under initial conditions, and after obtaining the scene texture, replace the default pupil texture with the scene texture to realize the reflection process.

[0059] In one exemplary embodiment, a change in the position of the camera module capturing the first scene image may cause corresponding changes in the surrounding environment. Therefore, by detecting the camera module's positional variables in real time, when the positional variables are greater than a preset variable, the camera module can capture a second scene image corresponding to the current moment. Based on this second scene image, the scene texture is then updated, and the updated scene texture and texture illumination reflection model are used to render the virtual character's pupils.

[0060] For example, when updating the scene texture based on the second scene image, the second scene image can be subjected to homography transformation and similarity transformation, and then the transformed second scene image is interpolated into the scene texture to obtain an updated scene texture, and subsequent rendering and other processing are performed based on the updated scene texture.

[0061] It should be noted that before updating the scene texture according to the second scene image, the second scene image may also be preprocessed, such as histogram matching processing, smoothing filtering processing, enhanced transformation processing, etc., to improve the quality of the second scene image.

[0062] In summary, in this exemplary embodiment, by generating scene textures from scene images of real environments and then using the scene textures in pupil reflection, a more natural scene texture can be displayed in the pupil. At the same time, the illumination characteristics of the light source under reflection conditions are added to the scene texture, making the pupil display more realistic and dynamic (see Figure 7 shown).

[0063] It should be noted that the above figures are merely illustrative of the processes included in the methods according to exemplary embodiments of the present disclosure and are not intended to be limiting. It is readily understood that the processes illustrated in the above figures do not indicate or limit the temporal order of these processes. Furthermore, it is readily understood that these processes may be executed synchronously or asynchronously, for example, in multiple modules.

[0064] For further reference, Figure 8 As shown, in the embodiment of this example, a virtual character generation device 800 is also provided, which includes an image acquisition module 810 and a pupil rendering module 820.

[0065] The image acquisition module 810 may be configured to acquire at least one first scene image corresponding to the current scene.

[0066] The pupil rendering module 820 can be used to generate a scene texture corresponding to the current scene based on at least one first scene image, and perform texture lighting reflection processing on the scene texture to render the pupil of the generated virtual character to obtain a virtual character displaying the pupil texture.

[0067] In an exemplary embodiment, when the first scene image includes multiple images, the pupil rendering module 820 can be used to perform image registration on the multiple first scene images to obtain a registration result; based on the registration result, the multiple first scene images are stitched to obtain a stitched image, and the stitched image is used as the scene texture corresponding to the current scene.

[0068] In an exemplary embodiment, the pupil rendering module 820 may be configured to perform image completion on the stitched image to obtain a completed stitched image, so as to use the completed stitched image as a scene texture corresponding to the current scene.

[0069] In an exemplary embodiment, the pupil rendering module 820 may be used to identify blank areas in the stitched image and generate a mask to be completed based on a preset texture; and perform image completion on the mask to be completed to obtain a stitched image after completion.

[0070] In an exemplary embodiment, the pupil rendering module 820 may be configured to perform illumination processing on the scene texture to obtain a processed scene texture image, so as to generate the pupil texture using the processed scene texture image.

[0071] In an exemplary embodiment, the pupil rendering module 820 may be configured to determine a light source area in the scene texture and add a light source spot in the light source area.

[0072] In an exemplary embodiment, the image acquisition module 810 may be used to perform image preprocessing on the first scene image; wherein the preprocessing includes at least one of the following processing processes: histogram matching processing, smoothing filtering processing, and enhanced transformation processing.

[0073] In an exemplary embodiment, the image acquisition module 810 can be used to acquire a second scene image through the camera module when it detects that the position variable of the camera module that acquires the first scene image is greater than a preset variable, and update the scene texture based on the second scene image to render the pupil of the virtual character based on the updated scene texture.

[0074] The specific details of each module in the above device have been described in detail in the implementation method part. The undisclosed details can be found in the implementation method part, so they will not be repeated here.

[0075] Those skilled in the art will appreciate that various aspects of the present disclosure may be implemented as systems, methods, or program products. Therefore, various aspects of the present disclosure may be implemented in the following forms: a complete hardware implementation, a complete software implementation (including firmware, microcode, etc.), or a combination of hardware and software implementations, which may be collectively referred to herein as "circuits," "modules," or "systems."

[0076] The exemplary embodiments of the present disclosure further provide a computer-readable storage medium on which a program product capable of implementing the above-mentioned method of the present specification is stored. In some possible implementations, various aspects of the present disclosure may also be implemented in the form of a program product, which includes program code. When the program product is run on a terminal device, the program code is used to cause the terminal device to execute the steps according to various exemplary embodiments of the present disclosure described in the above-mentioned "Exemplary Method" section of the present disclosure, for example, Figure 4 Any one or more steps in .

[0077] It should be noted that the computer-readable medium shown in the present disclosure may be a computer-readable signal medium or a computer-readable storage medium or any combination of the above two. The computer-readable storage medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or device, or any combination of the above. More specific examples of computer-readable storage media may include, but are not limited to: an electrical connection with one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above.

[0078] In the present disclosure, a computer-readable storage medium may be any tangible medium that contains or stores a program that can be used by or in conjunction with an instruction execution system, apparatus, or device. In the present disclosure, a computer-readable signal medium may include a data signal propagated in baseband or as part of a carrier wave, which carries computer-readable program code. This propagated data signal may take a variety of forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination of the foregoing. A computer-readable signal medium may also be any computer-readable medium other than a computer-readable storage medium that can send, propagate, or transmit a program for use by or in conjunction with an instruction execution system, apparatus, or device. The program code contained on the computer-readable medium may be transmitted using any suitable medium, including but not limited to wireless, wire, optical cable, RF, etc., or any suitable combination of the foregoing.

[0079] In addition, the program code for performing the operations of the present disclosure may be written in any combination of one or more programming languages, including object-oriented programming languages ​​such as Java, C++, and the like, as well as conventional procedural programming languages ​​such as "C" or similar programming languages. The program code may be executed entirely on the user computing device, partially on the user device, as a stand-alone software package, partially on the user computing device and partially on a remote computing device, or entirely on a remote computing device or server. In cases involving a remote computing device, the remote computing device may be connected to the user computing device via any type of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computing device (e.g., via the Internet using an Internet service provider).

[0080] Other embodiments of the present disclosure will readily occur to those skilled in the art after considering the specification and practicing the invention disclosed herein. This application is intended to cover any variations, uses, or adaptations of the present disclosure that follow from the general principles of the present disclosure and include common knowledge or customary techniques in the art not disclosed herein. The description and examples are to be considered as exemplary only, with the true scope and spirit of the present disclosure being indicated by the claims.

[0081] It should be understood that the present disclosure is not limited to the exact structures that have been described above and shown in the drawings, and that various modifications and changes can be made without departing from the scope thereof. The scope of the present disclosure is limited only by the appended claims.

Claims

1. A method for generating a virtual character, characterized in that: include: Acquire at least one first scene image corresponding to the current scene; generating a scene texture corresponding to the current scene based on the at least one first scene image, performing illumination processing on the scene texture to obtain a processed scene texture image, generating a pupil texture using the processed scene texture image, performing texture illumination reflection processing on the scene texture, and rendering the generated pupil of the virtual character to obtain the virtual character displaying the pupil texture; The method further comprises: When it is detected that the position variable of the camera module for obtaining the first scene image is greater than a preset variable, a second scene image is obtained through the camera module, and the scene texture is updated based on the second scene image to render the pupil of the virtual character based on the updated scene texture.

2. The method according to claim 1, characterized in that When the first scene image includes multiple images, generating a scene texture corresponding to the current scene according to the multiple first scene images includes: Performing image registration on the plurality of first scene images to obtain a registration result; Based on the registration result, multiple first scene images are stitched together to obtain a stitched image, and the stitched image is used as the scene texture corresponding to the current scene.

3. The method according to claim 2, characterized in that Before using the spliced ​​image as the scene texture corresponding to the current scene, the method further includes: Performing image completion on the stitched image to obtain a completed stitched image, so as to use the completed stitched image as a scene texture corresponding to the current scene.

4. The method according to claim 3, characterized in that The performing image completion on the stitched image to obtain a completed stitched image includes: Identifying blank areas in the stitched image and generating a mask to be completed based on a preset texture; Perform image completion on the mask to be completed to obtain a completed spliced ​​image.

5. The method according to claim 1, wherein The performing illumination processing on the scene texture to obtain a processed scene texture image includes: A light source area is determined in the scene texture, and a light source spot is added to the light source area.

6. The method according to claim 1, wherein Before generating the scene texture corresponding to the current scene according to the at least one first scene image, the method further includes: performing image preprocessing on the first scene image; The pre-processing includes at least one of the following processes: Histogram matching processing, smoothing filtering processing, and enhanced transformation processing.

7. A virtual character generation device, characterized in that: include: An image acquisition module, configured to acquire at least one first scene image corresponding to a current scene; a pupil rendering module, configured to generate a scene texture corresponding to the current scene based on the at least one first scene image, and perform texture illumination reflection processing on the scene texture to render the pupil of the generated virtual character to obtain the virtual character displaying the pupil texture; The pupil rendering module is further configured to perform illumination processing on the scene texture to obtain a processed scene texture image, so as to generate the pupil texture using the processed scene texture image; The image acquisition module is also used to acquire a second scene image through the camera module when it detects that the position variable of the camera module that acquires the first scene image is greater than a preset variable, and update the scene texture based on the second scene image to render the pupil of the virtual character based on the updated scene texture.

8. A computer-readable medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the method according to any one of claims 1 to 6 is implemented.

9. An electronic device, characterized in that: include: processor; as well as a memory for storing executable instructions of the processor; The processor is configured to perform the method of any one of claims 1 to 6 by executing the executable instructions.

Citation Information

Patent Citations

  • Digital virtual human eyeball real environment reflection method

    CN111429567A

  • Generating eyes for a character in a virtual environment

    US20050250579A1