Live special effect viewing perspective processing method and device, electronic equipment and medium

By combining camera face detection and gyroscope data to control the viewing angle of 3D effects, the problem of lost perspective caused by improper user operation is solved, and the stability and interactivity of 3D effects display are improved.

CN116016971BActive Publication Date: 2026-03-24GUANGZHOU FANGGUI INFORMATION TECHNOLOGY CO LTD
View PDF 3 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-12-30
Publication Date
2026-03-24

AI Technical Summary

Technical Problem

In the live broadcast room, users may lose their viewing angle of the 3D effects due to improper operation of the terminal, resulting in insufficient stability of the 3D effects display.

Method used

Face detection is performed using the terminal's camera. When a face is detected, the viewing angle of the 3D effects is controlled based on the tilt angle of the face and gyroscope data. When no face is detected, the 3D effects are displayed from a preset viewing angle.

Benefits of technology

It improves the display stability of 3D effects in the live streaming room and enhances the interaction stability between users and 3D effects in the metaverse live streaming scene.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116016971B_ABST
    Figure CN116016971B_ABST
Patent Text Reader

Abstract

The application relates to the technical field of network live broadcast, and provides a live broadcast special effect viewing angle processing method and device, electronic equipment and a storage medium. The application can improve the display stability of a three-dimensional special effect in a live broadcast room. The method comprises the following steps: when a three-dimensional special effect is played in a live broadcast room, face detection is performed through a camera of a terminal, when a face is detected, the viewing angle of the three-dimensional special effect is controlled according to the tilt angle of the face and the gyroscope data of the terminal, and when no face is detected, the three-dimensional special effect is displayed at a preset viewing angle.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the network live broadcast technical field, in particular to a live broadcast special effect viewing angle processing method and device, electronic equipment and computer readable storage medium. BACKGROUND

[0002] With the development of live broadcast technology, there are more and more ways for viewers and anchors to interact in the live broadcast room, and playing special effects in the live broadcast room is one of the ways. For example, after the viewer enters the live broadcast room, the viewer can interact with the anchor through gift sending and the like, and after detecting the viewer's gift sending, the corresponding gift special effect can be played in the live broadcast room. The special effects in the live broadcast room can be presented in three dimensions.

[0003] Based on the current technology, when presenting three-dimensional special effects to users in the live broadcast room, users are likely to lose the viewing angle of the three-dimensional special effects due to improper operation of the terminal, resulting in the technical problem of insufficient stability of the display of three-dimensional special effects in the live broadcast room. SUMMARY

[0004] Therefore, it is necessary to provide a live broadcast special effect viewing angle processing method, device, electronic equipment and computer readable storage medium to solve the above technical problems.

[0005] In a first aspect, the present application provides a live broadcast special effect viewing angle processing method. Applied to a terminal. The method comprises:

[0006] When the live broadcast room plays three-dimensional special effects, the terminal camera performs face detection;

[0007] When the face is detected, the viewing angle of the three-dimensional special effects is controlled according to the tilt angle of the face and the gyroscope data of the terminal;

[0008] When no face is detected, the three-dimensional special effects are displayed in a preset viewing angle.

[0009] In a second aspect, the present application provides a live broadcast special effect viewing angle processing device. Applied to a terminal. The device comprises:

[0010] A face detection module is configured to perform face detection through the terminal camera when the live broadcast room plays three-dimensional special effects;

[0011] A viewing angle control module is configured to control the viewing angle of the three-dimensional special effects according to the tilt angle of the face and the gyroscope data of the terminal when the face is detected;

[0012] A preset display module is configured to display the three-dimensional special effects in a preset viewing angle when no face is detected.

[0013] In a third aspect, the present application provides an electronic device. The electronic device comprises a memory and a processor, the memory stores a computer program, and the processor implements the following steps when executing the computer program:

[0014] When playing a three-dimensional special effect in the live room, face detection is performed through the camera of the terminal; when a face is detected, the viewing angle for viewing the three-dimensional special effect is controlled according to the tilt angle of the face and the gyroscope data of the terminal; and when no face is detected, the three-dimensional special effect is displayed at a preset viewing angle.

[0015] In a fourth aspect, the present application provides a computer readable storage medium. The computer readable storage medium stores a computer program, and the computer program is executed by a processor to implement the following steps:

[0016] When playing a three-dimensional special effect in the live room, face detection is performed through the camera of the terminal; when a face is detected, the viewing angle for viewing the three-dimensional special effect is controlled according to the tilt angle of the face and the gyroscope data of the terminal; and when no face is detected, the three-dimensional special effect is displayed at a preset viewing angle.

[0017] The above-mentioned viewing angle processing method, device, electronic device and storage medium of the live special effect, when playing a three-dimensional special effect in the live room, face detection is performed through the camera of the terminal, when a face is detected, the viewing angle for viewing the three-dimensional special effect is controlled according to the tilt angle of the face and the gyroscope data of the terminal, and when no face is detected, the three-dimensional special effect is displayed at a preset viewing angle. The control of the viewing angle for viewing the three-dimensional special effect in this scheme requires the face to remain within the detection range of the camera, and only when the face is detected, the viewing angle for viewing the three-dimensional special effect is controlled according to the tilt angle of the face and the gyroscope data of the terminal, and when the face is out of the detection range of the camera, the three-dimensional special effect is displayed at a preset viewing angle. Therefore, it can avoid the loss of the viewing angle for viewing the three-dimensional special effect due to improper operation of the user on the terminal, improve the stability of the display of the three-dimensional special effect in the live room, and can be applied to the interaction processing between the user and the three-dimensional special effect in the meta-universe live scene, thereby improving the interaction stability between the user and the three-dimensional special effect in the meta-universe live scene. BRIEF DESCRIPTION OF DRAWINGS

