A method and system for displaying special effects of avatars in live broadcast room

By collecting eyebrow and eye key points data in the avatar special effect display in the live broadcast room, building activity sensitivity index and motion vector change index, adaptively adjusting the length of the GOP structure, solving the problem of unstable compression efficiency caused by fixed GOP structure, and achieving more efficient video compression and transmission.

CN118138837BActive Publication Date: 2025-04-18CHANGSHA WEIWEI NETWORK TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202410443242.1
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-04-12
Publication Date
2025-04-18
Estimated Expiration
2044-04-12

AI Technical Summary

Technical Problem

In the existing live broadcast room avatar special effects display method, the fixed-length GOP structure is not flexible enough when adapting to different live broadcast scenarios, resulting in unstable compression efficiency.

Method used

By collecting the location data of eyebrow and eye key points in the live video, the eyebrow and eye activity sensitivity index is constructed, and combined with the motion vector distribution entropy, the special-effect expression motion vector change index comes from the length of the adaptive division GOP structure.

Benefits of technology

It achieves the ability to adapt to different scenarios with better compression efficiency, and avoids the defects of unstable compression efficiency caused by fixed GOP structures.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118138837B_ABST
    Figure CN118138837B_ABST
Patent Text Reader

Abstract

The present invention relates to the field of image communication technology, and in particular to a method and system for displaying special effects of avatars in a live broadcast room. The method comprises: obtaining video image data to be compressed at an anchor end; obtaining position information of key points of eyes and eyebrows; analyzing the distribution characteristics of each position point of eyebrows and eyes to construct an eyebrow and eye expression state index; obtaining an eyebrow and eye expression state index sequence; setting a sequence window; constructing an eyebrow and eye activity sensitivity coefficient in combination with the eyebrow and eye expression state coefficient distribution of a video image in the sequence window; constructing a special effect expression motion vector change index according to the difference in the eyebrow and eye activity sensitivity coefficient; obtaining a key frame coefficient value of each frame of video image; constructing a GOP structure; compressing and transmitting the video based on the GOP structure, thereby completing the display of the avatar special effects in the live broadcast room, and the GOP structure can be adaptively adjusted according to the live broadcast content to ensure and improve the video compression rate.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of image communication technology, and in particular to a method and system for displaying avatar special effects in a live broadcast room. Background Art

[0002] Live streaming is a technology that transmits audio, video or other multimedia content in real time over the Internet, allowing viewers to watch and listen to the content in real time. Live streaming usually covers a variety of topics, including game live streaming, social media live streaming, education live streaming, business live streaming, etc. Live avatar special effects are a function that uses technical means to process user avatars in real time during live streaming to enhance the fun and attractiveness of live streaming. It is achieved through various algorithms and image processing technologies, allowing users' avatars to present various interesting, exaggerated or artistic effects in live streaming. Due to the high requirements of live streaming for video transmission, unstable video transmission may cause image quality degradation or interruption. After adding avatar special effects, especially some complex special effects, more bandwidth is required, which increases the processing pressure of encoding and decoding.

[0003] In order to achieve low-latency transmission, current video encoding algorithms use a short GOP (group interval) structure during video compression, which divides the video into fixed-length frames to reduce the decoder load. However, this fixed structure may not be flexible enough to adapt to different live broadcast scenarios. Summary of the invention

[0004] In order to solve the above technical problems, the purpose of the present invention is to provide a method and system for displaying special effects of avatars in a live broadcast room. The technical solutions adopted are as follows:

[0005] In a first aspect, an embodiment of the present invention provides a method for displaying special effects of an avatar in a live broadcast room, the method comprising the following steps:

[0006] Obtain the video image data to be compressed from the host end;

[0007] Detect eyes and eyebrows according to video image data to obtain position information of key points; obtain eyebrow and eye expression state index according to distribution characteristics of eyebrow and eye position points; set normal range; obtain eyebrow and eye expression state index sequence according to the relationship between eyebrow and eye state index of each frame of video image and normal range; set sequence window with each frame of video image in the eyebrow and eye expression state index sequence as the center; obtain eyebrow and eye activity sensitivity coefficient of each frame of video image according to the distribution of eyebrow and eye expression state coefficient of each frame of video image in the sequence window; obtain special effect expression motion vector change index of each frame of video image according to the difference of eyebrow and eye activity sensitivity coefficient between adjacent frames of video image in combination with feature matching algorithm; obtain key frame coefficient value of each frame of video image according to the special effect expression motion vector change index of each frame of video image; obtain GOP structure according to the key frame coefficient value of each frame of video image; adopt H.264 video encoding according to the GOP structure, and transmit the encoded video to the client to complete the display of avatar special effects in the live broadcast room.

