Art special effect processing method and device, electronic equipment and storage medium
By creating ballistic shape maps and building ballistic renderings and reflection renderings in the movie's post-production, the problem of cumbersome and poor results in the art special effects production process is solved, and efficient, unified and realistic special effects production is achieved.
Patent Information
- Application Number
- CN202411855300.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-16
- Publication Date
- 2025-04-11
AI Technical Summary
In the post-production of the movie, the production process of art special effects is cumbersome and the effect is not good, especially the details of the gun fire effect and reflection effect are insufficient, resulting in a lack of realism in the lens image.
By creating a ballistic shape map for picture data, combining the target lens image, camera file and scene frame model, a ballistic renderings and ballistic reflection renderings are built, and these renderings are superimposed on the target lens image to generate art special effects.
Through the process-based production process, this method significantly saves production time, improves the efficiency of special effects, improves the unity of gunfire special effects and reflective planes, ensures the adaptability between art effects and lens images, and enhances the realism of the picture.
Smart Images

Figure CN119810274A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of special effect processing, and in particular to a method for processing art special effects, a device for processing art special effects, an electronic device and a computer-readable storage medium. Background Art
[0002] In the live-action film project, some special effects shots of gunfights will be involved. During the filming process, the crew usually uses prop model guns to shoot the shots. At the same time, for safety reasons, the prop guns on the shooting scene usually do not have ammunition firing effects. Therefore, in the post-production process, special effects producers are required to add corresponding gunfire effects and gunfire reflection effects according to the screen shots. However, in the production process, it is too dependent on the production experience of special effects producers. Not only are the production effects uneven, but the art special effects also have problems such as few reflection effect details and inaccurate reflection perspective. Summary of the invention
[0003] The embodiments of the present invention provide a method, device, electronic device and computer-readable storage medium for processing art special effects, so as to solve or partially solve the problems of complicated procedures and poor effects in the production process of art special effects.
[0004] The embodiment of the present invention discloses a method for processing artistic special effects, comprising:
[0005] Creating a trajectory shape graph for picture data, wherein the picture data at least includes a target lens picture, a camera file corresponding to the target lens picture, and a scene framework model, the target lens picture includes a firearm, and the trajectory shape graph includes a graphic for the firearm;
[0006] In response to a trajectory effect construction operation for the trajectory shape graph, the trajectory shape graph and the camera file are processed according to the trajectory effect construction operation to obtain a trajectory effect graph;
[0007] In response to the reflection effect construction operation, a ballistic reflection effect diagram for the target lens picture is constructed according to the ballistic effect diagram, the camera file and the scene framework model;
[0008] The ballistic effect diagram and the ballistic reflection effect diagram are superimposed on the target lens image to obtain an art special effect image corresponding to the image data.
[0009] The embodiment of the present invention further discloses a processing device for artistic special effects, including:
[0010] A graphics creation module, used to create a trajectory shape graph for picture data, wherein the picture data at least includes a target lens picture, a camera file corresponding to the target lens picture, and a scene framework model;
[0011] A trajectory effect graph processing module, for responding to a trajectory effect construction operation for the trajectory shape graph, processing the trajectory shape graph and the camera file according to the trajectory effect construction operation to obtain a trajectory effect graph;
[0012] A reflection effect graph processing module, configured to construct a ballistic reflection effect graph for the target lens picture according to the ballistic effect graph, the camera file and the scene framework model in response to a reflection effect construction operation;
[0013] An image superposition module is used to superimpose the ballistic effect image and the ballistic reflection effect image in the target lens image to obtain an art special effect image corresponding to the image data.
[0014] The embodiment of the present invention further discloses an electronic device, comprising a processor, a communication interface, a memory and a communication bus, wherein the processor, the communication interface and the memory communicate with each other via the communication bus;
[0015] The memory is used to store computer programs;
[0016] The processor is used to implement the method described in the embodiment of the present invention when executing the program stored in the memory.
[0017] The embodiment of the present invention further discloses a computer-readable storage medium having instructions stored thereon, which, when executed by one or more processors, enables the processors to execute the method described in the embodiment of the present invention.
[0018] The embodiments of the present invention include the following advantages:
[0019] In an embodiment of the present invention, when adding corresponding art special effects to a corresponding picture, a ballistic shape graph for picture data can be created, wherein the picture data at least includes a target lens picture, a camera file corresponding to the target lens picture, and a scene framework model, wherein the target lens picture includes a firearm, and the ballistic shape graph includes a graphic for the firearm. Then, in response to a ballistic effect construction operation for the ballistic shape graph, the ballistic shape graph and the camera file are processed according to the ballistic effect construction operation to obtain a ballistic effect graph. Then, in response to a reflection effect construction operation, a ballistic reflection effect graph for the target lens picture is constructed according to the ballistic effect graph, the camera file, and the scene framework model. Finally, the ballistic effect graph and the ballistic reflection effect graph are superimposed on the target lens picture to obtain an art special effect picture corresponding to the picture data. Thus, through a streamlined production process, production time is greatly saved, and the production efficiency of special effects is effectively improved. At the same time, by constructing corresponding gunfire reflection materials to simulate corresponding gunfire reflection effects, the unity between gunfire special effects and the reflection effects of the reflection plane is improved, the adaptability between art effects and lens pictures is ensured, and the realism of the pictures is improved. BRIEF DESCRIPTION OF THE DRAWINGS
[0020] Figure 1 is a flowchart of a method for processing artistic special effects provided in an embodiment of the present invention;
[0021] Figure 2 is a schematic diagram of a trajectory shape provided in an embodiment of the present invention;
[0022] Figure 3 is a schematic diagram of a gradient mask provided in an embodiment of the present invention;
[0023] Figure 4 is a schematic diagram of a mask image provided in an embodiment of the present invention;
[0024] Figure 5 is a schematic diagram of a two-dimensional ballistic image provided in an embodiment of the present invention;
[0025] Figure 6 is a schematic diagram of a target image provided in an embodiment of the present invention;
[0026] Figure 7 is a schematic diagram of a three-dimensional trajectory model provided in an embodiment of the present invention;
[0027] Figure 8 It is a schematic diagram of making a trajectory effect diagram provided in an embodiment of the present invention;
[0028] Fig. 9 is a schematic diagram of fuzzy processing of a reflection trajectory diagram provided in an embodiment of the present invention;
[0029] Fig.10is a fuzzy comparison diagram of the ballistic reflection diagram provided in an embodiment of the present invention;
[0030] Fig.11 is a schematic diagram of brightness processing provided in an embodiment of the present invention;
[0031] Fig.12 is a schematic diagram of processing of distortion displacement provided in an embodiment of the present invention;
[0032] Fig.13 is a schematic diagram of a ballistic reflection effect diagram provided in an embodiment of the present invention;
[0033] Fig.14 is a schematic diagram of an artistic special effect provided in an embodiment of the present invention;
[0034] Fig.15 is a structural block diagram of a device for processing artistic special effects provided in an embodiment of the present invention;
[0035] Fig.16 It is a block diagram of an electronic device provided in an embodiment of the present invention. DETAILED DESCRIPTION
[0036] In order to make the above-mentioned objects, features and advantages of the present invention more obvious and easy to understand, the present invention is further described in detail below with reference to the accompanying drawings and specific embodiments.
[0037] As an example, when adding corresponding gunfire effects to the screen, the ballistic perspective depends more on the experience of the production staff. For lenses with relatively large camera perspective, the perspective effect is difficult to grasp. Moreover, for multiple lenses in a scene, it is difficult to ensure uniformity in visual effects, and the overall production process cannot be streamlined, which seriously affects the production efficiency. Moreover, in image production software, the degree of realism for gunfire effects is often less accurate than that of real-shot two-dimensional materials, and if special effects adjustments are required in the subsequent production process, it is necessary to return to the image production software for processing, and the process is repeatedly modified, further affecting the production efficiency. Also, for gunfire effects, when there is a corresponding reflection plane in the scene, the reflection plane can reflect the corresponding gunfire effect, and the production of gunfire reflection effects and the production process of gunfire effects have similar problems.
[0038] In this regard, in the present invention, when adding corresponding art special effects to the corresponding picture, a ballistic shape graph for the picture data can be created, the picture data at least includes a target lens picture, a camera file corresponding to the target lens picture and a scene framework model, the target lens picture contains a firearm, and the ballistic shape graph contains a graphic for the firearm. Then, in response to a ballistic effect construction operation for the ballistic shape graph, the ballistic shape graph and the camera file are processed according to the ballistic effect construction operation to obtain a ballistic effect graph. Then, in response to a reflection effect construction operation, a ballistic reflection effect graph for the target lens picture is constructed according to the ballistic effect graph, the camera file and the scene framework model. Finally, the ballistic effect graph and the ballistic reflection effect graph are superimposed on the target lens picture to obtain an art special effect picture corresponding to the picture data, thereby greatly saving production time and effectively improving the production efficiency of special effects through a streamlined production process. At the same time, by constructing corresponding gunfire reflection materials to simulate corresponding gunfire reflection effects, the unity between gunfire special effects and the reflection effects of the reflection plane is improved, the adaptability between the art effect and the lens picture is ensured, and the realism of the picture is improved.
[0039] Reference Figure 1 , shows a flowchart of a method for processing artistic special effects provided in an embodiment of the present invention, which may specifically include the following steps:
[0040] Step 101, creating a trajectory shape graph for picture data, wherein the picture data at least includes a target lens picture, a camera file corresponding to the target lens picture, and a scene framework model, the target lens picture includes a firearm, and the trajectory shape graph includes a graphic for the firearm;
[0041] Optionally, embodiments of the present invention may be applied to visual effects software (hereinafter referred to as software), and production personnel may add corresponding visual effects to corresponding images in the visual effects software, such as adding corresponding gunfire effects to guns in movie shots, etc. The present invention is not limited to this.
[0042] In an embodiment of the present invention, the production personnel can import corresponding material data into the software. The material data may include target lens pictures, etc. The target lens pictures may be the required pictures taken by the camera. The production personnel can add corresponding art effects to the target lens pictures to enhance the visual experience and realism of the pictures, etc. For example, for lens pictures with firearms, since a firearm model may be used for shooting during the shooting process, there is a lack of corresponding realism. Therefore, the production personnel can add corresponding gunfire special effects to the firearms in the lens pictures to enhance the realism of the lens pictures.
[0043] It should be noted that the material data may also include two-dimensional special effects materials, camera files, and scene framework models, etc. The two-dimensional special effects materials may be special effects materials corresponding to the art special effects that need to be added. For example, when it is necessary to add gunfire special effects, the two-dimensional special effects materials may be two-dimensional gunfire materials, etc. The camera files may be the production content corresponding to the tracking group in the film and television production process, that is, the parameters obtained by tracking the camera according to the pictures taken by the director, such as camera parameters and motion trajectory, etc. The camera parameters may include information such as focal length, aperture, and lens distortion; the scene framework model may be a scene framework model provided by the tracking group during the shooting process, etc., through which the scene form corresponding to the shot scene may be listed, etc., and the present invention does not impose any restrictions on this.
[0044] In the process of producing corresponding art effects, corresponding two-dimensional material images can be created according to the needs of art effects. For example, corresponding two-dimensional material images can be created according to the shape of an object, the movement trajectory of an object, etc. In one example, in the process of producing gunfire effects for a gun in a target lens image, the production staff can create a ballistic shape diagram in the software to represent the bullet's flight trajectory, so as to construct the corresponding ballistic special effects through the ballistic shape diagram. For example, Figure 2 As shown, a schematic diagram of a trajectory shape diagram provided in an embodiment of the present invention is shown. Production personnel can draw the trajectory shape diagram in the software to produce corresponding trajectory special effects.
[0045] Step 102, in response to a trajectory effect construction operation for the trajectory shape graph, the trajectory shape graph and the camera file are processed according to the trajectory effect construction operation to obtain a trajectory effect graph;
[0046] In the embodiment of the present invention, after drawing the corresponding trajectory shape diagram, the production personnel can input the trajectory effect construction operation for the trajectory shape diagram, so as to process the trajectory shape diagram and the camera file according to the trajectory effect construction operation to obtain the corresponding trajectory effect diagram. It should be noted that in the process of constructing the trajectory effect diagram, the correct perspective performance of the trajectory trajectory under the camera perspective can be reversed, so that the movement of the trajectory trajectory is consistent with the camera movement of the real shot picture, further improving the authenticity of the lens picture.
[0047] In some feasible implementations, by responding to a ballistic effect construction operation for a trajectory shape graph, adjustment parameters for the trajectory shape graph can be obtained, the trajectory shape graph can be adjusted according to the adjustment parameters, a three-dimensional ballistic model corresponding to the target model can be obtained, and then the three-dimensional ballistic model can be connected to the camera file to construct a corresponding trajectory effect graph.
[0048] In the process of constructing a three-dimensional ballistic model, the adjustment parameters include at least a gradient mask, a blur parameter and a first transformation parameter. The gradient mask can be used to perform a mask operation on the ballistic shape graph to obtain a corresponding mask image, and then the blur parameter can be used to perform a blur operation on the mask image to obtain a two-dimensional ballistic image. Then, the first transformation parameter is used to perform a three-dimensional construction on the two-dimensional ballistic image to obtain a three-dimensional ballistic model corresponding to the ballistic shape graph. After the corresponding two-dimensional graphic is constructed and the two-dimensional graphic is adjusted to the corresponding two-dimensional ballistic image by adjusting the parameters, the two-dimensional ballistic image is converted into a three-dimensional ballistic model based on the first transformation parameter, which effectively enriches the ballistic effect and enhances the three-dimensional sense of the ballistic effect.
[0049] It should be noted that the gradient mask can be a transition effect from transparent to opaque or from opaque to transparent, and can be used to control the transparency of the image. The transparency of the ballistic shape image can be controlled by the gradient mask; the generated mask image is blurred using the blur parameter. The blur parameter can control the degree and range of blur, making the edge of the image softer, so that after the blur operation, the mask image will become smoother, forming a two-dimensional ballistic image.
[0050] In one example, referring to Figure 3 , shows a schematic diagram of a gradient mask provided in an embodiment of the present invention. The production personnel can create a black-bordered gradient mask, and perform a mask operation on the trajectory shape diagram according to the gradient mask to obtain a gradient mask. Figure 4 Then, the production staff can further input the fuzzy parameters for the mask image, and perform fuzzy operation on the mask image through the fuzzy parameters to obtain the following: Figure 5 The two-dimensional ballistic image shown can be used as the basis for building a three-dimensional model.
[0051] Furthermore, after obtaining the two-dimensional ballistic image, the two-dimensional ballistic image can be converted into a three-dimensional ballistic model. Specifically, the first transformation parameter includes at least the number of replications and the first rotation parameter. In the process of converting the two-dimensional ballistic image into the three-dimensional ballistic model, a basic card object for the two-dimensional ballistic image can be created, and then the two-dimensional ballistic image is adsorbed onto the basic card object to obtain a target image. The target image is then replicated according to the number of replications, and after each replication is completed, the replicated target image is rotated according to the first rotation parameter, and the rotated target images are combined with the original target image to obtain a three-dimensional ballistic model corresponding to the ballistic shape diagram, thereby effectively enriching the ballistic effect and enhancing the three-dimensional sense of the ballistic effect.
[0052] It should be noted that the basic card object can be a rectangle with a corresponding size. The size of the basic card object is close to the size of the two-dimensional ballistic image. In the process of creating the basic card object, the size of the two-dimensional ballistic image can be obtained, and then the corresponding basic card object can be constructed with the size, and then the two-dimensional ballistic image is adsorbed onto the basic card object to obtain the target image. For the target image, the production staff can set the corresponding number of copies and rotation parameters. For example, the number of copies can be 6 times, and the rotation parameter can be 30 degrees. Then, the target image can be copied first, and the image obtained by the first copy can be rotated 30 degrees along the corresponding axis. Then, the target image can be copied for the second time, and the image obtained by the second copy can be rotated 60 degrees along the corresponding axis, and so on, until it is copied 6 times, and then the corresponding three-dimensional ballistic model is constructed based on the obtained images.
[0053] For example, refer to Figure 6 , shows a schematic diagram of a target image provided in an embodiment of the present invention. The rectangular area is the basic card object. After the basic card object is created, the trajectory shape image can be adsorbed on the basic card object to construct the corresponding target image. The target image can be copied and rotated to obtain Figure 7 The three-dimensional ballistic model shown in FIG. 1 effectively enriches the ballistic effect and enhances the three-dimensional sense of the ballistic effect. Figure 6 The basic card object shown contains several rectangles. The number of rectangles is used to adjust the size of the basic card object. For example, a basic card object of size 3*3 can be composed of 9 rectangles. By adjusting the number of rectangles, the size of the basic card object and the trajectory shape diagram can be kept consistent.
[0054] Furthermore, after constructing the three-dimensional ballistic model, it is necessary to connect the three-dimensional ballistic model with the camera file to inversely obtain the correct perspective expression of the ballistic trajectory under the camera's perspective, so that the movement of the ballistic trajectory is consistent with the camera movement of the actual shot, further improving the authenticity of the lens image. Specifically, the corresponding camera parameters and motion trajectory can be extracted from the camera file, and then the synthetic model can be rendered according to the camera parameters and motion trajectory to obtain the ballistic rendering corresponding to the target lens image.
[0055] In one example, referring to Figure 8, shows a schematic diagram of producing a ballistic effect diagram provided in an embodiment of the present invention. The camera file may include motion trajectory information and camera parameters corresponding to the camera during shooting, the motion trajectory information at least includes position information, rotation information and scaling information, and the camera parameters at least include focal length, aperture, sensor size and lens distortion parameters, etc. In the process of connecting the three-dimensional ballistic model with the camera file, a corresponding virtual camera ① can be first created in the three-dimensional space based on the camera motion trajectory and camera parameters, and then the perspective relationship of the three-dimensional ballistic model ② in the same three-dimensional space can be adjusted according to the motion trajectory information and camera parameters, such as adjusting the position of the three-dimensional ballistic model in the three-dimensional space according to the position information, adjusting the rotation of the three-dimensional ballistic model in the three-dimensional space according to the rotation information, and adjusting the scaling ratio of the three-dimensional ballistic model in the three-dimensional space according to the scaling information, so that the perspective relationship of the three-dimensional ballistic model is consistent with the actual shooting picture, thereby improving the authenticity of the lens picture.
[0056] For example, assuming that the camera position in the camera file is (10, 20, 30), the position of the 3D ballistic model should also be set to (10, 20, 30); the camera rotation in the camera file is (30°, 45°, 60°), the rotation of the 3D ballistic model should also be set to (30°, 45°, 60°); assuming that the focal length in the camera file is 50mm and the sensor size is 36mmx24mm, the scaling ratio of the 3D ballistic model should be adjusted according to these parameters; assuming that the focal length in the camera file is 50mm, the focal length of the virtual camera should also be set to 50mm, and the field of view angle is calculated based on the focal length and sensor size, and the field of view angle of the virtual camera is ensured to be consistent with that of the real camera, so that the movement of the 3D ballistic model is consistent with the camera movement of the real shot, thereby improving the authenticity of the lens image.
[0057] Step 103, in response to the reflection effect construction operation, constructing a ballistic reflection effect diagram for the target lens picture according to the ballistic effect diagram, the camera file and the scene framework model;
[0058] After the corresponding trajectory effect diagram is constructed, since the scene displayed in the target lens picture may have a corresponding reflection plane, after the bullet is fired, the corresponding gunfire may have corresponding reflection content on the reflection plane. Therefore, in response to the reflection effect construction operation, a trajectory reflection effect diagram for the target lens picture can be constructed according to the trajectory effect diagram, the camera file and the scene framework model, and the reflection effect corresponding to the reflection plane when the gun is fired can be reflected by the trajectory reflection effect diagram. For example, the reflection plane can be a horizontal plane, a smooth ground, a mirror, etc. in the scene, and the present invention is not limited to this.
[0059] In some feasible implementations, by responding to a plane construction operation on a scene frame model, a reflection plane is created for a target lens picture, and the reflection plane is linked to a three-dimensional ballistic model corresponding to a camera file and a ballistic effect diagram to obtain a reflection ballistic diagram corresponding to the three-dimensional ballistic model. Then, in response to an image adjustment operation on the reflection ballistic diagram, image processing is performed on the reflection ballistic diagram according to the image adjustment operation to obtain a ballistic reflection effect diagram for the target lens picture. After the corresponding reflection plane is constructed, the production staff can further adjust the reflection plane to make the ballistic reflection effect presented by the reflection plane more realistic and match the scene in the lens picture, thereby ensuring consistency between the gunfire effect and the reflection effect.
[0060] It should be noted that the reflection ballistic map can be a mirror image that is mirror-symmetrical to the three-dimensional ballistic model. At the same time, since the reflection plane in the target lens image may have corresponding changes (such as wave patterns on the water surface, ripples corresponding to the ground plane, etc.), the reflection effect of the gunfire effect is not an absolute mirror image. Therefore, after constructing the corresponding reflection ballistic map, it is necessary to further adjust the reflection ballistic map to ensure that it matches the scene in the lens image and ensure the consistency between the gunfire effect and the reflection effect.
[0061] Among them, the image adjustment operation at least includes a blur processing operation, a brightness processing operation and a noise adjustment operation. Then, in response to the blur processing operation for the reflection trajectory map, a first blur parameter corresponding to the blur processing operation can be determined, and the reflection trajectory map can be blurred according to the first blur parameter to obtain an initial blur effect map corresponding to the reflection trajectory map. Then, in response to the brightness processing operation for the initial blur effect map, the corresponding first brightness information can be extracted from the target lens picture, and the initial blur effect map can be brightness adjusted according to the first brightness information to obtain a target blur effect map corresponding to the initial blur effect map. In response to the noise adjustment operation for the reflection trajectory map, a target noise image corresponding to the noise adjustment operation can be determined, and the reflection trajectory map can be distorted and displaced according to the target noise image to obtain a distorted displaced map corresponding to the reflection trajectory map. Then, the target blur effect map and the distorted displaced map can be merged to obtain a ballistic reflection effect map for the target lens picture.
[0062] In a specific implementation, for the fuzzy processing process, the first fuzzy parameter includes at least a number of different fuzzy values, and each fuzzy value can be used to fuzzy the reflection trajectory map to obtain a target fuzzy image corresponding to each fuzzy value, and then the target fuzzy images are superimposed to obtain an initial fuzzy effect image corresponding to the reflection trajectory map. For example, referring to Fig. 9, shows a schematic diagram of blur processing of a reflection trajectory map provided in an embodiment of the present invention. For the reflection trajectory map, multiple blur effects can be added in sequence, and each blur effect increases in proportion. Specifically, the blur value corresponding to the first blur effect can be 30, the blur value corresponding to the second blur effect can be 60, the blur value corresponding to the third blur effect can be 90, the blur value corresponding to the fourth blur effect can be 120, etc. After blurring the reflection trajectory map by the blur value to obtain the corresponding target blur image, the superimposed layer mode can be used to merge the various target blur images to obtain the corresponding initial blur effect map. Fig.10 , shows a fuzzy comparison diagram of the ballistic reflection diagram provided in an embodiment of the present invention, so that the realism of the reflection effect can be enhanced by adding a corresponding fuzzy effect.
[0063] After blurring the reflected ballistics map, the second brightness information corresponding to the initial blurred effect map can be further extracted, and the initial blurred effect map can be superimposed on the target lens picture, and the first brightness information corresponding to the pixel covered by the reflected ballistics map in the target lens picture can be extracted. Then, the first brightness information corresponding to the same pixel point and the second brightness information can be positively superimposed to obtain a target blurred effect map with the texture information of the target lens picture. Therefore, through brightness processing, the ballistic effect can be changed in real time according to the scene changes in the lens picture when movement occurs, ensuring the consistency between the gunfire effect and the reflection effect on the reflection plane in the lens picture.
[0064] In a specific implementation, the initial blur effect image and the target lens image can be superimposed in layer mode, and the brightness information of the initial blur effect image can be multiplied with the brightness information of the target lens image by means of positive overlay, so that when the ballistic effect moves, the ballistic effect can change in real time with the scene changes in the lens image, ensuring the consistency between the reflection plane of the gunfire effect and the reflection effect in the lens image. For example, refer to Fig.11, a schematic diagram of brightness processing provided in an embodiment of the present invention is shown. For the initial blur effect image (right image), the initial blur effect image can be superimposed on the target lens picture (left image) by using a positive film overlay method, and the "white" brightness part in the initial blur effect image can be covered on the target lens picture. By collecting the first brightness information corresponding to each covered first pixel in the target lens picture, and collecting the second brightness information corresponding to each second pixel in the "white" brightness part, and then for the pixel points at the same position, the first brightness information and the second brightness information are calculated by using a positive film overlay method, so as to obtain a reflection interactive light image with texture information, that is, a target blur effect image, so as to realize mapping the texture on the reflection plane in the target lens picture to the trajectory, so that the trajectory effect can change accordingly in real time with the scene changes in the lens picture, and ensure the consistency between the gunfire effect and the reflection effect on the reflection plane in the lens picture.
[0065] It should be noted that, in the above-mentioned processing of the initial effect map, the special effects processing of a single-frame image is taken as an example for exemplary explanation. In practice, the picture data may include multiple consecutive video frames. For the target video frames where art special effects need to be added, the production personnel can set different positions for the initial blur effect map according to actual needs. For example, for the ballistic effect, its dynamic change can be a depth change, that is, small at a distance and large at a near distance. When the production personnel add corresponding gunfire effects in video frames ①, ② and ③, the z-axis parameters corresponding to the initial blur effect map in video frames ①, ② and ③ can be set, so that the initial blur effect map is located at different positions in video frames ①, ② and ③. Based on different positions, the pixel points in the video frames that need to collect brightness information also change accordingly. Therefore, based on the continuous change processing process of multiple frames, the ballistic reflection effect can be updated in real time as the content in the lens picture changes, ensuring the consistency between the reflection plane of the gunfire effect and the reflection effect in the lens picture.
[0066] Furthermore, after obtaining the reflection trajectory map, the reflection trajectory map can be subjected to noise adjustment. Specifically, the noise channel corresponding to the target noise image can be determined in response to the noise adjustment operation on the reflection trajectory map, and the color channel information corresponding to the noise channel can be extracted from the target noise image. Then, in response to the distortion displacement operation on the reflection trajectory map, the distortion coefficient corresponding to the distortion displacement operation can be determined, and the color channel information can be copied to the reflection trajectory map according to the distortion coefficient to obtain the distortion displacement map corresponding to the reflection trajectory map. Optionally, the production staff can first create an initial target noise image and adjust the noise ratio of the initial target noise image in the x-axis and y-axis directions to obtain the target noise image.
[0067] It should be noted that the target noise image can be an image containing corresponding noise information created by the production staff, so that the corresponding color channel information is extracted from the corresponding color channel in the target noise image based on the noise information, and then the extracted color channel information is assigned to the reflection trajectory map. For example, an additional layer can be created for the reflection trajectory map, and the red channel information and green channel information in the target noise image are copied to the created layer respectively according to the distortion coefficient, and then the layer is superimposed with the color channel information in the reflection trajectory map, so as to realize the noise processing and distortion displacement of the reflection trajectory map, and obtain the corresponding distortion displacement map, and then based on the noise processing and distortion displacement, the reflection trajectory can better simulate the texture effect of the reflection plane. For example, referring to Fig.12 , showing a comparative schematic diagram of the distortion displacement provided in an embodiment of the present invention,
[0068] Furthermore, after obtaining the distortion displacement map, in response to an adjustment operation on the distortion displacement map, an adjustment parameter corresponding to the adjustment operation can be determined, and the distortion displacement map can be image processed according to the adjustment parameter to obtain a target distortion displacement map, and the target blur effect map can be merged with the target distortion displacement map to obtain a ballistic reflection effect map for the target lens picture. Wherein, the adjustment parameter includes at least a second blur parameter and a defocus parameter, and the distortion displacement map can be image processed according to the second blur parameter and the defocus parameter to obtain a target distortion displacement map, so that by adding blur and defocus effects, the blur and defocus of the scene displayed in the target lens picture can be matched, thereby improving the matching between the ballistic effect and the target lens picture, ensuring the adaptability between the artistic effect and the lens picture, and improving the realism of the picture. For example, referring to Fig.13 , shows a schematic diagram of a ballistic reflection effect diagram provided in an embodiment of the present invention, and the framed position is the reflection effect corresponding to the ballistic reflection effect diagram in the reflection plane.
[0069] Step 104, superimposing the ballistic effect diagram and the ballistic reflection effect diagram on the target lens image to obtain an art special effect image corresponding to the image data.
[0070] In the embodiment of the present invention, after constructing the corresponding ballistic effect graph and the ballistic reflection effect graph corresponding to the ballistic effect graph, the ballistic effect graph and the ballistic reflection effect graph can be combined. Figure 1 And superimposed on the target lens screen, thereby adding the corresponding gunfire effect and the gunfire reflection effect corresponding to the gunfire effect to the target lens screen, and then through the streamlined production process, greatly saving production time, effectively improving the production efficiency of special effects, and at the same time, by constructing corresponding gunfire reflection materials to simulate the corresponding gunfire reflection effect, the unity between the gunfire special effect and the reflection effect of the reflection plane is improved, ensuring the adaptability between the art effect and the lens screen, and enhancing the realism of the picture.
[0071] For example, refer to Fig.14 , shows a schematic diagram of the art special effects provided in an embodiment of the present invention. After making the corresponding ballistic effect graph and ballistic reflection effect graph, the ballistic effect graph and the ballistic reflection effect graph are superimposed on the target lens screen using the layer mode to obtain Fig.14 The art effects shown, Fig.14 The "white" trace in the middle represents the gunfire special effects corresponding to the bullets, and the reflection in the horizontal plane represents the reflection effects corresponding to the gunfire special effects in the horizontal plane. Therefore, by constructing the corresponding gunfire reflection material to simulate the corresponding gunfire reflection effect, the unity between the gunfire special effects and the reflection effects of the reflection plane is improved, ensuring the adaptability between the artistic effects and the lens images, and improving the realism of the images.
[0072] In addition, it should be noted that, based on the process of mapping the brightness information of the target lens image and the initial blur effect map in the aforementioned embodiment, the reflection effect in the horizontal plane can be updated in real time during the change of the trajectory to simulate the real reflection state and improve the authenticity of the lens image.
[0073] It should be noted that the embodiments of the present invention include but are not limited to the above examples. It is understandable that those skilled in the art can also make settings according to actual needs under the guidance of the ideas of the embodiments of the present invention, and the present invention is not limited to this.
[0074] In an embodiment of the present invention, when adding corresponding art special effects to a corresponding picture, a ballistic shape graph for picture data can be created, wherein the picture data at least includes a target lens picture, a camera file corresponding to the target lens picture, and a scene framework model, wherein the target lens picture includes a firearm, and the ballistic shape graph includes a graphic for the firearm. Then, in response to a ballistic effect construction operation for the ballistic shape graph, the ballistic shape graph and the camera file are processed according to the ballistic effect construction operation to obtain a ballistic effect graph. Then, in response to a reflection effect construction operation, a ballistic reflection effect graph for the target lens picture is constructed according to the ballistic effect graph, the camera file, and the scene framework model. Finally, the ballistic effect graph and the ballistic reflection effect graph are superimposed on the target lens picture to obtain an art special effect picture corresponding to the picture data. Thus, through a streamlined production process, production time is greatly saved, and the production efficiency of special effects is effectively improved. At the same time, by constructing corresponding gunfire reflection materials to simulate corresponding gunfire reflection effects, the unity between gunfire special effects and the reflection effects of the reflection plane is improved, the adaptability between art effects and lens pictures is ensured, and the realism of the pictures is improved.
[0075] It should be noted that, for the sake of simplicity, the method embodiments are described as a series of action combinations, but those skilled in the art should be aware that the embodiments of the present invention are not limited by the order of the actions described, because according to the embodiments of the present invention, certain steps can be performed in other orders or simultaneously. Secondly, those skilled in the art should also be aware that the embodiments described in the specification are all preferred embodiments, and the actions involved are not necessarily required by the embodiments of the present invention.
[0076] Reference Fig.15 , shows a structural block diagram of a processing device for artistic special effects provided in an embodiment of the present invention, which may specifically include the following modules:
[0077] A graphics creation module 1501 is used to create a trajectory shape graph for picture data, wherein the picture data at least includes a target lens picture, a camera file corresponding to the target lens picture, and a scene framework model, wherein the target lens picture includes a firearm, and the trajectory shape graph includes a graphic for the firearm;
[0078] A trajectory effect graph processing module 1502 is used for, in response to a trajectory effect construction operation for the trajectory shape graph, processing the trajectory shape graph and the camera file according to the trajectory effect construction operation to obtain a trajectory effect graph;
[0079] A reflection effect graph processing module 1503 is used to construct a ballistic reflection effect graph for the target lens picture according to the ballistic effect graph, the camera file and the scene framework model in response to a reflection effect construction operation;
[0080] The image superposition module 1504 is used to superimpose the trajectory effect image and the trajectory reflection effect image on the target lens image to obtain an art special effect image corresponding to the image data.
[0081] In some feasible implementations, the trajectory effect graph processing module 1502 is specifically used for:
[0082] In response to a trajectory effect construction operation for the trajectory shape graph, an adjustment parameter for the trajectory shape graph is obtained, and the trajectory shape graph is adjusted according to the adjustment parameter to obtain a three-dimensional trajectory model corresponding to the target model;
[0083] The three-dimensional trajectory model is connected to the camera file to construct a corresponding trajectory effect diagram.
[0084] In some feasible implementations, the adjustment parameters at least include a gradient mask, a blur parameter, and a first transformation parameter, and the trajectory effect graph processing module 1502 is specifically used for:
[0085] Using the gradient mask to perform mask operation on the trajectory shape image to obtain a corresponding mask image;
[0086] Using the fuzzy parameters to perform fuzzy operation on the mask image to obtain a two-dimensional ballistic image;
[0087] The first transformation parameter is used to perform three-dimensional construction on the two-dimensional trajectory image to obtain a three-dimensional trajectory model corresponding to the trajectory shape diagram.
[0088] In some feasible implementations, the first transformation parameter at least includes the number of replications and the first rotation parameter, and the trajectory effect graph processing module 1502 is specifically used for:
[0089] Creating a base card object for the two-dimensional ballistic image;
[0090] Adsorbing the two-dimensional ballistic image onto the basic card object to obtain a target image;
[0091] The target image is copied according to the number of copies, and after each copy is completed, the copied target image is rotated according to the first rotation parameter, and each rotated target image is combined with the original target image to obtain a three-dimensional trajectory model corresponding to the trajectory shape diagram.
[0092] In some feasible implementations, the camera file at least includes camera parameters and motion trajectories obtained by motion tracking the camera that shoots the target lens image, and the trajectory effect graph processing module 1502 is specifically used for:
[0093] The synthetic model is rendered according to the camera parameters and the motion trajectory to obtain a trajectory effect diagram corresponding to the target lens image.
[0094] In some feasible implementations, the reflection effect image processing module 1503 is specifically used to:
[0095] In response to the plane construction operation for the scene framework model, a reflection plane for the target lens picture is created, and the reflection plane is linked with the camera file and the three-dimensional ballistic model corresponding to the ballistic effect diagram to obtain a reflection ballistic diagram corresponding to the three-dimensional ballistic model;
[0096] In response to an image adjustment operation on the reflection trajectory diagram, image processing is performed on the reflection trajectory diagram according to the image adjustment operation to obtain a trajectory reflection effect diagram for the target lens picture.
[0097] In some feasible implementations, the image adjustment operation at least includes a blur processing operation, a brightness processing operation, and a noise adjustment operation, and the reflection effect image processing module 1503 is specifically used to:
[0098] In response to a fuzzy processing operation on the reflection trajectory diagram, a first fuzzy parameter corresponding to the fuzzy processing operation is determined, and the reflection trajectory diagram is fuzzy processed according to the first fuzzy parameter to obtain an initial fuzzy effect diagram corresponding to the reflection trajectory diagram;
[0099] In response to the brightness processing operation on the initial blur effect image, extracting corresponding first brightness information from the target lens picture, and adjusting the brightness of the initial blur effect image according to the first brightness information to obtain a target blur effect image corresponding to the initial blur effect image;
[0100] In response to a noise adjustment operation on the reflection trajectory diagram, a target noise image corresponding to the noise adjustment operation is determined, and the reflection trajectory diagram is distorted and permuted according to the target noise image to obtain a distorted permuted image corresponding to the reflection trajectory diagram;
[0101] The target blur effect map is combined with the distortion displacement map to obtain a ballistic reflection effect map for the target lens image.
[0102] In some feasible implementations, the first fuzzy parameter includes at least a plurality of different fuzzy values, and the reflection effect image processing module 1503 is specifically used for:
[0103] Using each of the fuzzy values to perform fuzzy processing on the reflection trajectory diagram respectively, to obtain a fuzzy image of the target corresponding to each of the fuzzy values;
[0104] The blurred images of each target are superimposed to obtain an initial blurred effect image corresponding to the reflection trajectory image.
[0105] In some feasible implementations, the reflection effect image processing module 1503 is specifically used to:
[0106] Extracting second brightness information corresponding to the initial blur effect image;
[0107] The first brightness information is multiplied by the second brightness information to obtain a target blur effect image corresponding to the initial blur effect image.
[0108] In some feasible implementations, the reflection effect image processing module 1503 is specifically used to:
[0109] In response to the noise adjustment operation on the reflection trajectory image, determining a noise channel corresponding to the target noise image, and extracting color channel information corresponding to the noise channel from the target noise image;
[0110] In response to a distortion permutation operation on the reflection trajectory map, a distortion coefficient corresponding to the distortion permutation operation is determined, and the color channel information is copied to the reflection trajectory map according to the distortion coefficient to obtain a distortion permutation map corresponding to the reflection trajectory map.
[0111] In some feasible implementations, the reflection effect image processing module 1503 is specifically used to:
[0112] In response to an adjustment operation on the distortion displacement map, determining an adjustment parameter corresponding to the adjustment operation, and performing image processing on the distortion displacement map according to the adjustment parameter to obtain a target distortion displacement map;
[0113] The target blur effect map and the target distortion displacement map are combined to obtain a ballistic reflection effect map for the target lens image.
[0114] In some feasible implementations, the adjustment parameters include at least a second blur parameter and a defocus parameter, and the reflection effect image processing module 1503 is specifically used for:
[0115] The distortion displacement map is subjected to image processing according to the second blur parameter and the defocus parameter to obtain a target distortion displacement map.
[0116] As for the device embodiment, since it is basically similar to the method embodiment, the description is relatively simple, and the relevant parts can be referred to the partial description of the method embodiment.
[0117] In addition, an embodiment of the present invention further provides an electronic device, including: a processor, a memory, and a computer program stored in the memory and executable on the processor. When the computer program is executed by the processor, each process of the above-mentioned artistic special effects processing method embodiment is implemented, and the same technical effect can be achieved. To avoid repetition, it will not be described here.
[0118] The embodiment of the present invention further provides a computer-readable storage medium, on which a computer program is stored, and when the computer program is executed by a processor, each process of the above-mentioned method for processing art special effects is implemented, and the same technical effect can be achieved. To avoid repetition, it is not repeated here. The computer-readable storage medium is, for example, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk.
[0119] Fig.16 A schematic diagram of the hardware structure of an electronic device for implementing various embodiments of the present invention.
[0120] The electronic device 1600 includes but is not limited to: a radio frequency unit 1601, a network module 1602, an audio output unit 1603, an input unit 1604, a sensor 1605, a display unit 1606, a user input unit 1607, an interface unit 1608, a memory 1609, a processor 1610, and a power supply 1611. Those skilled in the art will appreciate that the electronic device structure involved in the embodiments of the present invention does not constitute a limitation on the electronic device, and the electronic device may include more or fewer components than shown in the figure, or combine certain components, or arrange components differently. In the embodiments of the present invention, the electronic device includes but is not limited to a mobile phone, a tablet computer, a laptop computer, a PDA, a vehicle-mounted terminal, a wearable device, and a pedometer.
[0121] It should be understood that in the embodiment of the present invention, the radio frequency unit 1601 can be used for receiving and sending signals during information transmission or calls. Specifically, after receiving downlink data from the base station, it is sent to the processor 1610 for processing; in addition, the uplink data is sent to the base station. Generally, the radio frequency unit 1601 includes but is not limited to an antenna, at least one amplifier, a transceiver, a coupler, a low noise amplifier, a duplexer, etc. In addition, the radio frequency unit 1601 can also communicate with the network and other devices through a wireless communication system.
[0122] The electronic device provides users with wireless broadband Internet access through the network module 1602, such as helping users to send and receive emails, browse web pages, and access streaming media.
[0123] The audio output unit 1603 can convert the audio data received by the RF unit 1601 or the network module 1602 or stored in the memory 1609 into an audio signal and output it as sound. Moreover, the audio output unit 1603 can also provide audio output related to a specific function performed by the electronic device 1600 (for example, a call signal reception sound, a message reception sound, etc.). The audio output unit 1603 includes a speaker, a buzzer, a receiver, etc.
[0124] The input unit 1604 is used to receive audio or video signals. The input unit 1604 may include a graphics processor (GPU) 16041 and a microphone 16042, and the graphics processor 16041 processes the image data of a static picture or video obtained by an image capture device (such as a camera) in a video capture mode or an image capture mode. The processed image frame can be displayed on the display unit 1606. The image frame processed by the graphics processor 16041 can be stored in the memory 1609 (or other storage medium) or sent via the radio frequency unit 1601 or the network module 1602. The microphone 16042 can receive sound and can process such sound into audio data. The processed audio data can be converted into a format output that can be sent to a mobile communication base station via the radio frequency unit 1601 in the case of a telephone call mode.
[0125] The electronic device 1600 also includes at least one sensor 1605, such as a light sensor, a motion sensor, and other sensors. Specifically, the light sensor includes an ambient light sensor and a proximity sensor, wherein the ambient light sensor can adjust the brightness of the display panel 16061 according to the brightness of the ambient light, and the proximity sensor can turn off the display panel 16061 and / or the backlight when the electronic device 1600 is moved to the ear. As a type of motion sensor, the accelerometer sensor can detect the magnitude of acceleration in each direction (generally three axes), and can detect the magnitude and direction of gravity when stationary, which can be used to identify the posture of the electronic device (such as horizontal and vertical screen switching, related games, magnetometer posture calibration), vibration recognition related functions (such as pedometer, tapping), etc.; the sensor 1605 can also include a fingerprint sensor, a pressure sensor, an iris sensor, a molecular sensor, a gyroscope, a barometer, a hygrometer, a thermometer, an infrared sensor, etc., which will not be repeated here.
[0126] The display unit 1606 is used to display information input by the user or information provided to the user. The display unit 1606 may include a display panel 16061, which may be configured in the form of a liquid crystal display (LCD), an organic light-emitting diode (OLED), or the like.
[0127] The user input unit 1607 can be used to receive input digital or character information, and to generate key signal input related to user settings and function control of the electronic device. Specifically, the user input unit 1607 includes a touch panel 16071 and other input devices 16072. The touch panel 16071, also known as a touch screen, can collect user touch operations on or near it (such as operations performed by users using fingers, styluses, or any other suitable objects or accessories on or near the touch panel 16071). The touch panel 16071 may include two parts: a touch detection device and a touch controller. Among them, the touch detection device detects the user's touch orientation, detects the signal brought by the touch operation, and transmits the signal to the touch controller; the touch controller receives the touch information from the touch detection device, converts it into contact point coordinates, and then sends it to the processor 1610, receives the command sent by the processor 1610 and executes it. In addition, the touch panel 16071 can be implemented in various types such as resistive, capacitive, infrared, and surface acoustic waves. In addition to the touch panel 16071, the user input unit 1607 may also include other input devices 16072. Specifically, other input devices 16072 may include but are not limited to physical keyboards, function keys (such as volume control keys, switch keys, etc.), trackballs, mice, and joysticks, which will not be repeated here.
[0128] Further, the touch panel 16071 may be covered on the display panel 16061. When the touch panel 16071 detects a touch operation on or near it, it is transmitted to the processor 1610 to determine the type of the touch event, and then the processor 1610 provides a corresponding visual output on the display panel 16061 according to the type of the touch event. It can be understood that in one embodiment, the touch panel 16071 and the display panel 16061 are used as two independent components to implement the input and output functions of the electronic device, but in some embodiments, the touch panel 16071 and the display panel 16061 can be integrated to implement the input and output functions of the electronic device, which is not limited here.
[0129] The interface unit 1608 is an interface for connecting an external device to the electronic device 1600. For example, the external device may include a wired or wireless headset port, an external power supply (or battery charger) port, a wired or wireless data port, a memory card port, a port for connecting a device with an identification module, an audio input / output (I / O) port, a video I / O port, a headphone port, etc. The interface unit 1608 may be used to receive input (e.g., data information, power, etc.) from an external device and transmit the received input to one or more elements within the electronic device 1600 or may be used to transmit data between the electronic device 1600 and an external device.
[0130] The memory 1609 can be used to store software programs and various data. The memory 1609 can mainly include a program storage area and a data storage area, wherein the program storage area can store an operating system, an application required for at least one function (such as a sound playback function, an image playback function, etc.), etc.; the data storage area can store data created according to the use of the mobile phone (such as audio data, a phone book, etc.), etc. In addition, the memory 1609 can include a high-speed random access memory, and can also include a non-volatile memory, such as at least one disk storage device, a flash memory device, or other volatile solid-state storage devices.
[0131] The processor 1610 is the control center of the electronic device. It uses various interfaces and lines to connect various parts of the entire electronic device. By running or executing software programs and / or modules stored in the memory 1609 and calling data stored in the memory 1609, it performs various functions of the electronic device and processes data, thereby monitoring the electronic device as a whole. The processor 1610 may include one or more processing units; preferably, the processor 1610 may integrate an application processor and a modem processor, wherein the application processor mainly processes the operating system, user interface, and application programs, and the modem processor mainly processes wireless communications. It is understandable that the above-mentioned modem processor may not be integrated into the processor 1610.
[0132] The electronic device 1600 may also include a power supply 1611 (such as a battery) for supplying power to each component. Preferably, the power supply 1611 may be logically connected to the processor 1610 via a power management system, thereby implementing functions such as managing charging, discharging, and power consumption management through the power management system.
[0133] In addition, the electronic device 1600 includes some functional modules not shown, which will not be described in detail here.
[0134] It should be noted that, in this article, the terms "include", "comprises" or any other variations thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, an element defined by the sentence "comprises a ..." does not exclude the existence of other identical elements in the process, method, article or device including the element.
[0135] Through the description of the above implementation methods, those skilled in the art can clearly understand that the above-mentioned embodiment methods can be implemented by means of software plus a necessary general hardware platform, and of course by hardware, but in many cases the former is a better implementation method. Based on such an understanding, the technical solution of the present invention, or the part that contributes to the prior art, can be embodied in the form of a software product, which is stored in a storage medium (such as ROM / RAM, a magnetic disk, or an optical disk), and includes a number of instructions for enabling a terminal (which can be a mobile phone, a computer, a server, an air conditioner, or a network device, etc.) to execute the methods described in each embodiment of the present invention.
[0136] The embodiments of the present invention are described above in conjunction with the accompanying drawings, but the present invention is not limited to the above-mentioned specific implementation modes, which are merely illustrative rather than restrictive. Under the guidance of the present invention, ordinary technicians in this field can also make many forms without departing from the scope of protection of the present invention and the claims, all of which are within the protection of the present invention.
[0137] Those of ordinary skill in the art will appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed in the embodiments of the present invention can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of the present invention.
[0138] Those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working processes of the systems, devices and units described above can refer to the corresponding processes in the aforementioned method embodiments and will not be repeated here.
[0139] In the embodiments provided in the present application, it should be understood that the disclosed devices and methods can be implemented in other ways. For example, the device embodiments described above are only schematic. For example, the division of the units is only a logical function division. There may be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of devices or units, which can be electrical, mechanical or other forms.
[0140] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0141] In addition, each functional unit in each embodiment of the present invention may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit.
[0142] If the functions are implemented in the form of software functional units and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention, or the part that contributes to the prior art, or the part of the technical solution, can be embodied in the form of a software product. The computer software product is stored in a storage medium, including several instructions for a computer device (which can be a personal computer, server, or network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present invention. The aforementioned storage medium includes: various media that can store program codes, such as USB flash drives, mobile hard disks, ROM, RAM, magnetic disks, or optical disks.
[0143] The above is only a specific embodiment of the present invention, but the protection scope of the present invention is not limited thereto. Any person skilled in the art can easily think of changes or substitutions within the technical scope disclosed by the present invention, which should be included in the protection scope of the present invention. Therefore, the protection scope of the present invention should be based on the protection scope of the claims.
Claims
1. A method for processing artistic special effects, characterized in that: include: Creating a trajectory shape graph for picture data, wherein the picture data at least includes a target lens picture, a camera file corresponding to the target lens picture, and a scene framework model, the target lens picture includes a firearm, and the trajectory shape graph includes a graphic for the firearm; In response to a trajectory effect construction operation for the trajectory shape graph, the trajectory shape graph and the camera file are processed according to the trajectory effect construction operation to obtain a trajectory effect graph; In response to the reflection effect construction operation, a ballistic reflection effect diagram for the target lens picture is constructed according to the ballistic effect diagram, the camera file and the scene framework model; The ballistic effect diagram and the ballistic reflection effect diagram are superimposed on the target lens image to obtain an art special effect image corresponding to the image data.
2. The method according to claim 1, characterized in that In response to the trajectory effect construction operation for the trajectory shape graph, the trajectory shape graph and the camera file are processed according to the trajectory effect construction operation to obtain a trajectory effect graph, including: Obtaining adjustment parameters for the trajectory shape diagram; Adjusting the trajectory shape diagram according to the adjustment parameters to obtain a three-dimensional trajectory model corresponding to the target model; The three-dimensional trajectory model is connected to the camera file to construct a corresponding trajectory effect diagram.
3. The method according to claim 2, characterized in that The adjustment parameters at least include a gradient mask, a blur parameter, and a first transformation parameter, and the step of adjusting the trajectory shape graph according to the adjustment parameters to obtain a three-dimensional trajectory model corresponding to the target model includes: Using the gradient mask to perform mask operation on the trajectory shape image to obtain a corresponding mask image; Using the fuzzy parameters to perform fuzzy operation on the mask image to obtain a two-dimensional ballistic image; The first transformation parameter is used to perform three-dimensional construction on the two-dimensional trajectory image to obtain a three-dimensional trajectory model corresponding to the trajectory shape diagram.
4. The method according to claim 3, characterized in that The first transformation parameters at least include the number of replications and the first rotation parameter, and the step of using the first transformation parameters to construct the two-dimensional trajectory image in three dimensions to obtain a three-dimensional model corresponding to the trajectory shape diagram includes: Creating a base card object for the two-dimensional ballistic image; Adsorbing the two-dimensional ballistic image onto the basic card object to obtain a target image; The target image is copied according to the number of copies, and after each copy is completed, the copied target image is rotated according to the first rotation parameter, and each rotated target image is combined with the original target image to obtain a three-dimensional trajectory model corresponding to the trajectory shape diagram.
5. The method according to claim 2, 3 or 4, characterized in that: The camera file at least includes camera parameters and motion trajectory obtained by motion tracking of a camera shooting the target lens image, and the three-dimensional trajectory model is connected with the camera file to construct a corresponding trajectory effect diagram, including: The synthetic model is rendered according to the camera parameters and the motion trajectory to obtain a trajectory effect diagram corresponding to the target lens image.
6. The method according to claim 3 or 4, characterized in that: In response to the reflection effect construction operation, the ballistic reflection effect diagram for the target lens picture is constructed according to the ballistic effect diagram, the camera file and the scene framework model, including: In response to the plane construction operation for the scene framework model, a reflection plane for the target lens picture is created, and the reflection plane is linked with the camera file and the three-dimensional ballistic model corresponding to the ballistic effect diagram to obtain a reflection ballistic diagram corresponding to the three-dimensional ballistic model; In response to an image adjustment operation on the reflection trajectory diagram, image processing is performed on the reflection trajectory diagram according to the image adjustment operation to obtain a trajectory reflection effect diagram for the target lens picture.
7. The method according to claim 6, characterized in that The image adjustment operation at least includes a blur processing operation, a brightness processing operation and a noise adjustment operation. In response to the image adjustment operation on the reflection trajectory diagram, image processing is performed on the reflection trajectory diagram according to the image adjustment operation to obtain a trajectory reflection effect diagram for the target lens picture, including: In response to a fuzzy processing operation on the reflection trajectory diagram, a first fuzzy parameter corresponding to the fuzzy processing operation is determined, and the reflection trajectory diagram is fuzzy processed according to the first fuzzy parameter to obtain an initial fuzzy effect diagram corresponding to the reflection trajectory diagram; In response to the brightness processing operation on the initial blur effect image, extracting corresponding first brightness information from the target lens picture, and adjusting the brightness of the initial blur effect image according to the first brightness information to obtain a target blur effect image corresponding to the initial blur effect image; In response to a noise adjustment operation on the reflection trajectory diagram, a target noise image corresponding to the noise adjustment operation is determined, and the reflection trajectory diagram is distorted and permuted according to the target noise image to obtain a distorted permuted image corresponding to the reflection trajectory diagram; The target blur effect map is combined with the distortion displacement map to obtain a ballistic reflection effect map for the target lens image.
8. The method according to claim 7, characterized in that The first fuzzy parameter includes at least a plurality of different fuzzy values, and the fuzzy processing is performed on the reflection trajectory diagram according to the first fuzzy parameter to obtain an initial fuzzy effect diagram corresponding to the reflection trajectory diagram, including: Using each of the fuzzy values to perform fuzzy processing on the reflection trajectory diagram respectively, to obtain a fuzzy image of the target corresponding to each of the fuzzy values; The blurred images of each target are superimposed to obtain an initial blurred effect image corresponding to the reflection trajectory image.
9. The method according to claim 7 or 8, characterized in that: The step of adjusting the brightness of the initial blurred effect image according to the first brightness information to obtain a target blurred effect image corresponding to the initial blurred effect image includes: Extracting second brightness information corresponding to the initial blur effect image; The first brightness information is multiplied by the second brightness information to obtain a target blur effect image corresponding to the initial blur effect image.
10. The method according to claim 7, characterized in that In response to the noise adjustment operation on the reflection trajectory diagram, determining a target noise image corresponding to the noise adjustment operation, and distorting and permuting the reflection trajectory diagram according to the target noise image to obtain a distorted permuted image corresponding to the reflection trajectory diagram, including: In response to the noise adjustment operation on the reflection trajectory image, determining a noise channel corresponding to the target noise image, and extracting color channel information corresponding to the noise channel from the target noise image; In response to a distortion permutation operation on the reflection trajectory map, a distortion coefficient corresponding to the distortion permutation operation is determined, and the color channel information is copied to the reflection trajectory map according to the distortion coefficient to obtain a distortion permutation map corresponding to the reflection trajectory map.
11. The method according to claim 7 or 10, characterized in that: The step of merging the target blur effect map with the distortion displacement map to obtain a ballistic reflection effect map for the target lens image includes: In response to an adjustment operation on the distortion displacement map, determining an adjustment parameter corresponding to the adjustment operation, and performing image processing on the distortion displacement map according to the adjustment parameter to obtain a target distortion displacement map; The target blur effect map and the target distortion displacement map are combined to obtain a ballistic reflection effect map for the target lens image.
12. The method according to claim 11, characterized in that The adjustment parameters at least include a second blur parameter and a defocus parameter, and performing image processing on the distortion displacement map according to the adjustment parameters to obtain a target distortion displacement map includes: The distortion displacement map is subjected to image processing according to the second blur parameter and the defocus parameter to obtain a target distortion displacement map.
13. A processing device for artistic special effects, characterized in that: include: A graphics creation module, used to create a trajectory shape graph for picture data, wherein the picture data at least includes a target lens picture, a camera file corresponding to the target lens picture, and a scene framework model, the target lens picture includes a firearm, and the trajectory shape graph includes a graphic for the firearm; A trajectory effect graph processing module, for responding to a trajectory effect construction operation for the trajectory shape graph, processing the trajectory shape graph and the camera file according to the trajectory effect construction operation to obtain a trajectory effect graph; A reflection effect graph processing module, configured to construct a ballistic reflection effect graph for the target lens picture according to the ballistic effect graph, the camera file and the scene framework model in response to a reflection effect construction operation; An image superposition module is used to superimpose the ballistic effect image and the ballistic reflection effect image in the target lens image to obtain an art special effect image corresponding to the image data.
14. An electronic device, characterized in that: It includes a processor, a communication interface, a memory and a communication bus, wherein the processor, the communication interface and the memory communicate with each other through the communication bus; The memory is used to store computer programs; The processor is used to implement the method according to any one of claims 1 to 12 when executing the program stored in the memory.
15. A computer-readable storage medium having instructions stored thereon, which, when executed by one or more processors, cause the processors to perform the method according to any one of claims 1 to 12.