Virtual object mounting method and apparatus, device, and medium

By obtaining and eliminating the occlusion areas of virtual objects, the problem of unsatisfactory mounting effects of virtual objects in the existing technology is solved, and better fitting and realism are achieved.

WO2024174862A1PCT designated stage expired Publication Date: 2024-08-29BEIJING ZITIAO NETWORK TECH CO LTD
View PDF 8 Cites 0 Cited by

Patent Information

Application Number
PCT/CN2024/075971
Authority / Receiving Office
WO · WO
Patent Type
Applications
Current Assignee / Owner
Priority Date
2023-02-24
Filing Date
2024-02-05
Publication Date
2024-08-29

AI Technical Summary

Technical Problem

The virtual object mounting effect in the prior art is not ideal, especially in parts such as the neck, where it cannot effectively fit and adapt to the user's head movement, resulting in poor mounting effect.

Method used

By obtaining the original video and the virtual object selected by the user, mount it to the target part, remove the occluded area in real time, and render to achieve a better fitting effect.

Benefits of technology

The mounting effect of virtual objects has been improved, allowing it to fit more closely to the target part, enhancing realism and adaptability.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN2024075971_29082024_PF_FP_ABST
    Figure CN2024075971_29082024_PF_FP_ABST
Patent Text Reader

Abstract

The present application discloses a virtual object mounting method and apparatus, a device, and a medium. In order to implement the mounting of a virtual object, an original video is acquired, and a virtual object to be mounted is acquired on the basis of a selection of a user. The virtual object selected by the user is mounted at a target part of a target object in the original video. In addition, a blocked region of the virtual object is removed, and the video from which the blocked region has been removed is rendered to obtain a target video. That is, the part of the virtual object blocked by the target object is removed, so that the virtual object can better match the target part. That is, by means of the technical solution provided by the present application, the blocked region of the virtual object can be removed in time during the mounting of the virtual object to the target part of the target object in the original video, thereby better matching the target part and improving the mounting effect.
Need to check novelty before this filing date? Find Prior Art

Description

Virtual object mounting method, device, equipment and medium

[0001] This application claims priority to the Chinese patent application filed with the China Patent Office on February 24, 2023, with application number 202310179314.1 and invention name “A method, device, equipment and medium for mounting a virtual object”, the entire contents of which are incorporated by reference into this application. Technical Field

[0002] The present application relates to the field of computer technology, and in particular to a method, apparatus, device, and medium for mounting a virtual object. Background Art

[0003] High-quality rendering engines can provide a realistic and stable visual experience for image processing. However, existing mounting props are not ideal. For example, neck mounts are stiff, and mounted virtual objects may not fit snugly around the neck or adapt to the user's head movements.

[0004] Summary of the Invention

[0005] In view of this, embodiments of the present application provide a virtual object mounting method, apparatus, device, and medium to enable the virtual object to better fit the mounting location and improve the sense of reality.

[0006] To achieve the above objectives, the technical solutions provided by this application are as follows:

[0007] In a first aspect of the present application, a virtual object mounting method is provided, the method comprising:

[0008] Get the original video;

[0009] Obtaining virtual objects based on user selections;

[0010] Mounting the virtual object to a target portion of a target object in the original video;

[0011] Eliminating the occluded area of ​​the virtual object;

[0012] Render the video after removing the occluded area to obtain the target video.

[0013] In a second aspect of the present application, a virtual object mounting device is provided, the device comprising:

[0014] An acquisition unit, used for acquiring original video;

[0015] The acquisition unit is further configured to acquire a virtual object based on a user's selection;

[0016] a processing unit, configured to mount the virtual object to a target portion of a target object in the original video;

[0017] The processing unit is further configured to remove the occluded area of ​​the virtual object;

[0018] The rendering unit is used to render the video after removing the occluded area to obtain the target video.

[0019] In a third aspect of the present application, an electronic device is provided, the device comprising: a processor and a memory;

[0020] The memory is used to store instructions or computer programs;

[0021] The processor is configured to execute the instructions or computer program in the memory so that the electronic device executes the method described in the first aspect.