[0008] Preferably, the detecting of eyes and eyebrows according to the video image data to obtain the position information of key points includes:

[0009] Each frame of video image is used as the input of the Dlib tool in the C++ library, and the output of the Dlib tool in the C++ library is the position information of 6 key points on the left and right sides of the eyes and the position information of 5 key points on the left and right sides of the eyebrows.

[0010] Preferably, the eyebrow and eye expression state index is obtained according to the distribution characteristics of each position point of the eyebrows and eyes, specifically:

[0011] Obtaining the Manhattan distances between each key point of the left eyebrow and each key point of the left eye; using the mean of the Manhattan distances as the left distance parameter of each frame of the video image; and obtaining the right distance parameter using the calculation method of the left distance parameter;

[0012] Calculate the mean of the left distance parameter and the right distance parameter; take the arctangent value of the slope of the key point connecting line at both ends of the left eyebrow sequence as the inclination angle of the eyebrow; calculate the eccentricity of the key point contour of the eye;

[0013] Calculate the difference between 1 and the eccentricity; calculate the ratio of the inclination angle to the difference; and use the product of the ratio and the mean as the eyebrow expression state index of each frame of video image.

[0014] Preferably, the step of calculating the eccentricity of the key point contour of the eye comprises:

[0015] The key point position information of the left eye is obtained; the ellipse equation of the eye contour is obtained by using the least squares algorithm according to the key point position; and the eccentricity of the eye key point contour is obtained according to the ellipse equation.

[0016] Preferably, the step of obtaining the eyebrow and eye expression state index sequence according to the relationship between the eyebrow and eye state index of each frame of video image and the normal range includes:

[0017] Extracting a video image whose eyebrow and eye expression state index is within a normal range; using the eyebrow and eye expression state index of the video image as each element of the eyebrow and eye expression state index sequence.

[0018] Preferably, the step of obtaining the eyebrow and eye movement sensitivity coefficient of each frame of video image according to the eyebrow and eye expression state coefficient distribution of each frame of video image in the sequence window includes:

[0019] For each frame of video image in the sequence window;

[0020] Respectively obtain the minimum value and extreme value of the eyebrow expression state index of each frame of video image; calculate the difference between the eyebrow expression state index of each frame of video image and the minimum value; calculate the product of the difference and the extreme value;

[0021] Calculate the standard deviation of the facial expression state coefficients of all video frames in the sequence window; use the inverse of the standard deviation as the exponent of an exponential function with a natural constant as the base;

[0022] The average value of the ratio of the product of all the frame video images in the window sequence to the exponential function is calculated; and the average value is used as the eyebrow activity sensitivity coefficient of each frame video image.

[0023] Preferably, the method of obtaining the special effect expression motion vector change index of each frame of video image according to the difference in eyebrow and eye movement sensitivity coefficients between adjacent frames of video image in combination with a feature matching algorithm specifically includes:

[0024] Starting from the second frame of video image, each frame of video image and the previous frame of video image are used as the input of the GMS algorithm, and the output of the GMS algorithm is the distribution entropy;

[0025] Calculate the absolute value of the difference between the eyebrow and eye movement sensitivity coefficients of each frame of video image and the previous frame of video image; calculate a logarithmic function with 2 as the base and the absolute value of the difference as a true number; calculate the sum of 1 and the logarithmic function;

[0026] The ratio of the distribution entropy to the sum value is used as a special effect expression motion vector change index of each frame of video image.

[0027] Preferably, the step of obtaining the key frame coefficient value of each frame of video image according to the special effect expression motion vector change index of each frame of video image specifically includes:

[0028] Sorting the special effect expression motion vector change indexes of each frame of video image according to the timestamp to form a special effect expression motion vector change index sequence;

[0029] The special effect expression motion vector change index sequence is used as the input of the singular spectrum analysis algorithm, and the output of the singular spectrum analysis algorithm is a low-frequency component sequence; the key frame segmentation coefficient in the low-frequency signal of the singular spectrum analysis result is obtained;