[0018] Figure 1 The application scenario diagram of the viewing angle processing method of the live special effect in the embodiments of the present application is shown;

[0019] Figure 2 The flowchart of the viewing angle processing method of the live special effect in the embodiments of the present application is shown;

[0020] Figure 3 The flowchart of the step of controlling the viewing angle for viewing the three-dimensional special effect in the embodiments of the present application is shown;

[0021] Figure 4 This is a flowchart illustrating the steps for controlling the viewing angle of 3D special effects in a specific embodiment of this application.

[0022] Figure 5 This is a flowchart illustrating the steps of switching viewing angles via voice in an embodiment of this application;

[0023] Figure 6 This is a structural block diagram of the viewing angle processing device for live streaming special effects in the embodiments of this application;

[0024] Figure 7 This is a diagram of the internal structure of the electronic device in an embodiment of this application. Detailed Implementation

[0025] To make the objectives, technical solutions, and advantages of this application clearer, the following detailed description is provided in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative and not intended to limit the scope of this application.

[0026] The viewing angle processing method for live streaming special effects provided in this application embodiment can be applied to, for example... Figure 1 In the application scenario shown, the scenario can include terminals and servers. The terminals can specifically include the broadcaster's client and multiple viewer clients (e.g., viewer 1, viewer 2, etc.). Each broadcaster's client and multiple viewer clients communicate with the server via the internet. The server provides live streaming-related services to the broadcaster's client and multiple viewer clients. The terminals can be, but are not limited to, various personal computers, laptops, smartphones, and tablets. The server can be a standalone server or a server cluster composed of multiple servers. This application scenario can be a metaverse live streaming scenario, where the server can create independent metaverse scenarios for the broadcaster and viewers, building a virtual space parallel to the real world. By using technological means to link and create a virtual world that maps and interacts with the real world, 3D special effects can be played in this virtual space, and the avatars of the broadcaster and viewers can be displayed. The avatars of the broadcaster and viewers can also freely interact virtually in this virtual space. Simultaneously, the broadcaster can interact with virtual viewer users, and virtual viewer users can also interact with each other. Specifically, the host and viewers in the live broadcast room can complete human-computer interaction through terminals such as mobile phones to achieve basic control operations, such as gesture movement switching and selecting exit. The terminal can receive and display live broadcast data such as live video stream and live broadcast effects sent by the server. The terminal displays information for the metaverse scene and provides metaverse information to the host and viewers.

[0027] In the metaverse live broadcast scene, the host or performer can start the live broadcast on the green screen studio. The green screen studio stage is provided with a photographic lamp, a microphone, and a camera. The live broadcast video captured by the camera on the stage can be pushed to the live broadcast server in real time. The live broadcast server can separate the person from the green screen background and extract the person. The existing technology can extract the person through software and hardware. The processed person video stream can be synthesized in VR panorama. The person needs to be positioned at the appropriate coordinate position of the pre-prepared scene background. This scene can be a two-dimensional background or a three-dimensional background scene. When the audience plays through the VR device, the video in the VR live broadcast is mainly a panoramic video, which can include 180-degree and 360-degree videos. When the corresponding degree video is received, the video live broadcast stream is rendered on the inner surface of a transparent hemisphere (180 degrees) or a ball (360 degrees) or a 1 / 4 ball. A virtual camera is placed at the appropriate position to display the picture. In the metaverse live broadcast scene, three-dimensional special effects can also be played in the live broadcast room for users to watch, improving the live broadcast experience in the metaverse live broadcast scene.

[0028] In the metaverse live broadcast scene, based on the live broadcast special effect viewing angle processing method provided in the present application, the terminal can control the viewing angle of the three-dimensional special effect when playing the three-dimensional special effect in the live broadcast room based on the face detection and gyroscope data of the user, thereby stably displaying the three-dimensional special effect in the live broadcast room for the user, and applying it to the interaction between the user and the three-dimensional special effect in the metaverse live broadcast scene, improving the interaction stability between the user and the three-dimensional special effect in the metaverse live broadcast scene.

[0029] The live broadcast special effect viewing angle processing method of the present application is described below based on the application environment as shown in Figure 1 , combined with various embodiments and corresponding drawings.

[0030] In one embodiment, as shown in Figure 2 , a live broadcast special effect viewing angle processing method is provided. The method can be executed by a terminal as shown in Figure 1 . The method can include the following steps:

[0031] Step S201, when playing three-dimensional special effects in the live broadcast room, face detection is performed through the camera of the terminal.

[0032] Step S202, when the face is detected, the viewing angle of the three-dimensional special effect is controlled according to the tilt angle of the face and the gyroscope data of the terminal.

[0033] Step S203, when no face is detected, the three-dimensional special effect is displayed at a preset viewing angle.

[0034] Specifically, the three-dimensional special effect can be a three-dimensional gift special effect, which can be a corresponding three-dimensional gift special effect played in the live room when a user in the live room sends a specific three-dimensional gift to the host. The three-dimensional special effect can be played on each terminal. When the terminal plays the three-dimensional special effect in the live room, the users in the live room including the host and each user can watch the three-dimensional special effect from different viewing angles. The viewing angle of the user for the three-dimensional special effect is the viewing angle of a virtual camera in the three-dimensional space where the three-dimensional special effect is located. The user can change the viewing angle for the three-dimensional special effect by moving the terminal, such as changing from watching the three-dimensional special effect from the front to watching the three-dimensional special effect from the side, and so on.