[0022] In a fourth aspect of the present application, a computer-readable storage medium is provided, wherein instructions are stored in the computer-readable storage medium. When the instructions are executed on a device, the device executes the method described in the first aspect.

[0023] In a fifth aspect of the present application, a computer program product is provided, wherein the computer program product comprises a computer program / instructions, and when the computer program / instructions are executed by a processor, the method described in the first aspect is implemented.

[0024] It can be seen that this application has the following beneficial effects:

[0025] In the present application, in order to realize the mounting of a virtual object, the original video is obtained, and the virtual object to be mounted is obtained based on the user's selection. The virtual object selected by the user is mounted on the target part of the target object in the original video. At the same time, the occluded area of ​​the virtual object is removed, and the video after removing the occluded area is rendered to obtain the target video. That is, the occluded part of the virtual object by the target object is removed so that the virtual object can fit to the target part. That is, through the technical solution provided by the present application, when the virtual object is mounted to the target part of the target object in the original video, the occluded area of ​​the virtual object can be removed in time, so that it can better fit the target part and improve the mounting effect. BRIEF DESCRIPTION OF THE DRAWINGS

[0026] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the following briefly introduces the drawings required for use in the embodiments or the description of the prior art. Obviously, the drawings described below are only some embodiments recorded in this application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.

[0027] FIG1 is a flow chart of a virtual object mounting method provided in an embodiment of the present application;

[0028] FIG2 is a schematic diagram of a virtual object structure provided in an embodiment of the present application;

[0029] FIG3a is a schematic diagram of a shielding plane provided in an embodiment of the present application;

[0030] FIG3 b is a schematic diagram of another shielding plane provided in an embodiment of the present application;

[0031] FIG4a is a schematic diagram of collecting depth information at different positions according to an embodiment of the present application;

[0032] FIG4 b is a schematic diagram of shadow rendering provided by an embodiment of the present application;

[0033] FIG5 is a schematic diagram of the structure of a beauty rendering device provided in an embodiment of the present application;

[0034] FIG6 is a schematic diagram of the structure of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION

[0035] In order to help those skilled in the art better understand the present invention, the following will clearly and completely describe the technical solutions in the embodiments of the present invention in conjunction with the accompanying drawings. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.

[0036] Existing mounts primarily rely on skeletal points at target locations, such as the neck, wrist, and ankle, to drive their movement. However, when fewer skeletal points are available, the mount fails to fit the target location, resulting in poor mounting performance.

[0037] Based on this, this application proposes a virtual object mounting method. When a virtual object is to be mounted on a target part of a target object in an original video, the virtual object is selected and mounted on the target part. The occluded area of ​​the current virtual object is simultaneously determined, removed, and the video after removing the occluded area is rendered to obtain the target video. In other words, during the process of mounting the virtual object on the target part, the occluded area of ​​the virtual object can be determined in real time and removed, thereby ensuring that the virtual object fits the target part better and improving the mounting effect.

[0038] It is understandable that before using the technical solutions of each embodiment of the present disclosure, the type, scope of use, usage scenarios, etc. of the personal information involved should be informed to the user in an appropriate manner in accordance with relevant laws and regulations, and the user's authorization should be obtained.

[0039] For example, in response to a user's active request, a prompt message is sent to the user to clearly inform the user that the requested operation will require the acquisition and use of the user's personal information. This allows the user to independently choose whether to provide personal information to the electronic device, application, server, storage medium, or other software or hardware that performs the operation of the disclosed technical solution based on the prompt message.

[0040] As an optional but non-limiting implementation, in response to receiving a user's active request, the prompt information may be sent to the user in the form of a pop-up window, in which the prompt information may be presented in text form. Furthermore, the pop-up window may also contain a selection control for the user to select "agree" or "disagree" to provide personal information to the electronic device.

[0041] It is understandable that the above notification and user authorization process are merely illustrative and do not constitute a limitation on the implementation of the present disclosure. Other methods that comply with relevant laws and regulations may also be applied to the implementation of the present disclosure.

