Special effects display method, device, equipment and medium
The method and device enhance terminal interactions by capturing and processing video images to overlay and combine special effects based on user movements, addressing the lack of richness and interest in current special effects.
Patent Information
- Application Number
- JP2023547261
- Authority / Receiving Office
- JP · JP
- Patent Type
- Patents
- Current Assignee / Owner
- Priority Date
- 2021-02-04
- Filing Date
- 2022-01-29
- Publication Date
- 2024-12-23
- Estimated Expiration
- 2042-01-29
AI Technical Summary
Current special effects in terminal interactions lack richness and interest, failing to meet user needs.
A method and device that captures video images, determines the position of recognition objects, overlays trajectory recording images with preset special effect materials, and converts these into target special effect images, which are combined and displayed to enhance user interaction.
Enhances the richness and interest of special effects displays by generating and displaying special effects based on user movements, improving user interaction experience.
Smart Images

Figure 0007604669000001 
Figure 0007604669000002 
Figure 0007604669000003
Abstract
Description
[Technical field]
[0001] [CROSS REFERENCE TO RELATED APPLICATIONS] This application claims priority from a Chinese patent application filed on February 4, 2021, bearing application number 202110157069.5 and entitled "Special Effects Display Method, Apparatus, Equipment and Medium," the entire contents of which are incorporated herein by reference.
[0002] The present disclosure relates to the field of Internet technology, and in particular to a special effect display method, device, apparatus and medium. [Background technology]
[0003] With the continuous development of smart terminals and Internet technology, the interactions between terminals and users become more and more diverse.
[0004] Although the terminal can provide users with various exhibition special effects to attract users, the current special effects lack richness and interest and cannot meet the special effect needs of users. Summary of the Invention [Problem to be solved by the invention]
[0005] In order to solve the above technical problems, or at least partially solve the above technical problems, the present disclosure provides a special effect display method, device, apparatus and medium. [Means for solving the problem]
[0006] An embodiment of the present disclosure provides a special effect display method, the method comprising: acquiring a captured video image; determining position information of a recognition object based on the captured video image, and drawing a trajectory recording image according to the position information of the recognition object; performing a superimposition process on the trajectory recorded image and a preset special effect material image to obtain a unit special effect image; and a step of converting and processing the unit special effect images to generate a target special effect image, and adding the target special effect image to the captured video image for display, the target special effect image being an image obtained by combining a plurality of the unit special effect images.
[0007] An embodiment of the present disclosure further provides a special effect display device, the device comprising: an image acquisition module for acquiring the captured video images; a trajectory recording module for determining position information of a recognition object based on the captured video image, and drawing a trajectory recording image according to the position information of the recognition object; a first special effect module for performing a superimposing process on the trajectory recorded image and a preset special effect material image to obtain a unit special effect image; and a second special effect module for converting and processing the unit special effect images to generate a target special effect image, and adding the target special effect image to the captured video image for display, the target special effect image being an image formed by combining a plurality of the unit special effect images.
[0008] An embodiment of the present disclosure further provides an electronic device, the electronic device including a processor and a memory for storing executable instructions of the processor, the processor reading the executable instructions from the memory and executing the instructions to realize the special effect display method provided by the embodiment of the present disclosure.
[0009] An embodiment of the present disclosure further provides a computer-readable storage medium, the storage medium storing a computer program, the computer program being used to perform the special effect display method provided by the embodiment of the present disclosure.
[0010] An embodiment of the present disclosure further provides a computer program, which, when executed on a computer, causes the computer to perform the special effect display method provided by an embodiment of the present disclosure.
[0011] The technical solution provided by the embodiment of the present disclosure has the following advantages compared with the prior art: That is, the special effect display solution provided by the embodiment of the present disclosure includes the steps of obtaining a shooting video image, determining position information of a recognition object according to the shooting video image, drawing a trajectory recording image according to the position information of the recognition object, performing a superimposition process on the trajectory recording image and a preset special effect material image to obtain a unit special effect image, and converting the unit special effect image to generate a target special effect image, and adding the target special effect image to the shooting video image for display, where the target special effect image is an image obtained by combining a plurality of unit special effect images. By adopting the above technical solution, a trajectory recording image can be generated according to the positional changes of the recognized object in the captured video image, and then a special effect image can be obtained by performing a conversion process on the unit special effect image obtained by superimposing the trajectory recording image and the special effect material image, and the special effect image can be displayed to the user, thereby realizing the display of special effects according to the user's actions. Since the displayed special effect image is generated by combining multiple unit special effect images, the richness and interest of the special effect display is improved, and the user's interaction experience effect is further improved. [Brief description of the drawings]
[0012] The above and other features, advantages, and aspects of each embodiment of the present disclosure will become more apparent by reference to the following specific embodiments in conjunction with the accompanying drawings, in which the same or similar reference numerals refer to the same or similar elements throughout the drawings. It should be understood that the drawings are schematic and that parts and elements are not necessarily drawn to scale. [Figure 1]1 is a schematic flowchart of a special effect display method provided by an embodiment of the present disclosure. [Diagram 2] FIG. 2 is a schematic diagram of a special effects display provided by an embodiment of the present disclosure. [Diagram 3] FIG. 13 is a schematic diagram of another special effect display provided by an embodiment of the present disclosure. [Figure 4] FIG. 13 is a schematic diagram of yet another special effects display provided by an embodiment of the present disclosure. [Diagram 5] 4 is a schematic flowchart of another special effect display method provided by an embodiment of the present disclosure. [Figure 6] FIG. 2 is a structural schematic diagram of a special effect display device provided by an embodiment of the present disclosure. [Figure 7] FIG. 2 is a structural schematic diagram of an electronic device provided according to an embodiment of the present disclosure. DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS
[0013] Hereinafter, the embodiments of the present disclosure will be described in more detail with reference to the drawings. Although some embodiments of the present disclosure are shown in the drawings, the present disclosure can be realized in various forms, and should not be construed as being limited to the embodiments described herein, but rather, these embodiments are provided for a deeper and more complete understanding of the present disclosure. It should also be understood that the drawings and embodiments of the present disclosure are used for illustrative purposes only, and are not intended to limit the scope of protection of the present disclosure.
[0014] It should be understood that the steps described in the method embodiments of the present disclosure may be performed in a different order and / or in parallel. Also, method embodiments may include additional steps and / or omit the performance of steps that are illustrated. The scope of the present disclosure is not limited in this respect.
[0015] As used herein, the term "comprising" and variations thereof are intended to mean an open inclusive meaning, i.e., including but not limited to. The term "based on" means "based at least in part on." The term "one embodiment" refers to "at least one embodiment," the term "another embodiment" refers to "at least one alternative embodiment," and the term "some embodiments" refers to "at least some embodiments." Relevant definitions of other terms are provided below.
[0016] It should be noted that the concepts of "first", "second", etc. referred to in this disclosure are used only to distinguish different devices, modules, or units, and are not intended to limit the order or interdependence of functions performed by these devices, modules, or units.
[0017] It should be noted that the modifications "one" and "multiple" referred to in this disclosure are exemplary rather than limiting, and should be understood by those of skill in the art as "one or more" unless otherwise indicated herein.
[0018] The names of messages or information exchanged between devices in the embodiments of the present disclosure are not intended to limit the scope of these messages or information, but are for illustrative purposes only.
[0019] 1 is a schematic flowchart of a special effect display method provided by an embodiment of the present disclosure, the method can be performed by a special effect display device, the device can be realized in software and / or hardware, and can generally be integrated into electronic equipment. As shown in FIG. 1, the method includes the following steps: Step 101, capture a video image.
[0020] The captured video image may be an image that includes some or all of the user's body parts within the current image collection range, and the captured video image may include content such as the user's face, head, limbs, and background.
[0021] In the embodiment of the present disclosure, the client can collect the captured video image by the image collection module in response to the special effect display command of the user, and display the captured video image. The special effect display command means a command for starting the special effect display, and can be specifically generated by the user's trigger operation on the preset key, and the trigger operation method is not specifically limited, for example, can be performed by clicking on the preset key, and the preset key can be provided in the form of hardware or software, and the special effect display command can further be generated based on the voice command input by the user, for example, after receiving the voice input by the user, it can be determined whether the voice is a preset voice, and if so, generate the special effect display command.
[0022] Step 102: determining position information of a recognition object based on the captured video image, and drawing a trajectory recording image according to the position information of the recognition object.
[0023] The recognition object may be a pre-defined body part of the user, for example, the recognition object may include a nose, an eye, a finger, etc. on the face, and may be specifically defined according to the actual situation. In the embodiment of the present disclosure, the recognition object is a preset part on the face as an example, and the preset part may be any part on the face, for example, a nose, a beak, an eye, etc. The trajectory record diagram may be an image that records the motion trajectory of the preset part on the face of the user.
[0024] In the embodiment of the present disclosure, after the client obtains the captured video image, the client can use an image recognition algorithm to detect the face in the captured video image, and further determine the position information of the preset part of the face, that is, determine the position information of the recognition object. Then, the trajectory record diagram can be drawn according to the position information of the recognition object. The position information of the recognition object can be the coordinate of the recognition object in the captured video image, and the coordinate origin can be determined according to the actual situation.
[0025] Optionally, the step of drawing the trajectory recording image according to the position information of the recognition object includes the steps of: constructing a canvas, drawing circular areas at two positions corresponding to the recognition object on the canvas according to the position information of the recognition object in the first frame image and the second frame image in the captured video image, respectively; determining a target connecting line between the two positions, and determining one trajectory area based on the target connecting line, the distance between the point in the trajectory area and the target connecting line is less than or equal to the radius of the circular area; setting the transparency of the two circular areas and the trajectory area to transparent, and obtaining a trajectory recording image. Optionally, the step of determining one trajectory area based on the target connecting line includes the steps of determining a target point between the two positions, and selecting and drawing the target point according to the distance between the target point and the target connecting line, to obtain a trajectory area, the included angles between the first connecting line and the second connecting line corresponding to the target point and the target connecting line are all acute angles, and each of the first connecting line and the second connecting line is a connecting line between the target point and two positions.
[0026] The canvas means the basis for generating a trajectory record diagram by painting, and the color and size of the canvas are not specifically limited, for example, the canvas may be a black canvas. Specifically, the client determines the position information of the recognition object of each frame image of the captured video image, and can draw a circular area of a preset radius at two positions of the recognition object for the position information of the recognition object of the image of the first frame and the image of the second frame, and the preset radius can be the brush radius when the brush is a circular brush, and then determines the included angle between each of the first connection line and the second connection line corresponding to each point between the two positions and the target connection line, and can determine the point where the included angle is an acute angle as the target point, and for the target point, select and draw the target connection line whose distance is less than or equal to the radius of the circular area, and obtain a trajectory area, which can be a rectangular area, and the two circular areas and the trajectory area obtained are the motion painting areas of the recognition object of the image of the first frame and the image of the second frame, and set the transparency of the two circular areas and the trajectory area to be transparent on the canvas to obtain a trajectory record diagram. Optionally, the two circular areas and the trajectory area in the canvas may be filled with a preset color to obtain a trajectory record diagram, where the preset color means a color different from the color of the canvas, for example, if the canvas is a black canvas, the preset color may be white.
[0027] Step 103: A superimposing process is performed on the trajectory recorded image and the preset special effect material image to obtain a unit special effect image.
[0028] The special effect material image can be understood as a basic diagram for generating a unit special effect image, and can be regarded as an initial paper by analogy with a paper-cut window grill. The special effect material image can be a pie chart filled with a fixed color, and the color, shape and angle of the pie chart can be set according to the actual situation, for example, the special effect material image can be a red pie chart with an angle of 30 degrees. The shape and size of the track record diagram and the special effect material image can be the same or different, and are not specifically limited. The superimposition process is used to replace the background in the track record image with the special effect material image.
[0029] In an embodiment of the present disclosure, after a client obtains a trajectory recording image, the client can obtain a preset special effect material image, replace the background in the trajectory recording image with the special effect material image, and obtain a unit special effect image, and then the unit special effect image can be displayed, and the trajectory recording area in the unit special effect image can be highlighted and displayed.
[0030] Step 104: converting and processing the unit special effect images to generate a target special effect image, and adding the target special effect image to the captured video image for display, where the target special effect image is a combination image of a plurality of unit special effect images;
[0031] The target special effect image means a complete special effect image generated according to the unit special effect images, and can be obtained by combining multiple unit special effect images. In the embodiments of the present disclosure, the target special effect image is described as a window grill special effect image as an example, and the target special effect image can be understood as a special effect image similar to a window grill obtained by paper cutting.
[0032] The transformation process can include an operation of transforming the unit special effect image, and the transformation process can be a first transformation operation or a second transformation operation, and the first transformation operation can include a copy operation and a mirroring operation, and the second transformation operation can include a rotation operation and a movement operation. The copy operation means an operation of producing a plurality of the same images for the unit special effect image, the mirroring operation means an operation of producing one image arranged in reverse with respect to an axis intersecting with the unit special effect image or a plane intersecting with the unit special effect image, and the rotation operation means rotating the unit special effect image at a certain angle. The transformation parameters corresponding to the transformation process can be adjusted, and the transformation parameters can include at least one of the following: the number of copies corresponding to the copy operation, the rotation angle corresponding to the rotation operation, the image position, and the image size, etc. The dynamic control of the change parameters can be realized by the developer, so that the generated target special effect image has diversity.
[0033] In the embodiment of the present disclosure, a conversion process can be performed on the unit special effect image obtained by performing a superimposition process on the trajectory recording image and the preset special effect material image to generate a target special effect image, and the above-mentioned superimposition process and conversion process can be performed synchronously, or according to actual needs, the superimposition process can be performed first and then the conversion process can be performed.
[0034] After the client collects the shot video image, the client can display the shot video image in the image display interface, and then the track record image can be drawn according to the position information of the recognized object of the shot video image, and after the track record image is drawn, a target special effect image is generated and added to the shot video image in a setting animation manner for display. Specifically, the target special effect image can be completely displayed by being superimposed on the shot video image, and a part of the shot video image is blocked to highlight the target special effect image.
[0035] Optionally, the step of adding the target special effect image to the captured video image for display can include the step of adding the target special effect image to the captured video image for display in a preset animation manner after the drawing of the trajectory record image is completed. The preset animation manner means a preset dynamic effect display manner, which can be set according to the actual situation, for example, the preset animation manner can be a manner of moving the target special effect image up a preset distance, and displaying one by one from one unit special effect image to both sides until the target special effect image is completely displayed. After the drawing of the trajectory record image is completed, the generated target special effect image is input into a preset video program, and the target special effect image is displayed to the user in a preset animation manner.
[0036] In the above method, after the target special effect image is generated, it can be displayed with a preset animation, so that the user can feel the target special effect image with animation effect, and improve the interest of the special effect display.
[0037] For example, Fig. 2 is a schematic diagram of a special effect display provided by an embodiment of the present disclosure, Fig. 3 is a schematic diagram of another special effect display provided by an embodiment of the present disclosure, Fig. 2 and Fig. 3 are two schematic diagrams in the process of displaying a target special effect image in a set animation manner after it is generated, as shown in Fig. 2, the target special effect image is a window grill special effect image, only the upper half of the window grill pieces are displayed, the transparency of the displayed window grill pieces is different, and the other window grill pieces have not yet been displayed, as shown in Fig. 3, the target special effect image has been completely displayed in a set animation manner, and the transparency of different window grill pieces is the same. It can be understood that the above Figs. 2 and 3 are only examples of the target special effect image, and the parameters such as the shape, size, position, etc. of the target special effect image can all be dynamically adjusted according to actual needs.
[0038] The special effect display scheme provided by the embodiment of the present disclosure includes the steps of: acquiring a shooting video image; determining the position information of a recognition object according to the shooting video image, and drawing a trajectory record image according to the position information of the recognition object; performing superimposition processing on the trajectory record image and a preset special effect material image to obtain a unit special effect image; performing conversion processing on the unit special effect image, generating a target special effect image, and adding the target special effect image to the shooting video image for display, where the target special effect image is an image combining a plurality of unit special effect images. By adopting the above technical solution, a trajectory record image can be generated according to the position change of the recognition object in the shooting video image, and then performing conversion processing on the unit special effect image superimposed with the trajectory record image and the special effect material image to obtain a special effect image, which can be displayed to the user, thereby realizing the display of special effects according to the user's actions, and the displayed special effect image is a combination of a plurality of unit special effect images, thereby improving the richness and interest of the special effect display, and further improving the user's interaction experience effect.
[0039] In some embodiments, the special effect display method may further include a step of displaying a unit special effect image on the captured video image in real time during the drawing process of the track record image. Optionally, the step of displaying the unit special effect image in real time during the drawing process of the track record image may include the steps of: setting the transparency of other areas of the target special effect image other than the unit special effect image to be transparent during the drawing process of the track record image, to obtain a special effect image to be displayed; and superimposing and displaying the special effect image to be displayed on the captured video image.
[0040] In the process of drawing the trajectory record image, the trajectory record map and the special effect material map are superimposed in real time to generate a unit special effect image, and the unit special effect image can be displayed on the shooting video image in real time. In the above-mentioned real-time superimposition process, the complete map of the trajectory record map and the special effect material image can be superimposed, and the real-time current frame image of the trajectory record map and the change map of the motion trajectory area of the previous frame image can be superimposed on the special effect material image. In addition, when the unit special effect image is displayed in real time, since the target special effect image is a combination of multiple unit special effect images, the transparency of other areas of the target special effect image other than the unit special effect image is set to transparent to obtain the special effect image to be displayed, and only one unit special effect image of the special effect images to be displayed is opaque, and the special effect image to be displayed can be superimposed on the shooting video image to be displayed. The specific transparency of opaqueness is not limited, and for example, the transparency can be set to 50%.
[0041] For example, Fig. 4 is a schematic diagram of another special effect display provided by an embodiment of the present disclosure, which shows a schematic diagram of an image display interface in the process of generating a target special effect, in which only a unit special effect image 10 is displayed, and the unit special effect image 10 is displayed superimposed on a captured video image, and a transparent motion trajectory recording area generated based on the user's motion is displayed in the unit special effect image 10, which area changes continuously with the user's motion. The upper part of the image display interface in Fig. 4 can also display a progress bar of the generation of the special effect image, which progresses continuously with time and stops until the preset time progress bar is full. In the image display interface of Fig. 4, an atmosphere effect element can also be displayed on the side frame of the interface, which is used to match the current special effect image and enhance the user's immersive experience.
[0042] In the above method, the special effect images can be displayed in real time during the process of generation, and the user can feel the changes in the special effects that occur along with changes in movement in real time, further improving the richness and interest of the special effect display and enhancing the user's interaction experience.
[0043] In some embodiments, the special effect display method provided by the embodiments of the present disclosure may further include receiving a user's recording command, and recording a special effect video for the generation process and display process of the target special effect image. The recording command may be a command to perform video recording for the target special effect image, and the recording command includes the special effect display command in the above embodiment. The client may generate a recording command according to the user's trigger operation on the recording key, and then execute the above target special effect image generation step, record the generation process and display process of the target special effect image, and obtain a special effect video. The above recording time may be a fixed time, and the fixed time may be set according to actual circumstances, for example, the fixed time may be 15S.
[0044] The above solution supports users to record videos for generating and displaying target special effect images, and allows users to perform more operations such as subsequent video sharing, downloading, etc., thereby further improving the user interaction experience effect.
[0045] In some embodiments, the special effect display method of the embodiment of the present disclosure may further include a step of controlling the generation and display of a target special effect image based on a time stamp during the recording process of the special effect video. Specifically, during the recording process of the special effect video, a step of generating a target special effect image is performed, and when a preset time stamp is reached, the generation step is terminated and the display of the target special effect image is performed. The advantage of this configuration is that the target special effect image can be displayed within the preset recording time by avoiding lags that may occur when generating and displaying a target special effect image in units of image frames, and the display effect of the special effect is further improved.
[0046] 5 is a schematic flow chart of another special effect display method provided by an embodiment of the present disclosure, which is based on the above embodiment and further optimizes the above special effect display method. As shown in FIG. 5, the method includes the following steps: Step 201, capture video images. Step 202: determining position information of a recognized object based on the captured video image. The recognition objects are preset parts of the face. Step 203: A trajectory recording image is drawn according to the position information of the recognized object.
[0047] Specifically, the step of drawing a trajectory recording image according to the position information of the recognition object includes the steps of constructing a canvas, and drawing circular areas at two positions corresponding to the recognition object on the canvas according to the position information of the recognition object in the first frame image and the second frame image in the captured video image, respectively; determining a target connecting line between the two positions, and determining one trajectory area based on the target connecting line, where the distance between a point in the trajectory area and the target connecting line is less than or equal to the radius of the circular area; and setting the transparency of the two circular areas and the trajectory area to transparent, to obtain a trajectory recording image.
[0048] Optionally, the step of determining a trajectory area based on the target connecting line includes the steps of determining a target point between two positions, selecting and drawing the target point according to a distance between the target point and the target connecting line, to obtain a trajectory area, wherein the included angles between the first connecting line and the second connecting line corresponding to the target point and the target connecting line are both acute angles, and each of the first connecting line and the second connecting line is a connecting line between the target point and two positions.
[0049] Step 204: A superimposition process is performed on the track record image and the preset special effect material image to obtain a unit special effect image.
[0050] The overlay process is used to replace the background in the track recording image with a special effect material image.
[0051] Step 205: converting and processing the unit special effect image to generate a target special effect image.
[0052] The target special effect image is a window grill special effect image. The transformation process is a first transformation operation or a second transformation operation, the first transformation operation includes a copy operation and a mirroring operation, and the second transformation operation includes a rotation operation and a translation operation. The transformation parameters corresponding to the transformation process are adjustable, and the transformation parameters include at least one of a copy number corresponding to the copy operation, a rotation angle corresponding to the rotation operation, an image position, and an image size.
[0053] The special effect display method in the embodiment of the present disclosure may further include a step of displaying a unit special effect image on the captured video image in real time during the drawing process of the track record image. Optionally, the step of displaying the unit special effect image in real time during the drawing process of the track record image includes the steps of setting the transparency of other areas of the target special effect image other than the unit special effect image to be transparent during the drawing process of the track record image, obtaining the special effect image to be displayed, and superimposing and displaying the special effect image to be displayed on the captured video image.
[0054] The specific realization method of the target special effect image includes the steps of constructing a black canvas, i.e., generating a texture map, and at the same time restoring the coordinates of the actual texture map of the special effect material image; performing painting on the black canvas according to the user's actions, i.e., determining the current frame, the current point of the previous frame, and one previous point (both points are the same in the initial state), creating a circle of the brush radius for each (if the brush is circular), and then selecting and drawing the target points between the two points (the included angle between the connecting line from the target point to the current point and the connecting line between the current point and the previous point, and the included angle between the connecting line from the target point to the previous point and the connecting line between the current point and the previous point are all acute angles) that are the distance to the connecting line less than or equal to the length of the brush radius; the two circular areas and one rectangular area thus obtained are the areas of the painting from the previous frame to the current frame; finally allocating the points of this area; finally obtaining a black and white image (white is the drawn part), which is introduced into the functional module of the general-purpose special effect algorithm; storing the special effect material image in the render cache (render The method may also include the steps of: introducing the texture map coordinates into the rendering cache, obtaining them through a functional module of a general-purpose special effect algorithm, restoring the coordinates of the actual texture map, reserving an interface for customizing the position, size, and rotation angle, creating a varying array and copying and storing it; the specific number of copies may be 11, and a total of 12 variable arrays are copied 11 times; and at the same time, performing a superimposition process on the special effect material image of the changes such as copying and rotation in the rendering cache and the previous black and white image, and if this pixel point at the position of the black and white image is white, it will become transparent on the material canvas.
[0055] Step 206: Add the target special effect image to the captured video image for display.
[0056] The target special effect image is an image formed by combining a plurality of unit special effect images.
[0057] Optionally, the step of adding and displaying the target special effect image to the captured video image includes adding and displaying the target special effect image to the captured video image in a set animation manner after the drawing of the trajectory recording image is completed.
[0058] The special effect display scheme provided by the embodiment of the present disclosure includes the steps of obtaining a shot video image; determining position information of a recognition object based on the shot video image, and drawing a trajectory recording image according to the position information of the recognition object; performing a superimposition process on the trajectory recording image and a preset special effect material image to obtain a unit special effect image; converting and processing the unit special effect image to generate a target special effect image, and adding the target special effect image to the shot video image for display, where the target special effect image is an image obtained by combining a plurality of unit special effect images. By adopting the above technical solution, a trajectory recording image can be generated according to the positional changes of the recognized object in the captured video image, and then a conversion process is performed on the unit special effect image obtained by superimposing the trajectory recording image and the special effect material image to obtain a special effect image, and the special effect image can be displayed to the user, thereby realizing the display of special effects according to the user's actions. Since the displayed special effect image is a combination of multiple unit special effect images, the richness of the special effect display is improved; and since the special effect image can change in real time according to changes in the user's actions, the user can feel the changes in the special effects in real time, which further improves the interest of the special effect display and improves the user's interaction experience effect.
[0059] 6 is a structural schematic diagram of a special effect display device according to an embodiment of the present disclosure, which can be realized by software and / or hardware, and can be generally integrated into electronic equipment. As shown in FIG. 6, the device includes: an image acquisition module 301 for acquiring captured video images; a trajectory recording module 302 for determining position information of a recognition object based on the captured video image, and drawing a trajectory recording image according to the position information of the recognition object; a first special effect module 303 for performing a superimposing process on the trajectory recorded image and a preset special effect material image to obtain a unit special effect image; and a second special effect module 304 for converting and processing the unit special effect images to generate a target special effect image, and adding the target special effect image to the captured video image for display, the target special effect image being an image obtained by combining a plurality of the unit special effect images.
[0060] Optionally, the trajectory recording module 302 specifically comprises: constructing a canvas, and drawing circular regions on the canvas at two positions corresponding to the recognized object according to position information of the recognized object in the first frame image and the second frame image in the captured video image; determining a target connection line between the two positions; determining a trajectory region based on the target connection line, where a distance between a point in the trajectory region and the target connection line is less than or equal to a radius of the circular region; The transparency of the two circular regions and the trajectory region is set to transparent to obtain the trajectory recording image.
[0061] Optionally, the trajectory recording module 302 specifically comprises: A target point between the two positions is determined, the target point is selected and drawn according to a distance between the target point and the target connecting line, and the trajectory area is obtained, and the included angles between the first connecting line and the second connecting line corresponding to the target point and the target connecting line are both acute angles, and each of the first connecting line and the second connecting line is a connecting line between the target point and the two positions.
[0062] Optionally, said overlay process is used to replace a background in said track recorded image with said special effects element image.
[0063] Optionally, the transformation process is a first transformation operation or a second transformation operation, wherein the first transformation operation includes a copy operation and a mirroring operation, and the second transformation operation includes a rotation operation and a translation operation.
[0064] Optionally, a transformation parameter corresponding to said transformation process is adjustable, said transformation parameter including at least one of a copy count corresponding to said copy operation, a rotation angle corresponding to said rotation operation, an image position, and an image size.
[0065] Optionally, the apparatus further comprises: The display device further includes a real-time display module for displaying the unit special effect image on the captured video image in real time during the drawing process of the track record image.
[0066] Optionally, the real-time display module is specifically: In the process of drawing the trajectory record image, the transparency of the other areas of the target special effect image other than the unit special effect image is set to transparent, so as to obtain a special effect image to be displayed; The special effect image of the object to be exhibited is superimposed on the captured video image and exhibited.
[0067] Optionally, the second special effects module 304 specifically includes: After the drawing of the track record image is completed, the target special effect image is added to the captured video image and displayed in a set animation manner.
[0068] Optionally, the recognition object is a preset part on a face and the target special effect image is a window grill special effect image.
[0069] The special effect display device provided by the embodiments of the present disclosure can execute the special effect display method provided by any of the embodiments of the present disclosure, and includes functional modules and beneficial effects corresponding to the execution method.
[0070] An embodiment of the present disclosure provides a computer program product, which includes computer programs / instructions, which, when executed by a processor, implement the special effect display method provided by any embodiment of the present disclosure.
[0071] FIG. 7 is a structural schematic diagram of an electronic device provided by an embodiment of the present disclosure. Hereinafter, referring specifically to FIG. 7, a structural schematic diagram suitable for realizing the electronic device 400 in the embodiment of the present disclosure is shown. The electronic device 400 in the embodiment of the present disclosure can include, but is not limited to, mobile terminals such as mobile phones, notebook computers, digital broadcast receivers, PDAs (personal digital assistants), PADs (tablet computers), PMPs (portable multimedia players), and in-vehicle terminals (e.g., in-vehicle navigation terminals), and fixed terminals such as digital TVs and desktop computers. The electronic device shown in FIG. 7 is merely an example and should not impose any limitations on the functions and scope of use of the embodiment of the present disclosure.
[0072] 7, the electronic device 400 may include a processing unit (e.g., a central processing unit, a graphic processor, etc.) 401, which can perform various appropriate operations and processes according to a program stored in a read-only memory (ROM) 402 or loaded from a storage device 408 into a random access memory (RAM) 403. The RAM 403 further stores various programs and data necessary for the operation of the electronic device 400. The processing unit 401, the ROM 402, and the RAM 403 are connected to each other via a bus 404. An input / output (I / O) interface 405 is also connected to the bus 404.
[0073] Typically, the I / O interface 405 can be connected to an input device 406 including, for example, a touch screen, a touch pad, a keyboard, a mouse, a camera, a microphone, an accelerometer, a gyro, etc., an output device 407 including, for example, a liquid crystal display (LCD), a speaker, a vibrator, etc., a storage device 408 including, for example, a magnetic tape, a hard disk, etc., and a communication device 409. The communication device 409 allows the electronic device 400 to communicate wirelessly or wired with other devices to exchange data. Although FIG. 7 shows the electronic device 400 having various devices, it should be understood that the implementation or inclusion of all the devices shown is not required. Instead, more or fewer devices may be implemented or included.
[0074] In particular, according to an embodiment of the present disclosure, the processes described above with reference to the flowcharts may be implemented as a computer software program. For example, an embodiment of the present disclosure may include a computer program product including a computer program carried on a non-transitory computer-readable medium, the computer program including program code for performing the method illustrated in the flowchart. In such an embodiment, the computer program may be downloaded and installed from a network via the communication device 409, or may be installed from the storage device 408, or may be installed from the ROM 402. When the computer program is executed by the processing device 401, it performs the functions defined in the special effect display method of the embodiment of the present disclosure.
[0075] It should be noted that the computer-readable medium described in the embodiments of the present disclosure may be a computer-readable signal medium, or a computer-readable storage medium, or any combination of the above. The computer-readable storage medium may be, for example, but is not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination of the above. More specific examples of the computer-readable storage medium may include, but are not limited to, an electrical connection having one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above. In the present disclosure, the computer-readable storage medium may be any tangible medium that contains or stores a program that can be used by or in conjunction with an instruction execution system, apparatus, or device. In this disclosure, a computer-readable signal medium may include a data signal propagating in baseband or as part of a carrier wave, the data signal carrying a computer-readable program code. Such a propagated data signal may take various forms, including, but not limited to, an electromagnetic signal, an optical signal, or any suitable combination of the above. The computer-readable signal medium may be any computer-readable medium other than a computer-readable storage medium, the computer-readable signal medium being capable of transmitting, propagating, or transmitting a program for use by or in connection with an instruction execution system, apparatus, or device. The program code included in the computer-readable medium may be transmitted by any suitable medium, including, but not limited to, an electrical wire, an optical fiber cable, RF (radio frequency), or the like, or any suitable combination of the above.
[0076] In some embodiments, clients and servers may communicate using any network protocol now known or later developed, such as, for example, HyperText Transfer Protocol (HTTP), and may be interconnected by any form or medium of digital data communication (e.g., a communications network). Examples of communications networks include a local network ("LAN"), a wide area network ("WAN"), the World Wide Web (e.g., the Internet), an end-to-end network (e.g., an ad hoc end-to-end network), and any other network now known or later developed.
[0077] The computer-readable medium may be included in the electronic device, or may be separate from and not located on the electronic device.
[0078] When the computer-readable medium carries one or more programs and the one or more programs are executed by the electronic device, the electronic device is caused to perform the following steps: acquiring a shot video image; determining position information of a recognition object based on the shot video image and drawing a trajectory recording image according to the position information of the recognition object; performing a superimposition process on the trajectory recording image and a preset special effect material image to obtain a unit special effect image; and converting the unit special effect image to generate a target special effect image, and adding the target special effect image to the shot video image for display, wherein the target special effect image is an image that combines a plurality of the unit special effect images.
[0079] The computer program code for carrying out the operations of the present disclosure can be written in one or many programming languages or combinations thereof, including object-oriented programming languages such as Java, Smalltalk, C++, and further including, but not limited to, conventional procedural programming languages such as "C" or similar programming languages. The program code can be executed entirely on the user's computer, partially on the user's computer, as a single stand-alone software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. When a remote computer is involved, the remote computer can be connected to the user's computer via any type of network, including a local area network (LAN) or a wide area network (WAN), or can be connected to an external computer (e.g., connecting via the Internet using an Internet service provider).
[0080] The flowcharts and block diagrams in the drawings illustrate architecture, functions, and operations that can be realized according to the system, method, and computer program product of various embodiments of the present disclosure. In this regard, each block in the flowchart or block diagram may represent a module, program segment, or part of code, which includes one or more executable instructions for implementing a certain logical function. It should be noted that in some alternative implementations, the functions depicted in the blocks may occur in a different order from the order shown in the figures. For example, two blocks shown in succession may actually be executed essentially in parallel, or in some cases in the reverse order, depending on the related functions. Also, each block in the block diagram and / or flowchart, and combinations of blocks in the block diagram and / or flowchart may be realized in a dedicated system by hardware to execute a certain function or operation, or in a combination of dedicated hardware and computer instructions.
[0081] The units described in the embodiments of the present disclosure may be implemented in a software manner or a hardware manner, and the names of the units, if any, do not constitute limitations on the units themselves.
[0082] The functions described herein above may be performed, at least in part, by one or more hardware logic components. For example, exemplary types of hardware logic components that may be utilized include, but are not limited to, field programmable gate arrays (FPGAs), application specific integrated circuits (ASICs), application specific standard products (ASSPs), systems on chips (SOCs), complex programmable logic devices (CPLDs), etc.
[0083] In this disclosure, a machine-readable medium may be a tangible medium that contains or stores a program used by or in combination with an instruction execution system, apparatus, or device. A machine-readable medium may be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium includes, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any suitable combination of the above. More specific examples of machine-readable storage media include an electrical connection by one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact magnetic disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above.
[0084] According to one or more embodiments of the present disclosure, the present disclosure provides a special effect display method, comprising: acquiring a captured video image; determining position information of a recognition object based on the captured video image, and drawing a trajectory recording image according to the position information of the recognition object; performing a superimposition process on the trajectory recorded image and a preset special effect material image to obtain a unit special effect image; and a step of converting and processing the unit special effect images to generate a target special effect image, and adding the target special effect image to the captured video image for display, the target special effect image being an image obtained by combining a plurality of the unit special effect images.
[0085] According to one or more embodiments of the present disclosure, in the special effect display method provided by the present disclosure, the step of drawing a trajectory recording image according to the position information of the recognition object includes: constructing a canvas, and drawing circular regions at two positions corresponding to the recognized object on the canvas according to position information of the recognized object in a first frame image and a second frame image in the captured video image; determining a target connection line between the two positions and determining a trajectory region based on the target connection line, where a distance between a point in the trajectory region and the target connection line is less than or equal to a radius of the circular region; Setting the transparency of the two circular areas and the trajectory area to be transparent, and obtaining the trajectory recording image.
[0086] According to one or more embodiments of the present disclosure, in the special effect display method provided by the present disclosure, the step of determining a trajectory area based on the target connecting line includes: The method includes a step of determining a target point between the two positions, selecting and drawing the target point according to a distance between the target point and the target connection line, and obtaining the trajectory area, wherein the included angles between the first connection line and the second connection line corresponding to the target point and the target connection line are both acute angles, and each of the first connection line and the second connection line is a connection line between the target point and the two positions.
[0087] According to one or more embodiments of the present disclosure, in the special effect display method provided by the present disclosure, the overlay process is used to replace a background in the track recording image with the special effect material image.
[0088] According to one or more embodiments of the present disclosure, in the special effect display method provided by the present disclosure, the transformation process is a first transformation operation or a second transformation operation, the first transformation operation includes a copy operation and a mirroring operation, and the second transformation operation includes a rotation operation and a movement operation.
[0089] According to one or more embodiments of the present disclosure, in the special effect display method provided by the present disclosure, a transformation parameter corresponding to the transformation process is adjustable, and the transformation parameter includes at least one of a copy number corresponding to the copy operation, a rotation angle corresponding to the rotation operation, an image position, and an image size.
[0090] According to one or more embodiments of the present disclosure, there is provided a special effect display method, comprising: The process of drawing the track record image further includes a step of displaying the unit special effect image on the captured video image in real time.
[0091] According to one or more embodiments of the present disclosure, in the special effect display method provided by the present disclosure, in the drawing process of the trajectory recording image, the step of displaying the unit special effect image in real time includes: In the drawing process of the trajectory recording image, the transparency of the other area of the target special effect image other than the unit special effect image is set to transparent, thereby obtaining a special effect image to be displayed; and displaying the special effect image of the object to be displayed by superimposing it on the captured video image.
[0092] According to one or more embodiments of the present disclosure, in the special effect display method provided by the present disclosure, the step of adding the target special effect image to the captured video image and displaying it includes: After the drawing of the track record image is completed, the target special effect image is added to the captured video image in a preset animation manner for display.
[0093] According to one or more embodiments of the present disclosure, in the special effect display method provided by the present disclosure, the recognition object is a preset part of a face, and the target special effect image is a window grill special effect image.
[0094] According to one or more embodiments of the present disclosure, the present disclosure provides a special effect display device, comprising: an image acquisition module for acquiring the captured video images; a trajectory recording module for determining position information of a recognition object based on the captured video image, and drawing a trajectory recording image according to the position information of the recognition object; a first special effect module for performing a superimposing process on the trajectory recorded image and a preset special effect material image to obtain a unit special effect image; and a second special effect module for converting and processing the unit special effect images to generate a target special effect image, and adding the target special effect image to the captured video image for display, the target special effect image being an image formed by combining a plurality of the unit special effect images.
[0095] According to one or more embodiments of the present disclosure, in the special effect display device provided by the present disclosure, the trajectory recording module specifically includes: constructing a canvas, and drawing circular regions on the canvas at two positions corresponding to the recognized object according to position information of the recognized object in the first frame image and the second frame image in the captured video image; determining a target connection line between the two positions; determining a trajectory region based on the target connection line, where a distance between a point in the trajectory region and the target connection line is less than or equal to a radius of the circular region; The transparency of the two circular regions and the trajectory region is set to transparent to obtain the trajectory recording image.
[0096] According to one or more embodiments of the present disclosure, in the special effect display device provided by the present disclosure, the trajectory recording module specifically includes: A target point between the two positions is determined, the target point is selected and drawn according to a distance between the target point and the target connecting line, and the trajectory area is obtained, and the included angles between the first connecting line and the second connecting line corresponding to the target point and the target connecting line are both acute angles, and each of the first connecting line and the second connecting line is a connecting line between the target point and the two positions.
[0097] According to one or more embodiments of the present disclosure, in the special effect display device provided by the present disclosure, the overlay process is used to replace a background in the trajectory recording image with the special effect material image.
[0098] According to one or more embodiments of the present disclosure, in the special effect exhibition device provided by the present disclosure, the transformation process is a first transformation operation or a second transformation operation, the first transformation operation includes a copy operation and a mirroring operation, and the second transformation operation includes a rotation operation and a movement operation.
[0099] According to one or more embodiments of the present disclosure, in the special effect exhibition device provided by the present disclosure, transformation parameters corresponding to the transformation process are adjustable, and the transformation parameters include at least one of a number of copies corresponding to the copy operation, a rotation angle corresponding to the rotation operation, an image position, and an image size.
[0100] According to one or more embodiments of the present disclosure, there is provided a special effect display device, the device comprising: The display device further includes a real-time display module for displaying the unit special effect image on the captured video image in real time during the drawing process of the track record image.
[0101] According to one or more embodiments of the present disclosure, in the special effect display device provided by the present disclosure, the real-time display module specifically includes: In the process of drawing the trajectory record image, the transparency of the other area of the target special effect image other than the unit special effect image is set to transparent, so as to obtain a special effect image to be displayed; The special effect image of the object to be exhibited is superimposed on the captured video image and exhibited.
[0102] According to one or more embodiments of the present disclosure, in the special effect display device provided by the present disclosure, the second special effect module specifically includes: After the drawing of the track record image is completed, the target special effect image is added to the captured video image and displayed in a set animation manner.
[0103] According to one or more embodiments of the present disclosure, in a special effect display device provided by the present disclosure, the recognition object is a preset part of a face, and the target special effect image is a window grill special effect image.
[0104] According to one or more embodiments of the present disclosure, the present disclosure provides an electronic device, A processor; a memory for storing executable instructions for said processor; The processor reads the executable instructions from the memory and executes the instructions to implement any of the special effect display methods provided by the present disclosure.
[0105] According to one or more embodiments of the present disclosure, the present disclosure provides a computer-readable storage medium having a computer program stored therein, the computer program being used to execute any of the special effect display methods described herein provided by the present disclosure.
[0106] According to one or more embodiments of the present disclosure, the present disclosure further provides a computer program, which, when executed on a computer, causes the computer to perform the special effect display method provided by the embodiments of the present disclosure.
[0107] The above description is merely a description of the preferred embodiments and the technical principles applied in the present disclosure. As can be understood by those skilled in the art, the disclosure scope of the present disclosure is not limited to the technical solution formed by a specific combination of the above technical features, and should also cover other technical solutions formed by any combination of the above technical features or their equivalent features without departing from the above disclosed concept, for example, the above features and the technical features having similar functions disclosed in the present disclosure (but not limited thereto) are substituted with each other.
[0108] Also, although operations have been described employing a particular order, this should not be understood as requiring that these operations be performed in the particular order or sequence shown. In certain circumstances, multitasking and parallel processing may be advantageous. Similarly, the above discussion includes some specific implementation details, but these should not be construed as limitations on the scope of the disclosure. Some features that are described in the context of a single embodiment may also be implemented in combination in a single embodiment. Conversely, various features that are described in the context of a single embodiment may also be implemented in multiple embodiments separately or in any suitable subcombination.
[0109] Although the present subject matter has been described in language specific to structural features and / or logical operations of a method, it should be understood that the subject matter defined in the appended claims is not limited to the specific features or operations described above. Rather, the specific features and operations described above are merely example forms for implementing the claims.
Claims
1. A special effect display method performed by a special effect display device, comprising: acquiring a captured video image; determining position information of a recognition object based on the captured video image, and drawing a trajectory recording image according to the position information of the recognition object; performing a superimposition process on the trajectory recorded image and a preset special effect material image to obtain a unit special effect image; converting and processing the unit special effect images to generate a target special effect image, and adding the target special effect image to the captured video image for display, the target special effect image being an image obtained by combining a plurality of the unit special effect images; The step of drawing a trajectory recording image according to position information of the recognition object includes: constructing a canvas, and drawing circular regions at two positions corresponding to the recognition object on the canvas according to position information of the recognition object in a first frame image and a second frame image in the captured video image; determining a target connection line between the two positions and determining a trajectory region based on the target connection line, where a distance between a point in the trajectory region and the target connection line is less than or equal to a radius of the circular region; and setting the transparency of the two circular regions and the trajectory region to transparent, thereby obtaining the trajectory recording image. A method comprising:
2. The step of determining a trajectory region based on the target connection line comprises: determining a target point between the two positions, selecting and drawing the target point according to a distance between the target point and the target connection line, and obtaining the trajectory area, wherein an included angle between the target connection line and each of a first connection line and a second connection line corresponding to the target point is an acute angle, and each of the first connection line and the second connection line is a connection line between the target point and the two positions; 2. The method of claim 1 .
3. The overlay process is used to replace a background in the trajectory recording image with the special effect material image.
2. The method of claim 1 .
4. The transformation process is a first transformation operation or a second transformation operation, the first transformation operation includes a copy operation and a mirroring operation, and the second transformation operation includes a rotation operation and a movement operation; 2. The method of claim 1 .
5. A conversion parameter corresponding to the conversion process is adjustable, and the conversion parameter includes at least one of a copy count corresponding to the copy operation, a rotation angle corresponding to the rotation operation, an image position, and an image size.
5. The method of claim 4.
6. In the process of drawing the trajectory record image, the step of displaying the unit special effect image on the captured video image in real time is further included.
2. The method of claim 1 .
7. In the process of drawing the trajectory record image, the step of displaying the unit special effect image in real time includes: In the drawing process of the trajectory recording image, the transparency of the other area of the target special effect image other than the unit special effect image is set to transparent, thereby obtaining a special effect image to be displayed; and displaying the special effect image of the display object by superimposing it on the captured video image.
7. The method of claim 6.
8. The step of displaying the target special effect image by adding it to the captured video image includes: After the drawing of the trajectory recording image is completed, adding and displaying the target special effect image to the captured video image in a setting animation manner; 2. The method of claim 1 .
9. The recognition object is a preset part of a face, and the target special effect image is a window grill special effect image.
2. The method of claim 1 .
10. 1. A special effects display device, comprising: an image acquisition module for acquiring the captured video images; a trajectory recording module for determining position information of a recognition object based on the captured video image, and drawing a trajectory recording image according to the position information of the recognition object; a first special effect module for performing a superimposing process on the trajectory recorded image and a preset special effect material image to obtain a unit special effect image; a second special effect module for converting and processing the unit special effect images to generate a target special effect image, and adding the target special effect image to the captured video image for display, the target special effect image being an image obtained by combining a plurality of the unit special effect images; The trajectory recording module further comprises: constructing a canvas, and drawing circular areas on the canvas at two positions corresponding to the recognition object according to position information of the recognition object in the first frame image and the second frame image in the captured video image; determining a target connection line between the two positions; determining a trajectory region based on the target connection line, where a distance between a point in the trajectory region and the target connection line is less than or equal to a radius of the circular region; The transparency of the two circular regions and the trajectory region is set to transparent, and is used to obtain the trajectory recording image; An apparatus comprising:
11. An electronic device, A processor; a memory for storing executable instructions for said processor; The electronic device, characterized in that the processor realizes the special effect display method according to any one of claims 1 to 9 by reading the executable instructions from the memory and executing the executable instructions.
12. A computer-readable storage medium having a computer program stored therein, the computer program being used to execute the special effect display method according to any one of claims 1 to 9. A storage medium comprising:
13. A computer program, which, when executed by a computer, causes the computer to execute the special effect display method according to any one of claims 1 to 9. A computer program comprising:
Citation Information
Patent Citations
Smearing effect rendering method, device and equipment, and computer readable storage medium
CN109688346A
Lightning special effect rendering method, device and equipment and storage medium
CN109698914A
Video processing method, video processing device, and storage medium
US20190132642A1
Video image processing method, apparatus and terminal
US20200252553A1
Cited By
Special-effect display method and apparatus, and device and medium
US12665981B2
