Video player position adjusting method and related device
By using image processing technology in the video player, determining the user's pupil position and automatically adjusting the position of the video player, the problem of users needing to frequently manually adjust the player position when watching videos is solved, and the smoothness and comfort of the user experience is improved.
Patent Information
- Application Number
- CN202510010977.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-01-03
- Publication Date
- 2025-04-22
AI Technical Summary
When an existing video player is watching videos, the focus of the line of sight may be misaligned with the player position due to personal habits, environmental limitations or device characteristics, resulting in the user need to frequently manually drag the video to find the best viewing angle, which increases the user's operation burden and reduces the smoothness and comfort of the viewing experience.
By determining the current relative position between the user's pupil position and the reference plane based on the image taken by the target user, and panning the video player in the screen based on the current and historical relative positions to keep the video player in a suitable position and satisfy the user's viewing habits.
Without the need for the user to manually drag the video playback interface, the video player can automatically stay in the right position, improving the smoothness and comfort of the user experience.
Smart Images

Figure CN119863520A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of computer technology, and in particular to a method for adjusting the position of a video player and related devices. Background Art
[0002] In the current digital entertainment and multimedia content consumption field, video players are the main tool for users to watch video content. The quality of their user experience is directly related to user satisfaction and loyalty.
[0003] However, existing video players generally face a significant problem: when users watch videos, their visual focus may be misaligned with the display position of the video player on the screen due to personal habits, environmental restrictions or device characteristics. In this case, users may need to frequently manually drag the video to find the best viewing angle, which undoubtedly increases the user's operating burden and seriously reduces the smoothness and comfort of the viewing experience. Summary of the invention
[0004] In order to solve the above technical problems, the embodiment of the present application provides a method for adjusting the position of a video player and a related device to achieve the purpose of improving user experience. The technical solution is as follows:
[0005] On one hand, the present application provides a method for adjusting the position of a video player, comprising:
[0006] Based on the image captured of the target user, determine the current relative position between the pupil position of the target user and a reference plane; the reference plane is perpendicular to the plane of the screen and the center position of the screen is located on the reference plane;
[0007] Based on the current relative position and the historical relative position between the pupil position of the target user and the reference plane determined at a moment before the current moment, the video player is translated in the screen; wherein the size of the video player is smaller than the size of the screen.
[0008] In a possible implementation, determining a current relative position between a pupil position of the target user and a reference plane based on an image captured of the target user includes:
[0009] Based on the image captured of the target user, determine the current distance between the target user's eyeball position and the screen, and the current direction and current distance of the target user's pupil position relative to the reference plane;
[0010] Based on the current distance between the eyeball position of the target user and the screen, and the current distance of the pupil position relative to the reference plane, the size of the current angle between the pupil position and the reference plane is determined.
[0011] In a possible implementation, the historical relative position between the pupil position of the target user and the reference plane includes: a historical direction of the pupil position of the target user relative to the reference plane and a historical angle between the pupil position and the reference plane;
[0012] Based on the current relative position and the historical relative position between the pupil position of the target user and the reference plane, translating the video player in the screen includes:
[0013] If the current direction and the historical direction of the pupil position of the target user relative to the reference plane are consistent, determining the translation direction and the translation distance of the video player in the screen based on the difference between the current angle and the historical angle;
[0014] If the current direction and the historical direction of the pupil position of the target user relative to the reference plane are inconsistent, determining the translation direction of the video player in the screen based on the current direction, and determining the translation distance of the video player in the screen based on the size of the current angle and the size of the historical angle;
[0015] The video player is translated in the screen according to the translation direction and the translation distance.
[0016] In a possible implementation, determining the translation distance of the video player on the screen based on the difference between the current angle and the historical angle includes:
[0017] Based on the image, determining an upper limit value of an angle between a pupil position of the target user and the reference plane;
[0018] Determine the proportion of the difference between the current angle and the historical angle in the range corresponding to the upper limit of the angle;
[0019] Based on the proportion and the vertical distance between the edge of the screen and the reference plane, the translation distance of the video player in the screen is determined.
[0020] In a possible implementation, determining the translation distance of the video player on the screen based on the current angle and the historical angle includes:
[0021] Based on the image, determining an upper limit value of an angle between a pupil position of the target user and the reference plane;
[0022] Determine a first proportion and a second proportion of the current angle and the historical angle in a range corresponding to the upper limit value of the angle;
[0023] Based on the first proportion, the second proportion, and a vertical distance from an edge of the screen to the reference plane, a translation distance of the video player in the screen is determined.
[0024] In a possible implementation, determining, based on the image, an upper limit value of an angle between a pupil position of the target user and the reference plane includes:
[0025] Facial features are extracted from the image, and an upper limit angle value matching the facial features is searched in the correspondence between the calibrated upper limit angle value and the reference facial features as an upper limit angle value between the pupil position of the target user and the reference plane.
[0026] In another aspect of the present application, a device for adjusting the position of a video player is provided, comprising:
[0027] A determination module, configured to determine a current relative position between a pupil position of a target user and a reference plane based on an image captured of the target user; the reference plane is perpendicular to a plane of a screen and a center position of the screen is located on the reference plane;
[0028] A translation module is used to translate the video player in the screen based on the current relative position and the historical relative position between the pupil position of the target user and the reference plane determined at a moment before the current moment; wherein the size of the video player is smaller than the size of the screen.
[0029] In a third aspect of the present application, a computer program product is provided, comprising computer-readable instructions. When the computer-readable instructions are executed on an electronic device, the electronic device implements the method for adjusting the position of a video player as described in any one of the above.
[0030] In a fourth aspect of the present application, an electronic device is provided, comprising at least one processor and a memory connected to the processor, wherein:
[0031] The memory is used to store computer programs;
[0032] The processor is used to execute the computer program so that the electronic device can implement the position adjustment method of the video player as described in any one of the above.
[0033] The fifth aspect of the present application provides a computer storage medium, characterized in that the storage medium carries one or more computer programs, and when the one or more computer programs are executed by an electronic device, the electronic device can implement a method for adjusting the position of a video player as described in any one of the above.
[0034] In the present application, the current relative position between the pupil position of the target user and the reference plane is determined based on the image taken of the target user, and based on the current relative position and the historical relative position between the pupil position of the target user and the reference plane, the video player is translated in the screen. There is no need for the target object to manually drag the video playback interface, so the video player can be kept in a suitable position, meeting the user's viewing habits and improving the user experience. BRIEF DESCRIPTION OF THE DRAWINGS
[0035] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings required for use in the description of the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative labor.
[0036] Figure 1 It is a flowchart of a method for adjusting the position of a video player provided in Example 1 of the present application;
[0037] Figure 2 This is a schematic diagram of an implementation scenario of a method for adjusting the position of a video player provided by the present application;
[0038] Figure 3 This is another schematic diagram of an implementation scenario of a method for adjusting the position of a video player provided by the present application;
[0039] Figure 4 This is a schematic diagram of another implementation scenario of a method for adjusting the position of a video player provided by the present application;
[0040] Figure 5 This is a schematic diagram of another implementation scenario of a method for adjusting the position of a video player provided by the present application;
[0041] Figure 6 This is a schematic diagram of another implementation scenario of a method for adjusting the position of a video player provided by the present application;
[0042] Figure 7 This is a schematic diagram of another implementation scenario of a method for adjusting the position of a video player provided by the present application;
[0043] Figure 8 It is a timing diagram of a method for adjusting the position of a video player provided by the present application;
[0044] Fig. 9 This is a schematic diagram of another implementation scenario of a method for adjusting the position of a video player provided by the present application;
[0045] Fig.10It is a structural schematic diagram of a position adjustment device for a video player provided in the present application. DETAILED DESCRIPTION
[0046] The following will be combined with the drawings in the embodiments of the present application to clearly and completely describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.
[0047] In order to make the above-mentioned objects, features and advantages of the present application more obvious and easy to understand, the present application is further described in detail below in conjunction with the accompanying drawings and specific implementation methods.
[0048] Reference Figure 1 , is a flow chart of a method for adjusting the position of a video player provided in Example 1 of the present application, such as Figure 1 As shown, the method may include but is not limited to the following steps:
[0049] Step S101: based on an image taken of a target user, determine the current relative position between the pupil position of the target user and a reference plane; the reference plane is perpendicular to the plane of the screen and the center position of the screen is located on the reference plane.
[0050] In this embodiment, when a user is in front of an electronic device (such as a smart phone, tablet computer, or smart TV with a front camera, etc.) and is about to start or is watching video content, the image acquisition device (such as the front camera) of the electronic device can be activated to capture the facial image of the target user (an implementation method for the image taken by the target user). This process can be carried out under the premise of user authorization or consent to ensure privacy protection.
[0051] The user can complete the authorization by turning on or configuring the facial recognition or position adjustment function related to the front camera in the settings of the electronic device in advance. Alternatively, in the video playback interface, the electronic device can display a prompt or icon to inform the user that the front camera is being used for facial recognition or position adjustment. The user can authorize this function in real time by clicking to confirm or performing other related operations.
[0052] The target user may be determined by, but is not limited to, the following methods:
[0053] S11. An image acquisition device based on the electronic device acquires images.
[0054] S12: If the image contains multiple users, determine the facial integrity of each of the multiple users.
[0055] In this embodiment, the facial integrity of each user among multiple users may be determined based on facial recognition technology. The specific determination process may refer to the relevant introduction in the prior art, which will not be repeated here.
[0056] S13: Determine the user with the highest facial integrity among the multiple users as the target user.
[0057] S14: If the image contains a user, determine the object as a target user.
[0058] After capturing the facial image of the target user, the electronic device can analyze the facial image of the target user using an image processing algorithm to identify the user's eye area and determine the pupil position.
[0059] In this embodiment, whenever a new relative position between the pupil position of a target user and the reference plane is calculated, it will be used as the "current relative position" at that moment, and the new relative position and a timestamp will be immediately associated and stored. The timestamp can indicate the time when the new relative position was generated.
[0060] The current relative position between the pupil position of the target user and the reference plane may indicate whether the pupil position is biased upward or downward in the vertical direction (ie, the direction perpendicular to the reference plane).
[0061] Step S102: based on the current relative position and the historical relative position between the pupil position of the target user and the reference plane determined at a time before the current time, translate the video player in the screen; wherein the size of the video player is smaller than the size of the screen.
[0062] Since all previous relative positions have been stored in chronological order (ie, a new relative position and a timestamp have been associated and stored each time), the relative position determined one moment before the current moment can be searched in the stored relative positions as the historical relative position.
[0063] For example, the current pupil position and the historical pupil position are Figure 2 As shown, the current relative position indicates that the pupil position is above the reference plane, and the historical relative position indicates that the pupil position is on the reference plane. The video player can be translated upward on the screen according to the difference between the current relative position and the historical relative position.
[0064] The current pupil position and the historical pupil position are as follows Figure 3 As shown, the current relative position indicates that the pupil position is lower than the reference plane, and the historical relative position indicates that the pupil position is on the reference plane. The video player can be translated downward on the screen according to the difference between the current relative position and the historical relative position.
[0065] In this embodiment, by determining the current relative position between the pupil position of the target user and the reference plane based on the image taken of the target user, and based on the current relative position and the historical relative position between the pupil position of the target user and the reference plane, the video player is translated in the screen. There is no need for the target object to manually drag the video playback interface, so the video player can be kept in a suitable position, meeting the user's viewing habits and improving the user experience.
[0066] As another optional embodiment of the present application, a method for adjusting the position of a video player is provided in Embodiment 2 of the present application. This embodiment is mainly a refinement of step S101 in the above-mentioned embodiment 1. Step S101 may include but is not limited to the following steps:
[0067] Step S1011: based on the image captured of the target user, determine the current distance between the target user's eyeball position and the screen, and the current direction and current distance of the target user's pupil position relative to the reference plane.
[0068] In this embodiment, the image captured of the target user may include a facial depth image. In this embodiment, the eyeballs of the target user may be identified in the facial depth image based on an image processing algorithm, and the depth value of the eyeballs (which may represent the distance between the eyeballs and the front camera) may be extracted from the facial depth image. According to the depth value of the eyeballs and the distance between the front camera and the center of the screen, the current distance between the eyeball position of the target user and the screen may be determined.
[0069] In this embodiment, the pupil can be identified in the image taken of the target user, the two-dimensional coordinates of the pupil in the image can be determined, and the three-dimensional spatial coordinates of the pupil can be determined based on the two-dimensional coordinates of the pupil in the image, and the three-dimensional spatial coordinates of the pupil can be used as the pupil position.
[0070] In this embodiment, the electronic device can regard the center of the screen as a key point, and then set a virtual plane perpendicular to the key point as a reference plane according to the position of the center of the screen. The position of the center of the screen can be determined by the geometric size and resolution of the screen.
[0071] After determining the position of the screen center, a spatial coordinate system with the screen center as the origin can be established. In this coordinate system, the reference plane can be a plane passing through the origin and perpendicular to the screen. The pupil position can also be converted into this coordinate system to obtain the coordinates of the pupil position in this coordinate system.
[0072] In this embodiment, based on the coordinates of the pupil position in the coordinate system and the reference plane, the current direction and current distance of the pupil position of the target user relative to the reference plane can be determined.
[0073] Step S1012: Determine the current angle between the pupil position and the reference plane based on the current distance between the target user's eyeball position and the screen, and the current distance of the pupil position relative to the reference plane.
[0074] In this embodiment, after determining the current distance between the target user's eye position and the screen (which can be expressed as d1), and the current distance of the pupil position relative to the reference plane (which can be expressed as d2), the current angle between the pupil position and the reference plane can be calculated based on trigonometric functions.
[0075] For example, pupil position Figure 4 As shown, according to the current distance between the target user's eye position and the screen (which can be expressed as d1), the current distance of the pupil position relative to the reference plane (which can be expressed as d2) and trigonometric functions, β, that is, the current angle between the pupil position and the reference plane, can be calculated.
[0076] Alternatively, pupil position Figure 5 As shown, according to the current distance between the target user's eye position and the screen (which can be expressed as d1), the current distance of the pupil position relative to the reference plane (which can be expressed as d2) and trigonometric functions, α, that is, the current angle between the pupil position and the reference plane, can be calculated.
[0077] Accordingly, the historical relative position between the pupil position of the target user and the reference plane may include: the historical direction of the pupil position of the target user relative to the reference plane and the size of the historical angle between the pupil position and the reference plane. The method for determining the historical direction of the pupil position of the target user relative to the reference plane and the size of the historical angle between the pupil position and the reference plane can be referred to steps S1011 and S1012, which will not be repeated here.
[0078] In this embodiment, based on the image taken of the target user, the current distance between the target user's eye position and the screen, the current direction and current distance of the target user's pupil position relative to the reference plane are determined, and based on the current distance between the target user's eye position and the screen, and the current distance of the pupil position relative to the reference plane, the size of the current angle between the pupil position and the reference plane is determined. This can provide precise angle information and the direction of the pupil position relative to the reference plane, which helps to more accurately understand the spatial posture of the pupil position relative to the reference plane, thereby more accurately translating the video player on the screen.
[0079] As another optional embodiment of the present application, a method for adjusting the position of a video player is provided in Embodiment 3 of the present application. This embodiment is mainly a refinement of step S102 in the above-mentioned Embodiment 2. Step S102 may include but is not limited to the following steps:
[0080] Step S1021: If the current direction and historical direction of the pupil position of the target user relative to the reference plane are consistent, determine the translation direction and translation distance of the video player in the screen based on the difference between the current angle and the historical angle.
[0081] Determining the translation direction of the video player on the screen based on the difference between the current angle and the historical angle may include but is not limited to:
[0082] If the current angle is greater than the historical angle, it can be determined that the video player is moving upward on the screen. Figure 6 As shown, if the current angle is β2, the historical angle is β1, and β2 is greater than β1, it can be determined that the translation direction of the video player on the screen is upward translation.
[0083] Alternatively, if the current angle is smaller than the historical angle, it can be determined that the video player is moving in a downward direction on the screen. Figure 7 As shown, if the current angle is β1, the historical angle is β2, and β1 is smaller than β2, it can be determined that the translation direction of the video player on the screen is downward translation.
[0084] According to the size of the current angle, the current distance of the video player relative to the reference plane can be determined, and according to the size of the historical angle, the historical distance of the video player relative to the reference plane can be determined. By comparing the current distance and the historical distance of the video player relative to the reference plane, the difference between the current distance and the historical distance of the video player relative to the reference plane can be used as the translation distance of the video player in the screen.
[0085] Step S1022: If the current direction and historical direction of the pupil position of the target user relative to the reference plane are inconsistent, determine the translation direction of the video player in the screen based on the current direction, and determine the translation distance of the video player in the screen based on the size of the current angle and the size of the historical angle.
[0086] Based on the current direction, determining the translation direction of the video player on the screen may include but is not limited to:
[0087] If the current direction indicates that the pupil position is upward relative to the reference plane, it can be determined that the translation direction of the video player on the screen is upward.
[0088] Alternatively, if the current direction indicates that the pupil position is downward relative to the reference plane, it can be determined that the translation direction of the video player in the screen is a downward shift.
[0089] According to the size of the current angle, the current distance of the video player relative to the reference plane can be determined, and according to the size of the historical angle, the historical distance of the video player relative to the reference plane can be determined. By summing the current distance and the historical distance of the video player relative to the reference plane, the sum of the current distance and the historical distance of the video player relative to the reference plane can be used as the translation distance of the video player in the screen.
[0090] Step S1023: translate the video player on the screen according to the translation direction and the translation distance.
[0091] In this embodiment, by using the current direction and historical direction of the pupil position of the target user relative to the reference plane, as well as the current angle and historical angle of the pupil position of the target user relative to the reference plane, the change of the pupil position relative to the reference plane can be more accurately determined, thereby more accurately translating the video player on the screen.
[0092] In this embodiment, cloud computing can be used to determine the translation direction and translation distance of the video player on the screen. Figure 8 As shown, the image acquisition device can send multiple facial images corresponding to the target user to the control module of the electronic device, and the control module distributes the multiple facial images corresponding to the target object to the image processing module. The image processing module can determine the depth value of the eyeball and the two-dimensional coordinates of the pupil in the facial image based on the multiple facial objects, and send the depth value of the eyeball and the two-dimensional coordinates of the pupil in the facial image to the cloud computing module.
[0093] The cloud computing module can determine the current distance between the target user's eyeball position and the screen based on the depth value of the eyeball and the distance between the front camera and the center of the screen, and determine the three-dimensional space coordinates of the pupil based on the two-dimensional coordinates of the pupil in the image, use the three-dimensional space coordinates of the pupil as the pupil position, and determine the current direction and current distance of the pupil position of the target user relative to the reference plane. And, based on the current distance between the target user's eyeball position and the screen, and the current distance of the pupil position relative to the reference plane, determine the size of the current angle between the pupil position and the reference plane. And, if the current direction and historical direction of the pupil position of the target user relative to the reference plane are consistent, based on the difference between the size of the current angle and the size of the historical angle, determine the translation direction and translation distance of the video player in the screen. If the current direction and historical direction of the pupil position of the target user relative to the reference plane are inconsistent, based on the current direction, determine the translation direction of the video player in the screen, and based on the size of the current angle and the size of the historical angle, determine the translation distance of the video player in the screen.
[0094] The cloud computing module can send the translation direction and translation distance of the video player on the screen to the control module, and the control module can send the translation direction and translation distance of the video player on the screen to the video player, and the video player can translate on the screen according to the translation direction and translation distance.
[0095] In this embodiment, a sight switch may be set, and the sight switch is used to control whether the electronic device executes the method for adjusting the position of the video player. For the implementation of setting the sight switch, the adjustment logic of the video player can be found in Figure 3 ,like Figure 3 As shown, if the electronic device starts the video player, the electronic device detects whether the sight switch is turned on. If so, the facial image corresponding to the target user is collected based on the image acquisition device. If the facial image is collected, the depth value of the target user's eyeball and the two-dimensional coordinates of the pupil in the facial image are detected. The cloud computing module determines the translation direction and translation distance of the video player in the screen based on the depth value of the user's eyeball and the two-dimensional coordinates of the pupil in the facial image. If the translation direction and translation distance are determined, the video player translates in the screen according to the translation direction and translation distance, and the image acquisition device can continue to collect the facial image corresponding to the target object.
[0096] If the gaze switch is not turned on or the pan direction and pan distance are not obtained, the current position of the video player remains unchanged.
[0097] As another optional embodiment of the present application, a method for adjusting the position of a video player is provided in Embodiment 4 of the present application. This embodiment is mainly an implementation method for determining the translation distance of the video player in the screen based on the difference between the current angle and the historical angle in the above Embodiment 3. Based on the difference between the current angle and the historical angle, determining the translation distance of the video player in the screen may include but is not limited to the following steps:
[0098] Step S21: Based on the image, determine an upper limit value of an angle between the pupil position of the target user and the reference plane.
[0099] The upper limit of the angle may be understood as the maximum value of the angle between the pupil position and the reference plane when the pupil of the target user shifts upward or downward.
[0100] Step S22: determine the proportion of the difference between the current angle and the historical angle in the range corresponding to the upper limit value of the angle.
[0101] The range corresponding to the upper limit value of the angle may include: 0-the upper limit value of the angle.
[0102] Step S23: Determine the translation distance of the video player in the screen based on the proportion and the vertical distance between the edge of the screen and the reference plane.
[0103] In this embodiment, the product of the proportion and the vertical distance between the edge of the screen and the reference plane may be used as the translation distance of the video player in the screen.
[0104] In this embodiment, by determining the proportion of the difference between the current angle and the historical angle in the range corresponding to the upper limit value of the angle, and based on the proportion and the distance between the edge of the screen and the reference plane, determining the translation distance of the video player in the screen, the calculation process can be simplified and the calculation efficiency can be improved, so that the video player can be controlled to translate in the screen more timely, thereby improving the user experience.
[0105] As another optional embodiment of the present application, a method for adjusting the position of a video player is provided in Embodiment 5 of the present application. This embodiment is mainly an implementation method for determining the translation distance of the video player in the screen based on the size of the current angle and the size of the historical angle in the above Embodiment 3. Based on the size of the current angle and the size of the historical angle, determining the translation distance of the video player in the screen may include but is not limited to the following steps:
[0106] Step S41: Determine an upper limit value of an angle between the pupil position of the target user and the reference plane based on the image.
[0107] The detailed process of step S41 can refer to the relevant introduction of step S31 in embodiment 4, which will not be repeated here.
[0108] Step S42: Determine the current angle and the historical angle, and a first proportion and a second proportion in a range corresponding to the upper limit value of the angle.
[0109] Step S43: determine the translation distance of the video player in the screen based on the first proportion, the second proportion, and the vertical distance between the edge of the screen and the reference plane.
[0110] In this embodiment, the first proportion and the vertical distance from the edge of the screen to the reference plane may be multiplied to obtain a first translation distance. Also, the second proportion and the vertical distance from the edge of the screen to the reference plane may be multiplied to obtain a second translation distance. Also, the sum of the first translation distance and the second translation distance is used as the translation distance of the video player in the screen.
[0111] In this embodiment, by determining the size of the current angle and the size of the historical angle, the first proportion and the second proportion in the range corresponding to the upper limit value of the angle, based on the first proportion, the second proportion and the vertical distance between the edge of the screen and the reference plane, the translation distance of the video player in the screen is determined, which can simplify the calculation process and improve the calculation efficiency, so as to control the video player to translate in the screen more timely and improve the user experience.
[0112] As another optional embodiment of the present application, a method for adjusting the position of a video player provided in Embodiment 6 of the present application is mainly an implementation method for determining the upper limit value of the angle between the pupil position of the target user and the reference plane based on the image. Based on the image, determining the upper limit value of the angle between the pupil position of the target user and the reference plane may include but is not limited to the following steps:
[0113] Step S51, extracting facial features from the image, and searching for an angle upper limit value matching the facial features in the correspondence between the calibrated angle upper limit value and the reference facial features as the angle upper limit value between the pupil position of the target user and the reference plane.
[0114] In this embodiment, a plurality of sample users may be tested in advance to obtain a correspondence between the calibrated upper limit of the angle and the reference facial features.
[0115] In this embodiment, a certain number of sample users may be randomly selected to ensure that the sample is representative and can cover a range of different ages, genders, facial features, and the like.
[0116] By having multiple sample users move their eyeballs so that their pupils move up or down to the maximum extent, and taking images of multiple sample users in the process, an upper limit value of the angle between the pupil position of each sample user and a reference plane is determined based on the image of each sample user as a calibrated upper limit value of the angle, and a corresponding relationship between the calibrated upper limit value of the angle and the facial features of the sample users (i.e., the reference facial features) is established.
[0117] In this embodiment, by calibrating the upper limit of the angle for each sample user's facial features, it is possible to more accurately reflect the eye movement range and habits of different users, so that the established correspondence can be applicable to a wider range of target user groups. On this basis, according to the calibrated correspondence and the facial features of the target user, the upper limit of the angle between the pupil position of the target user and the reference plane is determined, which can reduce misjudgment, thereby ensuring the accuracy of the translation of the video player and improving the efficiency of the translation.
[0118] Next, a position adjustment device for a video player provided by the present application is introduced. The position adjustment device for the video player introduced below and the position adjustment method for the video player introduced above can correspond to each other.
[0119] Reference Fig.10 The position adjustment device of the video player includes: a determination module 100 and a translation module 200.
[0120] A determination module 100, configured to determine a current relative position between a pupil position of a target user and a reference plane based on an image captured of the target user; the reference plane is perpendicular to a plane of a screen and a center position of the screen is located on the reference plane;
[0121] The translation module 200 is used to translate the video player in the screen based on the current relative position and the historical relative position between the pupil position of the target user and the reference plane determined at a moment before the current moment; wherein the size of the video player is smaller than the size of the screen.
[0122] The determination module 100 may be specifically used for:
[0123] Based on the image captured of the target user, determine the current distance between the target user's eyeball position and the screen, and the current direction and current distance of the target user's pupil position relative to the reference plane;
[0124] Based on the current distance between the eyeball position of the target user and the screen, and the current distance of the pupil position relative to the reference plane, the size of the current angle between the pupil position and the reference plane is determined.
[0125] The historical relative position between the pupil position of the target user and the reference plane may include: the historical direction of the pupil position of the target user relative to the reference plane and the size of the historical angle between the pupil position and the reference plane;
[0126] The translation module 200 translates the video player on the screen based on the current relative position and the historical relative position between the pupil position of the target user and the reference plane, which may include:
[0127] If the current direction and the historical direction of the pupil position of the target user relative to the reference plane are consistent, determining the translation direction and the translation distance of the video player in the screen based on the difference between the current angle and the historical angle;
[0128] If the current direction and the historical direction of the pupil position of the target user relative to the reference plane are inconsistent, determining the translation direction of the video player in the screen based on the current direction, and determining the translation distance of the video player in the screen based on the size of the current angle and the size of the historical angle;
[0129] The video player is translated in the screen according to the translation direction and the translation distance.
[0130] The process of the translation module 200 determining the translation distance of the video player on the screen based on the difference between the current angle and the historical angle may specifically include:
[0131] Based on the image, determining an upper limit value of an angle between a pupil position of the target user and the reference plane;
[0132] Determine the proportion of the difference between the current angle and the historical angle in the range corresponding to the upper limit of the angle;
[0133] Based on the proportion and the vertical distance between the edge of the screen and the reference plane, the translation distance of the video player in the screen is determined.
[0134] The translation module 200 determines the translation distance of the video player on the screen based on the current angle and the historical angle, which may specifically include:
[0135] Based on the image, determining an upper limit value of an angle between a pupil position of the target user and the reference plane;
[0136] Determine a first proportion and a second proportion of the current angle and the historical angle in a range corresponding to the upper limit value of the angle;
[0137] Based on the first proportion, the second proportion, and a vertical distance from an edge of the screen to the reference plane, a translation distance of the video player in the screen is determined.
[0138] The process of the translation module 200 determining the upper limit of the angle between the pupil position of the target user and the reference plane based on the image may specifically include:
[0139] Facial features are extracted from the image, and an upper limit angle value matching the facial features is searched in the correspondence between the calibrated upper limit angle value and the reference facial features as an upper limit angle value between the pupil position of the target user and the reference plane.
[0140] In another embodiment of the present application, a computer program product is provided, including computer-readable instructions. When the computer-readable instructions are executed on an electronic device, the electronic device implements the method for adjusting the position of a video player as described in any one of Embodiments 1-6.
[0141] In another embodiment of the present application, an electronic device is provided, comprising at least one processor and a memory connected to the processor, wherein:
[0142] The memory is used to store computer programs;
[0143] The processor is used to execute the computer program so that the electronic device can implement the method for adjusting the position of the video player as described in any one of embodiments 1-6.
[0144] In another embodiment of the present application, a computer storage medium is provided, wherein the storage medium carries one or more computer programs. When the one or more computer programs are executed by an electronic device, the electronic device can implement the method for adjusting the position of a video player as described in any one of Embodiments 1-6.
[0145] It should be noted that each embodiment focuses on the differences from other embodiments, and the same or similar parts between the embodiments can be referred to each other. For the merging module embodiment, the digital circuit embodiment and the convolutional neural network hardware accelerator embodiment, since they are basically similar to the method embodiment, the description is relatively simple, and the relevant parts can be referred to the partial description of the method embodiment.
[0146] Finally, it should be noted that, in this article, relational terms such as first and second, etc. are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, the elements defined by the sentence "comprise a ..." do not exclude the presence of other identical elements in the process, method, article or device including the elements.
[0147] For the convenience of description, the above merging module, digital circuit and convolutional neural network hardware accelerator are described separately according to their functions. Of course, when implementing this application, the functions of each module can be implemented in the same or multiple software and / or hardware.
[0148] It can be known from the description of the above implementation methods that those skilled in the art can clearly understand that the present application can be implemented by means of software plus a necessary general hardware platform. Based on such an understanding, the technical solution of the present application can be essentially or partly contributed to the prior art in the form of a software product, which can be stored in a storage medium such as ROM / RAM, a magnetic disk, an optical disk, etc., and includes several instructions for enabling a computer device (which can be a personal computer, a server, or a network device, etc.) to execute the methods described in the various embodiments of the present application or certain parts of the embodiments.
[0149] The above is a detailed introduction to a method for adjusting the position of a video player and related devices provided by the present application. Specific examples are used in this article to illustrate the principles and implementation methods of the present application. The description of the above embodiments is only used to help understand the method of the present application and its core idea; at the same time, for general technical personnel in this field, according to the idea of the present application, there will be changes in the specific implementation method and application scope. In summary, the content of this specification should not be understood as a limitation on the present application.
Claims
1. A method for adjusting the position of a video player, characterized in that: include: Based on the image captured of the target user, determine the current relative position between the pupil position of the target user and the reference plane; The reference plane is perpendicular to the plane of the screen and the center position of the screen is located on the reference plane; Based on the current relative position and the historical relative position between the pupil position of the target user and the reference plane determined at a moment before the current moment, the video player is translated in the screen; wherein the size of the video player is smaller than the size of the screen.
2. The video playback adjustment method according to claim 1, characterized in that: Based on the image captured of the target user, determining a current relative position between a pupil position of the target user and a reference plane includes: Based on the image captured of the target user, determine the current distance between the target user's eyeball position and the screen, and the current direction and current distance of the target user's pupil position relative to the reference plane; Based on the current distance between the eyeball position of the target user and the screen, and the current distance of the pupil position relative to the reference plane, the size of the current angle between the pupil position and the reference plane is determined.
3. The method for adjusting the position of a video player according to claim 2, wherein: The historical relative position between the pupil position of the target user and the reference plane includes: the historical direction of the pupil position of the target user relative to the reference plane and the size of the historical angle between the pupil position and the reference plane; Based on the current relative position and the historical relative position between the pupil position of the target user and the reference plane determined at a time before the current time, translating the video player in the screen, including: If the current direction and the historical direction of the pupil position of the target user relative to the reference plane are consistent, determining the translation direction and the translation distance of the video player in the screen based on the difference between the current angle and the historical angle; If the current direction and the historical direction of the pupil position of the target user relative to the reference plane are inconsistent, determining the translation direction of the video player in the screen based on the current direction, and determining the translation distance of the video player in the screen based on the size of the current angle and the size of the historical angle; The video player is translated in the screen according to the translation direction and the translation distance.
4. The method for adjusting the position of a video player according to claim 3, characterized in that: Determining a translation distance of the video player on the screen based on a difference between the current angle and the historical angle includes: Based on the image, determining an upper limit value of an angle between a pupil position of the target user and the reference plane; Determine the proportion of the difference between the current angle and the historical angle in the range corresponding to the upper limit of the angle; Based on the proportion and the vertical distance between the edge of the screen and the reference plane, the translation distance of the video player in the screen is determined.
5. The method for adjusting the position of a video player according to claim 3, characterized in that: Determining a translation distance of the video player on the screen based on the current angle and the historical angle includes: Based on the image, determining an upper limit value of an angle between a pupil position of the target user and the reference plane; Determine a first proportion and a second proportion of the current angle and the historical angle in a range corresponding to the upper limit value of the angle; Based on the first proportion, the second proportion, and a vertical distance from an edge of the screen to the reference plane, a translation distance of the video player in the screen is determined.
6. The method for adjusting the position of a video player according to claim 4 or 5, characterized in that: Determining, based on the image, an upper limit value of an angle between a pupil position of the target user and the reference plane, comprising: Facial features are extracted from the image, and an upper limit angle value matching the facial features is searched in the correspondence between the calibrated upper limit angle value and the reference facial features as an upper limit angle value between the pupil position of the target user and the reference plane.
7. A device for adjusting the position of a video player, characterized in that: include: A determination module, used to determine a current relative position between a pupil position of the target user and a reference plane based on an image captured of the target user; The reference plane is perpendicular to the plane of the screen and the center position of the screen is located on the reference plane; A translation module is used to translate the video player in the screen based on the current relative position and the historical relative position between the pupil position of the target user and the reference plane determined at a moment before the current moment; wherein the size of the video player is smaller than the size of the screen.
8. A computer program product, characterized in that It includes computer-readable instructions, and when the computer-readable instructions are executed on an electronic device, the electronic device implements the position adjustment method of the video player as described in any one of claims 1 to 6.
9. An electronic device, characterized in that: The method comprises at least one processor and a memory connected to the processor, wherein: The memory is used to store computer programs; The processor is used to execute the computer program so that the electronic device can implement the position adjustment method of the video player as described in any one of claims 1 to 6.
10. A computer storage medium, characterized in that: The storage medium carries one or more computer programs, and when the one or more computer programs are executed by an electronic device, the electronic device can implement the position adjustment method of the video player as described in any one of claims 1 to 6.