[0035] In this embodiment, when the live room plays the three-dimensional special effect, the viewing angle for the three-dimensional special effect is not directly controlled according to the gyroscope data of the terminal. If the viewing angle for the three-dimensional special effect is directly controlled according to the gyroscope data as in the prior art applied in 3D models or games, the user can lose the viewing angle for the three-dimensional special effect due to improper operation of the terminal, which greatly affects the display effect of the three-dimensional special effect.

[0036] Therefore, in step S201, when the live room plays the three-dimensional special effect, the terminal can prompt the user to keep his face within the shooting range of the camera of the terminal and perform real-time face detection through the camera. At the same time, the terminal can also start the gyroscope service to obtain real-time gyroscope data.

[0037] In step S202, when the face of the user is detected, the terminal can obtain the tilt angle of the face of the user according to the detection result of the face detection, and also obtain the gyroscope data, and control the viewing angle for the three-dimensional special effect according to the tilt angle of the face and the gyroscope data. The tilt angle of the face refers to the tilt angle of the face of the user relative to the shooting plane of the camera of the terminal. Specifically, the tilt angle can include tilt angles in multiple preset directions, which can include left direction, right direction, up direction and down direction. That is, the tilt angles of the face of the user in the left direction, right direction, up direction and down direction can be obtained, and then the viewing angle for the three-dimensional special effect is controlled according to the tilt angles and the gyroscope data. In this way, the viewing angle for the three-dimensional special effect can change following the gyroscope data only when the face is kept within the shooting range of the camera, that is, the user can rotate the terminal to change the viewing angle for the three-dimensional special effect. In actual application, the terminal can shoot the face of the user through the front camera, so that the viewing angle for the three-dimensional special effect can change following the gyroscope data only when the user focuses on the three-dimensional special effect displayed on the screen of the terminal, preventing the user from losing the viewing angle for the three-dimensional special effect.

[0038] In step S203, in a case where the face of the user is not detected, the terminal can directly display the three-dimensional special effect with a preset viewing angle, which can be a preset initial viewing angle of the three-dimensional special effect, that is, once the face of the user is detected to be out of the shooting range of the camera, the terminal can directly switch the current viewing angle back to the initial viewing angle, to prevent the user from losing the viewing angle of the three-dimensional special effect. Specifically, the switching of the viewing angle of the three-dimensional special effect can be performed in an animated manner, when the face of the user is detected to be out of the shooting range of the camera, the terminal can move the current viewing angle to the initial viewing angle through animation and at a certain preset speed, and after returning to the initial viewing angle, if the face of the user is detected again, the current gyroscope data can be taken as the starting data to control the viewing angle of the three-dimensional special effect according to the tilt angle of the face and the gyroscope data of the terminal as in the foregoing step S202.

[0039] In a specific implementation, when the terminal starts to play the three-dimensional special effect in the live room, the three-dimensional special effect can be displayed with the initial viewing angle as described above, at this time, the viewing angle is fixed and cannot be moved, and when the face is detected, the viewing angle of the three-dimensional special effect can be controlled according to the tilt angle of the face and the gyroscope data of the terminal, and when the face is not detected or the face is lost, the terminal can continue or re-display the three-dimensional special effect with the initial viewing angle, to prevent the user from losing the viewing angle of the three-dimensional special effect.

[0040] The viewing angle processing method of the live special effect of the embodiment, when the three-dimensional special effect is played in the live room, the face is detected through the camera of the terminal, when the face is detected, the viewing angle of the three-dimensional special effect is controlled according to the tilt angle of the face and the gyroscope data of the terminal, and when the face is not detected, the three-dimensional special effect is displayed with a preset viewing angle. The control of the viewing angle of the three-dimensional special effect in this scheme requires the face to remain in the detection range of the camera, and only when the face is detected, the viewing angle of the three-dimensional special effect is controlled according to the tilt angle of the face and the gyroscope data of the terminal, and when the face is out of the detection range of the camera, the three-dimensional special effect is displayed with a preset viewing angle. Therefore, the user can avoid losing the viewing angle of the three-dimensional special effect due to improper operation of the terminal, and the stability of displaying the three-dimensional special effect in the live room is improved, which can be applied to the interactive processing between the user and the three-dimensional special effect in the meta-universe live scene, and further improve the interactive stability between the user and the three-dimensional special effect in the meta-universe live scene.

[0041] In some embodiments, the control of the viewing angle of the three-dimensional special effect according to the tilt angle of the face and the gyroscope data of the terminal in step S202 can include:

[0042] obtaining the tilt angles of the face in multiple preset directions; if the tilt angles of the face in the multiple preset directions are all less than or equal to a preset tilt angle threshold, then controlling the viewing angle of the three-dimensional special effect according to the gyroscope data of the terminal.

