Method and apparatus for adjusting screen display effect
By adjusting the screen display effect through three-dimensional rotation and perspective transformation, the problem of image distortion when the mobile device screen is not perpendicular to the human eye is solved, thus improving the user's viewing experience.
Patent Information
- Application Number
- CN202211273090.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-10-18
- Publication Date
- 2025-11-28
- Estimated Expiration
- 2042-10-18
AI Technical Summary
Existing technologies cannot effectively solve the problem of image distortion when the screen of a mobile device is not perpendicular to the human eye, resulting in a poor viewing experience for users.
By obtaining the position of the human eye and the direction of the gaze, and using three-dimensional rotation and perspective transformation methods, the screen display effect is adjusted to keep the image on the screen rectangular, adapting to the viewing needs of different perspectives.
It achieves the goal of maintaining a rectangular image displayed on the screen from a non-vertical viewing angle, improving the user's visual experience and enhancing the viewing experience.
Smart Images

Figure CN115576422B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] Embodiments of the present disclosure relate to the field of computer technology, and in particular, to a method and device for adjusting screen display effect. BACKGROUND
[0002] Nowadays, mobile phones, televisions, computers, tablets and other products are increasingly closely related to people's lives, and people use these devices for entertainment and work. However, when the screen of a mobile device is not perpendicular to the line of sight of a person but has a certain angle, the image will be distorted, thereby affecting the user's viewing experience. At this time, in order to achieve the best visual effect, the angle of the device needs to be manually adjusted or an additional device such as a stand is used.
[0003] Most of the existing methods tilt and rotate within a certain range through a gravity sensor, and cannot solve the problem that the visual effect is large near and small far. SUMMARY
[0004] Embodiments of the present disclosure provide a method and device for adjusting screen display effect.
[0005] In a first aspect, embodiments of the present disclosure provide a method for adjusting screen display effect, comprising: obtaining a human eye position and a line of sight direction; if an included angle between the line of sight direction and a screen is not within a predetermined perpendicular angle range and is greater than a minimum included angle threshold, rotating a plane P1 on which the screen is located to a virtual plane P3 perpendicular to the line of sight direction by a three-dimensional rotation method according to the human eye position, and calculating a rotation matrix M1; moving the virtual plane P3 to a virtual plane P2 that is perpendicular to the line of sight direction and passes through a vertex of the screen, and calculating a mapping formula M2 from the virtual plane P2 to the plane P1 on which the screen is located by a perspective transformation method; projecting a display boundary of an original image to be displayed on the screen onto the plane P1 on which the screen is located through the rotation matrix M1 and the mapping formula M2, and determining a display range E of a picture on the screen; corresponding the pixel points in the display range E to the pixel points of the original image one by one to obtain a distorted image; and rendering the distorted image to the screen.
[0006] In some embodiments, the obtaining of the human eye position and the line of sight direction comprises: obtaining a face image to perform face recognition and obtain identity information of at least one user; determining a target user with the highest priority according to the identity information of the at least one user and preset priority information; obtaining positions of both eyes of the target user, and determining the human eye position according to a center of the positions of both eyes; and determining a line of sight direction as a line connecting the human eye position and a center of the screen.
[0007] In some embodiments, the determining the target user with the highest priority according to the identity information of the at least one user and the preset priority information comprises: if a child mode is set and a child user is detected, determining the child user as the target user.
[0008] In some embodiments, the method further comprises: measuring a distance between the eye position of the child user and the center of the screen; and if the distance is less than a predetermined value, reducing the original image.
[0009] In some embodiments, the one-to-one correspondence between the pixel points in the display range E and the pixel points of the original image to obtain the distorted image comprises: if the reduction multiple of the display range E compared with the display boundary exceeds a predetermined threshold, adjusting the virtual plane P3 and the virtual plane P2 to be not perpendicular to the line of sight but to be inclined by a predetermined angle; updating the rotation matrix M1 and the mapping formula M2 according to the adjusted virtual plane P3 and the virtual plane P2, and re-determining the display range E of the picture on the screen; and if the reduction multiple of the updated display range E compared with the display boundary does not exceed the predetermined threshold, one-to-one correspondence between the pixel points in the updated display range E and the pixel points of the original image to obtain the updated distorted image.
[0010] In some embodiments, the method further comprises: if the reduction multiple of the updated display range E compared with the display boundary exceeds the predetermined threshold, determining the original image as the distorted image.
[0011] In some embodiments, the method further comprises: in response to detecting the screen angle adjustment, re-acquiring the eye position and the line of sight direction; re-calculating the rotation matrix M1 and the mapping formula M2 according to the updated angle between the line of sight direction and the screen, and re-determining the display range E of the picture on the screen; one-to-one correspondence between the pixel points in the updated display range E and the pixel points of the image to be displayed to obtain the updated distorted image; and rendering the updated distorted image onto the screen.
[0012] In a second aspect, embodiments of the present disclosure provide a device for adjusting a display effect of a screen, comprising: an obtaining unit configured to obtain a human eye position and a line of sight direction; a rotating unit configured to, if an angle between the line of sight direction and the screen is not within a predetermined vertical angle range and is greater than a minimum angle threshold, rotate a plane P1 on which the screen is located to a virtual plane P3 that is perpendicular to the line of sight direction by a three-dimensional rotation method according to the human eye position, and calculate a rotation matrix M1; a mapping unit configured to move the virtual plane P3 to a virtual plane P2 that is perpendicular to the line of sight direction and passes through a vertex of the screen, and calculate a mapping formula M2 from the virtual plane P2 to the plane P1 on which the screen is located by a perspective transformation method; a projecting unit configured to project a display boundary of an original image to be displayed on the screen onto the plane P1 on which the screen is located by the rotation matrix M1 and the mapping formula M2, and determine a display range E of a picture on the screen; a deforming unit configured to correspond each pixel point in the display range E to a pixel point of the original image to obtain a deformed image; and a rendering unit configured to render the deformed image onto the screen.
[0013] In some embodiments, the obtaining unit is further configured to: obtain a face image to perform face recognition, and obtain identity information of at least one user; determine a target user with the highest priority according to the identity information of the at least one user and preset priority information; obtain positions of both eyes of the target user, and determine the human eye position according to a center of the positions of both eyes; and determine a line of sight direction as a line connecting the human eye position and a center of the screen.
[0014] In some embodiments, the obtaining unit is further configured to: if a child mode is set and a child user is detected, determine the child user as the target user.
[0015] In some embodiments, the device further comprises a reducing unit configured to: measure a distance between the human eye position of the child user and a center of the screen; and if the distance is less than a predetermined value, reduce the original image.
[0016] In some embodiments, the deforming unit is further configured to: if a reduction multiple of the display range E with respect to the display boundary exceeds a predetermined threshold, adjust the virtual plane P3 and the virtual plane P2 to be not perpendicular to the line of sight but to be inclined by a predetermined angle; update the rotation matrix M1 and the mapping formula M2 according to the adjusted virtual plane P3 and the virtual plane P2, and redetermine the display range E of the picture on the screen; and if a reduction multiple of the updated display range E with respect to the display boundary does not exceed the predetermined threshold, correspond each pixel point in the updated display range E to a pixel point of the original image to obtain an updated deformed image.
[0017] In some embodiments, the warping unit is further configured to determine the original image as a warped image if a reduction multiple of the updated display range E compared to the display boundary exceeds a predetermined threshold.
[0018] In some embodiments, the apparatus further comprises an updating unit configured to: in response to detecting the screen angle adjustment, reacquire the human eye position and the line-of-sight direction; recalculate the rotation matrix M1 and the mapping formula M2 according to an included angle between the updated line-of-sight direction and the screen, and redetermine the display range E of the picture on the screen; correspond the pixel points in the updated display range E to the pixel points of the image to be displayed one by one to obtain an updated warped image; and render the updated warped image onto the screen.
[0019] In a third aspect, embodiments of the present disclosure provide an electronic device for adjusting a screen display effect, comprising: one or more processors; a storage device having one or more computer programs stored thereon, when the one or more computer programs are executed by the one or more processors, the one or more processors implement the method of any one of the first aspect.
[0020] In a fourth aspect, embodiments of the present disclosure provide a computer readable medium having a computer program stored thereon, wherein the computer program is executed by a processor to implement the method of any one of the first aspect.
[0021] The method and apparatus for adjusting a screen display effect provided by the embodiments of the present disclosure are used to rotate a picture by a rotation matrix and a perspective matrix when a human line-of-sight is not perpendicular to a screen, so that the picture displayed on the screen can always face the human eye direction, and the picture presented is a rectangle, solving the problem of a large picture near and a small picture far, and improving the visual effect of a user. BRIEF DESCRIPTION OF DRAWINGS
[0022] Other features, objects, and advantages of the present disclosure will become more apparent from the following detailed description of non-limiting embodiments made with reference to the accompanying drawings:
[0023] Figure 1a and Figure 1b are screen pictures of a vertical viewing angle and a non-vertical viewing angle, respectively;
[0024] Figure 2 is a flowchart of one embodiment of the method for adjusting a screen display effect according to the present disclosure;
[0025] Figure 3a , Figure 3b , Figure 3c and Figure 3d are schematic diagrams of calculating a rotation matrix M1 according to the method for adjusting a screen display effect of the present disclosure;
[0026] Figure 4 is a schematic diagram of calculating mapping formula M2 according to the method of adjusting screen display effect of the present disclosure;
[0027] Figure 5a and Figure 5b is a schematic diagram of determining display range E of a picture on a screen according to the method of adjusting screen display effect of the present disclosure;
[0028] Figure 6 is a schematic diagram of transformation result according to the method of adjusting screen display effect of the present disclosure;
[0029] Figure 7 is a structural schematic diagram of one embodiment of the device of adjusting screen display effect according to the present disclosure;
[0030] Figure 8 is a structural schematic diagram of a computer system of an electronic device suitable for implementing embodiments of the present disclosure. DETAILED DESCRIPTION
[0031] The present disclosure will be further described below in conjunction with the accompanying drawings and embodiments. It can be understood that the specific embodiments described herein are only used to explain the related application, and not to limit the application. In addition, it should be noted that only the parts related to the application are shown in the drawings for ease of description.
[0032] It should be noted that the embodiments in the present disclosure and the features in the embodiments can be combined with each other without conflict. The present disclosure will be described in detail below with reference to the accompanying drawings and in conjunction with the embodiments.
[0033] Figure 1a and Figure 1b A comparison diagram of pictures seen by vertical viewing angle and non-vertical viewing angle is shown. It should be noted that the method of adjusting screen display effect provided by the embodiments of the present disclosure is executed by a terminal device with a screen, and accordingly, the device of adjusting screen display effect is arranged in the terminal device. The terminal device is not limited to a smart phone, a tablet computer, an electronic book reader, etc.
[0034] Continuing to refer to Figure 2 , a flow 200 of one embodiment of the method of adjusting screen display effect according to the present disclosure is shown. The method of adjusting screen display effect includes the following steps:
[0035] Step 201, obtaining human eye position and line of sight direction.
[0036] In the present embodiment, the execution subject of the method of adjusting screen display effect (for example, the device of adjusting screen display effect) is arranged in the terminal device. Figure 1a and Figure 1bThe mobile phone shown can obtain the position of the user's eyes through its camera. The position of the eyes is determined based on the center of the eye position. The line connecting the position of the eyes and the center of the terminal device's screen is determined as the direction of gaze. The width w and height h of the screen can also be obtained, so that the coordinates of the screen's vertices can be obtained after establishing a coordinate system.
[0037] Step 202: If the angle between the line of sight and the screen is not within the predetermined vertical angle range and is greater than the minimum angle threshold, then the plane P1 where the screen is located is rotated to a virtual plane P3 perpendicular to the line of sight by a three-dimensional rotation method according to the position of the human eye, and the rotation matrix M1 is calculated.
[0038] In this embodiment, the vertical angle range can be [85, 95] degrees. It does not need to be strictly limited to 90 degrees. The minimum included angle threshold can be set to a small value, for example, 5 degrees. This is because if the included angle is too small, the user will not be able to see it clearly even if the screen display is adjusted.
[0039] If the included angle is within the predetermined vertical angle range or less than the minimum included angle threshold, the subsequent steps will not be executed.
[0040] The position and orientation of the physical screen need to be transformed into a three-dimensional coordinate system through a three-dimensional transformation. A suitable spatial coordinate system is established, the rotation matrix M1 is calculated, and the plane P1 containing the screen is rotated to a virtual plane P3 perpendicular to the line of sight using a three-dimensional rotation method.
[0041] Establish coordinate system 1 with the center of the screen as the origin, the x-axis and y-axis as the directions parallel to the two sides of the screen, and the z-axis as the direction perpendicular to the screen. Transform the positions of the left eye, right eye, and the center of the line connecting both eyes into the coordinate system.
[0042] The following is based on Figure 3a , Figure 3b , Figure 3c and Figure 3d Calculate the rotation angle as an example:
[0043] like Figure 3a As shown, left eye coordinates Right eye coordinates Coordinates of the center of both eyes .
[0044] like Figure 3b As shown, it rotates about the positive y-axis of its own coordinate system. angle:
[0045]
[0046]
[0047] like Figure 3c As shown, it rotates about its own coordinate system in the positive x-direction. Angle:
[0048]
[0049]
[0050] Rotate the plane around its y-axis positive direction Angle and rotate around its x-axis positive direction After rotating the plane by angle, the relative position of the plane and the center of the eyes is equivalent to rotating the center of the eyes around the y-axis of the fixed coordinate system in the opposite direction Angle and rotate around the x-axis of the fixed coordinate system in the opposite direction After rotating the plane by angle, the relative position of the plane and the center of the eyes is equivalent to rotating the center of the eyes around the z-axis for the sake of calculating the rotation angle.
[0051] As shown in Figure 3d :
[0052] The vector of the eyes (from the left eye to the right eye) before rotation is:
[0053]
[0054] The vector of the eyes (from the left eye to the right eye) after rotation is:
[0055]
[0056] The projection of this vector on the xy plane is , and the angle with the positive direction of the x-axis is the rotation angle around the z-axis of the coordinate system :
[0057]
[0058] If , ;
[0059] If , ;
[0060] From the above description, the screen plane needs to be rotated around its y-axis by angle, around its x-axis by angle, and around its z-axis by angle to reach the target plane Rotation matrix Angle and rotate around its z-axis by angle Angle, rotation matrix The calculation is as follows:
[0061]
[0062] Given that the width of the screen is , and the height is , theFigure 3a The four vertex coordinates A, B, C, and D shown are transformed to the rotated coordinate system to obtain the virtual plane P3:
[0063]
[0064]
[0065]
[0066]
[0067] Step 203, move the virtual plane P3 to the virtual plane P2 perpendicular to the line of sight and passing through the vertex of the screen, and calculate the mapping formula M2 of the virtual plane P2 to the plane P1 where the screen is located by the perspective transformation method.
[0068] In this embodiment, if the observer and the screen have a certain angle, the picture seen by the observer is large near and small far, high near and low far, and the virtual plane P2 is a trapezoid or an irregular quadrilateral. Therefore, the trapezoid or irregular quadrilateral needs to be converted into a rectangle by the perspective transformation method to solve the problem of large near and small far of the image displayed on the screen. The perspective transformation method described below is only illustrative, and any method in the prior art can be used for perspective transformation.
[0069] First, in order to facilitate calculation, we assume that the plane perpendicular to the line of sight passes through a vertex of the screen and establishes a coordinate system 2 with this vertex as the origin, as shown. Figure 4
[0070] Suppose E is the light source, and any quadrilateral q00 (i.e., the origin O) q01 q11 q10 on the virtual plane P2 can be projected onto the plane P1 where the screen is located as r00 (i.e., the origin O) r01 r11 r10.
[0071] The coordinates of the r points are: The angle is calculated by knowing three sides:
[0072]
[0073]
[0074] The length of Eq is:
[0075]
[0076] The length of Eq10 is:
[0077]
[0078] The coordinates of the points are:
[0079]
[0080] Similarly, q01, q11 coordinates can be obtained. The detailed calculation process is prior art, so it is not described here.
[0081] As shown in Figure 4 , according to the perspective mapping, the qr conversion formula, i.e., the mapping formula M2, can be obtained:
[0082]
[0083]
[0084] wherein , is a constant coefficient to make hold true. is a coefficient to make the equation hold true, wherein is a point in the virtual plane perpendicular to the line of sight. is a coefficient to make hold true, wherein r is a point in the screen plane.
[0085] Step 204, the display boundary of the original image to be displayed on the screen is projected onto the plane P1 where the screen is located by the rotation matrix M1 and the mapping formula M2, and the display range E of the picture on the screen is determined.
[0086] In this embodiment, the picture of the screen is projected onto a virtual plane, so that the viewable picture is the largest. Since the rotated plane P3 is parallel to the plane P2, the rotated plane coordinates (coordinates in the coordinate system 1 with the center point of the screen as the origin) are first transformed into the coordinate system 2 established with the top point of the screen (translation in the x and y directions). Then the rotated screen is projected onto the plane P2 (the coordinates of the rotated screen are added to the vector ), to obtain the coordinates of the virtual plane P2 projection. The projected rectangle is reduced to all points in the plane, as shown in Figure 5a . Then the four vertices of the rectangle are mapped to the screen plane P1 by the above qr conversion formula to obtain the final picture display range E, as shown in Figure 5b .
[0087] Step 205, the pixel points in the display range E are one-to-one corresponding to the pixel points of the original image, to obtain the distorted image.
[0088] In this embodiment, the pixel points in E are one-to-one corresponding to the pixel points of the entire screen by the above quadrilateral and rectangular mapping formula and the blur processing, to obtain the distorted image, i.e., the original image is rectangular and the distorted image is trapezoidal, but the user looks like a rectangle from an inclined angle.
[0089] Step 206, render the morphed image to the screen.
[0090] In this embodiment, the morphed image is finally rendered to the screen. The final effect is shown in the following figure Figure 6 The user with vertical visual angle sees a trapezoidal image, while the user without vertical visual angle sees a rectangular image.
[0091] In some optional implementations of this embodiment, the obtaining of the human eye position and the visual line direction comprises: obtaining a face image to perform face recognition, to obtain identity information of at least one user; determining a target user with the highest priority according to the identity information of the at least one user and preset priority information; obtaining positions of eyes of the target user, and determining the human eye position according to a center of the positions of the eyes; and determining a line connecting the human eye position and a center of the screen as the visual line direction.
[0092] When the terminal device is started for the first time, a prompt is popped up to ask whether to start the function of automatically adjusting the picture. If the function is not started, the function can be started manually. A single-user mode, a multi-user mode and a child mode can also be set. In the single-user mode, picture automatic adjustment is performed only when the current set user is recognized; in the multi-user mode, multiple faces are recorded in the terminal device in advance, and priority of the faces is set. When multiple users exist, the user with the highest priority is set as the main visual angle through face recognition, and no automatic adjustment is performed when all recognized faces do not belong to the faces recorded in the device. In this way, the display effect can be adjusted in a targeted manner.
[0093] In some optional implementations of this embodiment, the determining of the target user with the highest priority according to the identity information of the at least one user and the preset priority information comprises: if the child mode is set and a child user is detected, the child user is determined as the target user. In the child mode, the face of the child is recorded in advance, and the priority of the child is the highest. When the visual line of the child is not in a vertical state with the screen, the adjustment of the picture can prevent strabismus.
[0094] In some optional implementations of this embodiment, the method further comprises: measuring a distance between the human eye position of the child user and the center of the screen; and if the distance is less than a predetermined value, the original image is reduced. When the position of the child is too close to the screen, the picture can be reduced to prevent myopia.
[0095] In some optional implementations of the embodiment, the pixel points in the display range E are corresponded to the pixel points of the original image one by one to obtain the distorted image, including: if the multiple of the reduction of the display range E compared to the display boundary exceeds a predetermined threshold, the virtual plane P3 and the virtual plane P2 are adjusted to be not perpendicular to the line of sight, but to be inclined by a predetermined angle; the rotation matrix M1 and the mapping formula M2 are updated according to the adjusted virtual plane P3 and the virtual plane P2, and the display range E of the picture on the screen is re-determined; if the multiple of the reduction of the updated display range E compared to the display boundary does not exceed the predetermined threshold, the pixel points in the updated display range E are corresponded to the pixel points of the original image one by one to obtain the updated distorted image.
[0096] That is, the picture to be adjusted is smaller than the original image, and if the screen plane P1 is rotated to the virtual plane P3 perpendicular to the line of sight direction, the rotation angle is too large, which can cause the picture observed after rotation to be too small, and the observer cannot clearly see the transformed picture. A threshold (rotation angle threshold or multiple threshold of image reduction) can be set, and if the rotation angle exceeds the rotation angle threshold and is not much different from the rotation angle threshold (for example, less than 5°), the rotation angle threshold is processed, otherwise it is not processed. The rotation angle can also be limited by setting a multiple threshold. For example, if the picture to be adjusted is 3 times smaller than the original image, the virtual plane P3 and the virtual plane P2 can be adjusted to be not perpendicular to the line of sight, but to be inclined by a predetermined angle, for example, 85 degrees, so that the final distorted image can be 1.3 times smaller, and the naked eye cannot feel the difference, thereby improving the user experience. The predetermined threshold can be set by empirical statistics, for example, the average angle of a large number of users manually adjusting the screen after automatically adjusting the picture by the mobile phone is statistically counted, and the reduction multiple calculated according to the average angle is used as the multiple threshold.
[0097] In some optional implementations of the embodiment, the method further includes: if the multiple of the reduction of the updated display range E compared to the display boundary exceeds a predetermined threshold, the original image is determined as the distorted image. If the picture is too small after adjustment, the observer cannot clearly see the transformed picture, and the original image is displayed to the user, and the distortion processing is not performed, so as to avoid producing bad user experience.
[0098] In some optional implementations of the embodiment, the method further includes: in response to detecting the screen angle adjustment, the position of the human eye and the direction of the line of sight are re-acquired; the rotation matrix M1 and the mapping formula M2 are re-calculated according to the included angle between the updated line of sight and the screen, and the display range E of the picture on the screen is re-determined; the pixel points in the updated display range E are corresponded to the pixel points of the image to be displayed one by one to obtain the updated distorted image; and the updated distorted image is rendered onto the screen. The screen angle adjustment can be detected by a device such as a gravity sensor, triggering the method of re-executing the process 200.
[0099] Further referring to Figure 7 , as an implementation of the method shown in the above figures, the present disclosure provides an embodiment of an apparatus for adjusting screen display effect, which corresponds to the method embodiment shown in Figure 2 , and the apparatus can be applied in various electronic devices.
[0100] As shown in Figure 7 , the apparatus 700 for adjusting screen display effect in the embodiment comprises an acquisition unit 701, a rotation unit 702, a mapping unit 703, a projection unit 704, a deformation unit 705 and a rendering unit 706. The acquisition unit 701 is configured to acquire a human eye position and a line of sight direction; the rotation unit 702 is configured to, if an included angle between the line of sight direction and a screen is not within a predetermined vertical angle range and is greater than a minimum included angle threshold, rotate a plane P1 where the screen is located to a virtual plane P3 perpendicular to the line of sight direction by a three-dimensional rotation method according to the human eye position, and calculate a rotation matrix M1; the mapping unit 703 is configured to move the virtual plane P3 to a virtual plane P2 perpendicular to the line of sight direction and passing through a vertex of the screen, and calculate a mapping formula M2 from the virtual plane P2 to the plane P1 where the screen is located by a perspective transformation method; the projection unit 704 is configured to project a display boundary of an original image to be displayed on the screen onto the plane P1 where the screen is located by the rotation matrix M1 and the mapping formula M2, and determine a display range E of a picture on the screen; the deformation unit 705 is configured to correspond the pixel points in the display range E to the pixel points of the original image one by one to obtain a deformed image; and the rendering unit 706 is configured to render the deformed image onto the screen.
[0101] In the embodiment, the specific processing of the acquisition unit 701, the rotation unit 702, the mapping unit 703, the projection unit 704, the deformation unit 705 and the rendering unit 706 of the apparatus 700 for adjusting screen display effect can refer to steps 201-206 in the corresponding embodiment. Figure 2
[0102] In some optional implementations of the embodiment, the acquisition unit 701 is further configured to: acquire a face image to perform face recognition, and obtain identity information of at least one user; determine a target user with the highest priority according to the identity information of the at least one user and preset priority information; acquire positions of both eyes of the target user, and determine the human eye position according to a center of the positions of both eyes; and determine a line of sight direction as a line connecting the human eye position and a center of the screen.
[0103] In some optional implementations of the present embodiment, the acquisition unit 701 is further configured to: if the child mode is set and a child user is detected, determine the child user as the target user.
[0104] In some optional implementations of the present embodiment, the device 700 further includes a reducing unit (not shown in the figure) configured to: measure the distance between the eye position of the child user and the center of the screen; and if the distance is less than a predetermined value, reduce the original image.
[0105] In some optional implementations of the present embodiment, the warping unit 705 is further configured to: if the reduction multiple of the display range E compared to the display boundary exceeds a predetermined threshold, adjust the virtual plane P3 and the virtual plane P2 to be not perpendicular to the line of sight but to be inclined by a predetermined angle; update the rotation matrix M1 and the mapping formula M2 according to the adjusted virtual plane P3 and the virtual plane P2, and re-determine the display range E of the picture on the screen; and if the reduction multiple of the updated display range E compared to the display boundary does not exceed the predetermined threshold, correspond the pixel points in the updated display range E to the pixel points of the original image one by one to obtain an updated warped image.
[0106] In some optional implementations of the present embodiment, the warping unit 705 is further configured to: if the reduction multiple of the updated display range E compared to the display boundary exceeds a predetermined threshold, determine the original image as the warped image.
[0107] In some optional implementations of the present embodiment, the device 700 further includes an updating unit (not shown in the figure) configured to: in response to detecting the adjustment of the screen angle, re-acquire the eye position and the line of sight direction; re-calculate the rotation matrix M1 and the mapping formula M2 according to the updated angle between the line of sight direction and the screen, and re-determine the display range E of the picture on the screen; correspond the pixel points in the updated display range E to the pixel points of the image to be displayed one by one to obtain an updated warped image; and render the updated warped image onto the screen.
[0108] According to embodiments of the present disclosure, the present disclosure further provides an electronic device and a readable storage medium.
[0109] An electronic device for adjusting screen display effect, comprising: one or more processors; a storage device having one or more computer programs stored thereon, when the one or more computer programs are executed by the one or more processors, the one or more processors implement the method of flow 200.
[0110] A computer readable medium having a computer program stored thereon, wherein the computer program is executed by a processor to implement the method of flow 200.
[0111] Figure 8 A schematic block diagram of an example electronic device 800 that can be used to implement embodiments of the present disclosure is shown. The electronic device is intended to represent various forms of digital computers, such as laptops, desktops, tablets, personal digital assistants, servers, blade servers, mainframes, and other appropriate computers. The electronic device can also represent various forms of mobile devices, such as personal digital assistants, cellular telephones, smartphones, wearable devices, and other similar computing devices. The components shown here, their connections and relationships, and their functions, are meant to be examples only, and are not intended to limit the implementations of the present disclosure described and / or claimed in this document.
[0112] As shown, Figure 8 The device 800 includes a computing unit 801 that can perform various appropriate actions and processes in accordance with a computer program stored in a read-only memory (ROM) 802 or a computer program loaded from a storage unit 808 into a random access memory (RAM) 803. Various programs and data required for the operation of the device 800 can also be stored in the RAM 803. The computing unit 801, the ROM 802, and the RAM 803 are connected to each other through a bus 804. An input / output (I / O) interface 805 is also connected to the bus 804.
[0113] Various components in the device 800 are connected to the I / O interface 805, including an input unit 806, such as a keyboard, a mouse, etc.; an output unit 807, such as various types of displays, speakers, etc.; the storage unit 808, such as a magnetic disk, a magneto-optical disk, etc.; and a communication unit 809, such as a network card, a modem, a wireless communication transceiver, etc. The communication unit 809 allows the device 800 to exchange information / data with other devices through a computer network, such as the Internet, and / or various telecommunication networks.
[0114] The computing unit 801 can be various general and / or special purpose processing components with processing and computing capabilities. Some examples of the computing unit 801 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various specialized artificial intelligence (AI) computing chips, various computing units running machine learning model algorithms, a digital signal processor (DSP), and any suitable processor, controller, microcontroller, etc. The computing unit 801 performs various methods and processes described above, such as the method of adjusting screen display effects. For example, in some embodiments, the method of adjusting screen display effects can be implemented as a computer software program tangibly embodied in a machine-readable medium, such as the storage unit 808. In some embodiments, part or all of the computer program can be loaded and / or installed onto the device 800 via the ROM 802 and / or the communication unit 809. When the computer program is loaded onto the RAM 803 and executed by the computing unit 801, one or more steps of the method of adjusting screen display effects described above can be performed. Alternatively, in other embodiments, the computing unit 801 can be configured to perform the method of adjusting screen display effects by any other suitable means, such as by means of firmware.
[0115] Various implementations of the systems and techniques described above can be realized in digital electronic circuitry, integrated circuitry, a field programmable gate array (FPGA), an application specific integrated circuit (ASIC), a system on a chip (SOC), a programmable logic device (CPLD), computer hardware, firmware, software, and / or combinations thereof. These various implementations can include implementation in one or more computer programs that are executable and / or interpretable on a programmable system including at least one programmable processor, which can be special or general purpose, coupled to receive data and instructions from, and to transmit data and instructions to, a storage system, at least one input device, and at least one output device.
[0116] Program code for carrying out methods of the present disclosure can be written in any combination of one or more programming languages. The program code can be provided to a processor or controller of a general purpose computer, special purpose computer, or other programmable data processing apparatus to produce a machine, such that the program code, when executed by the processor or controller, produces a means for implementing the functions / acts specified in the flowcharts and / or block diagrams. The program code can be executed entirely on a machine, partially on a machine, partially on a machine as a stand-alone software package, partially on a machine and partially on a remote machine or entirely on a remote machine or server.
[0117] In the context of this disclosure, a machine-readable medium can be a tangible medium that contains or stores a program for use by or in connection with an instruction execution system, apparatus, or device. The machine-readable medium can be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium can include but is not limited to an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any suitable combination of the foregoing. More specific examples of the machine-readable storage medium will include one or more lines of electrical connections, portable computer disks, hard disk drives, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or Flash memory), optical fibers, portable compact disc read-only memories (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination of the foregoing.
[0118] To provide for interaction with a user, the systems and techniques described here can be implemented on a computer having a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to the user and a keyboard and a pointing device (e.g., a mouse or a trackball) by which the user can provide input to the computer. Other kinds of devices can be used to provide for interaction with a user as well; for example, feedback provided to the user can be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user can be received in any form, including acoustic, speech, or tactile input.
[0119] The systems and techniques described here can be implemented in a computing system that includes a back end component (e.g., as a data server), or that includes a middleware component (e.g., an application server), or that includes a front end component (e.g., a user computer having a graphical user interface or a Web browser through which a user can interact with an implementation of the systems and techniques described here), or any combination of such back end, middleware, or front end components. The components of the system can be interconnected by any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include a local area network (LAN), a wide area network (WAN), and the Internet.
[0120] The computer system can include clients and servers. This relationship can be. The servers are generally remote from the users and can be accessed via the Internet using a communication network. The relationship can be a client-server relationship over a communications network, and as such, the servers can be accessed by the clients using computer programs. The servers can be servers of a distributed system, or servers combined with a blockchain. The servers can also be cloud servers, or intelligent cloud computing servers or intelligent cloud hosts with artificial intelligence technology.
[0121] It should be understood that the various forms of flow shown above can be re-ordered, added to, or have steps deleted, using the steps described above. For example, the steps described in the present disclosure can be performed in parallel, in series, or in a different order, as long as the desired results of the technical solutions of the present disclosure can be achieved, and the present disclosure is not limited herein.
[0122] The above detailed description does not constitute a limitation on the protection scope of the present disclosure. Those skilled in the art should understand that various modifications, combinations, sub-combinations, and substitutions can be made according to design requirements and other factors. Any modifications, equivalent replacements, and improvements made within the spirit and principles of the present disclosure should be included in the protection scope of the present disclosure.
Claims
1. A method for adjusting screen display effects, comprising: To obtain the position of the human eye and the direction of the gaze; If the angle between the line of sight and the screen is not within the predetermined vertical angle range and is greater than the minimum angle threshold, then the plane P1 where the screen is located is rotated to a virtual plane P3 perpendicular to the line of sight by a three-dimensional rotation method according to the position of the human eye, and the rotation matrix M1 is calculated. The virtual plane P3 is translated along a straight line parallel to the line of sight to obtain the virtual plane P2, wherein the virtual plane P2 is perpendicular to the line of sight and passes through a vertex of the screen, and the mapping formula M2 from the virtual plane P2 to the plane P1 of the screen is calculated by the perspective transformation method. The display boundary of the original image to be displayed on the screen is projected onto the plane P1 where the screen is located by the rotation matrix M1 and the mapping formula M2, and the display range E of the image on the screen is determined. The pixels in the display range E are matched one-to-one with the pixels of the original image to obtain the deformed image; The deformed image is rendered onto the screen.
2. The method according to claim 1, wherein, The acquisition of the human eye position and gaze direction includes: Acquire facial images and perform facial recognition to obtain the identity information of at least one user; The target user with the highest priority is determined based on the identity information of the at least one user and the preset priority information; The positions of the target user's eyes are obtained, and the position of the human eye is determined based on the center of the positions of the eyes; The line connecting the position of the human eye and the center of the screen is defined as the direction of gaze.
3. The method according to claim 2, wherein, The step of determining the highest priority target user based on the identity information of the at least one user and preset priority information includes: If a child mode is set and a child user is detected, then the child user is identified as the target user.
4. The method according to claim 3, wherein, The method further includes: Measure the distance between the child user's eye position and the center of the screen; If the distance is less than a predetermined value, the original image is reduced in size.
5. The method according to claim 1, wherein, The step of mapping the pixels in the display area E to the pixels of the original image to obtain the deformed image includes: If the display range E is reduced by a factor exceeding a predetermined threshold compared to the display boundary, then the virtual plane P3 and the virtual plane P2 are adjusted to be tilted at a predetermined angle instead of perpendicular to the line of sight. Update the rotation matrix M1 and mapping formula M2 based on the adjusted virtual planes P3 and P2, and redetermine the display range E of the image on the screen; If the updated display range E is smaller than the display boundary by no more than a predetermined threshold, then the pixels in the updated display range E are matched one-to-one with the pixels in the original image to obtain the updated deformed image.
6. The method according to claim 5, wherein, The method further includes: If the updated display range E is reduced by a factor exceeding a predetermined threshold compared to the display boundary, then the original image is determined to be a deformed image.
7. The method according to any one of claims 1-6, wherein, The method further includes: In response to the detection of screen angle adjustment, the position of the human eye and the direction of the gaze are reacquired; The rotation matrix M1 and mapping formula M2 are recalculated based on the angle between the updated viewing direction and the screen, and the display range E of the image on the screen is redefined. The updated display range E is mapped one-to-one with the pixels of the image to be displayed to obtain the updated deformed image; The updated deformed image is rendered onto the screen.
8. A device for adjusting screen display effects, comprising: The acquisition unit is configured to acquire the position of the human eye and the direction of the gaze. The rotation unit is configured to rotate the plane P1 where the screen is located to a virtual plane P3 perpendicular to the viewing direction if the angle between the viewing direction and the screen is not within a predetermined vertical angle range and is greater than a minimum angle threshold, based on the human eye position, using a three-dimensional rotation method, and calculate the rotation matrix M1. The mapping unit is configured to translate the virtual plane P3 along a straight line parallel to the viewing direction to obtain a virtual plane P2, wherein the virtual plane P2 is perpendicular to the viewing direction and passes through a vertex of the screen, and calculates the mapping formula M2 from the virtual plane P2 to the plane P1 of the screen using a perspective transformation method. The projection unit is configured to project the display boundary of the original image to be displayed on the screen onto the plane P1 where the screen is located through the rotation matrix M1 and the mapping formula M2, and to determine the display range E of the image on the screen. The deformation unit is configured to map the pixels in the display range E to the pixels of the original image one by one to obtain a deformed image; A rendering unit is configured to render the deformed image onto the screen.
9. An electronic device for adjusting screen display effects, comprising: One or more processors; Storage device, on which one or more computer programs are stored, When the one or more computer programs are executed by the one or more processors, the one or more processors implement the method as described in any one of claims 1-7.
10. A computer-readable medium having a computer program stored thereon, wherein, When the computer program is executed by a processor, it implements the method as described in any one of claims 1-7.
Citation Information
Patent Citations
Method and device for adjusting screen of mobile terminal and mobile terminal
CN104679225A
Virtual screen projection implementation method and device and electronic equipment
CN111246189A