Special effect processing method and device, equipment and storage medium

By occluding the special effects three-dimensional model of the special effects wearables and combining it with the object contour map of the target object, the special effects combination image is determined, which solves the problem of the special effects wearables not fitting the wearing part, and achieves a more natural edge connection and better High sense of reality improves the user experience.

CN119338687APending Publication Date: 2025-01-21BEIJING ZITIAO NETWORK TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202310907962.4
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2023-07-21
Publication Date
2025-01-21

AI Technical Summary

Technical Problem

In the prior art, the special effect wear object does not fit the wear part, the edges are unnatural, and the sense of reality is poor, which reduces the participants' experience of using augmented reality special effect props.

Method used

By performing model occlusion processing on the special effects three-dimensional model of the special effects wearables, the special effects occlusion three-dimensional model is obtained; combined with the object outline of the target object, the special effects combination image is determined and displayed to achieve a natural fit between the special effects wearables and the wearing part.

Benefits of technology

It improves the wearing effect of special effects wearables, makes the connection between the target object and the edge of the special effects wearables more real and natural, improves the presentation of special effects, and enhances the participants' experience of using augmented reality special effects props.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119338687A_ABST
    Figure CN119338687A_ABST
Patent Text Reader

Abstract

The embodiment of the invention provides a special effect processing method and device, equipment and a storage medium. The method comprises the following steps: in response to a wearing trigger operation of a special-effect wearing object, performing model shielding processing on a special-effect three-dimensional model of the special-effect wearing object to obtain a special-effect shielding three-dimensional model; obtaining a currently displayed target object original image including a target object, and determining an object contour image of the target object original image, a wearing main body of the special effect wearing object being located on the target object; and determining and displaying a special effect combined image according to the special effect shielding three-dimensional model in combination with the object contour diagram. By means of the method, a two-dimensional shielding plane is set for a special-effect three-dimensional model, and an object contour diagram is obtained; in this way, fusion is carried out based on the special effect shielding three-dimensional model and the object contour diagram, the edge connection of the target object and the special effect wearing object in the presented image is more real and natural, the special effect presentation effect is improved, and the use experience of participants on augmented reality special effect props is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The embodiments of the present disclosure relate to the field of image processing technology, and in particular to special effects processing methods, devices, equipment and storage media. Background Art

[0002] With the development of network technology, augmented reality (AR) technology is increasingly used in entertainment applications such as live broadcast, short video interactive entertainment, etc. The AR special effects props provided can enhance the visual effects of participants in the live broadcast interface, short video interface and even interactive entertainment interface.

[0003] In special effects applications, special effects wearables are also a type of AR special effects props. The selected special effects wearables (such as hats, necklaces, and watches, etc.) can be presented at the parts that the participants want to wear. In the implementation of special effects processing of special effects wearables, the special effects model of the special effects wearables is often used to render the wearing parts on the participants, so as to combine the special effects wearables with the wearing parts to form a special effects combination picture.

[0004] However, in the special effects combination screen presented by the above rendering method, there are problems such as the special effects wearables not fitting well with the wearing parts, the edges not being connected naturally, and the sense of reality being poor, which reduces the participants' experience of using the enhanced display special effects props. Summary of the invention

[0005] The present invention provides a special effect processing method, device, equipment and storage medium to improve the wearing effect of special effect wearable objects in special effect props.

[0006] In a first aspect, an embodiment of the present disclosure provides a special effect processing method, the method comprising:

[0007] In response to a wearing triggering operation of the special-effect wearable object, performing model occlusion processing on the special-effect three-dimensional model of the special-effect wearable object to obtain a special-effect occluded three-dimensional model;

[0008] Acquire a currently displayed original image of the target object including the target object, and determine an object contour image of the original image of the target object, wherein the wearing body of the special effect wearable object is located on the target object;

[0009] A special effects combination image is determined and displayed based on the special effects occlusion three-dimensional model combined with the object outline map.

[0010] In a second aspect, the embodiments of the present disclosure further provide a special effects processing device, the device comprising:

[0011] An operation response module, configured to respond to a wearing trigger operation of a special-effect wearable object, perform model occlusion processing on a special-effect three-dimensional model of the special-effect wearable object, and obtain a special-effect occluded three-dimensional model;

[0012] A contour image determination module is used to obtain a currently displayed original image of a target object including a target object, and determine an object contour image of the original image of the target object, wherein the wearing body of the special effect wearable object is located on the target object;

[0013] The image display module is used to determine and display a special effect combination image based on the special effect occlusion three-dimensional model combined with the object outline map.

[0014] In a third aspect, an embodiment of the present disclosure further provides an electronic device, the electronic device comprising:

[0015] one or more processors;

[0016] a storage device for storing one or more programs,

[0017] When the one or more programs are executed by the one or more processors, the one or more processors implement the special effects processing method provided in the first aspect of the embodiment of the present disclosure.

[0018] In a fourth aspect, the embodiments of the present disclosure further provide a storage medium comprising computer executable instructions, which, when executed by a computer processor, are used to implement the special effects processing method provided in the first aspect of the embodiments of the present disclosure.

[0019] The disclosed embodiments provide a special effects processing method, device, equipment and storage medium, through which the special effects processing method first responds to the wearing trigger operation of the special effects wearable object, performs model occlusion processing on the special effects three-dimensional model of the special effects wearable object, and obtains a special effects occlusion three-dimensional model; then obtains the original image of the target object currently displayed that contains the target object, and determines the object contour image of the target object original image, and the wearing body of the special effects wearable object is on the target object; finally, according to the special effects occlusion three-dimensional model combined with the object contour image, the special effects combination image is determined and displayed. The above technical solution solves the problems that the existing special effects wearable objects do not fit the wearing parts, the edge connection is unnatural, and the sense of reality is poor. The above technical scheme sets a two-dimensional occlusion plane for the special effects three-dimensional model of the special effects wearable object to block the part of the special effects wearable object that should be blocked when it is actually presented; then the target object and the background are segmented based on the object contour map, so that they are fused based on the special effects occlusion three-dimensional model and the object contour map, and then the fused area can be divided into an area involving the target object and an area involving the background, and the target object area is presented as the target object, and the background area is presented as the special effects wearable object. The special effects combined image presented in this way can cover the target object in the special effects wearable object, and the edge connection between the target object and the special effects wearable object in the presented image is more realistic and natural, which improves the special effects presentation effect and enhances the participants' experience of using augmented reality special effects props. BRIEF DESCRIPTION OF THE DRAWINGS

[0020] The above and other features, advantages and aspects of the embodiments of the present disclosure will become more apparent with reference to the following detailed description in conjunction with the accompanying drawings. Throughout the accompanying drawings, the same or similar reference numerals represent the same or similar elements. It should be understood that the drawings are schematic and the originals and elements are not necessarily drawn to scale.

[0021] Figure 1 An example diagram of a special effect wearable object being worn and presented in an existing presentation form is provided;

[0022] Figure 2 A flowchart of a special effect processing method provided by an embodiment of the present disclosure;

[0023] Figure 3 An example diagram of the effect of the object outline diagram in the execution of the special effect processing method provided in this embodiment is given;

[0024] Figure 4 An example diagram of the presentation of a special effect wearable object after being processed by the special effect processing method provided in this embodiment is provided;

[0025] Figure 5 An example diagram of the effect of the special effect processing intermediate diagram in the execution of the special effect processing method provided in this embodiment is given;

[0026] Figure 6 An example diagram of the effect of the first special effect processing diagram in the execution of the special effect processing method provided in this embodiment is given;

[0027] Figure 7 A schematic diagram of an erosion algorithm in the execution of a special effect processing method provided in this embodiment is provided;

[0028] Figure 8 A schematic diagram of the structure of a special effect processing device provided by an embodiment of the present disclosure;

[0029] Fig. 9 A schematic diagram of the structure of an electronic device provided by an embodiment of the present disclosure. DETAILED DESCRIPTION

[0030] Embodiments of the present disclosure will be described in more detail below with reference to the accompanying drawings. Although certain embodiments of the present disclosure are shown in the accompanying drawings, it should be understood that the present disclosure can be implemented in various forms and should not be construed as being limited to the embodiments described herein, which are instead provided for a more thorough and complete understanding of the present disclosure. It should be understood that the drawings and embodiments of the present disclosure are only for exemplary purposes and are not intended to limit the scope of protection of the present disclosure.

[0031] It should be understood that the various steps described in the method embodiments of the present disclosure may be performed in different orders and / or in parallel. In addition, the method embodiments may include additional steps and / or omit the steps shown. The scope of the present disclosure is not limited in this respect.

[0032] The term "including" and its variations used herein are open inclusions, i.e., "including but not limited to". The term "based on" means "based at least in part on". The term "one embodiment" means "at least one embodiment"; the term "another embodiment" means "at least one additional embodiment"; the term "some embodiments" means "at least some embodiments". The relevant definitions of other terms will be given in the following description.

[0033] It should be noted that the concepts such as "first" and "second" mentioned in the present disclosure are only used to distinguish different devices, modules or units, and are not used to limit the order or interdependence of the functions performed by these devices, modules or units.

[0034] It should be noted that the modifications of "one" and "plurality" mentioned in the present disclosure are illustrative rather than restrictive, and those skilled in the art should understand that unless otherwise clearly indicated in the context, it should be understood as "one or more".

[0035] The names of the messages or information exchanged between multiple devices in the embodiments of the present disclosure are only used for illustrative purposes and are not used to limit the scope of these messages or information.

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

[0037] For example, in response to receiving an active request from a user, a prompt message is sent to the user to clearly prompt the user that the operation requested to be performed will require obtaining and using the user's personal information. Thus, the user can autonomously choose whether to provide personal information to software or hardware such as an electronic device, application, server, or storage medium that performs the operation of the technical solution of the present disclosure according to the prompt message.

[0038] As an optional but non-limiting implementation, in response to receiving an active request from the user, 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. In addition, the pop-up window may also carry a selection control for the user to choose "agree" or "disagree" to provide personal information to the electronic device.

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

[0040] It is known that special effects props are common functions in entertainment interactive applications such as live broadcasts and short videos. By using special effects props, the effects of live broadcasts or short videos can be better enhanced. Special effects wearables are one of the special effects props, which can be displayed in the associated wearable display position after the user triggers the special effects wearable function.