[0043] In the embodiment, as described above, the multiple preset directions can include the left direction, the right direction, the up direction and the down direction, and the terminal can obtain the tilt angles of the face in the left direction, the right direction, the up direction and the down direction respectively when detecting the face, and then determine whether the tilt angles are less than or equal to the preset tilt angle threshold in the corresponding direction respectively. The tilt angle threshold in each preset direction can be the same or different. Without loss of generality, it is assumed that the preset tilt angle threshold in each preset direction is A°, if the terminal determines that the tilt angles of the face in the left direction, the right direction, the up direction and the down direction are all less than or equal to A°, then the terminal controls the viewing angle of the three-dimensional special effect according to the gyroscope data, that is, the gyroscope mode is started at this time, the user can rotate the terminal and the face is always kept in the detection range of the camera, the terminal performs Euler angle rotation on the virtual camera according to the gyroscope data (such as the data on the X, Y and Z axes) transmitted by the gyroscope, realizes the control of the viewing angle of the three-dimensional special effect according to the gyroscope data, achieves the effect of controlling the viewing angle through the gyroscope of the terminal, and can prevent the user from losing the viewing angle.

[0044] In some other embodiments, as shown in Figure 3 controlling the viewing angle of the three-dimensional special effect according to the tilt angle of the face and the gyroscope data of the terminal in step S202 can include:

[0045] In step S301, the tilt angles of the face in multiple preset directions are obtained.

[0046] In step S302, if there is at least one target direction in the multiple preset directions, then the viewing angle of the three-dimensional special effect is controlled according to the tilt angle of the face in the target direction and the gyroscope data of the terminal.

[0047] In this embodiment, the plurality of preset directions can include left direction, right direction, up direction and down direction, the terminal can obtain the tilt angle of the face in the left direction, the right direction, the up direction and the down direction respectively when detecting the face, and then compare the tilt angles with the preset tilt angle threshold in the corresponding direction respectively, assuming that the preset tilt angle threshold in each preset direction is A°, if the terminal detects that the tilt angle of the face in a preset direction is greater than A°, the terminal can determine the preset direction as the target direction, that is, the target direction is the preset direction corresponding to the face in the plurality of preset directions whose tilt angle is greater than the preset tilt angle threshold, and then control the viewing angle of the three-dimensional special effect according to the tilt angle of the face in the target direction and the gyroscope data of the terminal. Based on the scheme of this embodiment, the fine control of the viewing angle can be realized by combining the tilt angle of the face in the target direction and the gyroscope in the case that the face remains in the shooting range of the camera.

[0048] Further, in one of the embodiments, as shown in Figure 4 controlling the viewing angle of the three-dimensional special effect according to the tilt angle of the face in the target direction and the gyroscope data of the terminal in step S302 specifically includes:

[0049] Step S401, determining a target rotation axis corresponding to the target direction in the plurality of rotation axes.

[0050] In this step, the rotation axis refers to the rotation axis of the viewing angle, which can include X, Y and Z axes, and the rotation axis can correspond to the aforementioned preset direction, for example, the X axis can correspond to the aforementioned left direction and right direction, the Y axis can correspond to the aforementioned up direction and down direction, etc. Specifically, after determining the target direction, the terminal can further determine the rotation axis corresponding to the target direction in the plurality of rotation axes as the target rotation axis.

[0051] Step S402, obtaining the viewing angle change information of the viewing angle corresponding to the target rotation axis according to the tilt angle of the face in the target direction and the gyroscope data corresponding to the target rotation axis.

[0052] Specifically, if the target direction is the right direction, the viewing angle change information of the viewing angle corresponding to the X axis can be obtained according to the tilt angle of the face in the right direction and the gyroscope data corresponding to the X axis, which is the information indicating the corresponding change of the viewing angle in the X axis, and specifically can be the rotation angle of the viewing angle corresponding to the X axis. If the target direction is the up direction, the viewing angle change information of the viewing angle corresponding to the Y axis can be obtained according to the tilt angle of the face in the up direction and the gyroscope data corresponding to the Y axis, which can be the rotation angle of the viewing angle corresponding to the Y axis.

[0053] Step S403: Obtain the viewing angle change information of the viewing angle in the other rotation axes according to the gyroscope data corresponding to the other rotation axes in the plurality of rotation axes.

[0054] In this step, the other rotation axes refer to the rotation axes other than the target rotation axis in the plurality of rotation axes. For example, if the target rotation axis is the X axis, the Y axis and the Z axis are the other rotation axes. Specifically, if the target rotation axis is the X axis, the viewing angle change information of the viewing angle in the Y axis and the Z axis is obtained according to the gyroscope data corresponding to the Y axis and the Z axis, which can be the rotation angle of the viewing angle in the Y axis and the Z axis.

[0055] Step S404: Control the viewing angle of the three-dimensional special effect according to the viewing angle change information of the viewing angle in the target rotation axis and the viewing angle change information of the viewing angle in the other rotation axes.

[0056] In this step, the terminal can control the viewing angle of the three-dimensional special effect to change according to the rotation angle of the viewing angle in the target rotation axis X obtained in step S402 and the rotation angle of the viewing angle in the other rotation axes Y and Z obtained in step S403, so as to achieve the effect of fine control of the viewing angle by combining the face and the gyroscope.

[0057] Further, as an embodiment, the step S402 of obtaining the viewing angle change information of the viewing angle in the target rotation axis according to the inclination angle of the face in the target direction and the gyroscope data corresponding to the target rotation axis specifically includes:

[0058] When the target direction belongs to the positive direction type, the viewing angle change information of the viewing angle in the target rotation axis is obtained according to the sum of the gyroscope data corresponding to the target rotation axis and the inclination angle of the face in the target direction; when the target direction belongs to the negative direction type, the viewing angle change information of the viewing angle in the target rotation axis is obtained according to the difference between the gyroscope data corresponding to the target rotation axis and the inclination angle of the face in the target direction.

