A text special effects display method, device, electronic device and storage medium

By identifying the key position points of the target object in the video image and dynamically displaying text special effects, the problem that the text special effects in the existing technology cannot be set in personalized, achieving higher fun and user interaction experience.

CN116033201BActive Publication Date: 2025-04-01DOUYIN VISION CO LTD
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202111250376.4
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-10-26
Publication Date
2025-04-01
Estimated Expiration
2041-10-26

AI Technical Summary

Technical Problem

In the prior art, the special effects of text in video images cannot be personalized and lacks interest.

Method used

By obtaining the text information to be displayed and the text display parameters, identifying the key position points of the target object in the video image, confirming the display path of the text to be displayed, and dynamically displaying it according to the text display parameters, forming a text special effect that dynamically displays the outline of the target object.

Benefits of technology

It realizes personalized settings of text special effects, adds the fun of text special effects display, and allows users to customize the display effect when sending text interactive information.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116033201B_ABST
    Figure CN116033201B_ABST
Patent Text Reader

Abstract

The disclosed embodiments disclose a method, device, electronic device and storage medium for displaying text special effects, wherein the method includes: when the text information to be displayed and the text display parameters are obtained, obtaining a video image displaying the text information to be displayed; identifying the key position points of the target object in the video image, and confirming the display path of the text to be displayed based on the key position points; and dynamically displaying the text information to be displayed according to the display path according to the text display parameters. The technical solution disclosed in the disclosed embodiments realizes an editable text special effect display method, which enables users to personalize the display effect of text special effects when sending text interactive information, thereby increasing the fun of text special effect display.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The embodiments of the present disclosure relate to the field of computer technology, and in particular to a text special effect display method, device, electronic device and storage medium. Background Art

[0002] Usually, when users are watching live broadcasts or videos, they can enter text in the interactive information input bar on the viewing interface to interact with the host, or to comment on and analyze the video being watched. The interactive text entered by the user will appear on the video viewing interface in the form of a bullet screen. As more interactive text is displayed, the text content entered earlier will be removed from the current viewing interface and no longer displayed or displayed in a loop. Users cannot personalize the display effect of text special effects, which lacks fun. Summary of the invention

[0003] The embodiments of the present disclosure provide a text special effects display method, device, electronic device and storage medium, which can provide an editable text special effects display method, so that users can personalize the display effect of text special effects when sending text interactive information, thereby increasing the interest of text special effects display.

[0004] In a first aspect, an embodiment of the present disclosure provides a method for displaying text special effects, including:

[0005] When the text information to be displayed and the text display parameters are obtained, a video image displaying the text information to be displayed is obtained;

[0006] Identifying key position points of the target object in the video image, and confirming a display path of the to-be-displayed text based on the key position points;

[0007] According to the text display parameters, the text information to be displayed is dynamically displayed along the display path.

[0008] In a second aspect, the embodiments of the present disclosure further provide a text special effect display device, including:

[0009] A text special effect display data acquisition module is used to acquire a video image showing the text information to be displayed when the text information to be displayed and the text display parameters are acquired;

[0010] A text special effect display path determination module, used to identify key position points of the target object in the video image, and confirm the display path of the text to be displayed based on the key position points;

[0011] The text special effect display module is used to dynamically display the text information to be displayed according to the display path based on the text display parameters.

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

[0013] one or more processors;

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

[0015] When the one or more programs are executed by the one or more processors, the one or more processors implement the text special effects display method as described in any of the embodiments of the present disclosure.

[0016] In a fourth aspect, the embodiments of the present disclosure further provide a storage medium comprising computer executable instructions, which, when executed by a computer processor, are used to execute the text special effects display method as described in any one of the embodiments of the present disclosure.

[0017] The technical solution of the disclosed embodiment is to obtain the text information to be displayed and the text display parameters when a user issues a text special effect display instruction, and then obtain a video image showing the text information to be displayed; and further identify the key position points of the target object in the video image to confirm the display path of the text to be displayed; finally, according to the text display parameters, the text information to be displayed is dynamically displayed according to the display path, forming a text special effect in which the text to be displayed is dynamically displayed around the outline of the target object. The technical solution of the disclosed embodiment solves the problem that the text special effects in the video screen cannot be personalized, and realizes an editable text special effects display method, so that users can personalize the display effects of text special effects when sending text interactive information, thereby increasing the fun of the text special effects display. BRIEF DESCRIPTION OF THE DRAWINGS

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

[0019] Figure 1 A flowchart of a text special effect display method provided in the first embodiment of the present disclosure;

[0020] Figure 2 A schematic diagram of a target object and various position points provided in the first embodiment of the present disclosure;

[0021] Figure 3 A flowchart of a text special effect display method provided in the second embodiment of the present disclosure;

[0022] Figure 4A flowchart of a text special effect display method provided in Embodiment 3 of the present disclosure;

[0023] Figure 5 A flowchart of a text special effect display method provided in Embodiment 4 of the present disclosure;

[0024] Figure 6 A schematic diagram of the overall necessary key position points of a standard portrait model provided in the fourth embodiment of the present disclosure;

[0025] Figure 7 A schematic diagram of key points of necessary positions of the upper body of a human body image provided by the fourth embodiment of the present disclosure;

[0026] Figure 8 A schematic diagram of key points of contour expansion provided by the fourth embodiment of the present disclosure;

[0027] Fig. 9 A schematic diagram of key points of contour expansion after supplementation provided in the fourth embodiment of the present disclosure;

[0028] Fig.10 A schematic diagram of a fitting curve showing a path provided in the fourth embodiment of the present disclosure;

[0029] Fig.11 A schematic diagram of a flow chart of calculating feature positions using a Newton iteration algorithm provided in the fourth embodiment of the present disclosure;

[0030] Fig.12 This is a structural schematic diagram of a text special effect display device provided in Embodiment 5 of the present disclosure;

[0031] Fig.13 This is a schematic diagram of the structure of an electronic device provided in Embodiment 6 of the present disclosure. DETAILED DESCRIPTION

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

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

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

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

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

[0037] Embodiment 1

[0038] Figure 1 This is a flowchart of a text special effect display method provided by the first embodiment of the present disclosure. The present embodiment is applicable to the case of displaying text special effects in video images. The method can be executed by a text special effect display device, which can be implemented in the form of software and / or hardware, and the device can be configured in an electronic device, such as a mobile terminal or a server device.

[0039] like Figure 1 As shown, the text special effects display method provided in this embodiment includes:

[0040] S110. When the text information to be displayed and the text display parameters are obtained, a video image displaying the text information to be displayed is obtained.

[0041] In the live broadcast scenario, when the live broadcast audience or the anchor himself wants to interact with the live broadcast through some text, he can enter the text information to be displayed and the parameters of the text display in the text interaction window of the live broadcast client. Or when the user is watching variety shows such as short videos or long videos or TV series, and hopes to interact with the plot content, he can also enter the text information to be displayed and the parameters of the text display in the text interaction window of the video client interface.

[0042] The text information to be displayed is the text object to be rendered with special effects. The text display parameters are the personalized settings of the rules for rendering special effects on the text to be displayed, such as the number of characters, font, font size, color, interval between each character, text life cycle (special effect display duration) and other parameters. Furthermore, the text life cycle refers to the time from the appearance to the disappearance of a character in the text special effect, which determines the speed of the text movement.

[0043] When the live broadcast or video application client receives the text information to be displayed and the text display parameters, it indicates that the client needs to perform text special effects rendering. The client will obtain the video image showing the text information to be displayed, including the live broadcast screen or the video image screen being played. The video image is a continuous video image within the duration corresponding to the life cycle of the text to be displayed. Next, the image will be processed frame by frame to determine the position information of the text to be displayed in each video image.

[0044] S120, identifying key position points of the target object in the video image, and confirming a display path of the text to be displayed based on the key position points.