[0041] Exemplarily, after the user selects the special effects wearable item as a special effects hat and triggers the wearing operation of the special effects hat, the special effects hat can be presented at the position of the user's head in the picture showing the user. Figure 1 An example diagram of a special effect wearable object being worn in an existing presentation form is given, such as Figure 1 As shown, a special effects composite image 11 obtained by processing a participant and a special effects hat in the prior art is shown. Through the area 111 where the special effects hat and the hair meet in the special effects composite image 11, it can be seen that part of the rear edge of the special effects hat that should be blocked by the hair is exposed, while the hair that should be displayed by blocking the rear edge of the hat is blocked by the rear edge of the special effects hat and is not displayed. Figure 1 It can be seen that there are problems with existing special effects processing methods, that is, the existing special effects processing methods will cause the special effects wearables to not fit the wearing parts, the edge connection is unnatural, and the sense of reality is poor, which reduces the participants' experience of using enhanced display special effects props.

[0042] In addition, after wearing the special effects wearables, participants may want to adjust their own orientation to see the wearing effect of the special effects wearables when they are in different orientations. In the existing technology, even if the special effects wearables can effectively block the object to be blocked when the participant is facing forward, the presentation position of the special effects wearables will change as the participant's posture is adjusted. There will also be problems such as the special effects wearables not fitting well with the wearing part, unnatural edge connection, and poor sense of reality. This reduces the participant's experience of using the enhanced display special effects props.

[0043] Based on this, this embodiment provides a special effects processing method, which can block the content that should not be displayed when the special effects wearable item is worn on the target object, so that the special effects wearable item fits well with the wearing part and the edges are naturally connected, thereby improving the wearing effect of the special effects wearable item.

[0044] Specifically, Figure 2A flow chart of a special effects processing method provided in an embodiment of the present disclosure. The embodiment of the present disclosure is applicable to the situation of processing special effects of special effects wearable objects and wearing parts. The method can be executed by a special effects processing device, which can be implemented in the form of software and / or hardware. Optionally, it can be implemented by an electronic device as an execution terminal, which can be a mobile terminal, a PC or a server, etc.

[0045] like Figure 2 As shown, a special effect processing method provided by an embodiment of the present disclosure specifically includes the following operations:

[0046] S210. In response to a wearing triggering operation of a special-effect wearable object, a model occlusion processing is performed on a special-effect three-dimensional model of the special-effect wearable object to obtain a special-effect occluded three-dimensional model.

[0047] In this embodiment, the special effects wearables can be regarded as AR special effects props that can play an augmented reality role, which can be special effects hats, special effects accessories (such as special effects necklaces, special effects watches, special effects glasses), and special effects equipment, etc., which can be considered as props that can be worn on a certain part of the participant's body. Generally, different types of special effects wearables can be provided in an application scenario for participants to choose from, and similarly, different special effects wearables can also appear in different special effects application scenarios.

[0048] It is understandable that before the special effect wearable object is triggered in the application scenario, a normal preview display of the target object can be performed. That is, it can be considered that the normal preview screen of the target object is presented in the normal state of the running related entertainment interactive application (such as live broadcast, short video, etc.).

[0049] In this embodiment, when a participant wants to wear a special effect wearable, the special effect wearable can be selected and triggered. This step can respond to a wearing trigger operation generated by selecting a special effect wearable. One way to generate the wearing trigger operation is that a participant or an interactive assistant selects any special effect wearable in the special effect wearable display area and selects and triggers the special effect wearable.

[0050] Exemplarily, the example of a participant wearing a special effects hat is used for explanation. Assuming that the participant wants to wear a special effects hat, the participant can select the special effects hat in the special effects wearable display area and trigger the selection of the special effects hat. After the wearing operation of the special effects hat, the special effects hat can be presented at the position of the participant's head in the screen showing the participant. Considering that after the special effects processing using the prior art, the connection between the special effects hat and the hair at the head position is unnatural and unreal, the back edge of the hat that should be covered by the hair will be exposed and displayed, and the hair that should be displayed is covered by the back edge of the hat and not displayed.

[0051] The effect to be achieved by this embodiment can be described as follows: through the special effects processing method provided by this embodiment, when participants wear special effects wearables, the wearables can be presented more realistically and naturally, and the connection between the special effects wearables and the participants is more natural, thereby improving the wearing effect of the special effects wearables. In order to achieve this goal, it is necessary to focus on the fusion rendering process between the special effects wearables and the participants.

[0052] It is understandable that the special effects wearables are actually rendered from an underlying special effects three-dimensional model. If the special effects wearables are directly rendered to the wearing parts of the participants when the special effects wearables are merged, the fused images will not be realistic. Therefore, in this embodiment, after responding to the wearing trigger operation of the special effects wearables, a process is first performed based on the acquired special effects three-dimensional model of the special effects wearables as a basic step for the fusion of the special effects wearables with the target object.

[0053] Considering that when the special effects wearables are integrated with the target object by using the existing special effects processing method, the rear part of the special effects wearables that should be blocked by the target object will be exposed and displayed, and the part of the target object that should be displayed will be blocked by the rear part of the special effects target object and not displayed. Therefore, in this step, the special effects 3D model of the special effects wearables is blocked, and a new model is obtained after the special effects 3D model is blocked, which is recorded as the special effects blocked 3D model in this embodiment.

[0054] Continuing with the above description, in order to achieve the occlusion of the special effect three-dimensional model, it is necessary to first determine an occlusion plane and the position where the occlusion plane should be placed. Exemplarily, a specific implementation method of the occlusion plane can be to determine the bottom vertex of the special effect three-dimensional model based on the model vertex information of the special effect three-dimensional model; based on the bottom vertex, the bottom plane can be determined, and the bottom plane contains the maximum plane length value and the central axis; based on the target object, the height value of the occlusion plane can be determined; based on the maximum plane length value and the height value, the occlusion plane can be determined; the occlusion plane is placed at the central axis; based on the special effect three-dimensional model and the occlusion plane, a special effect occlusion three-dimensional model can be formed.

[0055] For example, a special effects hat is used as a special effects wearable. The special effects hat is a three-dimensional model of a hat in three-dimensional space. At this time, an occlusion plane is found for the three-dimensional model of the hat, and the occlusion plane is placed horizontally in the center of the hat. The placement of the occlusion plane is equivalent to combining the occlusion plane with the original three-dimensional model of the hat, and the special effects occlusion three-dimensional model is formed after the occlusion processing.

[0056] It should be clear that the special effects three-dimensional model of the special effects wearable object itself is subjected to model occlusion processing. The purpose of the processing is to render the special effects occlusion three-dimensional model obtained after the processing, so that the front part of the special effects occlusion object is presented without occlusion during actual presentation. However, the back part of the special effects wearable object actually has an occlusion relationship with the target object. If the special effects three-dimensional model is directly rendered on the wearing part of the target object, a good presentation effect cannot be achieved. In this embodiment, an occlusion plane is set, so that when rendering is performed, only the front part of the special effects three-dimensional model is presented, and the back part of the special effects three-dimensional model is used as an interference part and is first occluded, and then filled based on subsequent processing.

[0057] Exemplarily, a special effects hat is used as an example for explanation. After the special effects hat is worn on the head of the target object, the actual presentation effect should be that the rear edge of the special effects hat is blocked by the hair of the target object. From the presentation effect, the front edge of the hat and the front view of the head should be seen, and the hair blocks the rear edge of the hat. It can also be understood that the hair should be inside the rear edge of the hat. Considering that there is an occlusion relationship between the rear edge of the special effects hat and the hair, there is no way to achieve this effect well if it is directly rendered, so an occlusion plane is set. Through this occlusion plane, only the front edge of the hat is seen during subsequent rendering. The interfering parts at the back are first blocked, and then a filling is implemented for this part based on subsequent processing. In this embodiment, the rear edge of the special effects hat can be blocked by such an occlusion plane, and only the hair can be seen in the effect presentation, and the hair is inside the rear edge of the special effects hat.

[0058] In general, after entering the wearing scene of the special effects wearable object and presenting the special effects combination screen, the target subject rarely remains still. Under normal circumstances, after the target subject participates in the wearing scene of the special effects wearable object, the target subject can make some actions (such as twisting the head, turning the neck, turning sideways or turning the palm, etc.) to view the wearing effect of the special effects wearable object. The action made by the target object is equivalent to a posture adjustment, and the presentation state of the special effects wearable object will often change with the change of the target object's posture. In this embodiment, the special effects occlusion three-dimensional model of the special effects wearable object is subjected to model occlusion processing to obtain a special effects occlusion three-dimensional model. No matter how the posture is adjusted, the two-dimensional occlusion plane will also be adjusted accordingly, which can ensure that the second half of the special effects three-dimensional model can be occluded in any posture.

[0059] S220, obtaining a currently displayed original image of the target object including the target object, and determining an object contour image of the original image of the target object, wherein the wearer of the special effect wearable article is located on the target object.

[0060] In this embodiment, the target subject can be specifically regarded as a subject participating in the special effects processing, and the target subject can be an entity with the ability to move, such as a person or an animal. Exemplarily, the target subject can be a participant in application scenarios such as live broadcast, short video, and human-computer interaction, and can be specifically presented in a live broadcast screen, a short video screen, or other human-computer entertainment interaction interfaces. It can be considered that before the wearing trigger operation of the special effects wearable is performed in the application scenario, a regular preview display of the target object can be performed. The original image of the target object can be considered to be a normal preview screen of the target object under normal conditions of the running related entertainment interactive applications (such as live broadcast, short video, etc.). Among them, the target object is included in the original image of the target object. The wearing subject of the special effects wearable can be understood as the part to be worn for the special effects wearable, and the wearing subject of the special effects wearable is on the target object.

[0061] In this embodiment, after obtaining the special effects occlusion three-dimensional model required for rendering, the target object is not directly rendered based on the special effects occlusion three-dimensional model, but it is necessary to obtain the original image of the target object currently displayed containing the target object. The original image of the target object is further processed to obtain an object contour image of the target object. The object contour image of the target object can be specifically understood as a contour image that separates the target object from the background. The method of determining the object contour image of the original image of the target object can be understood as performing target object detection on the original image of the target object, thereby separating the target object from the background and obtaining an object contour image of the target object.