[0030] For each element of the low-frequency component sequence; when the element value is greater than or equal to the key frame split coefficient, 1 is used as the key frame coefficient value of the corresponding video image frame; when the element value is less than the key frame split coefficient, 0 is used as the key frame coefficient value of the corresponding video image frame.

[0031] Preferably, the obtaining of the GOP structure according to the key frame coefficient values ​​of each frame of the video image specifically includes:

[0032] Each frame of video image with a key frame coefficient value of 1 is divided into an I frame, and each frame of video image between adjacent I frames is taken as a GOP structure.

[0033] In a second aspect, an embodiment of the present invention further provides a live broadcast room avatar special effects display system, comprising a memory, a processor, and a computer program stored in the memory and running on the processor, wherein the processor implements the steps of any one of the above-mentioned methods when executing the computer program.

[0034] The present invention has at least the following beneficial effects:

[0035] The present invention collects the key point position data of eyebrows and eyes in the live video, constructs the eyebrow and eye activity sensitivity index, analyzes the changes of avatar special effects in more detail, and further combines the motion vector distribution entropy to construct the special effect expression motion vector change index to divide the length of the GOP structure. The defect of unstable compression efficiency due to the fixed-length GOP structure in the existing live broadcast room avatar special effect display method is avoided. An adaptive GOP structure is used to adjust the GOP length according to the characteristics of the real-time content, which can better adapt to different scenes and improve the compression efficiency. BRIEF DESCRIPTION OF THE DRAWINGS

[0036] In order to more clearly illustrate the technical solutions and advantages in the embodiments of the present invention or the prior art, the drawings required for use in the embodiments or the prior art descriptions are briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.

[0037] Figure 1 A flowchart of a method for displaying special effects of avatars in a live broadcast room provided by one embodiment of the present invention;

[0038] Figure 2 A step diagram of a method for obtaining a GOP structure. DETAILED DESCRIPTION

[0039] In order to further explain the technical means and effects adopted by the present invention to achieve the predetermined purpose of the invention, the following is a detailed description of the specific implementation method, structure, features and effects of a live broadcast room avatar special effects display method and system proposed by the present invention in combination with the accompanying drawings and preferred embodiments. In the following description, different "one embodiment" or "another embodiment" does not necessarily refer to the same embodiment. In addition, specific features, structures or characteristics in one or more embodiments may be combined in any suitable form.

[0040] Unless defined otherwise, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this invention belongs.

[0041] The following is a detailed description of a method and system for displaying avatar special effects in a live broadcast room provided by the present invention in conjunction with the accompanying drawings.

[0042] See also Figure 1 , which shows a flowchart of a method for displaying avatar special effects in a live broadcast room provided by an embodiment of the present invention, the method comprising the following steps:

[0043] Step S001: Obtain live broadcast room video stream data.

[0044] Using streaming media technology, the content is divided into small data blocks and transmitted to the audience through the network. This technology allows users to start watching video content while downloading, without waiting for the entire file to be downloaded. When the live video is turned on, the live data stream collected by the host is uploaded to the server through compression encoding after adding avatar special effects. After being processed by the server, it is transmitted to the audience for display. The compressed video data collected by the host is recorded as Live t , represents the t-th frame of video image data in the live video.

[0045] At this point, the video image data to be compressed on the host end is obtained.

[0046] Step S002: Analyze the video image data of each frame collected by the anchor end, obtain the position information of the key points of the eyebrows and eyes, analyze the position information of the key points to construct the eyebrow and eye expression state index and the eyebrow and eyebrow activity sensitivity coefficient, and construct the special effect expression motion vector change index based on the change of the eyebrow and eye activity sensitivity coefficient, and use this to construct the key frame coefficient value of each frame of the video image.

[0047] Through the above steps, the video image data to be compressed on the anchor side is obtained, and the video data is compressed and encoded with H.264 video. The GOP structure in the encoding algorithm defines the encoding structure of continuous video frames, which is used to organize and manage the order of video frames. GOP consists of a group of continuous video image frames, including three main types of frames: I frames (key frames), P frames (predicted frames), and B frames (bidirectional predicted frames). The beginning of each GOP is usually an I frame, which provides an important reference point for the video sequence. After the I frame, the changes in the video image sequence can be described by predicted frames and bidirectional predicted frames. If the I frame is lost during the transmission process, the P frame and B frame in the corresponding GOP structure will not be decoded, resulting in garbled characters on the screen.