[0045] Among them, the target object can be a person, an animal or other object in the video image. The key position points of the target object are key position points on the target object and corresponding to the morphological features of the target object and the feature points of the target object. For example, the connection points of different joints or parts of the target object. When the target object is a person or an animal, the feature points can be the position points of the facial features of the person or animal. When recognizing the content of the video image, an information comparison or an artificial intelligence image recognition method can be used to identify the target object in the video image. When the video image contains multiple target objects, a certain type of object can be pre-set as the target object, and a certain target object can be selected from the identified multiple target objects. For example, in a live broadcast scene, a person is set as the target object by default. Alternatively, when the user enters the text information to be displayed, a target object is specified, and then when the video image is recognized, only the target object specified by the user is recognized in the video image. If it is recognized, the image processing operation will continue; otherwise, the text special effect rendering operation process will be stopped. After the target object is recognized, the position key points of the target object will be identified, so as to obtain the position key point information, that is, the coordinate information of the position key point on the client display screen.

[0046] Furthermore, since the display path of the text to be displayed is determined based on some key position points, curve fitting is required. In order to ensure the accuracy of the curve fitting result, there are certain requirements for the number of position key points, which must at least include all necessary key position points. Necessary key position points are position key points that have a greater impact on the fitting result when performing curve fitting.

[0047] When the key position points include all necessary key position points, the contour expansion key points corresponding to each key position point can be determined based on the position information of the position key points and the preset contour expansion parameters; thus, contour curve fitting is performed based on the contour expansion key points, and the fitted target contour expansion curve is used as the final text display path. Specifically, when determining the contour expansion key points corresponding to each key position point based on the position information of the position key points and the preset contour expansion parameters, the contour key points corresponding to the position key points on the contour line of the target object can be determined first; then, the contour expansion distance determined based on the preset contour expansion parameters is superimposed on the position information of the contour key points to obtain the position information of the contour expansion key points. Finally, according to the contour expansion key points, the appropriate curve type can be matched for fitting to obtain the target contour expansion curve as the display path of the text to be displayed when the text special effects are displayed.

[0048] For example, Figure 2 The target object identified in the video image is a table. The solid rectangle represents the tabletop, and the two ovals represent the table legs. The black dots in the solid area numbered from 1001 to 1011 represent all the necessary key position points of the target object. The dots filled with black dots on the solid line are the contour key points corresponding to the position key points (necessary position key points) on the contour line of the target object, and the dots filled with black dots on the dotted line are the contour expansion key points. The dotted line is the fitting curve obtained by curve fitting based on the contour expansion key points.

[0049] Among them, the contour key points are determined based on the positional relationship of each key position point, according to the preset length-width ratio of the table model and the distance ratio between each key position point and the edge of the table contour. Then, the contour expansion key points are superimposed on the position of the contour key points in the specified direction to determine the contour expansion key points. Among them, in this embodiment, the contour expansion length in the specified direction can be multiplied by the preset contour expansion length and the vector cross product result between the contour tangent direction vector and the vector perpendicular to the screen to obtain the target result. The preset contour expansion length represents the distance between the expanded contour line and the contour line. Alternatively, in an optional implementation, the mapping relationship between the position key points and expansion parameters of the target object and the target object model can also be established to directly generate the corresponding contour expansion key points.

[0050] S130. Dynamically display the text information to be displayed according to the text display parameters and along the display path.

[0051] After determining the display path value of the text to be displayed, the text to be displayed is displayed according to the font, font size, color, interval between each text, text life cycle (special effect display duration) and other parameters required by the text display parameters. In the process of switching multiple frames of video images, the effect of the text special effects display is to move along the display path until the text life cycle ends. The movement speed of the text can also be determined based on the length of the display path and the duration of the text life cycle. This embodiment can be applied to the personalized setting and display of text special effects in video subtitles or bullet screen displays.

[0052] The technical solution of the disclosed embodiment can be achieved by obtaining the text information to be displayed and the text display parameters when a user issues a text special effect display instruction, and then obtaining a video image showing the text information to be displayed; and further identifying the key position points of the target object in the video image, and when the identified key position points include all the necessary key position points, confirming the display path of the text to be displayed; and finally dynamically displaying the text information to be displayed according to the display path according to the text display parameters, forming a text special effect in which the text to be displayed is dynamically displayed around the outline of the target object. The technical solution of the disclosed embodiment solves the problem that the text special effects in the video screen cannot be personalized, and realizes an editable text special effects display method, so that users can personalize the display effects of text special effects when sending text interactive information, thereby increasing the fun of the text special effects display.

[0053] Embodiment 2

[0054] The embodiments of the present disclosure can be combined with the various optional solutions in the text special effect display method provided in the above embodiments. The text special effect display method provided in this embodiment further describes the process of supplementing key position points.

[0055] Figure 3 This is a flow chart of a text special effects display method provided by the second embodiment of the present disclosure. Figure 3 As shown, the text special effects display method provided in this embodiment includes:

[0056] S210: When the text information to be displayed and the text display parameters are obtained, a video image displaying the text information to be displayed is obtained.

[0057] In the live broadcast scenario, when the live broadcast audience or the anchor himself wants to interact with the live broadcast through some text, he can enter the text information to be displayed and the parameters of the text display in the text interaction window of the live broadcast client. Or when the user is watching variety shows such as short videos or long videos or TV series, and hopes to interact with the plot content, he can also enter the text information to be displayed and the parameters of the text display in the text interaction window of the video client interface.

[0058] The text information to be displayed is the text object to be rendered with special effects. The text display parameters are the personalized settings of the rules for rendering special effects on the text to be displayed, such as the number of characters, font, font size, color, interval between each character, text life cycle (special effect display duration) and other parameters. Furthermore, the text life cycle refers to the time from the appearance to the disappearance of a character in the text special effect, which determines the speed of the text movement.

[0059] When the live broadcast or video application client receives the text information to be displayed and the text display parameters, it indicates that the client needs to perform text special effects rendering. The client will obtain the video image showing the text information to be displayed, including the live broadcast screen or the video image screen being played. The video image is a continuous video image within the duration corresponding to the life cycle of the text to be displayed. Next, the image will be processed frame by frame to determine the position information of the text to be displayed in each video image.

[0060] S220, identifying key position points of the target object in the video image, and when the key position points do not include all the necessary key position points, determining whether the key position points include all preset reference key position points.

[0061] In order to ensure the accuracy of the curve fitting results, the integrity of the position key points will be checked to see whether the identified position key points include all the necessary key position points. The necessary key position points are the position key points that have a greater impact on the fitting results when performing curve fitting. When the key position points do not include all the necessary key position points, it is necessary to further determine whether the unidentified necessary key position points can be supplemented. If not, the text special effects processing process needs to be stopped.

[0062] The key point to determine whether the unidentified necessary key position points can be supplemented is whether the identified key position points include all the preset reference key position points. The preset reference key position points are part of the necessary key position points and are key points that can be set as a reference for non-reference key position points.

[0063] In a preferred embodiment, in order to reduce the jitter of text special effects caused by video or image algorithms, before determining the contour expansion key points corresponding to each key position point, the identified key position points are subjected to anti-shake processing. Anti-shake operation can be performed by means of median filtering or mean filtering. Taking median filtering as an example, the median of the position information of key position points in a continuous number (such as three frames) of video images can be taken as the position information of the key position points in the current video image to filter out noise jitter.

[0064] S230: When all preset reference key position points are included in the key position points, necessary key position points not included in the key position points are supplemented according to the position information of the preset reference key position points in the key position points and the size ratio of the standard reference model of the target object.

[0065] For example, in Figure 2 In the example, when the target object is identified, all preset reference key points 1001, 1003, 1004, 1008, 1009 and 1011 are identified. Then, the necessary key position points can be further supplemented.

[0066] In an optional implementation, a coordinate system may be established based on the points on the same horizontal line and the points on the same vertical line among the reference key points, and the coordinates of each reference key point in the coordinate system and the distances between each reference key point may be determined. Further, the positional relationship between each necessary key position point in the preset model of the target object may be referred to to fill in the missing necessary key position points.