[0062] In this embodiment, the purpose of determining to obtain an object contour map can be understood as segmenting the target object and the background in the original image of the target object. After the segmentation, it is equivalent to knowing what kind of area the target object is in the image, what areas it occupies in the image, and what kind of area the special effects wearable is, and what areas it occupies in the image. Exemplarily, assuming that the application scenario is to wear a special effects hat on a person's head, the person can be regarded as the target object, and the person's head can be regarded as the wearing subject. Based on the processing of the original image of the target object, an object contour map containing only people is obtained. It is equivalent to obtaining which areas the person occupies in the image and what the specific presentation form is, and at the same time obtaining which areas the person's head occupies in the image and what the specific presentation form is.

[0063] Exemplarily, in order to more clearly describe the object contour map of the original image of the target object, an example of a special effects hat worn on a person's head is used for explanation. Figure 3 An example diagram of the effect of the object outline map in the execution of the special effect processing method provided in this embodiment is given, such as Figure 3 As shown, the object contour map 13 is divided into a target object 131 and a background part 132.

[0064] S230: Determine and display a special effect combination image based on the special effect occlusion three-dimensional model and the object outline map.

[0065] In this embodiment, when the special effect occlusion three-dimensional model and the object outline are obtained, fusion rendering can be performed based on them to obtain the effect image after wearing, which is recorded as a special effect combination image. After the special effect combination image is determined, the special effect combination image can be presented on the display interface, and the presentation effect is that the special effect wearable object is worn on the target object.

[0066] In this embodiment, this step can present a combined picture formed after responding to the above-mentioned wearing trigger operation, and the combined picture can be recorded as a special effect combined picture. It can be known that the presentation effect that the special effect wearables need to achieve is to display the special effect wearables at the part where the participant or assistant expects them to be worn on the target object, such as the special effect hat that is expected to be presented on the top of the target object's head and cover the hair on the top of the head and both sides of the ears, and the special effect necklace that is expected to be presented on the neck of the target object and cover the neck skin where the special effect necklace is worn.

[0067] Specifically, in this embodiment, the screen presented on the display screen of the electronic device in response to the wearing trigger operation of the special effect wearable object can be recorded as a special effect combination screen, that is, the special effect combination screen presented in this step can be formed after the wearing trigger of a special effect wearable object. The special effect combination screen can be regarded as a combination of the target preview screen associated with the target object and the screen after the special effect wearable object is rendered. In the special effect combination screen, the special effect wearable object is presented at the position where it needs to be worn on the target object. At the same time, in order to reflect the authenticity of the special effect wearable object being worn at a certain position or part of the target subject, the rear edge of the special effect wearable object needs to be blocked by the content originally presented by the target subject.

[0068] Generally, when the target object wears a special effects wearable, the real effect should be that the image presented to the user is that the back part of the special effects wearable is in an occlusion relationship with the target object. At this time, it should be presented that the target object blocks the special effects wearable. For example, assuming that the target object is a person's head and the special effects wearable is a special effects hat, for a real scene, after a person wears a hat, the front of the person presented to other people is that the person's hair is inside the hat, that is, the back edge of the hat is blocked. Similarly, for augmented reality scenes, when a person in the scene wears a special effects hat, it should be ensured that the hair is inside the hat, and the back edge of the hat is blocked by the hair. Only in this way can the combined image be more realistic and natural.

[0069] In order to achieve the above purpose, different from the prior art that directly uses the three-dimensional model of the target object and the special effects wearables as an occlusion, the special effects wearables are occluded based on the outer contour of the entire target object in this embodiment. After obtaining the special effects occlusion three-dimensional model, the placement position of the occluding two-dimensional plane in the special effects occlusion three-dimensional model is actually equivalent to occluding the back half of the special effects wearables. This part involves the rear edge of the special effects wearables and the part where the target object and the special effects wearables are connected. Continuing with the above example, the placement position of the two-dimensional occlusion plane involves the rear edge of the hat and the hair, ears and other parts of the person. These parts are the parts where the special effects wearables and the target object occlude each other. The leading edge of the special effects wearable does not need to interact with the target object and can be directly presented on the top layer.

[0070] Continuing from the above description, for the two-dimensional occluded plane part involved in the special effect occluded three-dimensional model, it is necessary to re-fill and render, and this part involves the rear edge of the special effect wearable and the target object that have an occlusion relationship. Therefore, it is necessary to determine which part needs to be filled into the original target object and which part needs to be filled into the special effect wearable. For example, it is necessary to determine which part is filled into the human face part and which part is filled into the rear edge of the hat. How to divide these two parts needs to be determined based on the object outline map.

[0071] In this embodiment, since a two-dimensional occlusion plane is set in the special effect occlusion three-dimensional model, when rendering, only the front part of the special effect three-dimensional model is presented, and the back part of the special effect three-dimensional model is first occluded as an interference part, and then filled based on subsequent processing. The object contour map is to segment the target object and the background in the original image of the target object. After segmentation, it is equivalent to knowing what kind of area the target object is in the image, what areas it occupies in the image, and what areas the special effect wearables occupy in the image.

[0072] For example, assuming that the target object is a person, and the special effects wearable object is a special effects hat, the special effects occlusion three-dimensional model is a combination of a hat three-dimensional model and a two-dimensional occlusion plane. This special effects occlusion three-dimensional model can present the front edge of the hat, and block the back edge of the hat through the two-dimensional occlusion plane. For the object contour map, which is a person's contour map, the contour map is equivalent to segmenting the person and the background, so it can be determined which areas the face occupies in this image. The special effects occlusion three-dimensional model itself is rendered in a two-dimensional conversion, and the hat is attached to the image when it is displayed. But in fact, if only the hat model is rendered, what is rendered is a hat model and such a two-dimensional occlusion plane.

[0073] In this embodiment, after two-dimensional conversion rendering is performed based on the special effects occlusion three-dimensional model, a two-dimensional projection is obtained, including the projection of the front part of the special effects wearable object and the projection of the two-dimensional occlusion plane, where the front part of the special effects wearable object is covered on the projection of the two-dimensional occlusion plane. Combined with the object contour map, it is possible to determine the areas contained in this projection rendering area and the areas corresponding to them in the contour image. Replace the corresponding area in the object contour area with the projection rendering area. Exemplarily, considering that the size of the images is the same, the pixels are one-to-one corresponding, then the corresponding pixel coordinates of the area can be corresponded to the pixel coordinates on the object contour map, and the pixel information of this part of the pixel points in the object contour can be replaced with the pixel information of the pixel points in the projection rendering area.

[0074] Continuing with the above description, by replacing the above-mentioned projection rendering area with the object outline map, it is possible to determine which part should present the target object and which part should present the special effect wearable object based on the outline map of the replaced area. After knowing such an area, you can consider filling it according to the corresponding specific situation. Exemplarily, continuing with the above example, you can determine how much of this area the face occupies after replacing the human outline map, and then render a face in this part to fill it. The background part can also be rendered according to the two-dimensional conversion projection of the special effect wearable object to show where there is a hat.

[0075] It can be understood that the special effect occlusion 3D model is rendered with only the front of the hat plus a plane, and the object outline is only some outlines of the target object. If you want to form a combined image, you need to combine some pixel information of this part in the original image of the target object. Use these pixel information to fill, and you can form an image that merges the special effect wearable and the target body. Because the information in the occlusion plane itself has been divided and filled differently. After these logical processing, the hat will not be behind the hair, and the back of the hat will be blocked. You may need to present these parts of the hair, and the hair has been presented through segmentation. That may be the area on both sides of this area where there are extra areas to present the hat. In fact, it is equivalent to presenting it after the hair in terms of layering, and it can present the effect of the hair being presented before the hat.

[0076] Taking the scene of a person wearing a special effect hat as an example, the prior art only considers the head of the person when forming a special effect composite image. When performing fusion rendering, the hat and the detected head model are simply fused and rendered. The rendering does not consider the relationship between the hair and the hat, resulting in unnatural edges. In this embodiment, the entire outline of the entire target object is taken into account, rather than just the head as the rendering target. It not only considers the combination of the hat and the head, but also considers the combination relationship between the hat and the entire person.

[0077] Furthermore, in forming the special effect composite image, a map needs to be applied to the original image of the target object. Considering the background of the entire image and some parts of the target object that are not presented, in this embodiment, the rendered fused image is fused with the original image of the target object to achieve the entire special effect processing process, and the processed image is recorded as the special effect composite image. The special effect composite image can be displayed as the final image.

[0078] It is important to note that after processing, the obtained special effects composite image may still have some unoccluded problems. For example, the hair on the top of the head in the processed special effects composite image cannot be well covered by the wearable object, that is, some hair is exposed outside the hat after fusion. In this case, it is necessary to perform a deformation adjustment on the original image of the target object to be fused, press the size of the original image of the target object downward, and then perform fusion after adjustment.

[0079] This embodiment provides a special effect processing method, which first responds to the wearing trigger operation of the special effect wearable object, performs model occlusion processing on the special effect three-dimensional model of the special effect wearable object, and obtains the special effect occlusion three-dimensional model; then obtains the original image of the target object currently displayed, and determines the object contour image of the target object original image, and the wearing body of the special effect wearable object is on the target object; finally, according to the special effect occlusion three-dimensional model combined with the object contour image, the special effect combination image is determined and displayed. The problem that the existing special effect wearable object does not fit the wearing part, the edge connection is unnatural, and the sense of reality is poor is solved. The above technical scheme sets a two-dimensional occlusion plane for the special effects three-dimensional model of the special effects wearable object to block the part of the special effects wearable object that should be blocked when it is actually presented; then the target object and the background are segmented based on the object contour map, so that they are fused based on the special effects occlusion three-dimensional model and the object contour map, and then the fused area can be divided into an area involving the target object and an area involving the background, and the target object area is presented as the target object, and the background area is presented as the special effects wearable object. The special effects combined image presented in this way can cover the target object in the special effects wearable object, and the edge connection between the target object and the special effects wearable object in the presented image is more realistic and natural, which improves the special effects presentation effect and enhances the participants' experience of using augmented reality special effects props.