[0048] The length of GOP determines how many frames of video images are followed by a key frame I frame. Existing methods directly set a short GOP structure with a fixed length, but this may cause motion blur for videos with fast motion and drastic changes. According to the scene video information, the GOP structure of the video needs to be adaptively adjusted. Therefore, the determination of the I frame is particularly important. This embodiment will illustrate the extraction process of the I frame.

[0049] During the live broadcast, the avatar special effects can embed some interesting pictures or other effects by identifying the key features of the host's face, so as to achieve more vivid interaction. The camera on the host's side is responsible for capturing the host's facial and background data in order to communicate with the audience, and the main means of interaction is through the barrage text. The content expressed by the audience in text will be displayed on the live broadcast screen on the host's side, and the host can view the barrage and respond at the same time. The barrage is in a state of continuous scrolling, so the changes in the eyes and eyebrows during the live broadcast are relatively more obvious.

[0050] First of all, the host's eyes will move to varying degrees as the bullet screen slides. As the key points of face recognition, it is necessary to detect the position of the eyes and eyebrows and their changing states. At the same time, the detected facial expression feature points may have errors due to factors such as low clarity of the captured image and poor lighting conditions. The Dlib tool in the C++ library is used to achieve eye detection and key point positioning. Each frame of video image is used as input, and the eye detection and eyebrow detection models in the Dlib library are loaded. The algorithm outputs the position information of 6 key points on the left and right of the eyes and 5 key points on the left and right of the eyebrows. Therefore, according to the key information of each position point, the eyebrow expression state index is calculated, and the expression is:

[0051]

[0052]

[0053] In the formula, facet Indicates the eyebrow expression state index of the t-th frame video image, br l (t) represents the left distance parameter of each key point between the left eyebrow and the left eye of the t-th frame video image, B represents the total number of data of the left eyebrow key points, brow i Indicates the i-th key point in the left eyebrow, eye j Indicates the jth key point in the left eye. mhd() represents the Manhattan distance function between two points. The right distance parameter between the right eyebrow and each pixel of the right eye is calculated in the same way as the left distance parameter and saved as br r (t). Brow and eye represent the key point sequences of the left eyebrow and the left eye respectively, rad() is the function for calculating the tilt angle of the eyebrow, and cir() represents the eccentricity of the left eye key point contour (it cannot be 0 or 1 in actual calculation). For the convenience of unified calculation, the tilt angle is normalized to [0,90], and the distance parameter is normalized according to the maximum and minimum values ​​calculated. It should be noted that the method for obtaining the tilt angle of the eyebrow is the arc tangent value of the slope of the key point connection line at both ends of the left eyebrow key point sequence. Since the face has symmetry, this embodiment uses the tilt of the eyebrow on one side as the tilt of the eyebrows on the left and right sides; the method for obtaining the eccentricity of the eye key point contour is: the least squares method is used for the key points on the eye to obtain the ellipse equation of the eye contour, and the eccentricity is obtained according to the properties of the ellipse equation. Among them, the least squares method and the properties of the ellipse are existing well-known technologies and will not be repeated in this embodiment.

[0054] Under normal facial expressions, the inclination of the eyebrows is correlated with the eccentricity of the eye contour. The greater the distance between the eyebrows and the key points of the eyes, the greater the calculated mhd (brow i ,eye j ) value is larger, the corresponding distance parameter br l The larger the (t) value is, the larger the eyebrow tilt angle rad(brow) is, and the smaller the eccentricity of the eye contour is. The same is true in reverse. The calculated eyebrow expression state index value face t It is within the normal range, and the empirical value range is (0.8, 1.2). The implementer can adjust it by himself, and the eyebrow expression state index beyond this range will be recorded as an abnormality in facial key point detection.

[0055] Furthermore, the corresponding frames of video images whose eyebrow and eye expression state index is within the normal range in the above calculation are extracted. According to empirical values, most of them are within the normal range, while a few values ​​are abnormal. And the eyebrow and eye expression state index corresponding to each frame of video image is calculated to construct an eyebrow and eye expression state index sequence, which is recorded as: face = {face1, face2, face3...}. Due to changes in facial expressions and different degrees of change between adjacent frames of video images, the eyebrow and eye expression state index at different timestamps may be the same. Therefore, a sequence window with a radius of 5 as the center is taken as a certain frame of video image, which can be adjusted by the implementer. The eyebrow and eye activity sensitivity coefficient is constructed, and the expression is:

[0056]

[0057] Where agil(t) represents the eyebrow activity sensitivity coefficient of the t-th frame video image, N represents the total number of data in the sequence window, face(k) represents the k-th eyebrow expression state index in the sequence window, min(face w ) is the minimum value of the facial expression state index in the sequence window, D(face w ) represents the standard deviation of the data in the sequence window, rw represents the range of all eyebrow expression state indexes in the sequence window, and exp() represents an exponential function with a natural constant as the base.

[0058] If the difference in facial expression in the sequence window centered on the t-th frame video image is greater, the calculated face t The smaller the minimum value reached, the smaller the min(face w ) value is smaller, and the eyebrow expression state index of each frame in the sequence window is relatively stable, and the calculated face(k)-min(face w ) will also be larger; at the same time, the range rw and standard deviation D(face w ) value becomes larger, and the standard deviation becomes smaller after being transformed by the exponential function, and the final eyebrow and eye activity sensitivity coefficient becomes larger, indicating that the eyebrow and eye expressions are rich in the sequence window centered on the tth frame. In the process of avatar special effects display, in order to ensure the quality of transmitted video, it is necessary to use the eyebrow and eye activity sensitivity coefficient value to adjust the length of the GOP structure.

[0059] At this point, the corresponding eyebrow and eye activity sensitivity coefficients are calculated for all video image frames with no abnormalities in key points, and the GOP structure length is further adjusted based on the eyebrow and eye activity sensitivity coefficients. Since the avatar special effects in the live broadcast room will change with the changes in facial expressions, in addition to the details of the facial expressions, the avatar special effects themselves have rich and diverse effects. Therefore, the richness of the facial expressions is calculated by combining the eyebrow and eye activity sensitivity coefficients of adjacent frames and the motion statistics between adjacent frames of the special effects video image.

[0060] The motion statistics between special effect video image frames are obtained using the feature matching algorithm GMS (Grid-based Motion Statistics). The input of the GMS algorithm is two adjacent video image frames, and the grid structure is set to a 7*7 square. The output of the algorithm is the distribution entropy of the motion vector in the grid unit. It should be noted that the feature matching algorithm is an existing well-known technology and will not be described in detail in this embodiment. Based on the distribution entropy, the special effect expression motion vector change index is constructed as follows:

[0061]

[0062] In the formula, exp t It represents the change index of the special effect expression motion vector of the t-th frame video image, log2() represents the logarithmic function with base 2, agil(t-1) and agil(t) represent the eyebrow and eye movement sensitivity coefficients of the t-1-th frame and the t-th frame video image respectively, and ME is the distribution entropy between the t-1-th frame and the t-th frame video image.

[0063] When the difference in the sensitivity coefficients of eyebrow and eye activities is greater, the corresponding value agil(t-1)-agil(t) is smaller, and the motion entropy of the GMS matching algorithm is greater, indicating that the degree of movement of the special effects expressions in adjacent frames of video images is higher, and the corresponding special effects change more frequently.

[0064] Finally, the key frames of the GOP structure are divided according to the special effect expression motion vector change index, and the obtained special effect expression motion vector change index is constructed as a special effect expression motion vector change index sequence according to the timestamp. Singular spectrum analysis (SSA) is performed on the special effect expression motion vector change index sequence. Singular spectrum analysis is a data analysis method based on matrix decomposition. In SSA, if the data mutates somewhere, the mutation signal will be decomposed into the low-frequency components of the data. It should be noted that singular spectrum analysis is an existing well-known technology and will not be repeated in this embodiment. The low-frequency component sequence output by the algorithm is denoted as hop, and it is analyzed whether there is a jumping phenomenon. Construct the key frame coefficient value, and the expression is:

[0065]

[0066] In the formula, Vidi(t) represents the key frame coefficient value of the t-th frame video image, hop[t] represents the t-th element value in the low-frequency component sequence, va represents the key frame segmentation coefficient in the low-frequency signal of the singular spectrum analysis result, and the empirical value is 5, and Q represents the total number of frames of the transmitted video image. If the value of the special effect expression sequence suddenly changes, the corresponding hop[t] value will jump more strongly, and the change of the avatar special effect will be more obvious.