[0067] S240: Determine contour expansion key points corresponding to each of the key position points according to the position information of the supplemented position key points and preset contour expansion parameters.

[0068] Specifically, when determining the contour expansion key points corresponding to each key position point according to the position information of the supplemented position key points and the preset contour expansion parameters, the contour key points corresponding to the position key points on the contour line of the target object can be determined according to the preset model ratio of the target object; then, the contour expansion distance determined based on the preset contour expansion parameters is superimposed on the position information of the contour key points to obtain the position information of the contour expansion key points. Finally, according to the contour expansion key points, the appropriate curve type can be matched for fitting to obtain the target contour expansion curve as the display path of the text to be displayed when the text special effects are displayed.

[0069] S250 , performing contour curve fitting based on the contour expansion key points, and using the fitted target contour expansion curve as the display path.

[0070] To ensure that the fitting curve is smooth at the first contour expansion key point at the beginning and the last contour expansion key point at the end, a contour expansion key point is added at each end of the fitting curve. This requires that the added contour expansion key point and its two adjacent contour expansion key points meet a certain linear relationship, that is, the added contour expansion key point and its two adjacent contour expansion key points are kept on the same straight line. Among them, the relevant coefficients of the linear relationship can be set according to the characteristics of the fitting curve, or set by random numbers. Then, the contour curve is further fitted based on the supplemented contour expansion key points to obtain the target contour expansion curve as the display path.

[0071] S260: Dynamically display the text information to be displayed according to the text display parameters and along the display path.

[0072] The technical solution of the disclosed embodiment is based on the above-mentioned embodiment. When a user issues a text special effect display instruction, the text information to be displayed and the text display parameters are obtained, and then a video image showing the text information to be displayed is obtained; and the key position points of the target object in the video image are further identified. When the identified key position points do not include all necessary key position points, it is confirmed whether the identified key position points include all preset reference key position points. If so, the unidentified necessary key position points are filled in according to all preset reference key points. Then, the display path of the text to be displayed is confirmed based on the filled key position points; finally, according to the text display parameters, the text information to be displayed is dynamically displayed according to the display path, forming a text special effect in which the text to be displayed is dynamically displayed around the outline of the target object. The technical solution of the disclosed embodiment solves the problem that text special effects in video images cannot be personalized, and the problem that necessary key position points are missing during text special effects processing, and realizes an editable text special effects display method, so that users can personalize the display effects of text special effects when sending text interactive messages, thereby increasing the interest of text special effects display. Even under the condition of incomplete recognition of key position points, text special effects processing can still be performed.

[0073] Embodiment 3

[0074] The embodiments of the present disclosure can be combined with the various optional solutions in the text special effect display method provided in the above embodiments. The text special effect display method provided in this embodiment further describes the process of displaying text according to the display path.

[0075] Figure 4 This is a flow chart of a text special effects display method provided by Embodiment 3 of the present disclosure. Figure 4 As shown, the text special effects display method provided in this embodiment includes:

[0076] S310: When the text information to be displayed and the text display parameters are obtained, a video image displaying the text information to be displayed is obtained.

[0077] S320: Identify key position points of the target object in the video image, and confirm a display path of the text to be displayed based on the key position points.

[0078] The specific contents of S310-S320 can refer to the contents of the aforementioned embodiment and will not be repeated in this embodiment.

[0079] S330, determining the path position of each character in the displayed text in the current video image according to the text display parameters, the curve of the display path and the characteristic position of the first character in the to-be-displayed text in the previous frame of the video image.

[0080] Since the target object may move in different frames of video images, for example, in continuous video image frames, the target object is getting closer and closer to the lens, then the target object will become larger and the curve of the display path will become longer. Therefore, the movement process of the text to be displayed on the display path is uneven. In order to make the dynamic movement process of the text more stable and uniform when the text special effects are displayed, the text feature position information can be transmitted in two adjacent frames of video images. Since the target object in the video will continue to change, the position of the text in the human eye is generally set with reference to a certain feature point, and the position of the feature point can maintain the visual position invariance of the position in the current video image with the position in the previous frame of the video image. Therefore, the concept of a feature position is introduced here. The feature position represents the position of each text on the curve segment between the two contour expansion key points on the display path. The path position represents the length of the curve path of each text moving on the display path. The characteristic position of the text on the screen can be represented by CN(n, t), which means that the position of the Nth character is located on the curve segment of the contour expansion key point P(n) and the contour expansion key point P(n+1). t is a parameter of the display path curve. The value range of t is 0-1, which means the degree to which the position of the nth character is close to the contour expansion key point P(n) or the contour expansion key point P(n+1). The path position represents the length of the curve path that the Nth character has traveled from the starting point P1 in the contour expansion key point, which can be represented by LN. The path position is introduced to ensure the visual speed invariance of the text movement. In addition, LN(n, t) can represent the length of the curve corresponding to the Nth character moving from the characteristic position CN(n, 0) to CN(n, t); L(n, m) represents the length of the curve of Pn-m, that is, the length of the curve between the contour expansion key point n and the contour expansion key point m; L(n) represents L(n, n+1), that is, the length of the curve between the contour expansion key point n and the contour expansion key point n+1.

[0081] Specifically, the specific process of displaying the path position of each character in the current video image is as follows:

[0082] First, in the current video image, the moving speed of the to-be-displayed text is determined according to the text life cycle in the text display parameters and the curve length of the display path. The curve length is the length from the first contour expansion key point to the last contour expansion key point. The speed of the text can be determined by dividing the curve length by the text life cycle.

[0083] Then, the characteristic position of the first character in the text to be displayed in the previous frame of the video image is obtained. When the previous frame is not empty, the characteristic position can be directly obtained. If the current video image is the first frame of the video image, the previous frame is empty, and the characteristic position of the first character in the text to be displayed in the previous frame of the video image is recorded as CN (1, 0), indicating that the first character is at the position of the first contour expansion key point, which is equivalent to the starting point of the dynamic display of the text special effects. Then, the path position of the first character in the current video image can be calculated based on the characteristic position of the first character in the text to be displayed in the previous frame of the video image. In an optional embodiment, a preset curve integration method can be used first to perform an integral calculation on the fitting curve of the display path based on the characteristic position of the first character in the previous frame of the video image to determine the corresponding initial path position of the first character in the current video image. The preset curve integration method can be a Gauss-Legend integration algorithm, which is a numerical algorithm commonly used in computers for integral solution. The advantage is that a relatively small number of evaluation calculations is used to obtain an integral calculation result with high accuracy and numerical stability. Then, the moving distance of the first character is determined according to the time interval between the current video image and the previous frame of video image and the moving speed of the characters to be displayed; further, the moving distance is superimposed on the initial path position of the first character in the previous frame of video image to obtain the path position of the first character in the characters to be displayed in the current video image.

[0084] Furthermore, the text display intervals between each character in the text to be displayed and the first character may be superimposed on the path position of the first character in the current video image to determine the path position of each character in the text to be displayed in the current video image.

[0085] S340: Calculate the characteristic position of each character in the current video image according to the path position of each character in the characters to be displayed in the current video image.

[0086] The characteristic position is equivalent to a point on the display path curve, so the characteristic position point corresponding to the path position of each character in the current video image can be determined by solving the curve solution. Exemplarily, the characteristic position of each character can be calculated using the Newton iteration algorithm. The Newton iteration method is a common method for finding approximate roots of equations. Compared with finding exact roots, it has the advantages of reasonable calculation amount and satisfactory solution accuracy.

[0087] In the process of solving using the Newton iteration algorithm, the number of Newton iterations is usually set to 3. First, according to the path position of each character in the current video image, determine which curve segment between two contour expansion key points on the display path curve the path position is in. Then, bring the curve parameters of the display path into the Newton iteration function, iterate and solve according to the preset number of Newton iterations, and finally obtain the characteristic position of each character in the current video image.

[0088] S350: Determine the screen position of each character according to the characteristic position of each character in the current video image.