[0080] In order to better understand the special effects processing method provided above in this embodiment, this embodiment is illustrated by a special effects hat try-on scenario. First, you can enter the special effects hat try-on function module of the entertainment application software. After entering the special effects hat function, you can capture the image information of the target subject as the participant, and present the image information as the current preview screen frame in the preview interface; in the special effects hat try-on function, you can first present different styles and types of special effects hats to the participants. The participants can select the special effects hats they want to try on and generate a wearing trigger operation for the special effects hat by selecting the special effects hat. The method provided in this embodiment can display a special effects combination screen including the participant and the special effects hat by responding to the wearing trigger operation.

[0081] in, Figure 4 The following is an example of a special effect wearable object after being processed by the special effect processing method provided in this embodiment. Figure 4 As shown in FIG. 1 , a special effects combined image 14 after the special effects hat and the human head are combined and rendered is specifically shown. It can be found that Figure 1By comparison, in the area 141 where the special effects hat and the hair meet in the special effects combination image 14, it can be seen that part of the rear edge of the special effects hat is blocked by the hair, while the hair that should be displayed on the rear edge of the blocked hat is displayed normally. It can be seen that compared with the existing presentation method, the special effects combination image presented after being processed by the method provided in this embodiment better shows the wearing effect of the special effects wearable object.

[0082] On the basis of the above embodiment, as a first optional embodiment of this embodiment, the model occlusion processing of the special effect three-dimensional model of the special effect wearable object can be optimized, and the implementation of obtaining the special effect occlusion three-dimensional model is as follows:

[0083] a1) constructing a two-dimensional occlusion plane according to the model vertex information of the special effect three-dimensional model and determining a plane placement position that meets the conditions from the special effect three-dimensional model.

[0084] In this optional embodiment, the process of forming a special effects occlusion three-dimensional model can be understood as processing the special effects three-dimensional model in a special effects three-dimensional model editing tool to form a special effects occlusion three-dimensional model. It is necessary to first form a two-dimensional occlusion plane for this special effects three-dimensional model, and fuse the two-dimensional occlusion plane and the special effects three-dimensional model to form a new model as a special effects occlusion three-dimensional model. The special effects occlusion three-dimensional model includes two parts: a special effects three-dimensional model and a two-dimensional occlusion plane. For example, a special effects occlusion three-dimensional model of a special effects hat, one part of which is the original hat three-dimensional model part, and the other part is the two-dimensional occlusion plane to be constructed. This means that to obtain a special effects occlusion three-dimensional model, at least one two-dimensional occlusion plane is required, and it is necessary to determine where the two-dimensional occlusion plane is to be placed.

[0085] Exemplary, take a human body wearing a special effects hat as an example to illustrate, the existing special effects processing method only displays the back brim and front brim of the hat in the image formed when the special effects three-dimensional model is rendered and projected to two dimensions. If this image is combined with the original image of the target object, the image formed not only presents the front brim of the hat, but also the back brim of the hat, which is inconsistent with the real scene. Therefore, the special effects three-dimensional model is improved. In order to block the back brim of the hat during the actual fusion, there is a blocking panel under the special effects three-dimensional model, so that when the three-dimensional model is projected, the two-dimensional image formed can only present the front brim of the hat, and only the front brim of the hat can be seen, and the back brim of the hat is first blocked. This provides a more realistic underlying support for subsequent rendering.

[0086] It is understandable that after selecting a special effects wearable, the relevant information of the special effects three-dimensional model corresponding to the special effects wearable can be obtained. This step can obtain the model vertex information of the special effects three-dimensional model, such as which vertices the special effects three-dimensional model contains and the coordinate information of each vertex. After obtaining the model vertex information of the special effects three-dimensional model, the bottom vertex of the special effects three-dimensional model can be determined based on the model vertex information of the special effects three-dimensional model; the bottom plane can be determined based on the bottom vertex, and the bottom plane contains the maximum plane length value and the central axis; the height value of the occluding plane can be determined based on the target object; the two-dimensional occluding plane can be determined based on the maximum plane length value and the height value.

[0087] Continuing with the above description, after determining the bottom plane according to the bottom vertex, the central axis contained in the bottom plane can be determined, and the position information of the central axis is preferably determined as the plane placement position information. Preferably, selecting the central axis as the plane placement position can ensure that no matter how the target object rotates, the corresponding two-dimensional occlusion plane will also move accordingly, thereby ensuring the occlusion effect.

[0088] b1) combining the two-dimensional occluding plane with the special effect three-dimensional model at the plane placement position to obtain the special effect occluding three-dimensional model formed by the combination.

[0089] In this step, after obtaining the two-dimensional occlusion plane and the plane placement position where the two-dimensional occlusion plane is placed, the two-dimensional occlusion plane can be placed at the plane placement position, thereby combining the two-dimensional occlusion plane with the special effects three-dimensional model to obtain a combined three-dimensional model including the occlusion plane, which is recorded as the special effects occlusion three-dimensional model.

[0090] It should be noted that if the special effects 3D model is directly converted to 2D projection, the rear part of the special effects 3D model can also be displayed. In this embodiment, after the special effects 3D model is blocked by the 2D blocking plane, it is equivalent to the special effects 3D model being combined based on the 2D blocking plane. After the 2D projection is performed after the blocking plane is constructed, it is equivalent to blocking the rear half of the rear edge of the special effects 3D model. This ensures that the rear part of the special effects wearable is not rendered in the subsequent rendering, thereby ensuring the authenticity of the wearing effect of the special effects wearable.

[0091] Through the above-mentioned first optional embodiment, the steps of performing model occlusion processing on the special effects three-dimensional model of the special effects wearable object to obtain the special effects occlusion three-dimensional model are embodied. A two-dimensional occlusion plane and the position where the two-dimensional occlusion plane should be placed are determined according to the model vertex information of the special effects three-dimensional model, so that the two-dimensional occlusion plane is placed at the position to form a special effects occlusion three-dimensional model. By occluding the rear half of the special effects three-dimensional model, the rear half of the special effects three-dimensional model will not be presented when the special effects three-dimensional model is two-dimensionally projected, thereby ensuring that the rear part of the hat will not be presented during subsequent rendering, thereby improving the authenticity of the wearing effect of the special effects wearable object.

[0092] As a specific implementation, the following steps can be used to optimize the steps of constructing a two-dimensional occlusion plane based on the model vertex information of the special effect three-dimensional model and determining the plane placement position that meets the conditions from the special effect three-dimensional model:

[0093] a11) Determine the maximum plane length value and the central axis of the bottom plane formed by the bottom vertices of the special effect three-dimensional model according to the model vertex information of the special effect three-dimensional model.

[0094] In this optional embodiment, in order to realize the special effects occlusion three-dimensional model, a two-dimensional occlusion plane and a plane placement position are required. Specifically, the model vertex information of the special effects three-dimensional model is obtained, and the bottom vertex of the special effects three-dimensional model can be determined based on these model vertex information, and the bottom plane can be formed based on these bottom vertices. By calculating the two edge points of the bottom plane, a maximum length value can be found, which is recorded as the maximum plane length of the bottom plane in this embodiment. At the same time, after the bottom plane is determined, it is equivalent to knowing what shape this bottom plane is, so that the central axis of the bottom plane can be found.

[0095] Generally, special effects wearable items are symmetrical, such as a hat, a watch, and a necklace, all of which are symmetrical, so the bottom is a symmetrical shape, and the line of symmetry is called the central axis.

[0096] a12) determining the occlusion plane width value based on the maximum plane length value, and constructing the two-dimensional occlusion plane in combination with the pre-acquired occlusion plane height value.

[0097] In this optional embodiment, when forming a two-dimensional occlusion plane, at least the width value of the occlusion plane should be guaranteed to be able to occlude the second half of the special effect three-dimensional model. Therefore, the occlusion plane width value can be determined based on the maximum plane length value. For example, the occlusion plane width value can be set to be greater than the maximum plane length value, or the occlusion plane width value can be equal to the maximum plane length value.

[0098] Among them, the pre-acquired occlusion plane height can be given an appropriate height value according to the height of the target object through a logic, which is recorded as the occlusion plane height value. It can also be a default value that can be manually adjusted. Based on the occlusion plane width value and the occlusion plane height value determined above, a two-dimensional occlusion plane can be formed. Considering that when the target object wears the wearable object, there is an occlusion relationship between the wearable object and the target object. In this embodiment, the part that should be blocked is covered and blocked by a two-dimensional occlusion plane. Different two-dimensional occlusion planes need to be set for different objects.

[0099] For example, objects such as watches and hats have parts that are in an occluding relationship with the human body, and this part needs to be covered by a two-dimensional occluding plane. For example, when a special effects hat is worn on a person's head, the maximum plane length value of the bottom plane can be determined based on the vertex information of each model of the special effects three-dimensional model of the special effects hat, and the width value of the two-dimensional occluding plane can be determined based on the maximum plane value. Then, a height value is determined based on the human head model, or a height value is determined based on an empirical value. Based on the width value and the height value, a two-dimensional plane can be constructed as a two-dimensional occluding plane. The purpose of this two-dimensional occluding plane is to allow it to block the part of the hat that should be blocked. At the same time, the central axis of the bottom plane can be determined.

[0100] a13) determining the position information of the central axis as the plane placement position.

[0101] The central axis can be understood as being composed of a number of points, and the position information of the points together constitutes the position information of the central axis. In this implementation, the position information of the central axis is determined as the plane placement position.

[0102] The above technical solution specifies the steps of constructing a two-dimensional occlusion plane and determining the placement position of the plane according to the model vertex information of the special effect three-dimensional model. According to the model vertex information of the special effect three-dimensional model, the maximum plane length value and the central axis of the bottom plane of the special effect three-dimensional model are determined; the two-dimensional occlusion plane is formed according to the maximum length value and the pre-acquired width value, and the position information of the central axis of the bottom plane is used as the placement position of the two-dimensional occlusion plane. By setting a reasonable two-dimensional occlusion plane and a reasonable plane placement position, basic support is provided for forming a special effect occlusion three-dimensional model.