[0067] Step S003: Adaptively divide the GOP structure according to the key frame coefficient value of each frame of the video image, compress and transmit the video based on the GOP structure, and complete the display of the avatar special effects in the live broadcast room.

[0068] At this point, the key frame segmentation coefficients of all video frames are obtained. If the corresponding Vidi(t) is 1, it is divided into an I frame, otherwise it is divided into a B frame or a P frame. The video frames between adjacent I frames are regarded as a GOP structure, where the GOP structure is obtained as follows: Figure 2 As shown. The I frame is the start frame, the middle frame is the B frame, and the end frame is the P frame. There is one I frame and one P frame, and there can be multiple B frames. The determination of B frames or P frames is determined by the method within the H.264 video encoding algorithm. After the encoding is completed, the video is transmitted from the anchor end to the audience end for live special effects display.

[0069] At this point, the display of the avatar special effects in the live broadcast room is completed.

[0070] Based on the same inventive concept as the above method, an embodiment of the present invention also provides a live broadcast room avatar special effects display system, including a memory, a processor, and a computer program stored in the memory and running on the processor, and when the processor executes the computer program, it implements the steps of any one of the above-mentioned live broadcast room avatar special effects display methods.

[0071] To sum up, the embodiment of the present invention mainly collects the key point position data of the eyebrows and eyes in the live video, constructs the eyebrow and eye activity sensitivity index, analyzes the changes of the avatar special effects in more detail, and further combines the motion vector distribution entropy to construct the special effect expression motion vector change index to divide the length of the GOP structure, thereby avoiding the defect of setting a fixed-length GOP structure and unstable compression efficiency in the existing live broadcast room avatar special effects display method, and adopts an adaptive GOP structure to adjust the GOP length according to the characteristics of the real-time content, which can better adapt to different scenes and improve compression efficiency.

[0072] It should be noted that the sequence of the above embodiments of the present invention is only for description and does not represent the advantages and disadvantages of the embodiments. The above is a description of a specific embodiment of this specification. In addition, the processes depicted in the accompanying drawings do not necessarily require the specific order or continuous order shown to achieve the desired results. In some embodiments, multitasking and parallel processing are also possible or may be advantageous.

[0073] The various embodiments in this specification are described in a progressive manner, and the same or similar parts between the various embodiments can be referenced to each other, and each embodiment focuses on the differences from other embodiments.

[0074] The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. Any modifications, equivalent substitutions, improvements, etc. made within the principles of the present invention should be included in the protection scope of the present invention.

Claims