[0042] To facilitate understanding of the technical solutions provided in the embodiments of the present application, they will be described below with reference to the accompanying drawings.

[0043] Refer to Figure 1, which is a flow chart of a virtual object mounting method provided in an embodiment of the present application. The method can be executed by a client, which can be installed in an electronic device. The electronic device can include a mobile phone, tablet computer, laptop computer, desktop computer, vehicle terminal, wearable electronic device, all-in-one machine, smart home device and other devices with communication functions, and can also be a virtual machine or a device simulated by a simulator. As shown in Figure 1, the method can include the following steps:

[0044] S101: Obtain original video.

[0045] In this embodiment, when generating a video with a mounting effect, an original video is first obtained. This original video includes a target object, which includes the mounting location corresponding to the virtual object to be mounted, i.e., the target location. Specifically, if the mounting location corresponding to the virtual object to be mounted is the neck, the target location is the neck; if the mounting location corresponding to the virtual object to be mounted is the head, wrist, ankle, or limb, the target location is the head, wrist, ankle, or limb. For ease of understanding, the following description uses the target location of the neck as an example.

[0046] The acquisition of the original video may include: the user shooting the video in real time through the operation interface of the client, or selecting a video shot in advance.

[0047] S102: Acquire a virtual object based on the user's selection.

[0048] In this embodiment, when the user opens the client interface, a variety of mountable virtual objects can be displayed to the user, and the user can select the virtual object to be mounted according to their own needs. For example, the virtual object can be a virtual scarf, silk scarf, wristband, etc.

[0049] It should be noted that this embodiment does not limit the execution order of S101 and S102. The user can first upload or shoot the original video through the client and then select the virtual object, or the user can first select the virtual object through the client and then upload or shoot the original video.

[0050] S103: Mounting the virtual object to the target part of the target object in the original video.

[0051] After acquiring the virtual object and the original video, the virtual object is mounted to the target part of the target object in the original video.

[0052] In some embodiments, a virtual object can be attached to a target portion of a target object in an original video by: obtaining a target portion and a reference portion of the target object in the original video; controlling the movement of the virtual object based on the reference portion and the target portion; and attaching the virtual object to the target portion based on the motion information of the virtual object. Specifically, when attaching the virtual object to the target portion, the motion information of the target portion and the reference portion of the target object are first obtained. The motion of the virtual object is then controlled based on the motion information of the target portion and the reference portion. Finally, the virtual object is controlled to attach to the target portion based on the motion information of the virtual object.

[0053] That is, in order to enable the virtual object to more accurately track and fit the target part when the target part moves, this embodiment controls the virtual object to perform matching movements by combining the motion information of the target part with the motion information of the reference part, and then mounts the virtual object to the target part according to the motion information of the virtual object, thereby achieving fitting mounting of the virtual object and the target part.

[0054] For example, the virtual object is a scarf, the target part is the neck, and the reference part is the head. When the neck moves, the movement information of the neck and the head will be extracted, and the movement information of the scarf will be determined based on the movement information of the two. Then, the scarf is controlled to be mounted on the neck based on the movement information of the scarf, so that the scarf can fit the neck better during the movement of the neck.

[0055] In some embodiments, controlling the movement of a virtual object based on a reference part and a target part includes: obtaining first rotation information corresponding to the reference part and second rotation information corresponding to the target part; and controlling the movement of multiple components of the virtual object based on the first rotation information and the second rotation information to control the movement of the virtual object. The first rotation information may include the rotation angle and rotation direction of the reference part, and the second rotation information may include the rotation angle and rotation direction of the target part. The first rotation information may indicate the rotation information of the reference part as a whole, or may indicate the rotation information of a key point or position on the reference part. For example, if the reference part is the head, the first rotation information may be the rotation information corresponding to the position of the nose. The second rotation information may indicate the rotation information of the target part as a whole, or may indicate the rotation information corresponding to a key point or position on the target part. For example, if the target part is the neck, the second rotation information may be the rotation information corresponding to the position of the throat.

[0056] The first rotation information and the second rotation information can both be quaternions, and can both include a rotation axis and a rotation angle. For example, the rotation information can be expressed as (x, y, z, w), where (x, y, z) represents the rotation axis and w represents the rotation angle.