[0059] In this embodiment, specifically, the positive direction type direction refers to a direction that causes the viewing angle to produce a positive rotation on the corresponding axis, and the negative direction type direction refers to a direction that causes the viewing angle to produce a negative rotation on the corresponding axis. For example, when the target direction is the right direction and the down direction, it belongs to the positive direction type direction, and when the target direction is the left direction and the up direction, it belongs to the negative direction type direction. When the target direction belongs to the positive direction type direction, the terminal obtains the viewing angle change information of the viewing angle on the target rotation axis according to the sum of the gyroscope data corresponding to the target rotation axis and the tilt angle of the face in the target direction. Correspondingly, when the target direction belongs to the negative direction type direction, the terminal obtains the viewing angle change information of the viewing angle on the target rotation axis according to the difference between the gyroscope data corresponding to the target rotation axis and the tilt angle of the face in the target direction. As a specific example, assuming that the gyroscope data is a rotation angle, if the gyroscope data is a rotation radian, the corresponding rotation angle can be obtained through the conversion formula of radian and angle. If the target direction is the right direction, at this time the face of the user is tilted to the right side, and the terminal obtains the rotation angle of the viewing angle on the X axis = the rotation angle of the gyroscope on the X axis + the tilt angle of the face in the right direction, while for the Y axis and the Z axis, the rotation angle of the gyroscope on the Y axis and the Z axis is directly used. If the target direction is the left direction, at this time the face of the user is tilted to the left side, and the terminal obtains the rotation angle of the viewing angle on the X axis = the rotation angle of the gyroscope on the X axis - the tilt angle of the face in the left direction, while for the Y axis and the Z axis, the rotation angle of the gyroscope on the Y axis and the Z axis is directly used. If the target direction is the up direction, at this time the face of the user is tilted upwards, and the terminal obtains the rotation angle of the viewing angle on the Y axis = the rotation angle of the gyroscope on the Y axis - the tilt angle of the face in the up direction, while for the X axis and the Z axis, the rotation angle of the gyroscope on the X axis and the Z axis is directly used. If the target direction is the down direction, at this time the face of the user is tilted downwards, and the terminal obtains the rotation angle of the viewing angle on the Y axis = the rotation angle of the gyroscope on the Y axis + the tilt angle of the face in the down direction, while for the X axis and the Z axis, the rotation angle of the gyroscope on the X axis and the Z axis is directly used. Thus, the scheme of this embodiment can realize fine control of the viewing angle by combining the face and the gyroscope.

[0060] In some embodiments, as shown in FIG. 13, the method of the present application can further include the following steps: Figure 5

[0061] Step S501, when the face is detected, receiving the viewing angle switching voice input by the user.

[0062] Step S502, switching the current viewing angle according to the preset control keyword contained in the viewing angle switching voice.

[0063] ​The embodiment is that when the terminal detects the face of the user, the user can input voice to switch the viewing angle, further enrich the control mode of the user on the viewing angle, and prevent the user from losing the viewing angle. Specifically, when the terminal detects the face, the terminal can receive the viewing angle switching voice input by the user. The viewing angle switching voice is voice for instructing the terminal to switch the current viewing angle. The viewing angle switching voice needs to contain a preset control keyword. After the terminal receives the viewing angle switching voice input by the user, the terminal can identify the text corresponding to the viewing angle switching voice, determine whether the preset control keyword is contained in the viewing angle switching voice according to the text, the preset control keyword is a preset keyword for instructing the control on the viewing angle, and if the preset control keyword is contained in the viewing angle switching voice, the terminal switches the current viewing angle according to the preset control keyword contained in the viewing angle switching voice.

[0064] Further, in one embodiment, step S502 can specifically include:

[0065] If the viewing angle control voice contains the first preset control keyword, a first target viewing angle is randomly selected from a plurality of preset viewing angles, and the current viewing angle is switched to the first target viewing angle; if the viewing angle control voice contains the second preset control keyword, the current viewing angle is switched to the initial viewing angle; and if the viewing angle control voice contains the third preset control keyword, the current viewing angle is switched to a corresponding second target viewing angle according to the rotation axis corresponding to the third preset control keyword and the preset viewing angle change information corresponding to the third preset control keyword.