1. A method for displaying special effects of avatars in a live broadcast room, characterized in that: The method comprises the following steps: Obtain the video image data to be compressed from the host end; Detect eyes and eyebrows according to video image data to obtain the position information of key points; obtain eyebrow and eye expression state index according to the distribution characteristics of each position point of eyebrows and eyes; set a normal range; obtain eyebrow and eye expression state index sequence according to the relationship between the eyebrow and eye expression state index of each frame of video image and the normal range; set a sequence window with each frame of video image in the eyebrow and eye expression state index sequence as the center; obtain the eyebrow and eye activity sensitivity coefficient of each frame of video image according to the distribution of eyebrow and eye expression state index of each frame of video image in the sequence window; obtain the special effect expression motion vector change index of each frame of video image according to the difference of eyebrow and eye activity sensitivity coefficient between adjacent frames of video image combined with feature matching algorithm; obtain the key frame coefficient value of each frame of video image according to the special effect expression motion vector change index of each frame of video image; obtain the GOP structure according to the key frame coefficient value of each frame of video image; adopt H.264 video encoding according to the GOP structure, and transmit the encoded video to the client to complete the display of avatar special effects in the live broadcast room; The detecting of eyes and eyebrows according to the video image data to obtain the position information of key points includes: Each frame of video image is used as the input of the Dlib tool in the C++ library. The output of the Dlib tool in the C++ library is the position information of 6 key points on the left and right sides of the eyes and 5 key points on the left and right sides of the eyebrows. The calculation expression for obtaining the eyebrow and eye expression state index according to the distribution characteristics of each position point of the eyebrows and eyes is: In the formula, Represents the eyebrow expression state index of the t-th frame video image, Represents the left distance parameter of each key point between the left eyebrow and the left eye of the t-th frame video image, Indicates the total number of data points of the left eyebrow, represents the i-th key point in the left eyebrow, represents the jth key point in the left eye, Represents the calculation of the Manhattan distance function between two points. Represents the right distance parameter of each key point between the right eyebrow and the right eye of the t-th frame video image, , Respectively represent the key point sequences of the left eyebrow and left eye, To calculate the tilt angle function of the eyebrows, Indicates the calculation of the eccentricity of the left eye key point contour; wherein, based on the position information of the 6 key points of the right eye and the position information of the 5 key points of the right eyebrow, the right distance parameter is obtained by the same calculation method as the left distance parameter; The step of obtaining the eyebrow and eye movement sensitivity coefficient of each frame of video image according to the eyebrow and eye expression state index distribution of each frame of video image in the sequence window includes: The eyebrow activity sensitivity coefficient of the t-th frame video image in the sequence window is recorded as , The calculation is expressed as: In the formula, Indicates the total number of data in the sequence window, represents the kth eyebrow expression state index in the sequence window, is the minimum value of the eyebrow expression state index in the sequence window, represents the standard deviation of the data within the sequence window, Represents the extreme value of all eyebrow expression state indexes within the sequence window, represents an exponential function with a natural constant as base; The method of obtaining the special effect expression motion vector change index of each frame of video image according to the difference of eyebrow and eye activity sensitivity coefficients between adjacent frames of video image in combination with a feature matching algorithm specifically includes: Starting from the second frame of video image, each frame of video image and the previous frame of video image are used as the input of the GMS algorithm, and the output of the GMS algorithm is the distribution entropy; The special effect expression motion vector change index of the t-th frame video image is recorded as , The calculation expression is: In the formula, represents the logarithmic function with base 2, , Respectively represent the eyebrow and eye activity sensitivity coefficients of the t-1th frame and the tth frame video image, is the distribution entropy between the video images of the t-1th frame and the tth frame; The step of obtaining the key frame coefficient value of each frame of video image according to the special effect expression motion vector change index of each frame of video image specifically includes: Sorting the special effect expression motion vector change indexes of each frame of video image according to the timestamp to form a special effect expression motion vector change index sequence; The special effect expression motion vector change index sequence is used as the input of the singular spectrum analysis algorithm, and the output of the singular spectrum analysis algorithm is a low-frequency component sequence; the key frame segmentation coefficient in the low-frequency signal of the singular spectrum analysis result is obtained; For each element of the low-frequency component sequence; when the element value is greater than or equal to the key frame split coefficient, 1 is used as the key frame coefficient value of the corresponding video image frame; when the element value is less than the key frame split coefficient, 0 is used as the key frame coefficient value of the corresponding video image frame.

2. A method for displaying special effects of avatars in a live broadcast room according to claim 1, characterized in that: The specific steps of calculating the eccentricity of the left eye key point contour include: The key point position information of the left eye is obtained; the ellipse equation of the left eye contour is obtained by using the least squares algorithm according to the key point position; and the eccentricity of the left eye key point contour is obtained according to the ellipse equation.

3. A method for displaying special effects of avatars in a live broadcast room according to claim 1, characterized in that: The step of obtaining the eyebrow and eye expression state index sequence according to the relationship between the eyebrow and eye expression state index of each frame of video image and the normal range includes: Extracting a video image whose eyebrow and eye expression state index is within a normal range; using the eyebrow and eye expression state index of the video image as each element of the eyebrow and eye expression state index sequence.

4. A method for displaying special effects of avatars in a live broadcast room according to claim 1, characterized in that: The obtaining of the GOP structure according to the key frame coefficient values ​​of each frame of the video image specifically includes: Each frame of video image with a key frame coefficient value of 1 is divided into an I frame, and each frame of video image between adjacent I frames is taken as a GOP structure.

5. A live broadcast room avatar special effects display system, comprising a memory, a processor, and a computer program stored in the memory and running on the processor, characterized in that: When the processor executes the computer program, the steps of the method according to any one of claims 1 to 4 are implemented.

Citation Information

Patent Citations

  • Resource transmission method and device, terminal and storage medium

    CN113141523A

  • Video call method and apparatus based on avatar, and terminal

    WO2022143128A1