[0057] To facilitate controlling the movement of a virtual object to follow the movement of a target part, the virtual object can be divided into multiple components, and the movement of each component can be controlled separately. Specifically, the movement of the first component is controlled based on the first rotation information, and the movement of the second component is controlled based on the second rotation information. For example, the scarf model shown in Figure 2 has a composition similar to that of the neck skeleton. The skeleton of the scarf model includes a first component and a second component, which represent the upper and lower regions of the neck, respectively. The movement of the first component is controlled by the first rotation parameter corresponding to the head, and the movement of the second component is controlled by the second rotation parameter corresponding to the neck.

[0058] In this embodiment, when the second component is mounted, the mounting position is the target part, so its rotation can be directly controlled using the second rotation parameter corresponding to the target part. However, the first component does not completely match the reference part. For example, in Figure 2, the mounting position corresponding to the first component is located below the head. There is a rotational difference between the two, which should be considered an intermediate state between the reference part and the target part. To more accurately control the rotation of the first component, when using the first rotation information to control the movement of the first component, the first rotation information can be corrected first, and then the corrected rotation information can be used to control the rotation of the first component.

[0059] The correction process may specifically include: reducing or enlarging the first rotation angle in the first rotation information to obtain a third rotation angle; and controlling the rotation of the first component based on the second rotation angle and the third rotation angle. The second rotation angle is the rotation angle included in the second rotation information. Whether to reduce or enlarge the first rotation angle is generally determined based on the position between the mounting portion corresponding to the first component and the reference portion. When the mounting portion corresponding to the first component is below the reference portion, the first rotation angle is reduced; when the mounting portion corresponding to the first component is above the reference portion, the first rotation angle is enlarged.

[0060] Controlling the rotation of the first component using the second rotation angle and the third rotation angle includes: multiplying the second rotation angle by the third rotation angle to obtain a fourth rotation angle; and controlling the rotation of the first component based on the rotation axis and the fourth rotation angle. Specifically, the first component is first controlled to rotate by the second rotation angle, and then controlled to rotate by the fourth rotation angle, so that the first component is rotated toward the reference portion based on the second component.

[0061] In some embodiments, to more accurately control the movement of a virtual object, the virtual object can be divided into more components to control the movement of different components separately. Specifically, a third component can be obtained based on the first and second components, and the movement of the third component can be controlled based on the first rotation information and the second rotation information. For example, the third component can be obtained by dividing between the first and second components, and the weight information corresponding to the third component can be determined based on the distance between the center point of the third component and the center point of the first component, and the distance between the center point of the third component and the center point of the second component. The first rotation information, the second rotation information, and the weight information can then be used to determine the third rotation information corresponding to controlling the movement of the third component.

[0062] For example, the weight of the third component relative to the first component is a, and the weight relative to the second component is (1-a). Then the third rotation information = a*first rotation information + (1-a)*second rotation information, and the movement of the third component is controlled based on the third rotation information.

[0063] S104: Eliminate the occluded area of ​​the virtual object.

[0064] In this embodiment, after the virtual object is mounted on the target part, the target part or the reference part may block part of the virtual object. To provide a better mounting effect, the blocked area on the virtual object needs to be removed.

[0065] Specifically, the occluded area of ​​the virtual object can be removed in the following manner: obtaining the depth information of the virtual object; setting an occlusion plane based on the depth information of the virtual object, wherein the shape of the occlusion plane is obtained based on the detection of the target object; and removing the occluded area of ​​the virtual object based on the occlusion plane. That is, the depth information of the occlusion plane is determined by obtaining the depth information of the virtual object, and then the occlusion plane is used to remove the occluded area of ​​the virtual object. The specific shape of the occlusion plane depends on the target object. For example, when the virtual object is a scarf, the occlusion plane can be cropped based on the head and neck of the target object, so that the occlusion plane can be more accurately occluded. For example, as shown in Figure 3a, the occlusion area of ​​the virtual object is removed using an occlusion plane, wherein the shape of the occlusion plane is obtained by cropping the head and neck of the user in the original video.