[0103] As a second optional embodiment of this embodiment, in this second optional implementation, the implementation of determining and displaying the special effect combination image according to the special effect occlusion three-dimensional model combined with the object outline map can be optimized as follows:

[0104] a2) performing two-dimensional conversion rendering on the special effect occlusion three-dimensional model to obtain a special effect processing intermediate image, wherein the special effect processing intermediate image includes a plane rendering area of ​​a two-dimensional occlusion plane used for special effect processing.

[0105] In this optional embodiment, performing a two-dimensional conversion rendering on the special effect occlusion three-dimensional model is equivalent to performing a projection conversion on the special effect occlusion three-dimensional model, so as to obtain a converted and rendered image, which is recorded as a special effect processing intermediate image. In the formed special effect processing intermediate image, in addition to the area containing the projection of part of the special effect wearable object, it also includes the area obtained by the projection of the two-dimensional occlusion plane used in the special effect processing, which is recorded as a plane rendering area in this embodiment.

[0106] For example, in order to more clearly illustrate the special effect processing intermediate image, this embodiment uses a special effect wearable item as a special effect hat as an example for explanation. Figure 5 An example diagram of the effect of the special effect processing intermediate image in the execution of the special effect processing method provided in this embodiment is given, such as Figure 5 As shown, the special effect occlusion 3D model corresponding to the special effect hat is rendered through 2D conversion to obtain a special effect processing intermediate image 15, wherein the special effect processing intermediate image 15 includes a hat projection and a projection of a 2D occlusion plane. The projection area of ​​the 2D occlusion plane is a plane rendering area 151.

[0107] b2) performing image replacement on the plane rendering area of ​​the special effect processing intermediate image according to the object outline image to obtain a first special effect processing image after image replacement.

[0108] In this step, a plane rendering area in the special effect processing intermediate image is replaced according to the object outline image, and a corresponding area in the special effect processing intermediate image is replaced with the object outline image. The replaced image is called the first special effect processing image.

[0109] It can be understood that the object outline map is composed of a number of pixels, and similarly, the special effect processing intermediate map is also composed of a number of pixels. It can be considered that the object outline map and the special effect processing map are images of the same size, and accordingly, the area on the object outline map can correspond to the special effect processing map. Based on this, after determining the pixel coordinates of the pixels corresponding to the plane rendering area on the special effect intermediate rendering map, the pixel coordinates of the pixels of the corresponding area in the object outline map can be found in the object outline map. Then, the pixel information of these pixels in the object outline map can be obtained to replace the pixel information of these pixels in the special effect intermediate rendering map, thereby forming a new image, which is recorded as the first special effect processing map.

[0110] As a specific implementation, the image replacement of the plane rendering area of ​​the special effect processing intermediate image can be optimized according to the object outline image, and the implementation of obtaining the first special effect processing image after the image replacement is as follows:

[0111] b21) Determine the pixel coordinates of the pixel points corresponding to the plane rendering area on the special effect processing intermediate image.

[0112] The special effect processing intermediate image is composed of a number of pixels, each of which has corresponding pixel coordinates and pixel values. Specifically, after the plane rendering area is known, the pixel coordinates of the pixels corresponding to the plane rendering area on the special effect processing intermediate image can be determined.

[0113] b22) searching for contour pixel information of the pixel corresponding to the pixel coordinates on the object contour map.

[0114] Since the object contour map and the special effect processing intermediate map have the same size, the pixels in the object contour map and the pixels in the special effect processing intermediate map have a one-to-one correspondence. After the pixel coordinates of the corresponding pixels in the plane rendering area on the special effect processing intermediate map are known, the pixels corresponding to the same pixel coordinates can be found on the object contour map based on these pixel coordinates. Furthermore, the pixel values ​​of these pixels on the object contour map can be obtained and recorded as contour pixel information.

[0115] b23) Using the contour pixel information to replace the plane pixel information of the pixels in the plane rendering area to form a contour filling area.

[0116] In this embodiment, the pixel information of the pixel points in the plane rendering area is recorded as the plane pixel information. After the contour pixel information is obtained, the plane pixel information of the pixel points in the plane rendering area can be replaced by the contour pixel information, thereby forming a contour filling area. This process can be understood as replacing the pixel values ​​of the plane pixel points with the pixel values ​​of the contour pixel points, thereby obtaining the contour filling area.

[0117] b24) Determine the image containing the contour filling area as the first special effect processing image.

[0118] In this embodiment, after the outline filling area is formed, the image including the outline filling area is determined as the first special effect processing image.

[0119] The above technical solution specifies the steps of determining the first special effect processing image, and through the correspondence between the pixel points of the object contour image and the special effect processing intermediate image, the pixel point information of the pixel points of the plane rendering area of ​​the special effect processing intermediate image is replaced by the object contour image, thereby realizing image replacement of the plane rendering area and obtaining the first special effect processing image after image replacement. The target object part and the background part can be separated by image replacement, which provides a basis for the subsequent separate rendering of the two parts.

[0120] c2) color-filling the first special effect processing image according to a set color filling strategy to obtain a second special effect processing image after color filling.

[0121] In this optional embodiment, the first special effect processing image is obtained after image replacement of the plane rendering area of ​​the special effect processing intermediate image according to the object contour image. Since the contour filling area in the first special effect processing is not filled with color according to the actual situation, the area involving the target object in the contour filling area is white, and the part involving the background is black. The first special effect processing image cannot be directly merged with the original image of the target object. Therefore, the first special effect processing image needs to be filled with color.

[0122] It can be understood that the contour filling area in the first special effect processing image involves two parts, one part corresponds to the target object, and the other part corresponds to the special effect wearable object. When filling the contour filling area in the first special effect processing image, the contour filling area can be divided into two parts, and the two parts are filled according to the corresponding images. For the area involving the target object in the contour filling area, it can be filled based on the original image of the target object. For the area involving the background in the contour filling area, it can be filled based on the original rendering image of the special effect obtained by two-dimensional conversion rendering of the special effect wearable object. After the contour filling area is completely filled, the formed image is recorded as the second special effect processing image.

[0123] As a specific implementation, the color filling of the first special effect processing image can be optimized according to the set color filling strategy, and the implementation of obtaining the second special effect processing image after color filling is as follows:

[0124] c21) determining a contour background area and an object contour area from the contour filling area of ​​the first special effect processing image.

[0125] Among them, the contour filling area of ​​the first special effect processing image involves the area corresponding to the target object and the background area. Based on this, two areas are determined from the contour filling area of ​​the first special effect processing image, and the area involving the background is recorded as the contour background area, and the area involving the target object is recorded as the object contour area.

[0126] For example, in order to more clearly describe the first special effect processing diagram, this embodiment takes the special effect wearable object as a special effect hat as an example for explanation. Continuing with the above example, Figure 6 An example diagram of the effect of the first special effect processing diagram in the execution of the special effect processing method provided in this embodiment is given, such as Figure 6 As shown, the first special effect processing image 16 includes an object contour area 161 and a contour background area 162 .

[0127] c22) In the target object original image, searching for object pixel coordinates corresponding to the object contour area, and filling the object contour area with the pixel values ​​of the object pixel coordinates.

[0128] In this optional embodiment, when filling the object contour area, it is performed according to the original image of the target object. The pixels contained in the object contour area and the pixel coordinates of the pixels can be determined. The pixel coordinates that are the same as the pixel coordinates of the pixels in the object contour area are searched in the original image of the target object, and recorded as the object pixel coordinates. Then, the pixel values ​​corresponding to the object pixel coordinates in the original image of the target object can be obtained, and these pixel values ​​are filled into the object contour area according to the corresponding relationship. Through this step, the filling of the object contour area can be achieved, and the filled object contour area presents the corresponding content of the target object.

[0129] c23) In a predetermined special effect original rendering image, search for background pixel coordinates corresponding to the outline background area, and fill the pixel values ​​of the background pixel coordinates in the outline background area.

[0130] Among them, the step of determining the special effect original rendering image can be to perform two-dimensional conversion rendering on the special effect wear to obtain a rendered image, which is recorded as the special effect original rendering image.

[0131] In this optional embodiment, when filling the outline background area, it is performed according to the original rendering of the special effect. The pixels contained in the outline background area and the pixel coordinates of the pixels can be determined. The pixel coordinates that are the same as the pixel coordinates of the pixels in the outline background area are searched in the original rendering of the special effect, and recorded as the object pixel coordinates. Then, the pixel values ​​corresponding to the background pixel coordinates in the original rendering of the special effect can be obtained, and these pixel values ​​are filled into the outline background area according to the corresponding relationship. Through this step, the filling of the outline background area can be realized, and the outline background area after filling presents the corresponding content of the special effect wearable object.

[0132] Continue to refer Figure 6 , the object contour area 161 can be filled based on the target object original image 17, and the contour background area 162 can be filled based on the special effect original rendering image 18 to obtain a second special effect processing image.

[0133] c24) Recording the image after pixel value filling of the object contour area and the contour background area as the second special effect processing image.

[0134] In this optional embodiment, the image after the pixel value filling of the object contour area and the contour background area is completed is recorded as the second special effect processing image.

[0135] The above optional embodiment provides a specific implementation of the second special effect processing image determination step. When filling the contour filling area, the contour filling area can be divided into two parts, and the two parts are filled according to the corresponding images. For the area involving the target object in the contour filling area, it can be filled based on the original image of the target object. For the area involving the background in the contour filling area, it can be filled based on the original rendering image of the special effect obtained by two-dimensional conversion rendering of the special effect wearable object. The target object and the background are rendered separately, thereby avoiding the part of the special effect wearable object that should be blocked from being presented on the target object, making the connection between the target object and the special effect wearable object more realistic and natural, and improving the wearing effect of the special effect wearable object.

[0136] d2) performing image fusion on the second special effect processed image and the original image of the target object to obtain and display a fused special effect combined image.

[0137] Considering the background of the entire image and some parts of the target object that are not presented, in this embodiment, the second special effect processing image is fused with the original image of the target object to achieve the entire special effect processing process, and the processed image is recorded as a special effect combination image. The special effect combination image can be displayed as the final image.

