Image processing method and device, and electronic equipment
By obtaining and expanding the depth information and outline information of the role model, and generating a character image matching the target role, the problem of inaccurate interaction between the interactive special effects and the target role in the existing technology is solved, and accurate special effects interaction under the simple model is achieved.
Patent Information
- Application Number
- CN202411778056.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-04
- Publication Date
- 2025-04-11
AI Technical Summary
In the prior art, due to the large difference between the character model and the target role in the video or image, the interaction between the interaction special effects based on the character model and the target role in the video or image is inaccurate.
By obtaining the character outline information corresponding to the target role and the character depth information of the character model, the expansion process is performed to generate the first character image corresponding to the character model, so that it has the same outline as the target role, thereby achieving accurate interaction special effects.
Accurate special effects interaction based on simple model is realized, and the problem of inaccurate interaction caused by the difference between the character model and the target role is solved. At the same time, the problem of difficult and time-consuming and labor-intensive model production and action matching caused by excessive complexity of high models is avoided.
Smart Images

Figure CN119809916A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of computer technology, and in particular to an image processing method, device, electronic device, and computer-readable storage medium. Background Art
[0002] In projects such as live-action movies, in order to improve the expressiveness of videos or images, some special effects that interact with the target characters in the videos or images are usually produced, such as explosion effects that interact with the target characters, magic effects that interact with the target characters, etc.
[0003] At present, the implementation process of special effects and character interaction mainly includes making a corresponding character model according to the proportion of the target character in the video or image, matching the action of the character model according to the action of the character in the video or image, combining the character model after action matching with the special effects model to form a special effect that interacts with the character model (hereinafter referred to as "interactive special effects"), and then applying the interactive special effects to the video or image to achieve the interactive effect between the interactive special effects and the target character in the video or image. In the above process, the character model replaces the target character in the video or image, and acts as a production template for the interaction between special effects and characters. The character model usually includes two types: simple model and high model. Due to the high complexity of the high model itself, the action matching is difficult and time-consuming. Therefore, the character model currently used in the production of special effects interaction is usually a simple model. However, since the difference between the simple model and the target character in the video or image is often large, it usually leads to inaccurate interaction between the interactive special effects produced based on the character model and the target character in the video or image.
[0004] Therefore, the prior art has a technical problem that the interaction between the interactive special effects produced based on the character model and the target character in the video or image is inaccurate due to the large difference between the character model and the target character in the video or image. Summary of the invention
[0005] The present application provides an image processing method, device, electronic device, and computer-readable storage medium to solve the technical problem in the prior art that the interaction between the interactive special effects produced based on the character model and the target character in the video or image is inaccurate due to the large difference between the character model and the target character in the video or image.
[0006] In a first aspect, an embodiment of the present application provides an image processing method, the method comprising: obtaining character contour information corresponding to a target character and character depth information corresponding to a character model, the character model being a simple model pre-built based on the target character; performing expansion processing on the character depth information corresponding to the character model to obtain character expanded depth information corresponding to the character model; and obtaining a first character image corresponding to the character model based on the character contour information and the character expanded depth information.
[0007] In a second aspect, an embodiment of the present application provides an image processing device, comprising: an information acquisition unit, an information expansion unit, and an image generation unit; the information acquisition unit is used to acquire character contour information corresponding to a target character and character depth information corresponding to a character model, wherein the character model is a simple model pre-built based on the target character; the information expansion unit is used to expand the character depth information corresponding to the character model to obtain character expanded depth information corresponding to the character model; the image generation unit is used to obtain a first character image corresponding to the character model based on the character contour information and the character expanded depth information.
[0008] In a third aspect, an embodiment of the present application provides an electronic device, comprising: a memory and a processor; the memory is used to store one or more computer instructions; the processor is used to execute the one or more computer instructions to implement the above method.
[0009] In a fourth aspect, an embodiment of the present application provides a computer-readable storage medium having one or more computer instructions stored thereon, which, when executed by a processor, executes the above method.
[0010] Compared with the prior art, the image processing method provided by the present application includes: obtaining the character outline information corresponding to the target character and the character depth information corresponding to the character model; performing expansion processing on the character depth information corresponding to the character model to obtain the character expansion depth information corresponding to the character model; and obtaining the first character image corresponding to the character model based on the character outline information and the character expansion depth information. First, the character model used in the method is a simple model, and there is no problem of difficulty, time and effort in the early model making and action matching stage. Second, the method performs expansion processing on the character depth information of the character model, and generates the first character image corresponding to the character model based on the character expansion depth information and the character outline information after the expansion processing, so that the character model displayed in the first character image has the same outline as the target character, so there is no problem that the interactive special effects produced based on the simple model cannot interact accurately with the target character. Therefore, the image processing method provided by the present application is a method that can realize accurate interaction based on the simple model and with the target character, which solves the technical problem that the interaction between the interactive special effects produced based on the character model and the target character in the video or image is not accurate due to the large difference between the character model and the target character in the video or image in the prior art. BRIEF DESCRIPTION OF THE DRAWINGS
[0011] Figure 1 is a comparison diagram of the outlines of the target character and its simplified model provided in the embodiment of the present application;
[0012] Figure 2 is an application system diagram of the image processing method provided in an embodiment of the present application;
[0013] Figure 3 is a flowchart of an image processing method provided by the first embodiment of the present application;
[0014] Figure 4 This is a visualization effect diagram of the character depth information provided by the first embodiment of the present application;
[0015] Figure 5 This is a visualization effect diagram of the special effect depth information provided by the first embodiment of the present application;
[0016] Figure 6 This is a visualization effect diagram of the character outline information provided by the first embodiment of the present application;
[0017] Figure 7 is a schematic diagram of a second character image provided in the first embodiment of the present application;
[0018] Figure 8 is a schematic diagram of a third character image provided in the first embodiment of the present application;
[0019] Fig. 9 This is a comparison diagram of the visualization effects of the character depth information and the character expanded depth information provided by the first embodiment of the present application;
[0020] Fig.10 This is a visualization effect diagram of adding character outline information to character extended depth information provided by the first embodiment of the present application;
[0021] Fig.11 This is a comparison diagram of using and not using character outline information to form special effect interaction provided by the first embodiment of the present application;
[0022] Fig.12 This is a visualization effect diagram in which the character expansion depth information provided by the first embodiment of the present application cannot completely cover the character outline information;
[0023] Fig.13 It is a flowchart of realizing special effect interaction based on the image processing method provided in the first embodiment of the present application;
[0024] Fig.14 is a structural schematic diagram of an image processing device provided in a second embodiment of the present application;
[0025] Fig.15 It is a schematic diagram of the structure of an electronic device provided in the third embodiment of the present application. DETAILED DESCRIPTION
[0026] Many specific details are described in the following description to facilitate a full understanding of the present application. However, the present application can be implemented in many other ways than those described herein, and those skilled in the art can make similar generalizations without violating the connotation of the present application, so the present application is not limited by the specific implementation disclosed below.
[0027] In projects such as live-action movies, in order to improve the expressiveness of videos or images, some special effects that interact with the target characters in the videos or images are usually produced, such as explosion effects that interact with the target characters, magic effects that interact with the target characters, etc.
[0028] At present, the process of realizing the interaction between special effects and characters mainly includes the following steps: first, making a corresponding character model according to the proportion of the target character in the video, specifically, making a character model by referring to the height, arm length, leg length and other information of the target character in the video in the three-dimensional modeling software; second, matching the action of the character model according to the action of the target character in the video, specifically, importing the performance video of the target character in the video into the three-dimensional software as a background reference, ensuring that the time axis of the video is aligned with the time axis of the three-dimensional software, and manually adjusting the posture of the character model at the key frame to make it consistent with the action of the target character in the video; third, combining the character model after action matching with the special effects model to form a special effect that interacts with the character model (hereinafter referred to as "interactive special effect"), specifically, synthesizing the character model after action matching with the special effects model in the synthesis software to form a special effect performance with an interactive effect with the character model; fourth, after the interactive special effect is produced, the interactive special effect is applied to the video to achieve the interactive effect between the interactive special effect and the target character in the video. In the above process, the character model replaces the target character in the video and acts as a production template for the interaction between special effects and characters.
[0029] Character models usually include two types: low-poly models and high-poly models. Low-poly models refer to three-dimensional models with fewer details and fewer polygons. They are fast to produce, have small file sizes, and low processing costs, but are often too different from the characters. For example, the character's hair and clothing cannot be displayed. High-poly models refer to three-dimensional models with rich details and a large number of polygons. They have a high degree of match with the character and can restore the detailed performance of the character itself, but they take a long time to produce and are difficult to process. Since high-poly models have high production costs and it is difficult and time-consuming to use high-poly models as character models for action matching, the character models currently used in special effects interactive production are usually low-poly models. However, since the difference between low-poly models and target characters is often large, it usually leads to inaccurate interactions between interactive special effects produced based on character models and target characters.
[0030] Figure 1This is a comparison diagram of the outlines of the target character and its simplified model provided in the embodiment of the present application.
[0031] like Figure 1 As shown, the outline of the target character 101 is obviously larger than the outline of the simplified model 102. After the interactive special effect is made based on the simplified model 102, the interactive special effect is used in the video or image, but it still cannot fit with the area 103 of the target character 101 beyond the simplified model 102, that is, it cannot form an accurate interaction with the target character 101. Assuming that the interactive special effect formed based on the simplified model 102 is smoke behind the simplified model 102, then, when the interactive special effect is used in the video or image, the interactive special effect (smoke) will cover the area 103 (area 103 includes the hair of the target character 101), forming an abnormal interactive performance in which the smoke passes through the head of the target character 101.
[0032] Therefore, there is an urgent need for a method that can achieve accurate special effects interaction based on a simple model, so as to solve the technical problem of inaccurate interaction between the interactive special effects produced based on the character model and the target character in the video or image due to the large difference between the character model and the target character in the video or image.
[0033] In view of this, the present application provides an image processing method, which is a method that can achieve precise interaction with a target character based on a simple model. First, the character model used in this method is a simple model, and there is no problem of difficulty, time-consuming and labor-intensive model making and action matching in the previous stage. Second, the method expands the character depth information of the character model, and generates a first character image corresponding to the character model based on the expanded character depth information and the character contour information after the expansion process, so that the character model displayed in the first character image has the same contour as the target character. Therefore, there will be no problem that the interactive special effects produced based on the character model cannot interact accurately with the target character.
[0034] The image processing method, device, electronic device, and computer-readable storage medium described in the present application are further described in detail below in conjunction with specific embodiments and drawings.
[0035] Figure 2 is an application system diagram of the image processing method provided in the embodiment of the present application. Figure 2As shown, the system includes a user terminal 201 and a server 202. The user terminal 201 can be any device such as a smart phone, a tablet computer, a laptop computer, a desktop computer, a personal digital assistant (PDA), etc., on which a real video (video) is deployed. The server 202 can be a processing module located inside the user terminal 201, or a processing device electrically connected to the user terminal 201, or a server connected to multiple user terminals 201 for communication, on which an image processing method provided by the present application is deployed. After the server 202 receives the special effect interaction instruction, an interactive special effect is generated based on the method, and the interactive special effect is sent to the user terminal 201, so that the user terminal 201 applies the interactive special effect to the video or image, forming a special effect performance that accurately interacts with the role in the video or image.
[0036] The first embodiment of the present application provides an image processing method, which is deployed in Figure 2 In the server 202 shown, it is used to realize accurate interaction between the target character and the special effect based on the simple model corresponding to the target character. Optionally, the method is executed based on visual special effect production software, such as Nuke software. Specifically, Nuke software executes the method provided in this embodiment based on the function node.
[0037] Figure 3 : is a flow chart of the image processing method provided by this embodiment. Figure 3 The image processing method provided by this embodiment is described in detail. The embodiments described below are used to explain the technical solution of this application and are not intended to be used as limitations for actual use.
[0038] like Figure 3 As shown, the image processing method provided in this embodiment includes the following steps S310 to S330:
[0039] Step S310, obtaining character outline information corresponding to the target character and character depth information corresponding to the character model, where the character model is a simplified model pre-built based on the target character.
[0040] The method provided in this embodiment is to achieve accurate interaction between the target character and special effects in the real-shot video or image. Therefore, the real-shot video or image can be understood as the original sample for realizing the special effect interaction. The video is composed of continuous video frame images. Realizing the interaction between the target character and the special effects in the video can be understood as realizing the interaction between the target character and the special effects in each video frame image. In this embodiment, the image or video frame image including the target character is defined as the image to be processed. Of course, in an optional implementation method, for the video in which the special effect interaction is to be realized, in order to reduce performance consumption, the interactive matching of the target character and the special effects can be performed for the key frame images in the video based on the method provided in this embodiment, and then the interactive matching of the target character and the special effects in the video frame images between the key frame images is realized based on interpolation operations and other methods. Based on this, the image to be processed can also represent the key frame images in the video.
[0041] In the early stage of the method provided in this embodiment, it is also necessary to make a role model in the model making software based on the target role in the image to be processed, and the role model is a three-dimensional model. The method provided in this embodiment is to realize special effect interaction based on a simple model, so the role model is a simple model pre-built based on the target role. After the role model is made, it is also necessary to adjust the action of the role model according to the action of the target role in the image to be processed, so that the action of the role model is consistent with the action of the target character, thereby improving the fit of the special effect interaction.
[0042] In the early stage of the method provided in this embodiment, a special effect model needs to be made. The special effect model can be a three-dimensional model made in a model making software based on a special effect scheme provided by a special effect planner to add special effects to the video. The special effect model can also be a three-dimensional model made in a model making software based on the special effects shown in the video to enhance the expressiveness of the special effects shown in the video.
[0043] In the early stage of the method provided in this embodiment, it is also necessary to produce a character outline image based on the target character in the image to be processed. The character outline image can be understood as a mask, which is usually presented as a grayscale image, where black represents complete hiding and white represents complete display. The mask can accurately reflect the true outline of the target character in the image to be processed. The pixels in the character outline image store RGBA color values to achieve a grayscale effect.
[0044] After the character model, special effect model, and character outline image are made, relevant information for realizing special effect interaction can be generated and imported into the visual special effect production software. In this embodiment, the relevant information required for realizing special effect interaction includes the depth information corresponding to the character model, the depth information corresponding to the special effect model, and the outline information corresponding to the character outline image. The depth information can be understood as the distance from the model (character model / special effect model) to the virtual camera in three-dimensional space. In an optional implementation, the depth information includes the position data (such as coordinate values) of each point on the model in three-dimensional space, the distance from each point on the model to the virtual camera, and the color data (such as RGBA values) of each point on the model. In another optional implementation, the depth information includes the position data (such as coordinate values) of each point on the model in three-dimensional space, and the distance from each point on the model to the virtual camera. It should be noted that in order to increase the accuracy of the interaction between the special effect and the target character, the camera setting of the virtual camera needs to be consistent with the camera setting of the real camera when shooting the video, and the camera setting can specifically include camera intrinsic parameters and camera extrinsic parameters. The outline information may include position data (e.g., coordinate values) and color data (e.g., RGBA values) of pixels in the character outline image. For ease of distinction, in this implementation, the depth information corresponding to the character model is defined as character depth information, and the depth information corresponding to the special effect model is defined as special effect depth information.
[0045] In this embodiment, the acquisition perspective of the character outline information and the character depth information needs to be the same, and because the special effects interaction with the target character in the image to be processed is to be achieved, therefore, in order to increase the degree of special effects interaction with the target character in the image to be processed, the acquisition perspective of the character outline information and the character depth information also needs to be the same as the acquisition perspective of the image to be processed. Exemplarily, the acquisition perspective of the image to be processed is the front view perspective (that is, the front of the target character is displayed in the image to be processed), then, it is necessary to obtain the character depth information corresponding to the character model, the special effects depth information corresponding to the special effects model, and the character outline information corresponding to the character outline image under the front view perspective. Assuming that the acquired character depth information, special effects depth information, and character outline information are under other perspectives (such as rear view perspective, side view perspective, etc.), then the special effects cannot interact with the target character.
[0046] For example, the acquisition perspective is a frontal perspective (i.e., the image to be processed is formed by shooting the front of the target character), and the visualization effect diagram of the character depth information corresponding to the character model under the acquisition perspective is as follows: Figure 4 As shown in the figure, the visualization effect diagram of obtaining the special effect depth information corresponding to the special effect model under the viewing angle is as follows Figure 5 As shown in the figure, the visualization effect diagram of the character outline information corresponding to the target character under the viewing angle is as follows Figure 6It should be noted that the character depth information, special effect depth information, and character outline information are themselves invisible data, and the above-mentioned visualization effect diagram is obtained by rendering the character depth information, special effect depth information, and character outline information through DCC (Digital Content Creation) software.
[0047] Step S320 , performing expansion processing on the character depth information corresponding to the character model to obtain the character expanded depth information corresponding to the character model.
[0048] As shown above, the character model is a simplified model built based on the target character. Usually, the outline of the character model is smaller than the actual outline of the target character, such as Figure 1 Therefore, the special effect interaction based on the role model will inevitably have the defect of not being able to accurately match the target role.
[0049] In this embodiment, in order to overcome this defect, the character depth information corresponding to the character model is expanded so that the expanded character depth information can fill the part of the character model outline that is smaller than the target character outline, so that this part can also participate in the special effect interaction and achieve the precise fit between the target character and the special effect. The expansion process of the character depth information can also be understood as reverse repairing the character depth information to make the character model more accurate and the fit between the character model and the target character higher. By refining the character model by expanding the character depth information, compared with directly using the high model, it can not only solve the problem that the special effect interaction based on the simple model cannot fit the target character due to the large difference between the simple model and the target character, but also avoid the problem that the model making and action matching in the early stage are difficult, time-consuming and laborious due to the high complexity of the high model. In this embodiment, the expanded character depth information obtained by the expansion process of the character depth information is defined as the character expansion depth information.
[0050] In an optional implementation, the character depth information is expanded to obtain the character expanded depth information, which may specifically include the following steps S321 to S323:
[0051] Step S321 , performing a first information conversion process on the character depth information to form a second character image corresponding to the character model.
[0052] The pixels in the second character image record the character depth information and the color values converted from the character depth information.
[0053] The first information conversion process can be understood as a two-dimensional plane conversion of the character depth information, that is, a process of converting the information into an image. In this embodiment, the two-dimensional image converted from the character depth information is defined as the second character image.
[0054] In an optional implementation, the character depth information includes the position data (e.g., coordinate values) of points on the character model in three-dimensional space, the distance data from the points on the character model to the virtual camera, and the color data (e.g., RGBA values) of the points on the character model. Based on this, converting the character depth information into a second character image may include the following steps S321-11 to S321-12:
[0055] Step S321 - 11 , based on the position data of the points on the character model in the three-dimensional space, a mapping relationship between the points on the character model and the pixels in the two-dimensional image is established.
[0056] Step S321-12, based on the mapping relationship between the points on the character model and the pixels in the two-dimensional image, the distance data and color data corresponding to the points on the character model are mapped to the pixels in the two-dimensional image to form a second character image.
[0057] In another optional implementation, the depth information includes the position data (e.g., coordinate values) of the points on the model in the three-dimensional space, and the distance data from the points on the model to the virtual camera. That is, it does not include color data. Based on this, converting the character depth information into the second character image may include the following steps S321-21 to S321-24:
[0058] Step S321 - 21 , based on the position data of the points on the character model in the three-dimensional space, a mapping relationship between the points on the character model and the pixels in the two-dimensional image is established.
[0059] Step S321 - 22 , based on the mapping relationship between the points on the character model and the pixels in the two-dimensional image, the distance data corresponding to the points on the character model are mapped to the pixels in the two-dimensional image.
[0060] Step S321-23, based on the distance data mapped in the pixel of the two-dimensional image, calculate the color data in the preset color mode. The color data can reflect the relative size of the distance data. Exemplarily, the preset color mode is a grayscale mode, and the smaller the distance data, the more the calculated color data is biased towards black, and the larger the distance data, the more the calculated color data is biased towards white. By converting the distance data, not only can the two-dimensional image be given color data, but also the relative size of the distance data can be expressed based on the color data.
[0061] Step S321-24, recording the color data in the pixel points to form a second character image.
[0062] In a specific implementation, when the method provided in this embodiment is executed based on Nuke software, the character depth information can be converted into the second character image by using the deeptoimage function node. Figure 7 Yes Figure 4 A schematic diagram of a second character image obtained by performing information conversion processing on the character depth information shown.
[0063] Step S322: performing a character depth information expansion operation on the second character image to form a third character image corresponding to the character model.
[0064] The pixel points in the third character image record the character expanded depth information obtained by performing an expansion operation on the character depth information and the color value converted from the character expanded depth information.
[0065] Performing a character depth information expansion operation on the second character image actually enlarges the edge of the second character image so that the character depth information is expanded.
[0066] In a specific implementation, when the method provided in this embodiment is executed based on Nuke software, the expansion operation of the character depth information can be implemented by using the filtererode function node. Figure 8 Yes Figure 7 Schematic diagram of a third character image obtained by performing character depth information expansion operation on the second character image shown. Figure 8 and Figure 7 , Figure 8 The outline of the character model shown is significantly larger than Figure 7 The outline of the character model is shown.
[0067] Step S323: Perform a second information conversion process on the third character image to obtain character expansion depth information corresponding to the character model.
[0068] The second information conversion process can be understood as converting the character depth information of the third character image, that is, the process of extracting information from the image. In this embodiment, since the third character image is an extended image obtained by performing a character depth information expansion operation on the second character image, the character depth information extracted from the third character image is actually the character extended depth information after the expansion process.
[0069] In a specific implementation, when the method provided in this embodiment is executed based on Nuke software, the character expansion depth information can be extracted from the third character image by using the DeepFromImage function node.
[0070] Fig. 9 : is a comparison diagram of the visualization effects of the character depth information and the character extended depth information provided by this embodiment. Fig. 9 As shown, the character outline 901 corresponding to the character expansion depth information is obviously larger than the character outline 902 corresponding to the character depth information.
[0071] In an optional implementation, after performing a first information conversion process on the character depth information to form a second character image corresponding to the character model, the method provided in this embodiment may further include the following steps: performing a de-infinite value process on the color values recorded by the pixel points in the second character image to form a fourth character image corresponding to the character model. The pixel points in the fourth character image record the character depth information and the processed color values.
[0072] The process of removing infinite values can be understood as optimizing the color values recorded by the pixel points in the second character image to ensure the accuracy and stability of the subsequent processing steps. Exemplarily, the process of removing infinite values from the color values can be implemented by conditional expression operation. Specifically, the conditional expression includes the following expression 1, expression 2, and expression 3:
[0073] r == inf? 0:r (expression 1)
[0074] g == inf? 0:g (expression 2)
[0075] b == inf? 0:b (Expression 3)
[0076] Where r represents the color value corresponding to the red channel, g represents the color value corresponding to the green channel, b represents the color value corresponding to the blue channel, inf represents an infinite value, r==inf?0:r means that when r is an infinite value, its value is set to 0, otherwise the original value of r is maintained, g==inf?0:g means that when g is an infinite value, its value is set to 0, otherwise the original value of g is maintained, b==inf?0:b means that when b is an infinite value, its value is set to 0, otherwise the original value of b is maintained.
[0077] After the color values recorded by the pixels in the second character image are processed to remove infinite values, the color values recorded by some pixels are usually changed to form a new character image. In this embodiment, the new character image formed after the color values recorded by the pixels in the second character image are processed to remove infinite values is defined as a fourth character image. The pixels in the fourth character image record the character depth information and the processed color values.
[0078] Based on this, performing a character depth information expansion operation on the second character image to form a third character image corresponding to the character model may specifically include: performing a character depth information expansion operation on the fourth character image corresponding to the character model to form a third character image corresponding to the character model.
[0079] In an optional implementation, after the step of removing infinite values from the color values recorded by the pixels in the second character image to form a fourth character image corresponding to the character model, the method provided in this embodiment may further include the following steps: removing infinite values from the character depth information recorded by the pixels in the fourth character image to form a fifth character image corresponding to the character model. The pixels in the fifth character image record the processed character depth information and the processed color values.
[0080] The de-infinite value processing can be understood as optimizing the character depth information recorded by the pixel points in the fourth character image to ensure the accuracy and stability of the subsequent processing steps. Exemplarily, the de-infinite value processing of the character depth information can be implemented by conditional expression operation. Specifically, the conditional expression includes the following expression 4 and expression 5:
[0081] front == inf? 0:front (expression 4)
[0082] back == inf? 0:back (expression 5)
[0083] Among them, front represents the front end of the character depth information, back represents the back end of the character depth information, inf represents an infinite value, front==inf? 0:front means that when front is an infinite value, its value is set to 0, otherwise the original value of front is maintained, back==inf? 0:back means that when back is an infinite value, its value is set to 0, otherwise the original value of back is maintained.
[0084] After the depth information recorded by the pixels in the fourth character image is processed to remove infinite values, the depth information recorded by some pixels is usually changed to form a new character image. In this embodiment, the new character image formed after the depth information recorded by the pixels in the fourth character image is processed to remove infinite values is defined as the fifth character image. The pixels in the fifth character image record the processed character depth information and the processed color values.
[0085] Based on this, performing a character depth information expansion operation on the fourth character image corresponding to the character model to form a third character image corresponding to the character model may specifically include: performing a character depth information expansion operation on the fifth character image corresponding to the character model to form the third character image corresponding to the character model.
[0086] In an optional implementation, after performing a character depth information expansion operation on the second character image to form a third character image corresponding to the character model, the method provided in this embodiment may further include the following steps: performing a conditional expression operation on the character depth information recorded by the pixel points in the second character image and the character expanded depth information recorded by the pixel points in the third character image to obtain a sixth character image corresponding to the character model. The pixel points in the sixth character image record the character depth information or expanded character depth information determined after the conditional expression operation and the color values converted from the determined character depth information or expanded character depth information.
[0087] After performing a character depth information expansion operation on the second character image to form a third character image, a conditional expression operation is used to combine the second character image and the third character image to form a sixth character image corresponding to the character model, which can minimize the erroneous data that may be caused by the expansion operation to ensure the accuracy and stability of subsequent processing steps. Exemplarily, the conditional expression operation of the character depth information recorded by the pixel points in the second character image and the character expansion depth information recorded by the pixel points in the third character image can include the following expressions 6 and 7:
[0088] A.front==0? B.front:A.front (Expression 6)
[0089] A.back == 0? B.back:A.back (Expression 7)
[0090] Among them, A.front represents the front end of the character depth information recorded by the pixel points in the second character image, B.front represents the front end of the character extended depth information recorded by the pixel points in the third character image, A.back represents the back end of the character depth information recorded by the pixel points in the second character image, B.back represents the back end of the character extended depth information recorded by the pixel points in the third character image, A.front==0? B.front: A.front means that when A.front is 0, its value is set to B.front, otherwise the original value of A.front is maintained, A.back==0? B.back: A.back means that when A.back is 0, its value is set to B.back, otherwise the original value of A.back is maintained. That is, the sixth character image is actually a combination of the second character image and the part of the third character image that exceeds the second character image, and the pixels in the sixth character image record the character depth information or character extended depth information determined by the above conditional expression operation, as well as the color value converted from the determined character depth information or character extended depth information.
[0091] Based on this, performing a second information conversion process on the third character image to obtain character expansion depth information corresponding to the character model may include: performing a second information conversion process on the sixth character image to obtain character depth information corresponding to the character model or character expansion depth information.
[0092] In an optional implementation, the character depth information corresponding to the character model is expanded to obtain the character expanded depth information corresponding to the character model, which may specifically include: based on preset expansion parameters, the character depth information corresponding to the character model is expanded to obtain the character expanded depth information corresponding to the character model.
[0093] Specifically, the expansion parameters may include the kernel size of the expansion operation and the iteration rounds of the expansion operation. In practical applications, setting appropriate expansion parameters can reduce the introduced noise while meeting the expansion purpose.
[0094] Step S330: obtaining a first character image corresponding to the character model based on the character outline information and the character expanded depth information.
[0095] The pixels in the first character image record the character expansion depth information and the color value represented by the character outline information.
[0096] The character model outline in the character image converted based on the character expansion depth information will not be consistent with the real outline of the target character. Therefore, in this embodiment, the character outline information that can represent the real outline of the target character is used to remove the redundant part of the character expansion depth information, so that the character model outline displayed in the character image is consistent with the real outline of the target character.
[0097] The first character image is a character image formed based on the character outline information and the character extended depth information. Specifically, the color value represented by the character outline information and the character extended depth information are recorded in the pixel points of the two-dimensional image to form the first character image. In the first character image, the outline of the character model is consistent with the real outline of the target character.
[0098] In a specific implementation, when the method provided in this embodiment is executed based on Nuke software, the character outline information can be assigned to the character extended depth information by using the deepecolor function node to form a first character image including the character extended depth information and the color value represented by the character outline information.
[0099] Fig.10 This is a visualization effect diagram of adding character outline information to character expanded depth information provided by this embodiment.
[0100] like Fig.10As shown, the character outline information 1001 is assigned to the character extended depth information 1002 to cover the part 1003 of the character extended depth information 1002 that is larger than the character outline information 1001, so that the character model outline displayed in the first character image is consistent with the real outline of the target character. It should be noted that the character outline information and the character extended depth information themselves are not visible data, and the above visualization effect is obtained through rendering by DCC software.
[0101] Fig.11 This is a comparison diagram of using and not using character outline information to form special effect interaction provided by this embodiment.
[0102] like Fig.11 As shown in (a), without using the character outline information, the subsequent special effect interaction processing is directly performed based on the character expansion depth information, which cannot form an accurate special effect interaction with the target character 1101. Fig.11 As shown in (b), after using the character outline information to remove the redundant part of the character expansion depth information, the subsequent steps of special effect interaction processing are performed based on the character expansion depth information with the redundant part removed, which can form an accurate special effect interaction with the target character 1102.
[0103] The character's expanded depth information after expansion may not completely cover the character's outline information, such as Fig.12 As shown, the character outline information 1201 (at the hair tip) exceeds the character expansion depth information 1202. If the special effect interaction processing of the subsequent steps is continued based on the character expansion depth information 1202, there will be a special effect interaction error in the part because the part that exceeds the limit does not have depth information. Based on this, in an optional implementation, after the step of expanding the character depth information corresponding to the character model based on the preset expansion parameters to obtain the character expansion depth information corresponding to the character model, the method provided in this embodiment may also include the following steps: in response to the first character image including the pixel point that does not record the character expansion depth information, the character expansion depth information corresponding to the character model is expanded twice to obtain the character secondary expansion depth information corresponding to the character model. That is, the character expansion information is continued to be expanded so that the character expansion depth information after the second expansion can completely cover the character outline information. In this embodiment, the character depth information obtained by the second expansion of the character expansion depth information is defined as the character secondary expansion depth information.
[0104] Based on this, obtaining a first character image corresponding to the character model based on the character outline information and the character extended depth information may include: obtaining a first character image corresponding to the character model based on the character outline information and the character secondary extended depth information. The pixel points in the first character image record the color values represented by the character secondary extended depth information and the character outline information.
[0105] Through the above steps, a first character image consistent with the contour of the target character in the image to be processed is obtained. In an optional implementation provided by this embodiment, the method provided by this embodiment may also include the following steps S341 to S343:
[0106] Step S341, obtaining special effect depth information corresponding to the special effect model.
[0107] Step S342: performing a third information conversion process on the special effect depth information to form a special effect image corresponding to the special effect model.
[0108] Step S343 , combining the first character image and the special effect image according to the character expansion depth information recorded by the pixels in the first character image and the special effect depth information recorded by the pixels in the special effect image to form a special effect interactive image.
[0109] The special effect image refers to a two-dimensional image obtained by performing a third information conversion process on the special effect depth information. The pixels in the special effect image record the special effect depth information and the color value converted from the special effect depth information. The third information conversion process can be understood as a two-dimensional plane conversion of the special effect depth information, that is, a process of converting the information into an image. In this embodiment, the two-dimensional image converted from the special effect depth information is defined as a special effect image.
[0110] The first character image and the special effects image are merged according to the character expansion depth information recorded by the pixels in the first character image and the special effects depth information recorded by the pixels in the special effects image. This can be understood as depth information cropping of the first character image and the special effects image, so that the correct occlusion relationship between the character model displayed in the first character image and the special effects model displayed in the special effects image can be achieved.
[0111] In an optional implementation, based on the character expansion depth information recorded by the pixels in the first character image and the special effect depth information recorded by the pixels in the special effect image, the first character image and the special effect image are merged to form a special effect interactive image, which may specifically include the following steps S343-1 to S343-2:
[0112] Step S343-1, determining the occlusion relationship between the pixels in the first character image and the pixels in the special effect image according to the character expansion depth information recorded by the pixels in the first character image and the special effect depth information recorded by the pixels in the special effect image.
[0113] Step S343-2, based on the occlusion relationship, merge the pixel points in the first character image and the pixel points in the special effect image to form a special effect interactive image.
[0114] In a specific implementation, when the method provided in this embodiment is executed based on Nuke software, the first character image and the special effect image can be merged based on depth information by using the deepmerge function node.
[0115] In an optional implementation provided by this embodiment, after the special effect interactive image is formed, the method provided by this embodiment may further include the following step S350:
[0116] Step S350, performing image synthesis processing on the special effect interaction image and the image to be processed to form a target image with special effect interaction effect.
[0117] As shown above, the image to be processed displays the target character, and the special effects interaction image displays the interaction effect between the character model and the special effects model. The image to be processed and the special effects interaction image are synthesized to obtain a target image that displays the interaction effect between the target character and the special effects model. Specifically, align the character model displayed in the special effects interaction image with the target character displayed in the image to be processed, and synthesize the special effects interaction image and the image to be processed into a target image, in which the interaction effect between the target character and the special effects is displayed. Since the outline of the character model displayed in the special effects interaction image is consistent with the real outline of the target character, the target character in the target image will have precise interaction with the special effects. The special effects interaction effect displayed in the target image is as follows: Fig.11 (b) as shown.
[0118] In an optional implementation, when the method provided in this embodiment is executed based on Nuke software, the method provided in this embodiment is as follows: Fig.13 shown. Fig.13 : is a flow chart of realizing special effect interaction based on the image processing method provided in this embodiment. The special effect interaction based on Nuke software may specifically include the following steps S1301 to S1310:
[0119] Step S1301, importing character outline information corresponding to the target character, character depth information corresponding to the character model, and special effect depth information corresponding to the special effect model into Nuke.
[0120] Step S1302: converting the character depth information into a second character image based on the deeptoimage function node.
[0121] Step S1303, performing conditional expression operation on the color values recorded by the pixel points in the second character image to remove infinite values in the color values, thereby forming a fourth character image.
[0122] Step S1304, performing a conditional expression operation on the character depth information recorded by the pixel points in the fourth character image to remove infinite values in the character depth information, thereby forming a fifth character image.
[0123] Step S1305 , performing a character depth information expansion operation on the fifth character image based on the filtererode function node to form a third character image corresponding to the character model.
[0124] Step S1306 , performing a conditional expression operation on the character depth information recorded by the pixels in the fifth character image and the character expanded depth information recorded by the pixels in the third character image to form a sixth character image.
[0125] Step S1307: converting the sixth character image into character extended depth information based on the DeepFromImage function node.
[0126] Step S1308: assigning the character outline information to the character extended depth information based on the deepecolor function node to form a first character image.
[0127] Step S1309: converting the special effect depth information into a special effect image based on the deeptoimage function node.
[0128] Step S1310: cutting depth information of the first character image and the special effect image based on the deepmerge function node to form a special effect interactive image.
[0129] The above-mentioned first embodiment provides an optional image processing method. First, the character model used in this method is a simple model, and there is no problem of difficulty, time-consuming and labor-intensive in the previous model making and action matching stage. Second, the method expands the character depth information of the character model, and generates a first character image corresponding to the character model based on the expanded character depth information after expansion and the color value represented by the character contour information, so that the character model displayed in the first character image has the same contour as the target character. Therefore, there is no problem that the interactive special effects produced based on the character model cannot interact accurately with the target character. Third, the method merges the first character image and the special effects image based on the character expanded depth information recorded by the pixel points in the first character image and the special effects depth information recorded by the pixel points in the special effects image, which can reflect the correct occlusion relationship between the character model and the special effects model in the merged special effects interactive image, thereby improving the special effects interactive effect.
[0130] It should be noted that the examples in the first embodiment are only for explaining the method described in this application and are not intended to be limiting for actual use. The image processing method provided in this application includes but is not limited to the method described in the first embodiment.
[0131] A second embodiment of the present application provides an image processing device, Fig.14 Schematic diagram of the structure of the image processing device provided in this embodiment.
[0132] like Fig.14 As shown, the image processing device provided by this embodiment includes: an information acquisition unit 1401, an information expansion unit 1402, and an image generation unit 1403.
[0133] The information acquisition unit 1401 is used to acquire character outline information corresponding to the target character and character depth information corresponding to the character model, where the character model is a simplified model pre-built based on the target character.
[0134] The information expansion unit 1402 is used to expand the character depth information corresponding to the character model to obtain the character expanded depth information corresponding to the character model.
[0135] Optionally, the expanding the character depth information corresponding to the character model to obtain expanded character depth information corresponding to the character model includes:
[0136] Performing a first information conversion process on the character depth information to form a second character image corresponding to the character model;
[0137] Performing a character depth information expansion operation on the second character image to form a third character image corresponding to the character model;
[0138] A second information conversion process is performed on the third character image to obtain the character expansion depth information corresponding to the character model.
[0139] Optionally, after the step of performing a first information conversion process on the character depth information to form a second character image corresponding to the character model, the method is further configured to:
[0140] Performing a process of removing infinite values from color values recorded by pixel points in the second character image to form a fourth character image corresponding to the character model;
[0141] The performing a character depth information expansion operation on the second character image to form a third character image corresponding to the character model includes:
[0142] A character depth information expansion operation is performed on the fourth character image corresponding to the character model to form the third character image corresponding to the character model.
[0143] Optionally, after the step of removing infinite values from the color values recorded by the pixel points in the second character image to form a fourth character image corresponding to the character model, the method is further configured to:
[0144] performing a de-infinite value process on the character depth information recorded by the pixel points in the fourth character image to form a fifth character image corresponding to the character model;
[0145] The performing a character depth information expansion operation on the fourth character image corresponding to the character model to form the third character image corresponding to the character model includes:
[0146] A character depth information expansion operation is performed on the fifth character image corresponding to the character model to form the third character image corresponding to the character model.
[0147] Optionally, after the step of performing a character depth information expansion operation on the second character image to form a third character image corresponding to the character model, the method is further configured to:
[0148] Performing conditional expression operation on the character depth information recorded by the pixel points in the second character image and the character expanded depth information recorded by the pixel points in the third character image to obtain a sixth character image corresponding to the character model;
[0149] The performing the second information conversion process on the third character image to obtain the character expansion depth information corresponding to the character model includes:
[0150] A second information conversion process is performed on the sixth character image to obtain the character depth information or character expansion depth information corresponding to the character model.
[0151] Optionally, the expanding the character depth information corresponding to the character model to obtain expanded character depth information corresponding to the character model includes:
[0152] Based on preset expansion parameters, the character depth information corresponding to the character model is expanded to obtain the character expanded depth information corresponding to the character model.
[0153] The image generating unit 1403 is configured to obtain a first character image corresponding to the character model based on the character outline information and the character expanded depth information.
[0154] Optionally, after the step of performing expansion processing on the character depth information corresponding to the character model based on preset expansion parameters to obtain the character expanded depth information corresponding to the character model, the method is further configured to:
[0155] In response to the first character image including a pixel point that does not record the character expansion depth information, performing secondary expansion processing on the character expansion depth information corresponding to the character model to obtain the character secondary expansion depth information corresponding to the character model;
[0156] The step of obtaining a first character image corresponding to the character model based on the character outline information and the character expanded depth information includes:
[0157] Based on the character outline information and the character secondary expansion depth information, a first character image corresponding to the character model is obtained.
[0158] Optionally, the device further includes: a second image generating unit;
[0159] The second image generating unit is used for:
[0160] Get the special effect depth information corresponding to the special effect model;
[0161] Performing a third information conversion process on the special effect depth information to form a special effect image corresponding to the special effect model;
[0162] The first character image and the special effect image are merged according to the character expansion depth information recorded by the pixels in the first character image and the special effect depth information recorded by the pixels in the special effect image to form a special effect interactive image.
[0163] Optionally, the step of merging the first character image and the special effect image to form a special effect interactive image based on the character expansion depth information recorded by the pixels in the first character image and the special effect depth information recorded by the pixels in the special effect image includes:
[0164] Determine an occlusion relationship between a pixel point in the first character image and a pixel point in the special effect image according to the character expansion depth information recorded by the pixel point in the first character image and the special effect depth information recorded by the pixel point in the special effect image;
[0165] Based on the occlusion relationship, the pixels in the first character image and the pixels in the special effect image are merged to form the special effect interaction image.
[0166] Optionally, the image to be processed includes the target character, and the device further includes an image synthesis unit;
[0167] The image synthesis unit is used to perform image synthesis processing on the special effect interaction image and the image to be processed to form a target image with special effect interaction effect.
[0168] A third embodiment of the present application provides an electronic device, Fig.15 It is a schematic diagram of the structure of the electronic device provided in this embodiment.
[0169] like Fig.15As shown, the electronic device provided in this embodiment includes: a memory 1501 and a processor 1502;
[0170] The memory 1501 is used to store computer instructions for executing the image processing method;
[0171] The processor 1502 is configured to execute computer instructions stored in the memory 1501 to perform the following operations:
[0172] Acquire character outline information corresponding to a target character and character depth information corresponding to a character model, wherein the character model is a simplified model pre-built based on the target character;
[0173] Performing expansion processing on the character depth information corresponding to the character model to obtain character expanded depth information corresponding to the character model;
[0174] Based on the character outline information and the character expanded depth information, a first character image corresponding to the character model is obtained.
[0175] Optionally, also execute:
[0176] Get the special effect depth information corresponding to the special effect model;
[0177] Performing a third information conversion process on the special effect depth information to form a special effect image corresponding to the special effect model;
[0178] The first character image and the special effect image are merged according to the character expansion depth information recorded by the pixels in the first character image and the special effect depth information recorded by the pixels in the special effect image to form a special effect interactive image.
[0179] Optionally, the image to be processed includes the target character, and further executing:
[0180] The special effect interaction image and the image to be processed are subjected to image synthesis processing to form a target image with special effect interaction effect.
[0181] Optionally, the expanding the character depth information corresponding to the character model to obtain expanded character depth information corresponding to the character model includes:
[0182] Performing a first information conversion process on the character depth information to form a second character image corresponding to the character model;
[0183] Performing a character depth information expansion operation on the second character image to form a third character image corresponding to the character model;
[0184] A second information conversion process is performed on the third character image to obtain the character expansion depth information corresponding to the character model.
[0185] Optionally, after the step of performing a first information conversion process on the character depth information to form a second character image corresponding to the character model, the following is further performed:
[0186] Performing a process of removing infinite values from color values recorded by pixel points in the second character image to form a fourth character image corresponding to the character model;
[0187] The performing a character depth information expansion operation on the second character image to form a third character image corresponding to the character model includes:
[0188] A character depth information expansion operation is performed on the fourth character image corresponding to the character model to form the third character image corresponding to the character model.
[0189] Optionally, after the step of removing infinite values from the color values recorded by the pixel points in the second character image to form a fourth character image corresponding to the character model, the following is further performed:
[0190] performing a de-infinite value process on the character depth information recorded by the pixel points in the fourth character image to form a fifth character image corresponding to the character model;
[0191] The performing a character depth information expansion operation on the fourth character image corresponding to the character model to form the third character image corresponding to the character model includes:
[0192] A character depth information expansion operation is performed on the fifth character image corresponding to the character model to form the third character image corresponding to the character model.
[0193] Optionally, after the step of performing a character depth information expansion operation on the second character image to form a third character image corresponding to the character model, the following is further performed:
[0194] Performing conditional expression operation on the character depth information recorded by the pixel points in the second character image and the character expanded depth information recorded by the pixel points in the third character image to obtain a sixth character image corresponding to the character model;
[0195] The performing the second information conversion process on the third character image to obtain the character expansion depth information corresponding to the character model includes:
[0196] A second information conversion process is performed on the sixth character image to obtain the character depth information or character expansion depth information corresponding to the character model.
[0197] Optionally, the expanding the character depth information corresponding to the character model to obtain expanded character depth information corresponding to the character model includes:
[0198] Based on preset expansion parameters, the character depth information corresponding to the character model is expanded to obtain the character expanded depth information corresponding to the character model.
[0199] Optionally, after the step of performing expansion processing on the character depth information corresponding to the character model based on preset expansion parameters to obtain the character expanded depth information corresponding to the character model, the following is further performed:
[0200] In response to the first character image including a pixel point that does not record the character expansion depth information, performing secondary expansion processing on the character expansion depth information corresponding to the character model to obtain the character secondary expansion depth information corresponding to the character model;
[0201] The step of obtaining a first character image corresponding to the character model based on the character outline information and the character expanded depth information includes:
[0202] Based on the character outline information and the character secondary expansion depth information, a first character image corresponding to the character model is obtained.
[0203] Optionally, the step of merging the first character image and the special effect image to form a special effect interactive image based on the character expansion depth information recorded by the pixels in the first character image and the special effect depth information recorded by the pixels in the special effect image includes:
[0204] Determine an occlusion relationship between a pixel point in the first character image and a pixel point in the special effect image according to the character expansion depth information recorded by the pixel point in the first character image and the special effect depth information recorded by the pixel point in the special effect image;
[0205] Based on the occlusion relationship, the pixels in the first character image and the pixels in the special effect image are merged to form the special effect interaction image.
[0206] A fourth embodiment of the present application provides a computer-readable storage medium, where the computer-readable storage medium includes computer instructions. When the computer instructions are executed by a processor, they are used to implement the methods described in the embodiments of the present application.
[0207] It should be noted that the relational terms such as "first" and "second" in this article are only used to distinguish one entity or operation from another entity or operation, and do not require or imply any actual relationship or order between these entities or operations. In addition, the words "include", "have", "include" and "includes" and other similar forms are the same in meaning, and the end of any one or more items after any of the above words is open-ended, and any of the above nouns does not mean that the one or more items have been exhaustively listed or are limited to the one or more items listed.
[0208] As used herein, unless expressly stated otherwise, the term "or" includes all possible combinations, except those that are not feasible. For example, if it is expressed that a database may include A or B, then unless otherwise specifically stated or not feasible, it may include database A, or B, or A and B. As a second example, if it is expressed that a database may include A, B, or C, then unless otherwise specifically stated or not feasible, the database may include database A, or B, or C, or A and B, or A and C, or B and C, or A, B, and C.
[0209] It is worth noting that the above embodiments can be implemented by hardware or software (program code), or a combination of hardware and software. If implemented by software, it can be stored in the above-mentioned computer-readable medium. When the software is executed by a processor, it can execute the above-mentioned disclosed method. The computing unit and other functional units described in the present disclosure can be implemented by hardware or software, or a combination of hardware and software. Those of ordinary skill in the art will also understand that the above-mentioned multiple modules / units can be combined into one module / unit, and each of the above-mentioned modules / units can be further divided into multiple sub-modules / sub-units.
[0210] In the above detailed description, the embodiments have been described with reference to many specific details, which may vary from implementation to implementation. Certain adaptations and modifications may be made to the embodiments. For those skilled in the art, other embodiments may be readily apparent from the specific embodiments disclosed in the present application. This specification and examples are for exemplary purposes only, and the true scope and essence of the present application are described by the claims. The sequence of steps shown in the diagrams is also for the purpose of explanation only and is not intended to be limited to any particular steps or sequence. Therefore, those skilled in the art will appreciate that these steps may be performed in different orders when implementing the same method.
[0211] In the drawings and detailed description of the present application, exemplary embodiments are disclosed. However, many variations and modifications may be made to these embodiments. Accordingly, although specific terms are used, these terms are only general and descriptive and not for the purpose of limitation.
Claims
1. An image processing method, characterized in that: The method comprises: Acquire character outline information corresponding to a target character and character depth information corresponding to a character model, wherein the character model is a simplified model pre-built based on the target character; Performing expansion processing on the character depth information corresponding to the character model to obtain character expanded depth information corresponding to the character model; Based on the character outline information and the character expanded depth information, a first character image corresponding to the character model is obtained.
2. The method according to claim 1, characterized in that The method further comprises: Get the special effect depth information corresponding to the special effect model; Performing a third information conversion process on the special effect depth information to form a special effect image corresponding to the special effect model; The first character image and the special effect image are merged according to the character expansion depth information recorded by the pixels in the first character image and the special effect depth information recorded by the pixels in the special effect image to form a special effect interactive image.
3. The method according to claim 2, characterized in that The image to be processed includes the target character; the method further includes: The special effect interaction image and the image to be processed are subjected to image synthesis processing to form a target image with special effect interaction effect.
4. The method according to claim 1, characterized in that: The step of performing expansion processing on the character depth information corresponding to the character model to obtain the character expanded depth information corresponding to the character model includes: Performing a first information conversion process on the character depth information to form a second character image corresponding to the character model; Performing a character depth information expansion operation on the second character image to form a third character image corresponding to the character model; A second information conversion process is performed on the third character image to obtain the character expansion depth information corresponding to the character model.
5. The method according to claim 4, characterized in that After the step of performing a first information conversion process on the character depth information to form a second character image corresponding to the character model, the method further includes: Performing a process of removing infinite values from color values recorded by pixel points in the second character image to form a fourth character image corresponding to the character model; The performing a character depth information expansion operation on the second character image to form a third character image corresponding to the character model includes: A character depth information expansion operation is performed on the fourth character image corresponding to the character model to form the third character image corresponding to the character model.
6. The method according to claim 5, characterized in that After the step of performing a process of removing infinite values from the color values recorded by the pixel points in the second character image to form a fourth character image corresponding to the character model, the method further includes: performing a de-infinite value process on the character depth information recorded by the pixel points in the fourth character image to form a fifth character image corresponding to the character model; The performing a character depth information expansion operation on the fourth character image corresponding to the character model to form the third character image corresponding to the character model includes: A character depth information expansion operation is performed on the fifth character image corresponding to the character model to form the third character image corresponding to the character model.
7. The method according to claim 4, characterized in that After the step of performing a character depth information expansion operation on the second character image to form a third character image corresponding to the character model, the method further includes: Performing conditional expression operation on the character depth information recorded by the pixel points in the second character image and the character expanded depth information recorded by the pixel points in the third character image to obtain a sixth character image corresponding to the character model; The performing the second information conversion process on the third character image to obtain the character expansion depth information corresponding to the character model includes: A second information conversion process is performed on the sixth character image to obtain the character depth information or character expansion depth information corresponding to the character model.
8. The method according to claim 1, characterized in that The step of performing expansion processing on the character depth information corresponding to the character model to obtain the character expanded depth information corresponding to the character model includes: Based on preset expansion parameters, the character depth information corresponding to the character model is expanded to obtain the character expanded depth information corresponding to the character model.
9. The method according to claim 8, characterized in that After the step of performing expansion processing on the character depth information corresponding to the character model based on preset expansion parameters to obtain the character expanded depth information corresponding to the character model, the method further includes: In response to the first character image including a pixel point that does not record the character expansion depth information, performing secondary expansion processing on the character expansion depth information corresponding to the character model to obtain the character secondary expansion depth information corresponding to the character model; The step of obtaining a first character image corresponding to the character model based on the character outline information and the character expanded depth information includes: Based on the character outline information and the character secondary expansion depth information, a first character image corresponding to the character model is obtained.
10. The method according to claim 2, characterized in that The step of combining the character expansion depth information recorded by the pixels in the first character image and the special effect depth information recorded by the pixels in the special effect image to form a special effect interactive image includes: Determine an occlusion relationship between a pixel point in the first character image and a pixel point in the special effect image according to the character expansion depth information recorded by the pixel point in the first character image and the special effect depth information recorded by the pixel point in the special effect image; Based on the occlusion relationship, the pixels in the first character image and the pixels in the special effect image are merged to form the special effect interaction image.
11. An image processing device, characterized in that: The device comprises: an information acquisition unit, an information expansion unit, and an image generation unit; The information acquisition unit is used to acquire character outline information corresponding to the target character and character depth information corresponding to the character model, wherein the character model is a simplified model pre-built based on the target character; The information expansion unit is used to expand the character depth information corresponding to the character model to obtain the character expanded depth information corresponding to the character model; The image generating unit is used to obtain a first character image corresponding to the character model based on the character outline information and the character expanded depth information.
12. An electronic device, characterized in that: include: Memory, processor; The memory is used to store one or more computer instructions; The processor is used to execute the one or more computer instructions to implement the method according to any one of claims 1-10.
13. A computer-readable storage medium having one or more computer instructions stored thereon, characterized in that: When the instruction is executed by a processor, the method according to any one of claims 1 to 10 is performed.