[0066] The scheme of the embodiment can control different preset control keywords contained in the viewing angle control voice according to a viewing angle, so as to realize random switching of the viewing angle, viewing angle regression and rotation of a specific axis, further enrich the control mode of the viewing angle for the user, and facilitate the control of the viewing angle for the user, thereby preventing the user from losing the viewing angle. Specifically, if the first preset control keyword is contained in the viewing angle control voice, the first preset control keyword can be "change an angle" or the like, which is a keyword for instructing the terminal to switch the viewing angle. In this case, a plurality of viewing angles (i.e., a plurality of preset viewing angles) can be preset for the three-dimensional special effect, and when the user inputs the first preset control keyword such as "change an angle", the terminal can randomly select a preset viewing angle as a first target viewing angle from the plurality of preset viewing angles, and then switch the current viewing angle to the first target viewing angle. As described above, the current viewing angle can be moved to the first target viewing angle through an animation. If the second preset control keyword is contained in the viewing angle control voice, the second preset control keyword can be "back to the starting point" or the like, which is a keyword for instructing the terminal to perform viewing angle regression. In this case, an initial viewing angle can be preset for the three-dimensional special effect, and when the user inputs the second preset control keyword such as "back to the starting point", the terminal can switch the current viewing angle to the initial viewing angle. Specifically, the current viewing angle can be moved to the initial viewing angle through an animation. If the third preset control keyword is contained in the viewing angle control voice, the third preset keyword can be "right", "left", "down" and "up" or the like, which is a keyword for instructing the terminal to perform viewing angle switching in a specific rotation axis. In this case, the number of the third preset control keywords can be multiple, a corresponding rotation axis and corresponding preset viewing angle change information can be set for each third preset control keyword. The preset viewing angle change information can be a preset amount of rotation angle ΔB°. As an example, when the user inputs "right", the terminal can determine the corresponding X axis and the preset amount of rotation angle ΔB°, and then add the preset amount of rotation angle ΔB° to the current rotation angle of the X axis to obtain a corresponding second target viewing angle. The current viewing angle is switched to the corresponding second target viewing angle. As another example, when the user inputs "left", the terminal can determine the corresponding X axis and the preset amount of rotation angle ΔB°, and then subtract the preset amount of rotation angle ΔB° from the current rotation angle of the X axis to obtain a corresponding second target viewing angle. The current viewing angle is switched to the corresponding second target viewing angle. Specifically, the current viewing angle can also be moved to the second target viewing angle through an animation.

[0067] In some embodiments, the method of the present application can further include the following steps: filtering the detection results of the face detection and the gyroscope data when the current viewing angle is switched.

[0068] In this embodiment, the detection result of face detection and the gyroscope data can be filtered out when the current viewing angle is switched to the next viewing angle, that is, the control of the viewing angle is not performed until the switching of the viewing angle is completed, so that the switching control of the viewing angle is more stable and reliable. Specifically, the terminal can filter out the detection result of face detection and the gyroscope data during the animation movement of switching the viewing angle, and then reacquire the gyroscope data after the animation movement is completed. The current gyroscope data is used as the position currently corresponding to the viewing angle. At this time, the terminal rotates again when the face is in the camera range of the camera, and the viewing angle follows the rotation again.

[0069] It should be understood that, although each step in the flowchart involved in each of the above embodiments is displayed in sequence according to the arrow, these steps are not necessarily executed in sequence according to the arrow. Unless otherwise specified herein, the execution of these steps is not strictly limited in sequence, and these steps can be executed in other sequences. Moreover, at least part of the steps in the flowchart involved in each of the above embodiments can include multiple steps or stages, which are not necessarily executed at the same time, but can be executed at different times, and the execution sequence of these steps or stages is not necessarily sequential, but can be executed alternately or alternately with at least part of other steps or steps or stages in other steps.

[0070] Based on the same inventive concept, the embodiments of the present application also provide a live special effect viewing angle processing device for implementing the live special effect viewing angle processing method described above. The problem-solving implementation scheme provided by the device is similar to the implementation scheme described in the above method, so the specific limitations in one or more live special effect viewing angle processing device embodiments provided below can refer to the limitations of the live special effect viewing angle processing method in the above text, and will not be repeated here.

[0071] In one embodiment, as shown in Figure 6 A live special effect viewing angle processing device is provided. The device 600 can be applied to a terminal, and the device 600 can include:

[0072] The face detection module 601 is configured to perform face detection through the camera of the terminal when a three-dimensional special effect is played in a live room.

[0073] The viewing angle control module 602 is configured to, when a face is detected, control the viewing angle of the three-dimensional special effect according to the tilt angle of the face and the gyroscope data of the terminal.

[0074] The preset display module 603 is configured to display the three-dimensional special effect with a preset viewing angle when no face is detected.

[0075] In one embodiment, the view angle control module 602 is configured to acquire the tilt angles of the face in a plurality of preset directions, and control the viewing angle of the three-dimensional special effect according to the gyroscope data of the terminal if the tilt angles of the face in the plurality of preset directions are all less than or equal to a preset tilt angle threshold.

[0076] In one embodiment, the view angle control module 602 is configured to acquire the tilt angles of the face in a plurality of preset directions, and control the viewing angle of the three-dimensional special effect according to the tilt angle of the face in a target direction and the gyroscope data of the terminal if at least one target direction exists in the plurality of preset directions, wherein the target direction is a preset direction corresponding to a tilt angle of the face greater than a preset tilt angle threshold in the plurality of preset directions.

[0077] In one embodiment, the view angle control module 602 is further configured to determine a target rotation axis corresponding to the target direction in the plurality of rotation axes, obtain the viewing angle change information of the viewing angle corresponding to the target rotation axis according to the tilt angle of the face in the target direction and the gyroscope data corresponding to the target rotation axis, obtain the viewing angle change information of the viewing angle corresponding to other rotation axes according to the gyroscope data corresponding to the other rotation axes in the plurality of rotation axes, wherein the other rotation axes are rotation axes other than the target rotation axis in the plurality of rotation axes, and control the viewing angle of the three-dimensional special effect according to the viewing angle change information of the viewing angle corresponding to the target rotation axis and the viewing angle change information of the viewing angle corresponding to the other rotation axes.

[0078] In one embodiment, the view angle control module 602 is further configured to, when the target direction belongs to a positive direction category, obtain the viewing angle change information of the viewing angle corresponding to the target rotation axis according to the sum of the gyroscope data corresponding to the target rotation axis and the tilt angle of the face in the target direction, and when the target direction belongs to a negative direction category, obtain the viewing angle change information of the viewing angle corresponding to the target rotation axis according to the difference between the gyroscope data corresponding to the target rotation axis and the tilt angle of the face in the target direction.

