Virtual image construction method, device, computer equipment and readable storage medium
By collecting and processing the depth and color data of Metaverse users and using 3D modeling technology to generate virtual images, the problem of low realism of virtual images in existing technologies is solved, and fast and realistic virtual image construction is achieved, thereby improving the user experience.
Patent Information
- Application Number
- CN202211012840.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-08-23
- Publication Date
- 2025-09-16
- Estimated Expiration
- 2042-08-23
AI Technical Summary
Existing technologies for constructing virtual images in the metaverse have problems such as low realism and cumbersome design operations, resulting in poor user experience.
By receiving virtual image construction instructions, using TrueDepthCameraAPI to collect user image data, combining structured light sensors and camera modules to obtain depth and color data, compressing it in PNG format and then restoring it, using WebGL technology for 3D modeling, the target user's virtual image is generated.
It enables the rapid and realistic construction of user virtual images in the metaverse, improving user experience and metaverse interaction experience.
Smart Images

Figure CN115359186B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of metaverse, and in particular to a method, apparatus, computer device and readable storage medium for constructing a virtual image. Background Art
[0002] The key to conducting financial business in the metaverse lies in projecting a person's physical image into the virtual world of the metaverse, thereby bridging the real and virtual worlds. A key technical challenge is how to accurately map a person's physical image into the virtual world, creating a virtual image that closely resembles the physical image.
[0003] The current solution for establishing an image in the metaverse is mainly to simulate an individual's real image through a virtual customized image. The degree of restoration and realism are low, the image formed is stereotyped and monotonous, and the user is required to perform tedious virtual image design actions, which creates a considerable obstacle to the user's normal use and user experience.
[0004] Therefore, there is an urgent need for a faster and more efficient virtual image construction solution. Summary of the Invention
[0005] In order to solve the above technical problems, the embodiments of the present application provide a method, device, computer equipment and readable storage medium for constructing a virtual image that can be used in financial technology or other related metaverse fields.
[0006] In a first aspect, embodiments of the present application provide a method for constructing a virtual image in a metaverse, the method comprising:
[0007] receiving instructions for constructing a virtual image;
[0008] Controlling the target terminal to collect user image data according to the virtual image construction instruction;
[0009] receiving target image data returned by the target terminal, wherein the target image data is image data obtained by the target terminal after performing compression processing in a preset format according to the user image data;
[0010] Performing a preset restoration process on the target image data to obtain target floating-point data;
[0011] 3D modeling is performed based on the target floating-point data to obtain a target user virtual image.
[0012] According to a specific implementation of the embodiment of the present application, the user image data includes depth data and color data corresponding to the upper body of the target user, and the step of controlling the target terminal to collect the user image data according to the virtual image construction instruction includes:
[0013] Controlling the structured light sensor of the target terminal to collect the depth data;
[0014] The camera module of the target terminal is controlled to collect the color data.
[0015] According to a specific implementation of the embodiment of the present application, the depth data and the color data are stored in the same dimension.
[0016] According to a specific implementation of the embodiment of the present application, the format of the target image data is png format, and the step of obtaining the target image data includes:
[0017] Dividing the depth data and the color data into a plurality of groups of floating-point data according to a preset byte size based on a preset order;
[0018] Each group of floating-point data is stored in sequence in a picture file, wherein the picture file is in png format;
[0019] The image file is compressed to obtain the target image data.
[0020] According to a specific implementation of the embodiment of the present application, the step of performing a preset restoration process on the target image data to obtain target floating-point data includes:
[0021] The target image file is decompressed in an order opposite to the preset order to obtain target floating-point data for representing the depth data and the color data.
[0022] According to a specific implementation of the embodiment of the present application, the step of performing 3D modeling based on the target floating-point data to obtain a virtual image of the target user includes:
[0023] Build a 3D model based on the target floating-point data used to represent the depth data to obtain a 3D image model of the target user;
[0024] Color rendering is performed on the target user 3D image model according to the target floating-point data used to represent color data to obtain the target user virtual image.
[0025] According to a specific implementation of the embodiment of the present application, the target terminal includes TrueDepthCameraAPI.
[0026] In a second aspect, an embodiment of the present application provides a virtual image construction device for constructing a virtual image in a metaverse, the virtual image construction device comprising:
[0027] A receiving module, configured to receive a virtual image construction instruction;
[0028] A collection module, configured to control a target terminal to collect user image data according to the virtual image construction instruction;
[0029] a compression module, configured to receive target image data returned by the target terminal, wherein the target image data is image data obtained by the target terminal after performing compression processing in a preset format according to the user image data;
[0030] A restoration module, configured to perform a preset restoration process on the target image data to obtain target floating-point data;
[0031] A construction module is used to perform 3D modeling based on the target floating-point data to obtain a target user virtual image.
[0032] In a third aspect, an embodiment of the present application provides a computer device, which includes a memory and a processor, wherein the memory is used to store a computer program, and when the processor is running, the computer program executes the model training method provided in the first aspect and any implementation method of the first aspect.
[0033] In a fourth aspect, an embodiment of the present application provides a computer-readable storage medium storing a computer program, which, when running on a processor, executes the virtual image construction method provided in the first aspect and any implementation method of the first aspect.
[0034] The virtual image construction method, device, computer device, and readable storage medium provided by the present application are used to construct a virtual image in the metaverse. The method includes: receiving a virtual image construction instruction; controlling a target terminal to collect user image data according to the virtual image construction instruction; receiving target image data returned by the target terminal, the target image data being image data obtained after the target terminal performs a preset format compression process on the user image data; performing a preset restoration process on the target image data to obtain target floating-point data; and performing 3D modeling based on the target floating-point data to obtain a target user virtual image. The present invention can quickly create a 3D image in a metaverse scene, realistically restore the user image, and thus enhance the metaverse interactive experience. BRIEF DESCRIPTION OF THE DRAWINGS
[0035] In order to more clearly illustrate the technical solution of this application, the following is a brief introduction to the drawings required for use in the embodiments. It should be understood that the following drawings only illustrate certain embodiments of this application and should not be regarded as limiting the scope of protection of this application. In each of the drawings, similar components are numbered similarly.
[0036] Figure 1 A schematic diagram showing a method flow of a virtual image construction method provided by an embodiment of the present application is shown;
[0037] Figure 2 One of the schematic diagrams showing a storage method of depth data in a method for constructing a virtual image provided by an embodiment of the present application is shown;
[0038] Figure 3 A second schematic diagram of a storage method of depth data in a virtual image construction method provided by an embodiment of the present application is shown;
[0039] Figure 4 A schematic diagram showing a storage method of target image data of a virtual image construction method provided by an embodiment of the present application is shown;
[0040] Figure 5 A schematic diagram showing a 3D image model of a target user in a virtual image construction method provided in an embodiment of the present application;
[0041] Figure 6 A schematic diagram of device modules of a virtual image construction device provided by an embodiment of the present application is shown;
[0042] Figure 7 A schematic diagram of a device module of a terminal device provided in an embodiment of the present application is shown. DETAILED DESCRIPTION
[0043] The technical solutions in the embodiments of the present application will be described clearly and completely below in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, rather than all the embodiments.
[0044] The components of the embodiments of the present application generally described and illustrated in the drawings herein may be arranged and designed in a variety of different configurations. Therefore, the following detailed description of the embodiments of the present application provided in the drawings is not intended to limit the scope of the claimed application, but rather merely represents selected embodiments of the present application. All other embodiments obtained by those skilled in the art based on the embodiments of the present application without creative effort are within the scope of protection of the present application.
[0045] Hereinafter, the terms "including", "having" and their cognates, which may be used in various embodiments of the present application, are intended only to indicate specific features, numbers, steps, operations, elements, components or combinations of the foregoing items, and should not be understood as first excluding the existence of one or more other features, numbers, steps, operations, elements, components or combinations of the foregoing items or the possibility of adding one or more features, numbers, steps, operations, elements, components or combinations of the foregoing items.
[0046] Furthermore, the terms “first,” “second,” “third,” etc., are merely used for distinguishing descriptions and are not to be understood as indicating or implying relative importance.
[0047] Unless otherwise defined, all terms used herein (including technical and scientific terms) have the same meaning as commonly understood by those skilled in the art to which the various embodiments of the present application belong. The terms (such as those defined in generally used dictionaries) will be interpreted as having the same meaning as in the context of the relevant technical field and will not be interpreted as having an idealized meaning or an overly formal meaning unless clearly defined in the various embodiments of the present application.
[0048] refer to Figure 1 , which is one of the flow charts of a method for constructing a virtual image provided by an embodiment of the present disclosure. The virtual image construction method provided by this embodiment is used to construct a virtual image in the metaverse, such as Figure 1 As shown, the virtual image construction method includes:
[0049] Step S101, receiving a virtual image construction instruction;
[0050] In a specific embodiment, when a user needs to enter his or her own virtual image in the metaverse scene, the virtual image construction device proposed in this embodiment will receive a virtual image construction instruction sent by the user terminal.
[0051] Specifically, the generation scenario of the virtual image construction instruction can refer to the specific scenario of any metaverse business handling. For example, when a user needs to handle currency transactions in the virtual world, the user's virtual image can be entered through a mobile phone terminal so that the user can complete the transaction more conveniently in the virtual world and enhance the experience of the metaverse service.
[0052] This embodiment does not limit the specific scenarios of the metaverse, and can be adaptively replaced according to the actual application process.
[0053] According to a specific implementation of the embodiment of the present application, the target terminal includes TrueDepthCameraAPI.
[0054] Specifically, the virtual image construction device provided in this embodiment performs multiple information interactions with the user terminal.
[0055] The target terminal may be a terminal device used by the user himself, or a terminal device provided by a service provider in a public scenario.
[0056] In this embodiment, the terminal devices all include a TrueDepthCamera API real-depth camera calling interface, so that the target terminal calls the depth camera according to the real-depth camera calling interface to collect the three-dimensional data of the target user himself.
[0057] Step S102, controlling the target terminal to collect user image data according to the virtual image construction instruction;
[0058] In a specific embodiment, the virtual image construction device sends an image acquisition instruction to the target terminal immediately after receiving the virtual image construction instruction, so as to control the target terminal to call the corresponding camera module interface and control each camera module to collect the user's image data.
[0059] Specifically, the user image data may be the user's full body three-dimensional data and full body color image data, or the user's half body three-dimensional data and half body color image data.
[0060] The user image data includes three-dimensional data and color image data.
[0061] It should be noted that the three-dimensional data and the color image data correspond to the same user body range.
[0062] In a specific embodiment, the user can also collect the user image data by himself through the corresponding terminal device. When the terminal device receives the user's instruction to collect the user image data, it controls the corresponding camera module to collect the corresponding user image data.
[0063] According to a specific implementation of the embodiment of the present application, the user image data includes depth data and color data corresponding to the upper body of the target user, and the step of controlling the target terminal to collect the user image data according to the virtual image construction instruction includes:
[0064] Controlling the structured light sensor of the target terminal to collect the depth data;
[0065] The camera module of the target terminal is controlled to collect the color data.
[0066] In a specific embodiment, the user terminal calls an interface through a realistic depth camera, starts a corresponding structured light sensor, and controls the structured light sensor to collect depth data of the user's upper body.
[0067] At the same time, the user terminal calls the interface through the RGB camera, starts the corresponding camera module, and controls the camera module to collect color data of the user's upper body.
[0068] Specifically, the depth data is a depth image including three-dimensional data, and the color data is an RGB color image.
[0069] Each pixel of the depth data stores the distance between the corresponding pixel object in the RGB color image and the camera.
[0070] In actual application scenarios, the distance can be adaptively replaced, and the storage size of the pixel can also be preset as needed.
[0071] In this embodiment, the distance between the pixel object stored in the depth data and the camera is 1 meter, and each pixel in the depth data is stored using 16-bit (2-byte) floating point data.
[0072] According to a specific implementation of the embodiment of the present application, the depth data and the color data are stored in the same dimension.
[0073] In a specific embodiment, the depth data and color data collected by the structured light sensor and the camera module in this embodiment have data maps of the same size.
[0074] After the depth data and the color data are acquired, the depth data and the color data are stored in a corresponding user image database so as to be called upon in subsequent steps.
[0075] This is so as to facilitate the subsequent construction of a user 3D image model with color based on the depth data and the color data.
[0076] Step S103, receiving target image data returned by the target terminal, wherein the target image data is image data obtained by the target terminal after performing a compression process in a preset format according to the user image data;
[0077] According to a specific implementation of the embodiment of the present application, the format of the target image data is png format, and the step of obtaining the target image data includes:
[0078] Dividing the depth data and the color data into a plurality of groups of floating-point data according to a preset byte size based on a preset order;
[0079] Each group of floating-point data is stored in sequence in a picture file, wherein the picture file is in png format;
[0080] The image file is compressed to obtain the target image data.
[0081] In a specific embodiment, the depth data and color data collected by the target terminal are easily damaged during the process of data transmission, data storage and data analysis. This embodiment can effectively ensure the integrity of the collected depth data and color data by compressing and preprocessing the depth data and color data, so as to improve the accuracy of virtual image construction.
[0082] Specifically, such as Figure 2 and Figure 3As shown, each square represents 8 bits (1 byte) of storage space, and two consecutive squares represent 16 bits (2 bytes) of storage space. The storage space of two squares can store the pixel data of a complete depth image.
[0083] like Figure 3 As shown, the depth data and the color data are divided into multiple groups of floating-point data according to the byte size set for each grid.
[0084] Each group of floating-point data is stored in the created image file in sequence from left to right and from top to bottom.
[0085] like Figure 4 As shown, two consecutive pixel data (4 bytes) are used as RGBA data of the target image data and compressed to obtain a compressed file in PNG format. The compressed file in PNG format is the target image data obtained after the target terminal performs a preset compression process.
[0086] This embodiment effectively ensures the integrity of the data by compressing the depth data and the color data, thereby preventing the data from being damaged during transmission and storage.
[0087] After the target terminal completes the image compression process, the virtual image construction device of this embodiment receives the target image data sent from the target terminal.
[0088] Step S104, performing a preset restoration process on the target image data to obtain target floating-point data;
[0089] In a specific embodiment, the preset restoration process is to perform a decompression step on the target image data that is completely opposite to the compression step, so as to obtain floating-point data of the target image data before compression.
[0090] According to a specific implementation of the embodiment of the present application, the step of performing a preset restoration process on the target image data to obtain target floating-point data includes:
[0091] The target image file is decompressed in an order opposite to the preset order to obtain target floating-point data for representing the depth data and the color data.
[0092] In a specific embodiment, the target image file is decompressed by using a decompression step in the opposite order of the compression step, so that the depth image in png format can be restored to float16 floating point data.
[0093] Step S105 , performing 3D modeling according to the target floating-point data to obtain a virtual image of the target user.
[0094] In a specific embodiment, based on WebGL (Web Graphics Library) 3D drawing technology and the float16 floating point data, a 3D image modeling of the target user can be performed to obtain the following: Figure 5 The 3D image model of the target user is shown.
[0095] According to a specific implementation of the embodiment of the present application, the step of performing 3D modeling based on the target floating-point data to obtain a virtual image of the target user includes:
[0096] Build a 3D model based on the target floating-point data used to represent the depth data to obtain a 3D image model of the target user;
[0097] Color rendering is performed on the target user 3D image model according to the target floating-point data used to represent color data to obtain the target user virtual image.
[0098] In a specific embodiment, after the construction of the 3D image model of the target user is completed, the 3D image model of the target user can be rendered based on the corresponding RGB color image data to form a 3D virtual image of the target user that is consistent with the real human body image.
[0099] To sum up, the embodiments of the present application provide a method for constructing a virtual image. By calling a terminal device with a structured light camera module to collect corresponding user image data, and based on rapid processing and 3D data modeling of depth data and color data, a unique user 3D virtual image can be quickly established in the metaverse scene by simply taking photos, thereby effectively improving the user experience of the metaverse scene and facilitating the rapid implementation of various businesses in the metaverse.
[0100] refer to Figure 6 , which is a schematic diagram of a device module of a virtual image construction device 600 according to an embodiment of the present disclosure. The virtual image construction device 600 provided in the embodiment of the present application is used to construct a virtual image in the metaverse, such as Figure 6 As shown, the virtual image building device 600 includes:
[0101] Receiving module 601, for receiving a virtual image construction instruction;
[0102] The acquisition module 602 is used to control the target terminal to acquire user image data according to the virtual image construction instruction;
[0103] Compression module 603, configured to receive target image data returned by the target terminal, wherein the target image data is image data obtained by the target terminal after performing compression processing in a preset format according to the user image data;
[0104] Restoration module 604, configured to perform a preset restoration process on the target image data to obtain target floating-point data;
[0105] The construction module 605 is used to perform 3D modeling according to the target floating-point data to obtain a virtual image of the target user.
[0106] The specific implementation process of the virtual image construction device 600 provided in this embodiment can refer to the specific implementation process in the above-mentioned method embodiment 1, and will not be repeated here to avoid repetition.
[0107] In addition, an embodiment of the present disclosure provides a computer device, which includes a mobile terminal 700, a memory and a processor, wherein the memory stores a computer program, and when the computer program runs on the processor, it executes the model training method provided in the above-mentioned method embodiment 1.
[0108] Specifically, such as Figure 7 As shown, the mobile terminal 700 provided in this embodiment includes:
[0109] Components include a radio frequency unit 701, a network module 702, an audio output unit 703, an input unit 704, a sensor 705, a display unit 706, a user input unit 707, an interface unit 708, a memory 709, a processor 710, and a power supply 711. Those skilled in the art will appreciate that Figure 7 The mobile terminal structure shown in the figure does not constitute a limitation on the mobile terminal. The mobile terminal may include more or fewer components than shown, or combine certain components, or arrange the components differently. In the embodiments of the present application, the mobile terminal includes but is not limited to a mobile phone, a tablet computer, a laptop computer, a PDA, a vehicle-mounted mobile terminal, a wearable device, and a pedometer.
[0110] It should be understood that in the embodiments of the present application, the RF unit 701 may be used to receive and transmit signals during information transmission or calls. Specifically, it receives downlink data from the base station and transmits it to the processor 710 for processing; in addition, it transmits uplink data to the base station. Typically, the RF unit 701 includes, but is not limited to, an antenna, at least one amplifier, a transceiver, a coupler, a low-noise amplifier, a duplexer, and the like. Furthermore, the RF unit 701 may communicate with the network and other devices via a wireless communication system.
[0111] The mobile terminal provides users with wireless broadband Internet access through the network module 702, such as helping users to send and receive emails, browse web pages, and access streaming media.
[0112] The audio output unit 703 can convert audio data received by the RF unit 701 or the network module 702 or stored in the memory 709 into an audio signal and output it as sound. In addition, the audio output unit 703 can also provide audio output related to specific functions performed by the mobile terminal 700 (for example, a call signal reception sound, a message reception sound, etc.). The audio output unit 703 includes a speaker, a buzzer, a receiver, etc.
[0113] The input unit 704 is used to receive audio or video signals. The input unit 704 may include a graphics processing unit (GPU) 7041 and a microphone 7042. The graphics processor 7041 processes image data of a still picture or video obtained by an image capture mobile terminal (such as a camera) in a video capture mode or an image capture mode. The processed image frames can be played as a video on the display unit 706. The image frames processed by the graphics processor 7041 can be stored in the memory 709 (or other storage medium) or transmitted via the radio frequency unit 701 or the network module 702. The microphone 7042 can receive sound and process such sound into audio data. The processed audio data can be converted into a format that can be sent to a mobile communication base station via the radio frequency unit 701 in the case of a telephone call mode.
[0114] The mobile terminal 700 also includes at least one sensor 705, such as a light sensor, a motion sensor, and other sensors. Specifically, the light sensor includes an ambient light sensor and a proximity sensor, wherein the ambient light sensor can adjust the brightness of the display panel 7061 according to the brightness of the ambient light, and the proximity sensor can turn off the display panel 7061 and / or the backlight when the mobile terminal 700 is moved to the ear. As a type of motion sensor, the accelerometer sensor can detect the magnitude of acceleration in all directions (generally three axes), and can detect the magnitude and direction of gravity when stationary. It can be used to identify the posture of the mobile terminal (such as horizontal and vertical screen switching, related games, magnetometer posture calibration), vibration recognition related functions (such as pedometer, tapping), etc.; the sensor 705 can also include a fingerprint sensor, a pressure sensor, an iris sensor, a molecular sensor, a gyroscope, a barometer, a hygrometer, a thermometer, an infrared sensor, etc., which will not be repeated here.
[0115] The display unit 706 is used to play information input by the user or information provided to the user. The display unit 706 may include a display panel 7061, which may be configured in the form of a liquid crystal display (LCD), an organic light-emitting diode (OLED), or the like.
[0116] The user input unit 707 can be used to receive input digital or character information, and generate key signal input related to the user settings and function control of the mobile terminal. Specifically, the user input unit 707 includes a touch panel 7071 and other input devices 7072. The touch panel 7071, also known as a touch screen, can collect user touch operations on or near it (such as operations performed by the user using any suitable object or accessory such as a finger, stylus, etc. on or near the touch panel 7071). The touch panel 7071 may include two parts: a touch detection mobile terminal and a touch controller. Among them, the touch detection mobile terminal detects the user's touch direction and detects the signal caused by the touch operation, and transmits the signal to the touch controller; the touch controller receives the touch information from the touch detection mobile terminal and converts it into touch point coordinates, which are then sent to the processor 710, which receives and executes the command sent by the processor 710. In addition, the touch panel 7071 can be implemented using various types such as resistive, capacitive, infrared, and surface acoustic wave. In addition to the touch panel 7071, the user input unit 707 may also include other input devices 7072. Specifically, other input devices 7072 may include but are not limited to a physical keyboard, function keys (such as volume control keys, switch keys, etc.), a trackball, a mouse, and a joystick, which will not be repeated here.
[0117] Furthermore, the touch panel 7071 may be overlaid on the display panel 7061. When the touch panel 7071 detects a touch operation on or near it, it transmits the information to the processor 710 to determine the type of touch event. Subsequently, the processor 710 provides corresponding visual output on the display panel 7061 according to the type of touch event. Figure 7 In the figure, the touch panel 7071 and the display panel 7061 are two independent components to realize the input and output functions of the mobile terminal. However, in some embodiments, the touch panel 7071 and the display panel 7061 can be integrated to realize the input and output functions of the mobile terminal, which is not limited here.
[0118] The interface unit 708 is an interface for connecting an external mobile terminal to the mobile terminal 700. For example, the external mobile terminal may include a wired or wireless headset port, an external power supply (or battery charger) port, a wired or wireless data port, a memory card port, a port for connecting to a mobile terminal with an identification module, an audio input / output (I / O) port, a video I / O port, a headphone port, etc. The interface unit 708 may be used to receive input (e.g., data information, power, etc.) from the external mobile terminal and transmit the received input to one or more components within the mobile terminal 700, or may be used to transmit data between the mobile terminal 700 and an external mobile terminal.
[0119] Memory 709 can be used to store software programs and various data. Memory 709 may primarily include a program storage area and a data storage area. The program storage area may store an operating system and at least one application required for a function (such as a sound playback function or an image playback function); the data storage area may store data generated based on the use of the mobile phone (such as audio data, a phone book, etc.). Furthermore, memory 709 may include high-speed random access memory and non-volatile memory, such as at least one disk storage device, flash memory device, or other volatile solid-state storage device.
[0120] Processor 710 is the control center of the mobile terminal, connecting all components of the mobile terminal using various interfaces and circuits. By running or executing software programs and / or modules stored in memory 709 and accessing data stored in memory 709, it executes various functions of the mobile terminal and processes data, thereby providing overall monitoring of the mobile terminal. Processor 710 may include one or more processing units; preferably, processor 710 may integrate an application processor and a modem processor. The application processor primarily handles the operating system, user interface, and application programs, while the modem processor primarily handles wireless communications. It is understood that the modem processor may not be integrated into processor 710.
[0121] The mobile terminal 700 may also include a power supply 711 (such as a battery) for supplying power to various components. Preferably, the power supply 711 may be logically connected to the processor 710 through a power management system, thereby managing functions such as charging, discharging, and power consumption through the power management system.
[0122] In addition, the mobile terminal 700 includes some functional modules not shown, which will not be described here.
[0123] The present application also provides a computer-readable storage medium, on which a computer program is stored. When the computer program is run on a processor, the virtual image construction method shown in Example 1 is executed. To avoid repetition, it will not be described here.
[0124] In this embodiment, the computer-readable storage medium may be a read-only memory (ROM), a random access memory (RAM), a magnetic disk, or an optical disk.
[0125] It should be noted that, in this document, the terms "comprises," "includes," or any other variations thereof are intended to encompass non-exclusive inclusion, such that a process, method, article, or terminal comprising a series of elements includes not only those elements but also other elements not explicitly listed, or elements inherent to such process, method, article, or terminal. In the absence of further limitations, an element defined by the phrase "comprising a ..." does not exclude the presence of other identical elements in the process, method, article, or terminal comprising the element.
[0126] Through the description of the above implementation methods, those skilled in the art can clearly understand that the above-mentioned embodiment methods can be implemented by means of software plus the necessary general hardware platform, and of course can also be implemented by hardware, but in many cases the former is a better implementation method. Based on this understanding, the technical solution of the present application, or the part that contributes to the prior art, can be embodied in the form of a software product, which is stored in a storage medium (such as ROM / RAM, magnetic disk, optical disk), and includes a number of instructions for enabling a terminal (which can be a mobile phone, computer, server, air conditioner, or network device, etc.) to execute the methods described in each embodiment of the present application.
[0127] The embodiments of the present application are described above in conjunction with the accompanying drawings, but the present application is not limited to the above-mentioned specific implementation methods. The above-mentioned specific implementation methods are merely illustrative and not restrictive. Under the guidance of this application, ordinary technicians in this field can also make many forms without departing from the purpose of this application and the scope of protection of the claims, all of which are within the protection of this application.
Claims
1. A method for constructing a virtual image, characterized in that: For constructing a virtual image in the metaverse, the virtual image construction method includes: receiving instructions for constructing a virtual image; Controlling the target terminal to collect user image data according to the virtual image construction instruction; receiving target image data returned by the target terminal, wherein the target image data is image data obtained by the target terminal after performing compression processing in a preset format according to the user image data; Performing a preset restoration process on the target image data to obtain target floating-point data; Performing 3D modeling based on the target floating-point data to obtain a target user virtual image; The user image data includes depth data and color data corresponding to the upper body of the target user. The step of controlling the target terminal to collect the user image data according to the virtual image construction instruction includes: Controlling the structured light sensor of the target terminal to collect the depth data; Controlling a camera module of the target terminal to collect the color data; The target image data is in PNG format, and the steps of obtaining the target image data include: Dividing the depth data and the color data into a plurality of groups of floating-point data according to a preset byte size based on a preset order; Each group of floating-point data is stored in sequence in a picture file, wherein the picture file is in png format; The image file is compressed to obtain the target image data.
2. The method according to claim 1, characterized in that The depth data and the color data are stored in the same dimension.
3. The method according to claim 1, characterized in that The step of performing a preset restoration process on the target image data to obtain target floating-point data includes: The target image data is decompressed in an order opposite to the preset order to obtain target floating-point data for representing the depth data and the color data.
4. The method according to claim 3, characterized in that The step of performing 3D modeling based on the target floating-point data to obtain a target user virtual image includes: Build a 3D model based on the target floating-point data used to represent the depth data to obtain a 3D image model of the target user; Color rendering is performed on the target user 3D image model according to the target floating-point data used to represent color data to obtain the target user virtual image.
5. The method according to claim 1, wherein The target terminal includes TrueDepthCamera API.
6. A virtual image construction device, characterized in that: Used to construct a virtual image in the metaverse, the virtual image construction device includes: A receiving module, configured to receive a virtual image construction instruction; A collection module, configured to control a target terminal to collect user image data according to the virtual image construction instruction; a compression module, configured to receive target image data returned by the target terminal, wherein the target image data is image data obtained by the target terminal after performing compression processing in a preset format according to the user image data; A restoration module, configured to perform a preset restoration process on the target image data to obtain target floating-point data; A construction module, configured to perform 3D modeling based on the target floating-point data to obtain a target user virtual image; The user image data includes depth data and color data corresponding to the upper body of the target user. The step of controlling the target terminal to collect the user image data according to the virtual image construction instruction includes: Controlling the structured light sensor of the target terminal to collect the depth data; Controlling a camera module of the target terminal to collect the color data; The target image data is in PNG format, and the steps of obtaining the target image data include: Dividing the depth data and the color data into a plurality of groups of floating-point data according to a preset byte size based on a preset order; Each group of floating-point data is stored in sequence in a picture file, wherein the picture file is in png format; The image file is compressed to obtain the target image data.
7. A computer device, characterized in that: The computer device includes a memory and a processor, wherein the memory stores a computer program, and when the processor runs the computer program, the method for constructing a virtual image according to any one of claims 1 to 5 is executed.
8. A computer-readable storage medium, characterized in that The device stores a computer program, which executes the virtual image construction method according to any one of claims 1 to 5 when running on a processor.
Citation Information
Patent Citations
Equipment and method for modeling three-dimensional (3D) object
CN102542601A
Virtual object creating method, device and system and computer storage medium
CN114241118A