[0066] In some application scenarios, the target part may move, and the virtual object may also move with it, causing the occlusion area corresponding to the virtual object to change. To ensure accurate culling of the occlusion area of ​​the virtual object, the occlusion plane is reset based on the depth information of the virtual object after the virtual object moves. For example, as shown in Figure 3b, when the user's neck rotates to the left, the occlusion plane is reset to cull the occlusion area of ​​the virtual object.

[0067] Specifically, setting an occlusion plane based on the depth information of the virtual object includes: obtaining first depth information and second depth information based on the depth information of the virtual object; and determining the depth information of the occlusion plane based on the first depth information and the second depth information. The first depth information and the second depth information respectively represent the depth information of different positions in the virtual object, and the depth information of the occlusion plane is determined based on the depth information of the two different positions. For example, as shown in FIG4a , the first depth information is the depth information at position 1 in the virtual object, and the second depth information is the depth information at position 2 in the virtual object. Specifically, the average value of the first depth information and the second depth information is used as the depth information of the occlusion plane, or based on the pre-assigned weight, the weighted value of the first depth information and the second depth information is used as the depth information of the occlusion plane.

[0068] S105: Render the video after removing the blocked area to obtain a target video.

[0069] After removing the occluded area of ​​the virtual object, the video is rendered to obtain a target video in which the virtual object can accurately fit the target part.

[0070] The rendering of the video includes rendering the shadow generated after the virtual object is mounted on the target part in the video. Specifically, the corresponding ambient light occlusion information after the virtual object is mounted on the target part is obtained; the video after the occluded area is removed is rendered using the ambient light occlusion information to obtain the target video. The ambient light occlusion information includes the ambient light occlusion information of the contact position between the virtual object and the target part and the ambient light occlusion information of the contact position between the virtual object and other parts (such as the reference part). For example, as shown in Figure 4b, the shadow is rendered at the occluded position between the scarf and the human body, so that there is a better light and shadow transition at the junction of the human body and the scarf.

[0071] It can be seen that in order to achieve the mounting of the virtual object, the original video is obtained, and the virtual object to be mounted is obtained based on the user's selection. The virtual object selected by the user is mounted on the target part of the target object in the original video. At the same time, the occluded area of ​​the virtual object is removed, and the video after the occluded area is removed is rendered to obtain the target video. That is, the occluded part of the virtual object by the target object is removed so that the virtual object can fit the target part. That is, through the technical solution provided by the present application, when the virtual object is mounted on the target part of the target object in the original video, the occluded area of ​​the virtual object can be removed in time, so that it can better fit the target part and improve the mounting effect.

[0072] Based on the above method example, an embodiment of the present application provides a virtual object mounting device and an electronic device, which will be described below with reference to the accompanying drawings.

[0073] Refer to Figure 5, which is a structural diagram of a virtual object mounting device provided in an embodiment of the present application. As shown in Figure 5, the device includes: an acquisition unit 501, a processing unit 502 and a rendering unit 503.

[0074] The acquisition unit 501 is used to acquire the original video;

[0075] The acquisition unit 501 is further configured to acquire a virtual object based on a user's selection;

[0076] The processing unit 502 is configured to mount the virtual object to a target portion of the target object in the original video;

[0077] The processing unit 502 is further configured to remove the occluded area of ​​the virtual object;

[0078] The rendering unit 503 is configured to render the video after removing the occluded area to obtain a target video.

[0079] In some embodiments, the processing unit 502 is specifically used to obtain the target part and the reference part of the target object in the original video; control the movement of the virtual object based on the reference part and the target part; and mount the virtual object to the target part based on the movement information of the virtual object.

[0080] In some embodiments, the processing unit 502 is specifically used to obtain first rotation information corresponding to the reference part; obtain second rotation information corresponding to the target part; and control the movement of multiple components of the virtual object based on the first rotation information and the second rotation information to control the movement of the virtual object.