[0089] In the process of contour expansion curve fitting, the curve fitting is performed according to the screen position of each contour expansion key point, and the output of the fitting curve is the screen position. For the characteristic position CN (n, t) of the Nth character, the screen position of the Nth character can be obtained by inputting t and the position information of the contour expansion key point P (n) and one or more adjacent contour expansion key points into the display path curve. Among them, the position information of the contour expansion key point P (n) and one or more adjacent contour expansion key points specifically input into the display path curve is consistent with the conditions when the display path curve is fitted. For example, when performing curve fitting, four adjacent contour expansion key points are used for spline curve fitting. Then, when determining the screen position, the position information input into the display path curve is the position information of the four contour expansion key points P (n-1), P (n), P (n + 1) and P (n + 2).

[0090] S360: Render and display the text to be displayed in the video image based on the screen position of each text.

[0091] In this step, the text to be displayed can be rendered at the screen position of each text according to the text font and font size in the text display parameters; then, the rendering effect of each text is superimposed on the corresponding video image for display. The video image is rendered before the text is rendered.

[0092] The technical solution of the embodiment of the present disclosure, on the basis of the above-mentioned embodiment, introduces the characteristic position and path position of the text in the video image. When determining the movement process of the text to be displayed, the path position of each text in the current video image is determined according to the characteristic position of each text in the previous frame of the video image, and then the path position is converted into the characteristic position in the current video image, and then the screen position of each text is determined. It can solve the problem that the dynamic effect of text rendering changes unevenly due to the change of the target object in different frames of video images, and optimize the rendering effect of the text to be displayed. Finally, a dynamic display text special effect is formed in which the text to be displayed moves at a uniform speed around the outline of the target object. The technical solution of the embodiment of the present disclosure solves the problem that the text special effect in the video screen cannot be personalized, and the problem that the target object changes in different video frames, and realizes an editable text special effect display method, so that users can personalize the display effect of text special effects when sending text interactive information, and increase the fun of text special effect display.

[0093] Embodiment 4

[0094] The embodiments of the present disclosure can be combined with the various optional solutions in the text special effect display method provided in the above embodiments. The text special effect display method provided in this embodiment further describes the process of displaying text according to the portrait contour curve path when the target object is a portrait.

[0095] Figure 5 This is a flow chart of a text special effects display method provided by the fourth embodiment of the present disclosure. Figure 5 As shown, the text special effects display method provided in this embodiment includes:

[0096] S410: When the text information to be displayed and the text display parameters are obtained, a video image displaying the text information to be displayed is obtained.

[0097] S420, identifying key position points of the image of the person in the video image, and when the key position points do not include all the necessary key position points but include all the preset reference key position points, supplement the necessary key position points not included in the key position points based on the position information of the preset reference key position points in the key position points and the size ratio of the standard reference model of the target object.

[0098] In this embodiment, the target object is a person image, and the technical solution of this embodiment can realize the process of dynamically displaying the text to be displayed above the human body outline. It can be applied to user interaction in live broadcast scenes, or other video interaction scenes.

[0099] When identifying the key positions of a person’s image, the preset human skeleton key point model is used as a reference. The positions of the key points in the model can be as follows: Figure 6shown. Figure 6 A two-dimensional human skeleton key point model is shown, including 1-17 key points in the model. Of course, a three-dimensional human skeleton key point model can also be used. The reason why a two-dimensional human skeleton key point model is used instead of a three-dimensional human skeleton key point model in this embodiment is that the three-dimensional human skeleton key point model is not as accurate and stable as the two-dimensional human skeleton key point model, and the two-dimensional human skeleton key point model already meets the requirements of special effects.

[0100] Now take the key position points of the upper body of the human skeleton key point model (such as Figure 7 ) is taken as an example to illustrate the process of determining all necessary key position points of a person's image. In the upper body part of the human body, the set of necessary key position points is: [0, 1, 2, 5, 14, 15, 16, 17]. Since the characters in the video image are sometimes partially outside the video image, resulting in incomplete necessary key position points identified by the image algorithm, it is necessary to check whether the acquired necessary key position points are missing. If they are missing, they need to be supplemented according to the preset strategy. For example, some preset reference key position points in the middle near the human face are selected, and the default positions of other necessary key position points are calculated based on the proportions of the standard portrait. Specifically, the preset reference key position points in this embodiment are [0, 1, 14, 15]. The 0 point is taken as the coordinate origin, the 0-1 point direction is the vertical axis direction, and the 14-15 point direction is the horizontal axis direction to establish a reference coordinate system. The specific calculation formula for the ath key point is as follows (the value range of a is the serial number of the necessary key position point in the set of necessary key position points):

[0101] B(a)=B(0)+x(a)*[B(15)-B(14)]+y(a)*[B(1)-B(0)].

[0102] Among them, B(a) represents the screen position of the ath human key point, that is, the position information obtained when the key position point is identified, and x(a) and y(a) are the horizontal and vertical coordinates of point a in the reference coordinate system. x(a) and y(a) can be pre-calculated based on the position information of the known key position points and the proportion of the human skeleton key point model. The coordinate calculation results of the necessary key position points in the reference coordinate system are as follows:

[0103] a x(a) y(a) 2 -2.0 1.5 5 2.0 1.5 16 -0.9 -0.3 17 0.9 -0.3

[0104] Furthermore, by substituting the coordinate values ​​in the above table into the key point screen position calculation formula, the screen position information of the supplementary necessary key position points can be determined.

[0105] In a preferred embodiment, in order to reduce the jitter of text effects caused by video or image algorithms, anti-shake processing is performed on the identified key position points. Simple median filtering can be used to take the median of the key point position components of three consecutive frames as the position component of the current frame to filter out noise jitter. Alternatively, other filtering methods can be used.

[0106] S430: Determine contour expansion key points corresponding to each of the key position points according to the position information of the supplemented position key points and the preset contour expansion parameters.

[0107] The contour expansion key points generally select several key position points corresponding to the necessary position key points, which are usually the position points that reflect the overall contour and characteristics of the character image. For the selection of contour expansion key points for the task image, please refer to Figure 8 The contour expansion key points P1-P9 shown. The position calculation of each round of expansion key points depends on the contour key points on the contour line of the human body image. Here, the position calculation of the nth outer contour key point can be calculated using the following calculation formula: P(n) = O(a) + length*cross(T(n), forward).

[0108] Among them, P(n) is the position information of the nth contour expansion key point, that is, the screen coordinate position; O(a) is the position information of each necessary key position point on the human body contour line. The specific value can be determined according to the position information of each necessary key position point and the distance between each necessary key position point, and the ratio with the standard portrait, or the calculation rules can be pre-set based on the characteristics of the portrait. The calculation rules can meet the visual effect that fits the human body contour, and simple calculation rules are preferred; length is the contour expansion length, which represents the distance between the contour expansion curve and the human body, cross() is the vector cross product function, T(n) is the tangent direction of the contour line, and forward is the vector perpendicular to the screen facing inward, here is (0, 0, 1). The values ​​of O(a) and T(n) determine the shape of the contour expansion curve, and length determines the size of the contour. In this embodiment, in order to simplify the calculation relationship as much as possible, the numerical calculation of O(a) corresponding to each contour key point follows the calculation rules in the following table:

[0109]

[0110] Among them, distance() represents the distance function between two points.

[0111] S440: Perform contour curve fitting based on the contour expansion key points, and use the fitted target contour expansion curve as the display path.

[0112] First, to ensure that the fitting curve is smooth at the starting point P1 and the ending point P9, it is necessary to add contour expansion key points at the starting point and the ending point of the contour expansion key points, such as Fig. 9 P0 and P10 in the figure. P0 and P10 need to have a certain linear relationship with the original contour key points to make the fitting curve smooth at the starting P1 and the end P9, that is, keep P2-3-0 and P8-9-10 on the same straight line. In this embodiment, the specific calculation relationship between P0 and P10 can be calculated as follows:

[0113] P(0)=P(1)*2-P(2), P(10)=P(9)*2-P(8).

[0114] The determination of the above calculation relationship can pre-set multiple groups of linear relationship parameters, obtain multiple groups of linear fitting results respectively, and determine the final calculation relationship according to the effect of curve fitting. Further, in this embodiment, after determining the final supplemented contour expansion key points, CatmullRom spline curve is used for linear fitting. For the curve segment P(n)-P(n+1) between any two contour expansion key points, four points P(n-1), P(n), P(n+1) and P(n+2) are required as input. The calculation code is as follows, where p0, p1, p2 and p3 correspond to four input points respectively, t ranges from 0-1, a, b and c are known curve fitting parameters, and the return value is the screen position.

[0115]

[0116] The final fitting curve is as follows Fig.10 As shown by the middle dotted line, the curve segment P1-P9 is the dynamic display path of the text to be displayed.

[0117] S450, determining the path position of each character in the displayed text in the current video image according to the text display parameters, the curve of the display path and the characteristic position of the first character in the to-be-displayed text in the previous frame of the video image.

[0118] Since the target object may move in different frames of video images, for example, in continuous video image frames, the target object is getting closer and closer to the lens, then the target object will become larger and the curve of the display path will become longer. Therefore, the movement process of the text to be displayed on the display path is uneven. In order to make the dynamic movement process of the text more stable and uniform when the text special effects are displayed, the text feature position information can be transmitted in two adjacent frames of video images. Since the target object in the video will continue to change, the position of the text in the human eye is generally set with reference to a certain feature point, and the position of the feature point can maintain the visual position invariance of the position in the current video image with the position in the previous frame of the video image. Therefore, the concept of a feature position is introduced here. The feature position represents the position of each text on the curve segment between the two contour expansion key points on the display path. The path position represents the length of the curve path of each text moving on the display path. The characteristic position of the text on the screen can be represented by CN(n, t), which means that the position of the Nth character is located on the curve segment of the contour expansion key point P(n) and the contour expansion key point P(n+1). t is a parameter of the display path curve. The value range of t is 0-1, which means the degree to which the position of the nth character is close to the contour expansion key point P(n) or the contour expansion key point P(n+1). The path position represents the length of the curve path that the Nth character has traveled from the starting point P1 in the contour expansion key point, which can be represented by LN. The path position is introduced to ensure the visual speed invariance of the text movement. In addition, LN(n, t) can represent the length of the curve corresponding to the Nth character moving from the characteristic position CN(n, 0) to CN(n, t); L(n, m) represents the length of the curve of Pn-m, that is, the length of the curve between the contour expansion key point n and the contour expansion key point m; L(n) represents L(n, n+1), that is, the length of the curve between the contour expansion key point n and the contour expansion key point n+1.

[0119] Specifically, the specific process of displaying the path position of each character in the current video image is as follows:

[0120] First, in the current video image, the moving speed of the to-be-displayed text is determined according to the text life cycle in the text display parameters and the curve length of the display path. The curve length is the length from the first contour expansion key point to the last contour expansion key point. The speed of the text can be determined by dividing the curve length by the text life cycle.

[0121] Then, obtain the characteristic position of the first character in the text to be displayed in the previous frame of the video image. When the previous frame is not empty, directly obtain the characteristic position. If the current video image is the first frame of the video image, the previous frame is empty, and the characteristic position of the first character in the text to be displayed in the previous frame of the video image is recorded as CN (1, 0), indicating that the first character is at the position of the first contour expansion key point, which is equivalent to the starting point of the dynamic display of the text special effects. Then, the path position of the first character in the text to be displayed in the current video image can be calculated based on the characteristic position of the first character in the text to be displayed in the previous frame of the video image. In an optional embodiment, a preset curve integration method can be first used to integrate the fitting curve of the display path based on the characteristic position of the first character in the previous frame of the video image to determine the corresponding initial path position of the first character in the current video image.

[0122] In this embodiment, based on the curve fitting function, the text feature position point can be expressed as

[0123] Q(n, t) = CatmullRomPoint[t, P(n-1), P(n), P(n+1), P(n+2)]; further or polynomial: Q(n, t) = a+bt+ct 2 +dt 3 ; The derivative of the polynomial is expressed as: Q′(n, t) = b+2ct+3dt 2 ; The length of the vector corresponding to the derivative is: Then, the curve length LN(n, t) can be calculated based on the Gauss-Legend integral. Where k = 5. i and x i The parameters corresponding to the Gaussler integral can be taken according to the following table.

[0124]

[0125]

[0126] The path location can be expressed as

[0127] After the path position is calculated, the moving distance of the first character is determined based on the time interval between the current video image and the previous frame of video image and the moving speed of the text to be displayed; then, the moving distance is superimposed on the initial path position of the first character in the previous frame of video image to obtain the path position of the first character in the text to be displayed in the current video image.

[0128] Furthermore, the text display intervals between each character in the text to be displayed and the first character may be superimposed on the path position of the first character in the current video image to determine the path position of each character in the text to be displayed in the current video image.

[0129] S460: Calculate the characteristic position of each character in the current video image according to the path position of each character in the characters to be displayed in the current video image.

[0130] Among them, the characteristic position is equivalent to a point on the display path curve, so the characteristic position point corresponding to the path position of each character in the current video image can be determined by solving the solution of the curve. Exemplarily, the characteristic position of each character can be calculated using the Newton iteration algorithm. The Newton iteration method is a common method for finding approximate roots of equations. Compared with finding exact roots, it has the advantages of reasonable calculation amount and satisfactory solution accuracy.

[0131] In the process of solving by using Newton iteration algorithm, the number of Newton iterations is usually set to 3. First, according to the path position of each character in the current video image, determine which curve segment between two contour expansion key points on the display path curve the path position is in. Then, the curve parameters of the display path are brought into the Newton iteration function, and the iterative solution is performed according to the preset number of Newton iterations, and finally the characteristic position of each character in the current video image is obtained. In this embodiment, the process of calculating the characteristic position can be referred to Fig.11 As shown in the flowchart. Assign the path position of the Nth word to len, and then start from P1 to determine which two contour expansion key points the Nth word falls within. When len is greater than the length between P1 and P2, subtract the length between P1 and P2 from the value of len. Based on the new len value, further determine whether the feature position of the Nth word is between points P2 and P3, until len is less than L(n), determine the curve segment where the Nth word is located, and then use the Newton iterative algorithm to solve the parameter t to determine the feature position of the Nth word. Among them,

[0132] S470: Determine the screen position of each character according to the characteristic position of each character in the current video image.

[0133] In the process of contour expansion curve fitting, the curve fitting is performed according to the screen position of each contour expansion key point, and the output of the fitting curve is the screen position. For the characteristic position CN(n, t) of the Nth character, the screen position of the Nth character can be obtained by inputting t and the position information of the contour expansion key point P(n) and one or more adjacent contour expansion key points into the display path curve. It can be expressed as: SN(x, y) = Q(n, t) = CatmullRomPoint[t, P(n-1), P(n), P(n+1), P(n+2)], SN(x, y) is the screen position of each Nth character.

[0134] S480: Render and display the text to be displayed in the video image based on the screen position of each text.

[0135] In this step, the text to be displayed can be rendered at the screen position of each text according to the text font and font size in the text display parameters; then, the rendering effect of each text is superimposed on the corresponding video image for display. The video image is rendered before the text is rendered.

[0136] The technical solution of the embodiment of the present disclosure, on the basis of the above embodiment, applies the text special effects display method to the scene where the target object is a human image, firstly identifies the necessary key position points in the video image, and supplements the necessary position key points that have not been identified, then gradually performs the fitting of the text display path curve, and then introduces the characteristic position and path position of the text in the video image according to the curve fitting result, and when determining the movement process of the text to be displayed, determines its path position in the current video image according to the characteristic position of each text in the previous frame of the video image, and then converts the path position into the characteristic position in the current video image, and then determines the screen position of each text. Finally, a dynamic display text special effect is formed in which the text to be displayed moves at a uniform speed around the outline of the portrait. The technical solution of the embodiment of the present disclosure solves the problem that the text special effects in the video screen cannot be personalized, and the problem that the target objects in different video frames change, and realizes an editable text special effects display method, so that users can personalize the display effect of text special effects when sending text interactive information, and increase the fun of text special effects display.