[0138] The above technical solution specifies the steps of determining the special effect combination image based on the special effect occlusion three-dimensional model combined with the object outline map. The special effect occlusion three-dimensional model is converted and rendered in two dimensions. Due to the existence of the two-dimensional occlusion plane, the rear part of the special effect occlusion three-dimensional model that should not be displayed can be occluded, so that only the front part of the special effect three-dimensional model is presented after projection; further, the plane rendering area corresponding to the two-dimensional occlusion plane is replaced based on the object outline map, so that the target object and the background in the area can be separated; and different areas are rendered separately to avoid the part of the special effect wearable that should be occluded from being presented on the target object, so that the connection between the target object and the special effect wearable is more real and natural, and the wearing effect of the special effect wearable is improved.

[0139] There are many facial beautification algorithms that can beautify the target object. For example, if the original mask range is still used after the face thinning operation, the mask range of the face will be larger than the real user's face, so that there will be a gap between the hat and the face after the masking. The following optional embodiment adds a step of updating the object contour map for this situation.

[0140] Based on the above embodiment, as a third optional embodiment of this embodiment, a function of performing a deformation beautification operation on a selected subject on a target object may be further added, and the following is further optimized and added:

[0141] a3) when it is detected that a deformation beautification operation is performed on a selected subject on the target object, deformation information of the selected subject corresponding to the deformation beautification operation is obtained.

[0142] The deformation beautification operation can be specifically understood as an operation of reducing the deformation of the selected subject in the target object. The selected subject on the target object can be a part of the target object. When the deformation beautification operation is performed on the selected subject on the target object, it is like performing a face-slimming operation on a portrait, and the face is the selected subject.

[0143] Considering that after the deformation operation, the width of the selected subject of the original target object has changed from large to small, if the object outline and the special effect occlusion three-dimensional model are directly processed, there will be a gap between the special effect wearable and the selected subject of the target object. Therefore, it is necessary to shorten this gap to make the occlusion more fitting. The specific amount of shortening of the gap is related to the deformation information generated during the deformation beautification operation. In this embodiment, the deformation information corresponding to the deformation beautification operation is recorded as the selected subject deformation information.

[0144] Therefore, when a deformation beautification operation is detected for a selected subject on a target object, it is necessary to first obtain the deformation information of the selected subject corresponding to the deformation beautification operation. The deformation information of the selected subject can be understood as information on the degree to which the selected object is deformed. For example, assuming that the target object is a person and the selected subject is a face, by performing a deformation beautification operation on the face, such as 10% thinning and 20% thinning, 10% thinning and 20% thinning can be considered as deformation information of the face.

[0145] b3) updating the object contour map according to the selected subject deformation information.

[0146] In this optional embodiment, after the deformation information of the selected subject is determined, it is equivalent to knowing the deformation degree of the selected subject, and based on the deformation degree, it is determined how many times the object contour map needs to be reduced. And based on the pixel value update strategy, the pixel values ​​of the pixels at the contour are updated. For example, in the place that needs to be reduced, the pixel values ​​that represent the contour itself are changed to the pixel values ​​that represent the background through the pixel value update. According to the above determined update times, the object contour map is updated to obtain the reduced object contour map.

[0147] After the above technical solution adds the function of performing a deformation beautification operation on the selected subject on the target object, it is necessary to update the object outline map. By obtaining the deformation information of the selected subject corresponding to the deformation beautification operation, the object outline map is updated based on the deformation information of the selected subject, so that after the deformation beautification operation is performed on the selected subject on the target object, the connection between the target object and the special effect wearable object can still be guaranteed to be more realistic and natural, thereby improving the wearing effect of the special effect wearable object.

[0148] As a specific implementation, the implementation of updating the object contour map according to the selected subject deformation information can be optimized as follows:

[0149] b31) Determine the number of update cycles of the object contour map based on the selected subject deformation information.

[0150] After the selected subject deformation information is determined as above, the number of update cycles of the object contour map corresponding to the selected subject deformation information can be determined according to the selected subject deformation information. The selected subject deformation information indicates the degree of deformation of the selected subject. Exemplarily, the degree of deformation can be a value in the range of 0-100%. After the degree of deformation in the selected subject deformation information is determined, it is determined which pixels need to be updated, that is, which parts need to be changed from the object contour to the background part.

[0151] After the deformation beautification operation, if the object outline image and the special effect occlusion three-dimensional model are directly replaced, the resulting occluded part, if rendered based on the original image of the target object after deformation, will cause a gap between the special effect wearable object and the selected subject. In this embodiment, the occluded part needs to be reduced to ensure a natural connection between the special effect wearable object and the selected subject after deformation.

[0152] When updating the object contour map, it is necessary to first determine the number of update cycles required for the object contour map based on the selected subject deformation information, which can also be understood as determining how many times the object contour map needs to be eroded, that is, how many times the erosion process is performed.

[0153] b32) updating the pixel values ​​of all the pixels in the object contour map according to the set pixel value update strategy.

[0154] In order to solve the problem of gaps between the special effects wearable and the selected subject of the target object, the object outline needs to be adjusted, which is equivalent to shrinking the object outline accordingly after the selected object is deformed and beautified. Here, the part that needs to be shrunk can be turned into the black of the background part. When it is turned into black, the pixel value update strategy is adopted.

[0155] The pixel value update strategy is an erosion algorithm. At this time, the object contour map needs to be processed in combination with the erosion algorithm to reduce the range of the object contour. The erosion algorithm can delete some white pixels along the contour of the white target object in the image, thereby reducing the size of the mask of the white object contour.

[0156] Exemplarily, in order to more clearly describe the principle of updating the pixel values ​​of the pixel points of the object contour map. Figure 7 A schematic diagram of an erosion algorithm in the execution of a special effect processing method provided in this embodiment is given. Figure 7As shown in the figure, the principle of the erosion algorithm is: set the black pixel value = 0, the white pixel value = 1, and take the pixel point circled by the black frame in the figure as an example. At this time, the sum of the pixel values ​​of the pixel point and the surrounding pixel points can be expressed as the pixel value of the pixel point + the pixel value of the left pixel point + the pixel value of the right pixel point + the pixel value of the upper pixel point + the pixel value of the lower pixel point + the pixel value of the upper left pixel point + the pixel value of the lower left pixel point + the pixel value of the upper right pixel point + the pixel value of the lower right pixel point. The final sum of the pixel values ​​is equal to 8, and the sum of the pixel values ​​is less than 9, so the pixel value of the pixel point can be set to 0, that is, black is displayed. On the contrary, if the sum of the pixel values ​​obtained by adding is 9, there is no need to update the pixel value of the pixel point.

[0157] It is understandable that the pixel value of each pixel in the object contour map is composed of 0 and 1. The process of updating the pixel value of the pixel of the object contour map is the process of changing some white pixel values ​​to black pixel values. When performing a round of update, it is equivalent to performing an erosion algorithm calculation on all the pixels in the current object contour map, thereby updating the object contour map.

[0158] b33) Based on the updated pixel values ​​of all pixels, an updated object contour map is formed, and the current update loop count is increased by 1.

[0159] Specifically, an updated object contour map may be formed according to the updated pixel values ​​of all pixels, and the current update loop count is increased by 1.

[0160] b34) Return and re-execute the pixel value update operation until the current update loop count is equal to the number of update loops.

[0161] In this optional embodiment, after executing a pixel value update of a pixel point, it is necessary to determine whether a new pixel value update is required. If the current update cycle number is equal to the total update cycle number, no further update is required. The last updated object contour map can be used as the final object contour map.

[0162] The above technical solution specifies the steps of updating the object contour map according to the selected subject deformation information. First, the number of update cycles required is determined according to the selected subject deformation information, and then the object contour map is reduced based on the pixel value update strategy, and finally the updated object contour map is obtained. For subsequent processing based on the updated object contour map and the special effect occlusion three-dimensional model, the obtained special effect combined image can ensure that the connection between the target object and the special effect wearable object is more realistic and natural, and improve the wearing effect of the special effect wearable object.

[0163] Figure 8 A schematic diagram of the structure of a special effect processing device provided by an embodiment of the present disclosure is shown in FIG. Figure 8As shown, the device includes: an operation response module 51, a contour map determination module 52 and an image display module 53;

[0164] An operation response module 51 is used for performing model occlusion processing on the special effect three-dimensional model of the special effect wearable object in response to a wearing trigger operation of the special effect wearable object to obtain a special effect occluded three-dimensional model;

[0165] The contour image determination module 52 is used to obtain the currently displayed original image of the target object including the target object, and determine the object contour image of the original image of the target object, and the wearing body of the special effect wearable object is on the target object;

[0166] The image display module 53 is used to determine and display a special effect combination image based on the special effect occlusion three-dimensional model combined with the object outline map.

[0167] The technical solution provided by the disclosed embodiment solves the problems that the existing special effects wearables do not fit the wearing part, the edge connection is unnatural, and the sense of reality is poor. The above technical solution sets a two-dimensional occlusion plane for the special effects three-dimensional model of the special effects wearables to block the part behind the special effects wearables that should be blocked when actually presented; then the target object and the background are segmented based on the object contour map, so that the special effects occlusion three-dimensional model and the object contour map are fused, and then the fused area can be divided into an area involving the target object and an area involving the background, and the target object area is presented as the target object, and the background area is presented as the special effects wearables. The special effects combined image presented in this way can make the target object included in the special effects wearables, and the edge connection between the target object and the special effects wearables in the presented image is more realistic and natural, which improves the special effects presentation effect and improves the participants' experience of using augmented reality special effects props.

[0168] Furthermore, the operation response module 51 may include:

[0169] A plane construction unit, used to construct a two-dimensional occlusion plane according to model vertex information of the special effect three-dimensional model and determine a plane placement position that meets the conditions on the special effect three-dimensional model;

[0170] The model combination unit is used to combine the two-dimensional occluding plane with the special effect three-dimensional model at the plane placement position to obtain the special effect occluding three-dimensional model formed after the combination.

[0171] Furthermore, the plane construction unit can be specifically used for:

[0172] Determining, according to the model vertex information of the special effect three-dimensional model, a maximum plane length value and a central axis of a bottom plane formed by the bottom vertices of the special effect three-dimensional model;