[0081] In some embodiments, the processing unit 502 is specifically used to control the movement of the first component based on the first rotation information; control the movement of the second component based on the second rotation information; obtain the third component based on the first component and the second component; and control the movement of the third component based on the first rotation information and the second rotation information.

[0082] In some embodiments, the processing unit 502 is specifically used to obtain depth information of the virtual object; set an occlusion plane based on the depth information of the virtual object, and the shape of the occlusion plane is obtained based on the detection of the target object; and remove the occlusion area of ​​the virtual object based on the occlusion plane.

[0083] In some embodiments, the processing unit 502 is specifically configured to obtain first depth information and second depth information based on the depth information of the virtual object; and determine the depth information of the occlusion plane based on the first depth information and the second depth information.

[0084] In some embodiments, the rendering unit 503 is specifically used to obtain the corresponding ambient light occlusion information after the virtual object is mounted on the target part; and use the ambient light occlusion information to render the video after removing the occluded area to obtain the target video.

[0085] In some embodiments, the ambient occlusion information includes ambient occlusion information of a contact position between the virtual object and the target part and ambient occlusion information of a contact position between the virtual object and other parts.

[0086] It should be noted that the specific implementation of each unit in this embodiment can refer to the relevant description in the above method embodiment. The division of units in the embodiment of the present application is schematic and is only a logical function division. There may be other division methods in actual implementation. The functional units in the embodiment of the present application can be integrated into a processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. For example, in the above embodiment, the processing unit and the sending unit can be the same unit or different units. The above-mentioned integrated units can be implemented in the form of hardware or in the form of software functional units.

[0087] Referring to FIG6 , a schematic diagram of the structure of an electronic device 600 suitable for implementing embodiments of the present disclosure is shown. Terminal devices in embodiments of the present disclosure may include, but are not limited to, mobile terminals such as mobile phones, laptop computers, digital broadcast receivers, PDAs (personal digital assistants), PADs (tablet computers), PMPs (portable multimedia players), in-vehicle terminals (e.g., in-vehicle navigation terminals), and fixed terminals such as digital TVs and desktop computers. The electronic device shown in FIG6 is merely an example and should not limit the functionality or scope of use of embodiments of the present disclosure.

[0088] As shown in FIG6 , the electronic device 600 may include a processing device (e.g., a central processing unit, a graphics processing unit, etc.) 601, which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM) 602 or a program loaded from a storage device 608 into a random access memory (RAM) 603. Various programs and data required for the operation of the electronic device 600 are also stored in the RAM 603. The processing device 601, the ROM 602, and the RAM 603 are connected to each other via a bus 604. An input / output (I / O) interface 605 is also connected to the bus 604.

[0089] Typically, the following devices may be connected to the I / O interface 605: an input device 606 including, for example, a touch screen, a touchpad, a keyboard, a mouse, a camera, a microphone, an accelerometer, a gyroscope, etc.; an output device 607 including, for example, a liquid crystal display (LCD), a speaker, a vibrator, etc.; a storage device 608 including, for example, a magnetic tape, a hard disk, etc.; and a communication device 609. The communication device 609 may allow the electronic device 600 to communicate with other devices wirelessly or by wire to exchange data. Although FIG. 6 shows the electronic device 600 with various devices, it should be understood that not all of the devices shown are required to be implemented or present. More or fewer devices may alternatively be implemented or present.

[0090] In particular, according to an embodiment of the present disclosure, the process described above with reference to the flowchart can be implemented as a computer software program. For example, an embodiment of the present disclosure includes a computer program product, which includes a computer program carried on a non-transitory computer-readable medium, and the computer program includes a program code for executing the method shown in the flowchart. In such an embodiment, the computer program can be downloaded and installed from the network through the communication device 609, or installed from the storage device 608, or installed from the ROM 602. When the computer program is executed by the processing device 601, the above-mentioned functions defined in the method of the embodiment of the present disclosure are performed.

[0091] The electronic device provided by the embodiment of the present disclosure and the method provided by the above embodiment belong to the same inventive concept. For technical details not fully described in this embodiment, please refer to the above embodiment, and this embodiment has the same beneficial effects as the above embodiment.