[0137] Embodiment 5

[0138] Fig.12 This is a schematic diagram of the structure of a text special effect display device provided in Embodiment 5 of the present disclosure. The text special effect display device provided in this embodiment is suitable for displaying text special effects in video images.

[0139] like Fig.12As shown, the text special effect display device includes: a text special effect display data acquisition module 510, a text special effect display path determination module 520 and a text special effect display module 530.

[0140] Among them, the text special effect display data acquisition module 510 is used to obtain a video image displaying the text information to be displayed when the text information to be displayed and the text display parameters are obtained; the text special effect display path determination module 520 is used to identify the key position points of the target object in the video image, and confirm the display path of the text to be displayed based on the key position points; the text special effect display module 530 is used to dynamically display the text information to be displayed according to the display path according to the text display parameters.

[0141] The technical solution of the disclosed embodiment is to obtain the text information to be displayed and the text display parameters when a user issues a text special effect display instruction, and then obtain a video image showing the text information to be displayed; and further identify the key position points of the target object in the video image to confirm the display path of the text to be displayed; finally, according to the text display parameters, the text information to be displayed is dynamically displayed according to the display path, forming a text special effect in which the text to be displayed is dynamically displayed around the outline of the target object. The technical solution of the disclosed embodiment solves the problem that the text special effects in the video screen cannot be personalized, and realizes an editable text special effects display method, so that users can personalize the display effects of text special effects when sending text interactive information, thereby increasing the fun of the text special effects display.

[0142] In some optional implementations, the text special effect display path determination module 520 specifically includes a contour expansion key point determination submodule and a path curve fitting submodule; wherein,

[0143] A contour expansion key point determination submodule is used to determine the contour expansion key points corresponding to each of the key position points according to the position information of the position key points and preset contour expansion parameters when the key position points include all necessary key position points; a path curve fitting submodule is used to perform contour curve fitting based on the contour expansion key points, and use the fitted target contour expansion curve as the display path.

[0144] In some optional implementations, the text special effect display path determination module 520 further includes a key position point supplement submodule, which is used to:

[0145] Determining whether the key position points include all preset reference key position points;

[0146] When all preset reference key position points are included in the key position points, necessary key position points not included in the key position points are supplemented according to the position information of the preset reference key position points in the key position points and the size ratio of the standard reference model of the target object;

[0147] Otherwise, stop the current text special effect display processing process.

[0148] In some optional implementations, the contour expansion key point determination submodule is further used to:

[0149] Determine a contour key point on the contour line of the target object corresponding to the position key point;

[0150] The contour expansion distance determined based on the preset contour expansion parameters is superimposed on the position information of the contour key points to obtain the position information of the contour expansion key points.

[0151] In some optional implementations, the path curve fitting submodule is specifically used to:

[0152] Supplement contour expansion key points according to the preset contour expansion key point position relationship;

[0153] Contour curve fitting is performed based on the supplemented contour expansion key points.

[0154] In some optional implementations, the text special effects display device also includes a key position point information correction module, which is used to take the median of the position information of each key position point in multiple consecutive frames of video images as the position information of each key position point before determining the contour expansion key point corresponding to each key position point.

[0155] In some optional implementations, the text special effects display module 530 includes: a text path position determination submodule, a text feature position determination submodule, a text screen position determination submodule and a text rendering display submodule; wherein the text path position determination submodule is used to determine the path position of each character in the displayed text in the current video image according to the text display parameters, the curve of the display path and the feature position of the first character in the text to be displayed in the previous frame of the video image, wherein the feature position represents the position of each character on the curve segment between two contour expansion key points on the display path, and the path position represents the length of the curve path moved by each character on the display path; the text feature position determination submodule is used to calculate the feature position of each character in the current video image according to the path position of each character in the text to be displayed in the current video image; the text screen position determination submodule is used to determine the screen position of each character according to the feature position of each character in the current video image; the text rendering display submodule is used to render and display the text to be displayed in the video image based on the screen position of each character.

[0156] In some optional implementations, the text path position determination submodule is specifically used for:

[0157] Determining the moving speed of the to-be-displayed characters according to the character life cycle in the character display parameters and the curve length of the display path;

[0158] Determine the path position of the first character in the current video image based on the moving speed of the displayed characters and the characteristic position of the first character in the characters to be displayed in the previous frame of the video image;

[0159] The path position of each character in the characters to be displayed in the current video image is determined according to the path position of the first character in the current video image and the character display interval in the character display parameter.

[0160] In some optional implementations, the text path position determination submodule is further used to:

[0161] A preset curve integration algorithm is used to integrate the characteristic position of the first character in the previous frame of video image, and determine an initial path position corresponding to the characteristic position of the first character in the previous frame of video image in the current video image;

[0162] Determining the moving distance of the first character according to the time interval between the current video image and the previous frame of video image and the moving speed of the character to be displayed;

[0163] The moving distance is superimposed on the initial path position to determine the path position of the first text in the current video image.

[0164] In some optional implementations, the text rendering and display submodule is specifically used to:

[0165] Rendering the characters to be displayed at the screen positions of the characters according to the character fonts and font sizes in the character display parameters;

[0166] The rendering effects of the characters are superimposed on the video image for display.

[0167] In some optional implementations, the target object includes an image of a person in a video image.

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

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

[0170] Embodiment 6

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

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

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

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

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

[0176] Embodiment 7

[0177] An embodiment of the present disclosure provides a computer storage medium on which a computer program is stored. When the program is executed by a processor, the text special effect display method provided in the above embodiment is implemented.

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

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

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

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

[0182] When the text information to be displayed and the text display parameters are obtained, a video image displaying the text information to be displayed is obtained;

[0183] Identifying key position points of the target object in the video image, and confirming a display path of the to-be-displayed text based on the key position points;

[0184] According to the text display parameters, the text information to be displayed is dynamically displayed along the display path.

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

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

[0187] The units involved in the embodiments described in the present disclosure may be implemented by software or hardware. The names of the units and modules do not, in some cases, limit the units and modules themselves. For example, the data generation module may also be described as a "video data generation module".

[0188] The functions described above herein may be performed at least in part by one or more hardware logic components. For example, without limitation, exemplary types of hardware logic components that may be used include: Field Programmable Gate Array (FPGA), Application Specific Integrated Circuit (ASIC), Application Specific Standard Parts (ASSP), System on Chip (SOC), Complex Programmable Logic Device (CPLD), etc.

[0189] In the context of the present disclosure, a machine-readable medium may be a tangible medium that may contain or store a program for use by or in conjunction with an instruction execution system, device, or equipment. A machine-readable medium may be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium may include, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, device, or equipment, or any suitable combination of the foregoing. A more specific example of a machine-readable storage medium may include an electrical connection based on one or more lines, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.

[0190] According to one or more embodiments of the present disclosure, [Example 1] provides a method for displaying text special effects, the method comprising:

[0191] When the text information to be displayed and the text display parameters are obtained, a video image displaying the text information to be displayed is obtained;

[0192] Identifying key position points of the target object in the video image, and confirming a display path of the to-be-displayed text based on the key position points;

[0193] According to the text display parameters, the text information to be displayed is dynamically displayed along the display path.

[0194] According to one or more embodiments of the present disclosure, [Example 2] provides a text special effect display method, further comprising:

[0195] In some optional implementations, confirming the display path of the to-be-displayed text based on the key position point includes:

[0196] When the key position points include all necessary key position points, determining contour expansion key points corresponding to each of the key position points according to the position information of the position key points and preset contour expansion parameters;