[0173] Determine the occlusion plane width value based on the maximum plane length value, and construct the two-dimensional occlusion plane in combination with the pre-acquired occlusion plane height value;

[0174] The position information of the central axis is determined as the plane placement position.

[0175] Furthermore, the image display module 53 may include:

[0176] A first processing unit is used to perform two-dimensional conversion rendering on the special effect occlusion three-dimensional model to obtain a special effect processing intermediate image, wherein the special effect processing intermediate image includes a plane rendering area of ​​a two-dimensional occlusion plane used in special effect processing;

[0177] A second processing unit is used to perform image replacement on the plane rendering area of ​​the special effect processing intermediate image according to the object outline image to obtain a first special effect processing image after image replacement;

[0178] A third processing unit is used to fill the first special effect processing image with color according to a set color filling strategy to obtain a second special effect processing image after color filling;

[0179] The fourth processing unit is used to perform image fusion on the second special effect processing image and the original image of the target object to obtain and display the fused special effect combination image.

[0180] Furthermore, the second processing unit may be specifically used for:

[0181] Determine pixel coordinates of pixels corresponding to the plane rendering area on the special effect processing intermediate image;

[0182] Searching for contour pixel point information of a pixel point corresponding to the pixel point coordinates on the object contour map;

[0183] The contour pixel information is used to replace the plane pixel information of the pixel points in the plane rendering area to form a contour filling area;

[0184] An image including the contour filling area is determined as the first special effect processing image.

[0185] Furthermore, the third processing unit may be specifically configured to:

[0186] Determine a contour background area and an object contour area from the contour filling area of ​​the first special effect processing image;

[0187] In the original image of the target object, searching for the coordinates of the object pixel points corresponding to the object contour area, and filling the pixel values ​​of the object pixel point coordinates in the object contour area;

[0188] In a predetermined special effect original rendering image, searching for background pixel coordinates corresponding to the outline background area, and filling the outline background area with the pixel values ​​of the background pixel coordinates;

[0189] The image after completing pixel value filling of the object contour area and the contour background area is recorded as the second special effect processing image.

[0190] Furthermore, the device also includes a deformation determination module, which may specifically include:

[0191] an information determining unit, configured to, when detecting that a deformation beautification operation is performed on a selected subject on the target object, obtain deformation information of the selected subject corresponding to the deformation beautification operation;

[0192] An updating unit is used to update the object contour map according to the selected subject deformation information.

[0193] Furthermore, the information determination unit may be specifically used for:

[0194] Determining the number of update cycles of the object contour map according to the selected subject deformation information;

[0195] Updating the pixel values ​​of all the pixels in the object contour map according to the set pixel value update strategy;

[0196] According to the updated pixel values ​​of all pixels, an updated object contour map is formed, and the current update loop count is increased by 1;

[0197] Return and re-execute the pixel value update operation until the current update loop count is equal to the update loop count.

[0198] The special effects processing device provided in the embodiments of the present disclosure can execute the special effects processing method provided in any embodiment of the present disclosure, and has the functional modules and beneficial effects corresponding to the execution method.

[0199] It is worth noting that the various units and modules included in the above-mentioned device are only divided according to functional logic, but are not limited to the above-mentioned division, as long as the corresponding functions can be achieved; in addition, the specific names of the functional units are only for the convenience of distinguishing each other, and are not used to limit the protection scope of the embodiments of the present disclosure.

[0200] Fig. 9 This is a schematic diagram of the structure of an electronic device provided by an embodiment of the present disclosure. Fig. 9 , which shows an electronic device (eg, Fig. 9The terminal device in the embodiment of the present disclosure may include but is not limited to mobile terminals such as mobile phones, notebook computers, digital broadcast receivers, PDAs (personal digital assistants), PADs (tablet computers), PMPs (portable multimedia players), vehicle-mounted terminals (such as vehicle-mounted navigation terminals), etc., and fixed terminals such as digital TVs, desktop computers, etc. Fig. 9 The electronic device shown is only an example and should not bring any limitation to the functions and scope of use of the embodiments of the present disclosure.

[0201] like Fig. 9 As shown, 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. In the RAM 603, various programs and data required for the operation of the electronic device 600 are also stored. The processing device 601, the ROM 602, and the RAM 603 are connected to each other via a bus 606. An edit / output (I / O) interface 606 is also connected to the bus 606.

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

[0203] 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 contains 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 executed.

[0204] The names of the messages or information exchanged between multiple devices in the embodiments of the present disclosure are only used for illustrative purposes and are not used to limit the scope of these messages or information.

[0205] The electronic device provided by the embodiment of the present disclosure and the special effects processing method provided by the above embodiment belong to the same inventive concept. The technical details not fully described in this embodiment can be referred to the above embodiment, and this embodiment has the same beneficial effects as the above embodiment.

[0206] The embodiments of the present disclosure provide a computer storage medium on which a computer program is stored. When the program is executed by a processor, the special effect processing method provided by the above embodiments is implemented.

[0207] It should be noted that the computer-readable medium disclosed above may be a computer-readable signal medium or a computer-readable storage medium or any combination of the above two. The computer-readable storage medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or device, or any combination of the above. More specific examples of computer-readable storage media may include, but are not limited to: an electrical connection with one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above. In the present disclosure, a computer-readable storage medium may be any tangible medium containing or storing a program that may be used by or in combination with an instruction execution system, device or device. In the present disclosure, a computer-readable signal medium may include a data signal propagated in a baseband or as part of a carrier wave, in which a computer-readable program code is carried. This propagated data signal may take a variety of forms, including but not limited to an electromagnetic signal, an optical signal, or any suitable combination of the above. The computer readable signal medium may also be any computer readable medium other than a computer readable storage medium, which may send, propagate or transmit a program for use by or in conjunction with an instruction execution system, apparatus or device. The program code contained on the computer readable medium may be transmitted using any suitable medium, including but not limited to: wires, optical cables, RF (radio frequency), etc., or any suitable combination of the above.

[0208] In some embodiments, the client and the server may communicate using any currently known or future developed network protocol such as HTTP (HyperTextTransferProtocol), and may 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 adhoc peer-to-peer network), as well as any currently known or future developed network.

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

[0210] The computer-readable medium carries one or more programs. When the one or more programs are executed by the electronic device, the electronic device:

[0211] The above-mentioned computer-readable medium carries one or more programs. When the above-mentioned one or more programs are executed by the electronic device, the electronic device: responds to the wearing trigger operation of the special effect wearable object, performs model occlusion processing on the special effect three-dimensional model of the special effect wearable object, and obtains the special effect occluded three-dimensional model; obtains the currently displayed target object original image containing the target object, and determines the object contour map of the target object original image, and the wearing body of the special effect wearable object is on the target object; determines and displays the special effect combined image according to the special effect occlusion three-dimensional model combined with the object contour map.

[0212] 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 user's computer, partially on the user's computer, as a separate software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In cases involving a remote computer, the remote computer may be connected to the user's 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).

[0213] The flow chart and block diagram in the accompanying drawings illustrate the possible architecture, function and operation of the system, method and computer program product according to various embodiments of the present disclosure. In this regard, each square box in the flow chart or block diagram can represent a module, a program segment or a part of a code, and the module, the program segment or a part of the code contains one or more executable instructions for realizing the specified logical function. It should also be noted that in some implementations as replacements, the functions marked in the square box can also occur in a sequence different from that marked in the accompanying drawings. For example, two square 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 square box in the block diagram and / or flow chart, and the combination of the square boxes in the block diagram and / or flow chart can be implemented with a dedicated hardware-based system that performs a specified function or operation, or can be implemented with a combination of dedicated hardware and computer instructions.

[0214] The units involved in the embodiments described in the present disclosure may be implemented by software or hardware. The name of a unit does not limit the unit itself in some cases. For example, the first acquisition unit may also be described as a "unit for acquiring at least two Internet Protocol addresses".

[0215] The functions described above herein may be performed at least in part by one or more hardware logic components. For example, 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 chips (SOCs), complex programmable logic devices (CPLDs), and the like.

[0216] In the context of the present disclosure, a machine-readable medium may be a tangible medium that may contain or store a program for use by or in conjunction with an instruction execution system, device, or equipment. A machine-readable medium may be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium may 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 may 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.

[0217] According to one or more embodiments of the present disclosure, [Example 1] provides a special effects processing method, the method comprising: in response to a wearing trigger operation of a special effects wearable object, performing model occlusion processing on a special effects three-dimensional model of the special effects wearable object to obtain a special effects occluded three-dimensional model; obtaining the currently displayed original image of the target object containing the target object, and determining an object contour map of the target object original image, wherein the wearing body of the special effects wearable object is on the target object; determining and displaying a special effects combined image based on the special effects occlusion three-dimensional model in combination with the object contour map.

[0218] According to one or more embodiments of the present disclosure, [Example 2] provides a special effects processing method, which includes performing model occlusion processing on the special effects three-dimensional model of the special effects wearable object to obtain further optimization of the special effects occlusion three-dimensional model. Specifically, it can also be optimized as follows: according to the model vertex information of the special effects three-dimensional model, a two-dimensional occlusion plane is constructed and a plane placement position that meets the conditions is determined from the special effects three-dimensional model; the two-dimensional occlusion plane is combined with the special effects three-dimensional model at the plane placement position to obtain the special effects occlusion three-dimensional model formed after the combination.

[0219] According to one or more embodiments of the present disclosure, [Example Three] provides a special effects processing method, which includes further optimizing the construction of a two-dimensional occlusion plane based on the model vertex information of the special effects three-dimensional model and determining a plane placement position that meets the conditions from the special effects three-dimensional model. Specifically, the optimization can be as follows: according to the model vertex information of the special effects three-dimensional model, determine the maximum plane length value and the central axis of the bottom plane formed by the bottom vertex of the special effects three-dimensional model; determine the occlusion plane width value based on the maximum plane length value, and construct the two-dimensional occlusion plane in combination with the pre-acquired occlusion plane height value; determine the position information of the central axis as the plane placement position.