[0092] An embodiment of the present disclosure provides a computer storage medium having a computer program stored thereon. When the program is executed by a processor, the method provided in the above embodiment is implemented.

[0093] It should be noted that the computer-readable medium mentioned above in the present disclosure may be a computer-readable signal medium or a computer-readable storage medium, or any combination of the two. A computer-readable storage medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device, or component, 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. 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, device, or component. 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. Such a propagated data signal may take a variety of forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination of the above. A computer-readable signal medium may also be any computer-readable medium other than a computer-readable storage medium that can transmit, propagate, or transport 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 wires, optical cables, RF (radio frequency), etc., or any suitable combination thereof.

[0094] In some embodiments, the client and server can communicate using any currently known or later developed network protocol, such as HTTP (Hypertext Transfer Protocol), and can be interconnected with any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include a local area network ("LAN"), a wide area network ("WAN"), an internet (e.g., the Internet), and a peer-to-peer network (e.g., an ad hoc peer-to-peer network), as well as any currently known or later developed network.

[0095] The computer-readable medium may be included in the electronic device, or may exist independently without being incorporated into the electronic device.

[0096] The computer-readable medium carries one or more programs. When the one or more programs are executed by the electronic device, the electronic device can perform the method.

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

[0098] The flowcharts and block diagrams in the accompanying drawings illustrate the possible implementation architecture, functions and operations of the systems, methods and computer program products according to various embodiments of the present disclosure. In this regard, each box in the flowchart or block diagram can represent a module, program segment, or a part of code, and the module, program segment, or a part of code contains one or more executable instructions for realizing the specified logical function. It should also be noted that in some alternative implementations, the functions marked in the box can also occur in a different order than that marked in the accompanying drawings. For example, two boxes represented in succession can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each box in the block diagram and / or flowchart, and the combination of the boxes in the block diagram and / or flowchart, can be implemented with a dedicated hardware-based system that performs the specified function or operation, or can be implemented with a combination of dedicated hardware and computer instructions.

[0099] The units involved in the embodiments described in this disclosure may be implemented in software or hardware, wherein the name of a unit / module does not, in some cases, limit the unit itself.

[0100] The functions described above herein may be performed, at least in part, by one or more hardware logic components. For example, and without limitation, exemplary types of hardware logic components that may be used include: field programmable gate arrays (FPGAs), application specific integrated circuits (ASICs), application specific standard products (ASSPs), systems on chip (SOCs), complex programmable logic devices (CPLDs), and the like.

[0101] In the context of the present disclosure, a machine-readable medium can be a tangible medium that can contain or store a program for use by or in conjunction with an instruction execution system, device or equipment. A machine-readable medium can be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium can include, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or equipment, or any suitable combination of the foregoing. A more specific example of a machine-readable storage medium can include an electrical connection based on one or more lines, 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 foregoing.

[0102] It should be noted that the various embodiments in this specification are described in a progressive manner, with each embodiment focusing on the differences from other embodiments. Reference can be made to the common and similar parts between the various embodiments. For the systems or devices disclosed in the embodiments, since they correspond to the methods disclosed in the embodiments, the description is relatively simple, and the relevant parts can be referred to the method description.

[0103] It should be understood that in this application, "at least one (item)" means one or more, and "plurality" means two or more. "And / or" is used to describe the association relationship of associated objects, indicating that three relationships may exist. For example, "A and / or B" can mean: only A exists, only B exists, and A and B exist at the same time, where A and B can be singular or plural. The character " / " generally indicates that the previous and next associated objects are in an "or" relationship. "At least one of the following items" or similar expressions refers to any combination of these items, including any combination of single items or plural items. For example, at least one of a, b or c can mean: a, b, c, "a and b", "a and c", "b and c", or "a and b and c", where a, b, c can be single or multiple.

[0104] It should also be noted that, in this document, relational terms such as first and second, etc., are used only to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "comprises," "comprising," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or device 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 device. In the absence of further limitations, an element defined by the phrase "comprising a ..." does not exclude the presence of additional identical elements in the process, method, article, or device comprising the element.