[0079] In one embodiment, the apparatus 600 can further include a voice control module configured to, when the face is detected, receive a viewing angle switching voice input by a user, and switch the current viewing angle according to a preset control keyword contained in the viewing angle switching voice.

[0080] In an embodiment, the voice control module is further configured to: if the viewing angle control voice contains a first preset control keyword, randomly select a first target viewing angle from a plurality of preset viewing angles, and switch the current viewing angle to the first target viewing angle; if the viewing angle control voice contains a second preset control keyword, switch the current viewing angle to an initial viewing angle; and if the viewing angle control voice contains a third preset control keyword, switch the current viewing angle to a corresponding second target viewing angle according to a rotation axis corresponding to the third preset control keyword and preset viewing angle change information corresponding to the third preset control keyword.

[0081] In an embodiment, the apparatus 600 can further include a data filtering module configured to filter the detection result of the face detection and the gyroscope data when the current viewing angle is switched.

[0082] The modules in the viewing angle processing apparatus for live special effects described above can be implemented in whole or in part by software, hardware, and combinations thereof. The modules described above can be embedded in or independent of a processor in the electronic device in hardware form, or can be stored in a memory in the electronic device in software form, so as to be called and executed by the processor to perform the operations corresponding to the modules.

[0083] In an embodiment, an electronic device is provided, which can be a terminal, and an internal structure diagram thereof can be as shown in Figure 7 The electronic device includes a processor, a memory, a communication interface, a display screen, and an input device connected through a system bus. The processor of the electronic device is configured to provide computing and control capabilities. The memory of the electronic device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system and a computer program. The internal memory provides an environment for the operating system and the computer program in the non-volatile storage medium to run. The communication interface of the electronic device is configured to perform wired or wireless communication with external devices. The wireless communication can be achieved through WIFI, mobile cellular network, NFC (Near Field Communication), or other technologies. The computer program is executed by the processor to implement a viewing angle processing method for live special effects. The display screen of the electronic device can be a liquid crystal display screen or an electronic ink display screen. The input device of the electronic device can be a touch layer overlaid on the display screen, or can be a key, trackball, or touchpad arranged on the shell of the electronic device, or can be an external keyboard, touchpad, or mouse, etc.

[0084] Those skilled in the art can understand that Figure 7The structure shown in the figure is only a block diagram of part of the structure related to the scheme of the present application, and does not constitute a limitation on the electronic device to which the scheme of the present application is applied. The specific electronic device can include more or fewer components than those shown in the figure, or combine certain components, or have a different arrangement of components.

[0085] In an embodiment, an electronic device is also provided, including a memory and a processor, the memory storing a computer program, and the processor implementing the steps in the above-mentioned method embodiments when executing the computer program.

[0086] In an embodiment, a computer-readable storage medium is provided, storing a computer program, which, when executed by a processor, implements the steps in the above-mentioned method embodiments.

[0087] A person of ordinary skill in the art can understand that all or part of the processes in the above-mentioned embodiments can be completed by a computer program instructing related hardware. The computer program can be stored in a non-volatile computer-readable storage medium and, when executed, can include the processes of the above-mentioned embodiments. Any reference to a memory, database, or other medium used in the embodiments provided by the present application can include at least one of a non-volatile and volatile memory. The non-volatile memory can include a read-only memory (ROM), a magnetic tape, a floppy disk, a flash memory, an optical storage, a high-density embedded non-volatile memory, a resistive memory (ReRAM), a magnetoresistive random access memory (MRAM), a ferroelectric random access memory (FRAM), a phase change memory (PCM), a graphene memory, etc. The volatile memory can include a random access memory (RAM) or an external cache memory, etc. As an illustration but not as a limitation, the RAM can be in various forms, such as a static random access memory (SRAM) or a dynamic random access memory (DRAM), etc. The database involved in the embodiments provided by the present application can include at least one of a relational database and a non-relational database. The non-relational database can include a distributed database based on a blockchain, etc., without being limited thereto. The processor involved in the embodiments provided by the present application can be a general-purpose processor, a central processing unit, a graphics processing unit, a digital signal processor, a programmable logic device, a data processing logic device based on quantum computing, etc., without being limited thereto.

[0088] It should be noted that the user information (including but not limited to user equipment information, user personal information, etc.) and data (including but not limited to data for analysis, stored data, displayed data, etc.) involved in the present application are information and data authorized by the user or authorized by all parties.

[0089] The technical features of the above embodiments can be combined in any manner. To make the description concise, all possible combinations of the technical features in the above embodiments are not described, but as long as the combinations of the technical features do not exist, they should be considered as the scope of the present application.

[0090] The above embodiments only express several implementation manners of the present application, and the description is more specific and detailed, but it should not be understood as a limitation on the patent scope of the present application. It should be pointed out that for ordinary skilled persons in the art, some modifications and improvements can be made without departing from the concept of the present application, and these all belong to the protection scope of the present application. Therefore, the protection scope of the present application should be subject to the appended claims.

Claims