[0197] Contour curve fitting is performed based on the contour expansion key points, and the target contour expansion curve obtained by fitting is used as the display path.

[0198] According to one or more embodiments of the present disclosure, [Example 3] provides a text special effect display method, further comprising:

[0199] In some optional implementations, when the key position points do not include all the necessary key position points, the method further includes:

[0200] Determining whether the key position points include all preset reference key position points;

[0201] When all preset reference key position points are included in the key position points, necessary key position points not included in the key position points are supplemented according to the position information of the preset reference key position points in the key position points and the size ratio of the standard reference model of the target object;

[0202] Otherwise, stop the current text special effect display processing process.

[0203] According to one or more embodiments of the present disclosure, [Example 4] provides a text special effect display method, further comprising:

[0204] In some optional implementations, determining contour expansion key points corresponding to each of the key position points according to the position information of the position key points and preset contour expansion parameters includes:

[0205] Determine a contour key point on the contour line of the target object corresponding to the position key point;

[0206] The contour expansion distance determined based on the preset contour expansion parameters is superimposed on the position information of the contour key points to obtain the position information of the contour expansion key points.

[0207] According to one or more embodiments of the present disclosure, [Example 5] provides a text special effect display method, further comprising:

[0208] In some optional implementations, performing contour curve fitting based on the contour expansion key points includes:

[0209] Supplement contour expansion key points according to the preset contour expansion key point position relationship;

[0210] Contour curve fitting is performed based on the supplemented contour expansion key points.

[0211] According to one or more embodiments of the present disclosure, [Example 6] provides a text special effect display method, further comprising:

[0212] In some optional implementations, before determining the contour expansion key points corresponding to each of the key position points, the method further includes:

[0213] The median value of the position information of each of the key position points in the video images of multiple consecutive frames is taken as the position information of each of the key position points.

[0214] According to one or more embodiments of the present disclosure, [Example 7] provides a text special effect display method, further comprising:

[0215] In some optional implementations, according to the text display parameter, the text information to be displayed is dynamically displayed according to the display path, and the method further includes:

[0216] Determine the path position of each character in the displayed characters in the current video image according to the character display parameters, the curve of the display path and the characteristic position of the first character in the characters to be displayed in the previous frame of the video image, wherein the characteristic position represents the position of each character on the curve segment between two contour expansion key points on the display path, and the path position represents the length of the curve path moved by each character on the display path;

[0217] Calculating the characteristic position of each character in the current video image according to the path position of each character in the characters to be displayed in the current video image;

[0218] Determining the screen position of each character according to the characteristic position of each character in the current video image;

[0219] The characters to be displayed are rendered and displayed in the video image based on the screen positions of the characters.

[0220] According to one or more embodiments of the present disclosure, [Example 8] provides a text special effect display method, further comprising:

[0221] In some optional implementations, determining the path position of each character in the displayed text in the current video image according to the text display parameter, the curve of the display path, and the characteristic position of the first character in the to-be-displayed text in the previous frame of the video image includes:

[0222] Determining the moving speed of the to-be-displayed characters according to the character life cycle in the character display parameters and the curve length of the display path;

[0223] Determine the path position of the first character in the current video image based on the moving speed of the displayed characters and the characteristic position of the first character in the characters to be displayed in the previous frame of the video image;

[0224] The path position of each character in the characters to be displayed in the current video image is determined according to the path position of the first character in the current video image and the character display interval in the character display parameter.

[0225] According to one or more embodiments of the present disclosure, [Example 9] provides a text special effect display method, further comprising:

[0226] In some optional implementations, determining the path position of the first character in the current video image based on the moving speed of the displayed character and the characteristic position of the first character in the to-be-displayed characters in the previous frame of the video image includes:

[0227] A preset curve integration algorithm is used to integrate the characteristic position of the first character in the previous frame of video image, and determine an initial path position corresponding to the characteristic position of the first character in the previous frame of video image in the current video image;

[0228] Determining the moving distance of the first character according to the time interval between the current video image and the previous frame of video image and the moving speed of the character to be displayed;

[0229] The moving distance is superimposed on the initial path position to determine the path position of the first text in the current video image.

[0230] According to one or more embodiments of the present disclosure, [Example 10] provides a text special effect display method, further comprising:

[0231] In some optional implementations, the rendering and displaying the to-be-displayed text in a video image based on the screen position of each text includes:

[0232] Rendering the characters to be displayed at the screen positions of the characters according to the character fonts and font sizes in the character display parameters;

[0233] The rendering effects of the characters are superimposed on the video image for display.

[0234] According to one or more embodiments of the present disclosure, [Example 11] provides a text special effect display method, further comprising:

[0235] In some optional implementations, the target object includes an image of a person in a video image.

[0236] According to one or more embodiments of the present disclosure, [Example 12] provides a text special effect display device, including:

[0237] A text special effect display data acquisition module is used to acquire a video image showing the text information to be displayed when the text information to be displayed and the text display parameters are acquired;

[0238] A text special effect display path determination module, used to identify key position points of the target object in the video image, and confirm the display path of the text to be displayed based on the key position points;

[0239] The text special effect display module is used to dynamically display the text information to be displayed according to the display path based on the text display parameters.

[0240] According to one or more embodiments of the present disclosure, [Example 13] provides a text special effect display device, further comprising:

[0241] In some optional implementations, the text special effects display path determination module specifically includes a contour expansion key point determination submodule and a path curve fitting submodule; wherein,

[0242] A contour expansion key point determination submodule is used to determine the contour expansion key points corresponding to each of the key position points according to the position information of the position key points and preset contour expansion parameters when the key position points include all necessary key position points; a path curve fitting submodule is used to perform contour curve fitting based on the contour expansion key points, and use the fitted target contour expansion curve as the display path.

[0243] According to one or more embodiments of the present disclosure, [Example 14] provides a text special effect display device, further comprising:

[0244] In some optional implementations, the text special effect display path determination module further includes a key position point supplement submodule, which is used to:

[0245] Determining whether the key position points include all preset reference key position points;

[0246] When all preset reference key position points are included in the key position points, necessary key position points not included in the key position points are supplemented according to the position information of the preset reference key position points in the key position points and the size ratio of the standard reference model of the target object;

[0247] Otherwise, stop the current text special effect display processing process.

[0248] According to one or more embodiments of the present disclosure, [Example 15] provides a text special effect display device, further comprising:

[0249] In some optional implementations, the contour expansion key point determination submodule is further used to:

[0250] Determine a contour key point on the contour line of the target object corresponding to the position key point;

[0251] The contour expansion distance determined based on the preset contour expansion parameters is superimposed on the position information of the contour key points to obtain the position information of the contour expansion key points.

[0252] According to one or more embodiments of the present disclosure, [Example 16] provides a text special effect display device, further comprising:

[0253] In some optional implementations, the path curve fitting submodule is specifically used to:

[0254] Supplement contour expansion key points according to the preset contour expansion key point position relationship;

[0255] Contour curve fitting is performed based on the supplemented contour expansion key points.

[0256] According to one or more embodiments of the present disclosure, [Example 17] provides a text special effect display device, further comprising:

[0257] In some optional implementations, the text special effects display device also includes a key position point information correction module, which is used to take the median of the position information of each key position point in multiple consecutive frames of video images as the position information of each key position point before determining the contour expansion key point corresponding to each key position point.

[0258] According to one or more embodiments of the present disclosure, [Example 18] provides a text special effect display device, further comprising:

[0259] In some optional implementations, the text special effects display module includes: a text path position determination submodule, a text feature position determination submodule, a text screen position determination submodule and a text rendering display submodule; wherein the text path position determination submodule is used to determine the path position of each character in the displayed text in the current video image according to the text display parameters, the curve of the display path and the feature position of the first character in the text to be displayed in the previous frame of the video image, wherein the feature position represents the position of each character on the curve segment between two contour expansion key points on the display path, and the path position represents the length of the curve path moved by each character on the display path; the text feature position determination submodule is used to calculate the feature position of each character in the current video image according to the path position of each character in the text to be displayed in the current video image; the text screen position determination submodule is used to determine the screen position of each character according to the feature position of each character in the current video image; the text rendering display submodule is used to render and display the text to be displayed in the video image based on the screen position of each character.