[0105] The steps of the methods or algorithms described in conjunction with the embodiments disclosed herein may be implemented directly using hardware, a software module executed by a processor, or a combination of the two. The software module may be placed in a random access memory (RAM), internal memory, read-only memory (ROM), electrically programmable ROM, electrically erasable programmable ROM, registers, a hard disk, a removable disk, a CD-ROM, or any other form of storage medium known in the art.

[0106] The above description of the disclosed embodiments is intended to enable one skilled in the art to implement or use the present application. Various modifications to these embodiments will be readily apparent to one skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of the present application. Therefore, the present application is not limited to the embodiments shown herein, but is intended to conform to the widest scope consistent with the principles and novel features disclosed herein.

Claims

1. A virtual object mounting method, comprising: Get the original video; Acquire a virtual object based on a user's selection; Mounting the virtual object to a target part of a target object in the original video; Eliminate the occluded area of ​​the virtual object; Render the video after removing the occluded area to obtain the target video.

2. The method according to claim 1, wherein mounting the virtual object to a target part of a target object in the original video comprises: Acquire a target part and a reference part of a target object in the original video; controlling the movement of the virtual object based on the reference part and the target part; The virtual object is mounted to the target part based on the motion information of the virtual object.

3. The method according to claim 2, wherein controlling the movement of the virtual object based on the reference part and the target part comprises: Acquiring first rotation information corresponding to the reference part; Acquiring second rotation information corresponding to the target part; The movement of the multiple components of the virtual object is controlled based on the first rotation information and the second rotation information to control the movement of the virtual object.

4. The method according to claim 3, wherein controlling the movement of multiple components of the virtual object based on the first rotation information and the second rotation information comprises: controlling the movement of the first component based on the first rotation information; controlling the movement of the second component based on the second rotation information; Obtaining a third component based on the first component and the second component; The movement of the third component is controlled based on the first rotation information and the second rotation information.

5. The method according to claim 1, wherein removing the occluded area of ​​the virtual object comprises: Acquiring depth information of the virtual object; Setting an occlusion plane based on the depth information of the virtual object, wherein the shape of the occlusion plane is obtained based on the detection of the target object; The occluded area of ​​the virtual object is culled based on the occluded plane.

6. The method according to claim 5, wherein setting the occlusion plane based on the depth information of the virtual object comprises: Acquire first depth information and second depth information based on the depth information of the virtual object; Depth information of the occlusion plane is determined based on the first depth information and the second depth information.

7. The method according to claim 1, wherein rendering the video after removing the blocked area to obtain the target video comprises: Acquire the ambient light occlusion information corresponding to the virtual object after being mounted on the target part; The ambient light occlusion information is used to render the video after removing the occluded area to obtain a target video. 8 . The method according to claim 7 , wherein the ambient occlusion information comprises ambient occlusion information of a position where the virtual object contacts the target part and ambient occlusion information of a position where the virtual object contacts other parts.

9. A virtual object mounting device, comprising: An acquisition unit, used for acquiring original video; The acquisition unit is further used to acquire the virtual object based on the user's selection; A processing unit, configured to mount the virtual object to a target part of a target object in the original video; The processing unit is further used to remove the occluded area of ​​the virtual object; The rendering unit is used to render the video after removing the occluded area to obtain the target video.

10. An electronic device, wherein the device comprises: Processor and memory; The memory is used to store instructions or computer programs; The processor is used to execute the instructions or computer programs in the memory so that the electronic device executes the method according to any one of claims 1 to 8.

11. A computer-readable storage medium, wherein the computer-readable storage medium stores instructions, and when the instructions are executed on a device, the device executes the method according to any one of claims 1 to 8.

Citation Information

Patent Citations

  • Virtual object mounting method and device, equipment and medium

    CN116228952A

  • Virtual object processing method and device, electronic equipment and storage medium

    CN112348841A

  • Image processing method, mobile terminal and storage medium

    CN112422945A

  • Image processing method and device, equipment and storage medium

    CN113240692A

  • Special effect video determination method and device, electronic equipment and storage medium

    CN114697568A