1. A method for processing the viewing angle of live streaming special effects, characterized in that, Applied to a terminal, the method is used in a live streaming room within a metaverse live streaming scenario, including: When playing 3D effects in the live stream, face detection is performed through the camera of the terminal; wherein, users in the live stream view the 3D effects from different viewing angles, and the viewing angle is the perspective of the virtual camera in the 3D space where the 3D effects are located; When a face is detected, the terminal acquires the tilt angle of the user's face and gyroscope data. Based on the tilt angle of the face and the gyroscope data of the terminal, the viewing angle of the 3D effect is controlled, including: acquiring the tilt angle of the face in multiple preset directions; if at least one of the multiple preset directions is a target direction, the viewing angle of the 3D effect is controlled based on the tilt angle of the face in the target direction and the gyroscope data of the terminal; wherein, the target direction is a preset direction in the multiple preset directions where the tilt angle of the face is greater than a preset tilt angle threshold; When no face is detected, the camera determines that the user's face has left the camera's shooting range and displays the 3D effect from a preset viewing angle. When the user's face is detected again, the current gyroscope data is used as the starting data to re-control the viewing angle of the 3D effect. The preset viewing angle is the initial viewing angle of the 3D effect that is set in advance.

2. The method according to claim 1, characterized in that, The step of controlling the viewing angle of the 3D special effects based on the tilt angle of the face and the gyroscope data of the terminal further includes: If the tilt angle of the face in multiple preset directions is less than or equal to a preset tilt angle threshold, the viewing angle of the three-dimensional special effects is controlled according to the gyroscope data of the terminal.

3. The method according to claim 1, characterized in that, The step of controlling the viewing angle of the 3D special effects based on the tilt angle of the face in the target direction and the gyroscope data of the terminal includes: Determine the target rotation axis corresponding to the target direction among multiple rotation axes; Based on the tilt angle of the face in the target direction and the gyroscope data corresponding to the target rotation axis, the viewing angle change information corresponding to the target rotation axis is obtained; Based on the gyroscope data corresponding to other rotation axes among the plurality of rotation axes, the viewing angle change information corresponding to the other rotation axes is obtained; wherein, the other rotation axes are rotation axes other than the target rotation axis among the plurality of rotation axes; The viewing angle of the 3D special effects is controlled based on the viewing angle change information corresponding to the target rotation axis and the viewing angle change information corresponding to the other rotation axes.

4. The method according to claim 3, characterized in that, The step of obtaining viewing angle change information corresponding to the target rotation axis based on the tilt angle of the face in the target direction and the gyroscope data corresponding to the target rotation axis includes: When the target direction is a positive direction, the viewing angle change information corresponding to the target rotation axis is obtained by summing the gyroscope data corresponding to the target rotation axis and the tilt angle of the face in the target direction. When the target direction is a negative direction, the viewing angle change information corresponding to the target rotation axis is obtained based on the difference between the gyroscope data corresponding to the target rotation axis and the tilt angle of the face in the target direction.

5. The method according to any one of claims 1 to 4, characterized in that, The method further includes: When a face is detected, the system receives user input to switch the viewing angle via voice commands. The current viewing angle is switched based on the preset control keywords contained in the viewing angle switching voice.

6. The method according to claim 5, characterized in that, The step of switching the current viewing angle based on preset control keywords contained in the voice recording of the viewing angle includes: If the viewing angle control voice contains a first preset control keyword, then a first target viewing angle is randomly selected from multiple preset viewing angles, and the current viewing angle is switched to the first target viewing angle; If the viewing angle control voice contains a second preset control keyword, then the current viewing angle will be switched to the initial viewing angle; If the viewing angle control voice contains a third preset control keyword, then the current viewing angle will be switched to the corresponding second target viewing angle according to the rotation axis corresponding to the third preset control keyword and the corresponding preset viewing angle change information.

7. The method according to claim 5, characterized in that, The method further includes: When the current viewing angle changes, the detection results of the face detection and the gyroscope data are filtered.

8. A viewing angle processing device for live streaming special effects, characterized in that, Applied to a terminal, the device is used in a live streaming room within a metaverse live streaming scenario, comprising: The face detection module is used to detect faces through the camera of the terminal when playing 3D effects in the live broadcast room; wherein, the live broadcast room users view the 3D effects from different viewing angles, and the viewing angle is the perspective of the virtual camera in the 3D space where the 3D effects are located; A viewing angle control module is used to, when a face is detected, acquire the tilt angle of the user's face and gyroscope data, and control the viewing angle of the 3D effect based on the tilt angle of the face and the gyroscope data of the terminal. This includes: acquiring the tilt angle of the face in multiple preset directions; if at least one of the multiple preset directions is a target direction, controlling the viewing angle of the 3D effect based on the tilt angle of the face in the target direction and the gyroscope data of the terminal; wherein the target direction is a preset direction in the multiple preset directions where the tilt angle of the face is greater than a preset tilt angle threshold. The preset display module is used to determine when the user's face leaves the camera's shooting range if no face is detected, and to display the 3D effect from a preset viewing angle. When the user's face is detected again, the current gyroscope data is used as the starting data to re-control the viewing angle of the 3D effect. The preset viewing angle is the initial viewing angle of the 3D effect that is set in advance.

9. An electronic device comprising a memory and a processor, wherein the memory stores a computer program, characterized in that, When the processor executes the computer program, it implements the steps of the method according to any one of claims 1 to 7.

10. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by a processor, it implements the steps of the method according to any one of claims 1 to 7.

Citation Information

Patent Citations

  • Panoramic video playing method and apparatus

    CN107318008A

  • A data processing method and system for intelligent house inspection

    CN109934736A

  • 3D display method and device for assisting human eye tracking by using gyroscope

    CN113347410A