[0260] According to one or more embodiments of the present disclosure, [Example 19] provides a text special effect display device, further comprising:

[0261] In some optional implementations, the text path position determination submodule is specifically used for:

[0262] Determining the moving speed of the to-be-displayed characters according to the character life cycle in the character display parameters and the curve length of the display path;

[0263] Determine the path position of the first character in the current video image based on the moving speed of the displayed characters and the characteristic position of the first character in the characters to be displayed in the previous frame of the video image;

[0264] The path position of each character in the characters to be displayed in the current video image is determined according to the path position of the first character in the current video image and the character display interval in the character display parameter.

[0265] According to one or more embodiments of the present disclosure, [Example 20] provides a text special effect display device, further comprising:

[0266] In some optional implementations, the text path position determination submodule is further used to:

[0267] A preset curve integration algorithm is used to integrate the characteristic position of the first character in the previous frame of video image, and determine an initial path position corresponding to the characteristic position of the first character in the previous frame of video image in the current video image;

[0268] Determining the moving distance of the first character according to the time interval between the current video image and the previous frame of video image and the moving speed of the character to be displayed;

[0269] The moving distance is superimposed on the initial path position to determine the path position of the first text in the current video image.

[0270] According to one or more embodiments of the present disclosure, [Example 21] provides a text special effect display device, further comprising:

[0271] In some optional implementations, the text rendering and display submodule is specifically used to:

[0272] Rendering the characters to be displayed at the screen positions of the characters according to the character fonts and font sizes in the character display parameters;

[0273] The rendering effects of the characters are superimposed on the video image for display.

[0274] According to one or more embodiments of the present disclosure, [Example 22] provides a text special effect display device, further comprising:

[0275] In some optional implementations, the target object includes an image of a person in a video image.

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

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

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

Claims

1. A method for displaying text special effects, characterized in that: include: When the text information to be displayed and the text display parameters are obtained, a video image displaying the text information to be displayed is obtained; Identifying key position points of the target object in the video image, and confirming a display path of the to-be-displayed text based on the key position points; According to the text display parameters, dynamically displaying the text information to be displayed along the display path; Confirming the display path of the to-be-displayed text based on the key position point includes: When the key position points include all necessary key position points, determining contour expansion key points corresponding to each of the key position points according to the position information of the key position points and preset contour expansion parameters; Performing contour curve fitting based on the contour expansion key points, and using the fitted target contour expansion curve as the display path; According to the text display parameter, dynamically displaying the text information to be displayed according to the display path, the method further includes: Determine the path position of each character in the characters to be displayed in the current video image according to the character display parameters, the curve of the display path and the characteristic position of the first character in the characters to be displayed in the previous frame of the video image, wherein the characteristic position represents the position of each character on the curve segment between two contour expansion key points on the display path, and the path position represents the length of the curve path moved by each character on the display path; Calculating the characteristic position of each character in the current video image according to the path position of each character in the characters to be displayed in the current video image; Determining the screen position of each character according to the characteristic position of each character in the current video image; The characters to be displayed are rendered and displayed in the video image based on the screen positions of the characters.

2. The method according to claim 1, characterized in that When the key position points do not include all the necessary key position points, the method further includes: Determining whether the key position points include all preset reference key position points; When all preset reference key position points are included in the key position points, necessary key position points not included in the key position points are supplemented according to the position information of the preset reference key position points in the key position points and the size ratio of the standard reference model of the target object; Otherwise, stop the current text special effect display processing process.

3. The method according to claim 1, characterized in that Determining contour expansion key points corresponding to each of the key position points according to the position information of the key position points and preset contour expansion parameters includes: Determine a contour key point on the contour line of the target object corresponding to the key position point; The contour expansion distance determined based on the preset contour expansion parameters is superimposed on the position information of the contour key points to obtain the position information of the contour expansion key points.

4. The method according to claim 3, characterized in that The performing contour curve fitting based on the contour expansion key points includes: Supplement contour expansion key points according to the preset contour expansion key point position relationship; Contour curve fitting is performed based on the supplemented contour expansion key points.

5. The method according to claim 1, characterized in that: Before determining the contour expansion key points corresponding to each of the key position points, the method further includes: The median value of the position information of each of the key position points in the video images of multiple consecutive frames is taken as the position information of each of the key position points.

6. The method according to claim 1, characterized in that Determining the path position of each character in the characters to be displayed in the current video image according to the character display parameter, the curve of the display path and the characteristic position of the first character in the characters to be displayed in the previous frame of the video image includes: Determining the moving speed of the to-be-displayed characters according to the character life cycle in the character display parameters and the curve length of the display path; Determine the path position of the first character in the current video image based on the moving speed of the characters to be displayed and the characteristic position of the first character in the characters to be displayed in the previous frame of video image; The path position of each character in the characters to be displayed in the current video image is determined according to the path position of the first character in the current video image and the character display interval in the character display parameter.

7. The method according to claim 6, characterized in that Determining the path position of the first character in the current video image based on the moving speed of the characters to be displayed and the characteristic position of the first character in the characters to be displayed in the previous frame of the video image includes: A preset curve integration algorithm is used to integrate the characteristic position of the first character in the previous frame of video image, and determine an initial path position corresponding to the characteristic position of the first character in the previous frame of video image in the current video image; Determining the moving distance of the first character according to the time interval between the current video image and the previous frame of video image and the moving speed of the character to be displayed; The moving distance is superimposed on the initial path position to determine the path position of the first text in the current video image.

8. The method according to claim 1, characterized in that: The rendering and displaying of the to-be-displayed characters in a video image based on the screen positions of the characters includes: Rendering the characters to be displayed at the screen positions of the characters according to the character fonts and font sizes in the character display parameters; The rendering effects of the characters are superimposed on the video image for display.

9. The method according to any one of claims 1 to 8, characterized in that: The target object includes a person image in a video image.

10. A text special effects display device, characterized in that: include: A text special effect display data acquisition module is used to acquire a video image showing the text information to be displayed when the text information to be displayed and the text display parameters are acquired; A text special effect display path determination module, used to identify key position points of the target object in the video image, and confirm the display path of the text to be displayed based on the key position points; A text special effect display module, used for dynamically displaying the text information to be displayed along the display path according to the text display parameters; The text special effects display path determination module specifically includes a contour expansion key point determination submodule and a path curve fitting submodule; wherein, The contour expansion key point determination submodule is used to determine the contour expansion key points corresponding to each of the key position points according to the position information of the key position points and the preset contour expansion parameters when the key position points include all necessary key position points; the path curve fitting submodule is used to perform contour curve fitting based on the contour expansion key points, and use the fitted target contour expansion curve as the display path; The text special effect display module includes: a text path position determination submodule, a text feature position determination submodule, a text screen position determination submodule and a text rendering display submodule; wherein the text path position determination submodule is used to determine the path position of each character in the text to be displayed in the current video image according to the text display parameters, the curve of the display path and the feature position of the first character in the text to be displayed in the previous frame of the video image, wherein the feature position represents the position of each character on the curve segment between two contour expansion key points on the display path, and the path position represents the length of the curve path moved by each character on the display path; the text feature position determination submodule is used to calculate the feature position of each character in the current video image according to the path position of each character in the text to be displayed in the current video image; the text screen position determination submodule is used to determine the screen position of each character according to the feature position of each character in the current video image; the text rendering display submodule is used to render and display the text to be displayed in the video image based on the screen position of each character.

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

12. A storage medium comprising computer executable instructions, wherein the computer executable instructions, when executed by a computer processor, are used to execute the text special effect display method as described in any one of claims 1 to 9.

Citation Information

Patent Citations

  • Bullet screen display method and device, terminal and storage medium

    CN112328091A