[0220] According to one or more embodiments of the present disclosure, [Example Four] provides a special effects processing method, which includes further optimization of determining and displaying a special effects combination image based on the special effects occlusion three-dimensional model in combination with the object contour map. Specifically, the optimization can be as follows: performing two-dimensional conversion rendering on the special effects occlusion three-dimensional model to obtain a special effects processing intermediate image, wherein the special effects processing intermediate image contains a plane rendering area of ​​the two-dimensional occlusion plane used for special effects processing; performing image replacement on the plane rendering area of ​​the special effects processing intermediate image according to the object contour map to obtain a first special effects processing image after image replacement; performing color filling on the first special effects processing image according to a set color filling strategy to obtain a second special effects processing image after color filling; performing image fusion on the second special effects processing image and the original image of the target object to obtain and display a fused special effects combination image.

[0221] According to one or more embodiments of the present disclosure, [Example Five] provides a special effects processing method, which includes performing image replacement on the plane rendering area of ​​the special effects processing intermediate image according to the object contour map, and obtaining further optimization of the first special effects processing image after the image replacement, which can be specifically optimized as follows: determining the pixel coordinates of the pixel points corresponding to the plane rendering area on the special effects processing intermediate image; searching for the contour pixel information of the pixel points corresponding to the pixel coordinates on the object contour map; using the contour pixel information to replace the plane pixel information of the pixel points in the plane rendering area to form a contour filling area; and determining the image containing the contour filling area as the first special effects processing image.

[0222] According to one or more embodiments of the present disclosure, [Example Six] provides a special effect processing method, which fills the first special effect processing image with color according to a set color filling strategy, and obtains a second special effect processing image after color filling, which is further optimized as follows: determining the contour background area and the object contour area from the contour filling area of ​​the first special effect processing image; in the target object original image, searching for the object pixel point coordinates corresponding to the object contour area, and filling the pixel values ​​of the object pixel point coordinates in the object contour area; in a predetermined special effect original rendering image, searching for the background pixel point coordinates corresponding to the contour background area, and filling the pixel values ​​of the background pixel point coordinates in the contour background area; and recording the image after completing the pixel value filling of the object contour area and the contour background area as the second special effect processing image.

[0223] According to one or more embodiments of the present disclosure, [Example 7] provides a special effects processing method, which may also be further configured to include, when detecting that a deformation beautification operation is performed on a selected subject on the target object, obtaining deformation information of the selected subject corresponding to the deformation beautification operation; and updating the object contour map according to the deformation information of the selected subject.

[0224] According to one or more embodiments of the present disclosure, [Example Eight] provides a special effects processing method, which includes further optimizing the updating of the object contour map according to the selected subject deformation information, and can be specifically optimized as follows: determining the number of update cycles of the object contour map according to the selected subject deformation information; updating the pixel values ​​of all pixels in the object contour map according to the set pixel value update strategy; forming an updated object contour map according to the updated pixel values ​​of all pixels, and adding 1 to the current update cycle count; returning to re-execute the pixel value update operation until the current update cycle count is equal to the number of update cycles.

[0225] According to one or more embodiments of the present disclosure, [Example Nine] provides a special effects processing device, which includes: an operation response module, which is used to respond to the wearing trigger operation of the special effects wearable object, perform model occlusion processing on the special effects three-dimensional model of the special effects wearable object, and obtain a special effects occluded three-dimensional model; a contour map determination module, which is used to obtain the currently displayed target object original image containing the target object, and determine the object contour map of the target object original image, and the wearing body of the special effects wearable object is on the target object; an image display module, which is used to determine and display the special effects combined image based on the special effects occlusion three-dimensional model in combination with the object contour map.

[0226] According to one or more embodiments of the present disclosure, [Example 10] provides an electronic device, which includes one or more processors; a storage device for storing one or more programs, when the one or more programs are executed by the one or more processors, the one or more processors implement the special effects processing method as described in any one of Examples 1 to 8 above.

[0227] According to one or more embodiments of the present disclosure, [Example 11] provides a storage medium containing computer executable instructions, which, when executed by a computer processor, are used to execute the special effects processing method described in any one of Examples 1 to 8.

[0228] The above description is only a preferred embodiment of the present disclosure and an explanation of the technical principles used. Those skilled in the art should understand that the scope of disclosure involved in the present disclosure is not limited to the technical solutions formed by a specific combination of the above technical features, but should also cover other technical solutions formed by any combination of the above technical features or their equivalent features without departing from the above disclosed concept. For example, the above features are replaced with the technical features with similar functions disclosed in the present disclosure (but not limited to) by each other to form a technical solution.

[0229] In addition, although each operation is described in a specific order, this should not be understood as requiring these operations to be performed in the specific order shown or in a sequential order. Under certain circumstances, multitasking and parallel processing may be advantageous. Similarly, although some specific implementation details are included in the above discussion, these should not be interpreted as limiting the scope of the present disclosure. Some features described in the context of a separate embodiment can also be implemented in a single embodiment in combination. On the contrary, the various features described in the context of a single embodiment can also be implemented in multiple embodiments individually or in any suitable sub-combination mode.

[0230] Although the subject matter has been described in language specific to structural features and / or methodological logical actions, it should be understood that the subject matter defined in the appended claims is not necessarily limited to the specific features or actions described above. On the contrary, the specific features and actions described above are merely example forms of implementing the claims.

Claims

1. A special effect processing method, characterized in that: include: In response to a wearing triggering operation of the special-effect wearable object, performing model occlusion processing on the special-effect three-dimensional model of the special-effect wearable object to obtain a special-effect occluded three-dimensional model; Acquire a currently displayed original image of the target object including the target object, and determine an object contour image of the original image of the target object, wherein the wearing body of the special effect wearable object is located on the target object; A special effects combination image is determined and displayed based on the special effects occlusion three-dimensional model combined with the object outline map.

2. The method according to claim 1, characterized in that The performing model occlusion processing on the special effects three-dimensional model of the special effects wearable object to obtain the special effects occluded three-dimensional model includes: According to the model vertex information of the special effect three-dimensional model, a two-dimensional occlusion plane is constructed, and a plane placement position that meets the conditions is determined on the special effect three-dimensional model; The two-dimensional occluding plane is combined with the special effect three-dimensional model at the plane placement position to obtain the special effect occluding three-dimensional model formed by the combination.

3. The method according to claim 2, characterized in that The step of constructing a two-dimensional occlusion plane according to the model vertex information of the special effect three-dimensional model and determining a plane placement position that meets the conditions on the special effect three-dimensional model includes: Determining, according to the model vertex information of the special effect three-dimensional model, a maximum plane length value and a central axis of a bottom plane formed by the bottom vertices of the special effect three-dimensional model; Determine the occlusion plane width value based on the maximum plane length value, and construct the two-dimensional occlusion plane in combination with the pre-acquired occlusion plane height value; The position information of the central axis is determined as the plane placement position.

4. The method according to claim 1, characterized in that: The determining and displaying of a special effects combination image based on the special effects occlusion three-dimensional model and the object outline map includes: Performing two-dimensional conversion rendering on the special effect occlusion three-dimensional model to obtain a special effect processing intermediate image, wherein the special effect processing intermediate image includes a plane rendering area of ​​a two-dimensional occlusion plane used for special effect processing; Performing image replacement on the plane rendering area of ​​the special effect processing intermediate image according to the object outline image to obtain a first special effect processing image after image replacement; Filling the first special effect processing image with color according to a set color filling strategy to obtain a second special effect processing image after color filling; The second special effect processing image is fused with the original image of the target object to obtain a fused special effect combination image and display it.

5. The method according to claim 4, characterized in that The step of performing image replacement on the plane rendering area of ​​the special effect processing intermediate image according to the object outline image to obtain a first special effect processing image after image replacement includes: Determine pixel coordinates of pixels corresponding to the plane rendering area on the special effect processing intermediate image; Searching for contour pixel point information of a pixel point corresponding to the pixel point coordinates on the object contour map; The contour pixel information is used to replace the plane pixel information of the pixel points in the plane rendering area to form a contour filling area; An image including the contour filling area is determined as the first special effect processing image.

6. The method according to claim 4, characterized in that The step of filling the first special effect processing image with color according to the set color filling strategy to obtain the second special effect processing image after color filling includes: Determine a contour background area and an object contour area from the contour filling area of ​​the first special effect processing image; In the original image of the target object, searching for the coordinates of the object pixel points corresponding to the object contour area, and filling the pixel values ​​of the object pixel point coordinates in the object contour area; In a predetermined special effect original rendering image, searching for background pixel coordinates corresponding to the outline background area, and filling the outline background area with the pixel values ​​of the background pixel coordinates; The image after completing pixel value filling of the object contour area and the contour background area is recorded as the second special effect processing image.

7. The method according to any one of claims 1 to 6, characterized in that: Also includes: When it is detected that a deformation beautification operation is performed on a selected subject on the target object, deformation information of the selected subject corresponding to the deformation beautification operation is obtained; The object outline map is updated according to the selected subject deformation information.

8. The method according to claim 7, characterized in that The updating of the object contour map according to the selected subject deformation information comprises: Determining the number of update cycles of the object contour map according to the selected subject deformation information; Updating the pixel values ​​of all the pixels in the object contour map according to the set pixel value update strategy; According to the updated pixel values ​​of all pixels, an updated object contour map is formed, and the current update loop count is increased by 1; Return and re-execute the pixel value update operation until the current update loop count is equal to the update loop count.

9. A special effect processing device, characterized in that: include: An operation response module, configured to respond to a wearing trigger operation of a special-effect wearable object, perform model occlusion processing on a special-effect three-dimensional model of the special-effect wearable object, and obtain a special-effect occluded three-dimensional model; A contour image determination module is used to obtain a currently displayed original image of a target object including a target object, and determine an object contour image of the original image of the target object, wherein the wearing body of the special effect wearable object is located on the target object; An image display module is used to determine and display a special effect combination image based on the special effect occlusion three-dimensional model combined with the object outline map.

10. An electronic device, characterized in that: The electronic device comprises: one or more processors; a storage device for storing one or more programs, When the one or more programs are executed by the one or more processors, the one or more processors implement the special effect processing method as described in any one of claims 1-8.

11. A storage medium containing computer executable instructions, characterized in that: The computer executable instructions are used to execute the special effect processing method as described in any one of claims 1-8 when executed by a computer processor.