Screen anti-shake method and device, equipment and storage medium
By obtaining the relative positional relationship between the user's face and the screen direction and adjusting the angle of the electronic device's screen, the jitter problem of electronic devices during use is solved, and the user's viewing stability and vision protection are improved.
Patent Information
- Application Number
- CN202310850653.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-07-11
- Publication Date
- 2025-01-14
AI Technical Summary
The screen of electronic devices is prone to shake when the user walks or rides on bumpy vehicles, causing eye fatigue and affecting his vision and user experience.
By obtaining the relative positional relationship between the user's face and the preset direction of the screen, the offset situation is determined using the target pattern and the pre-stored comparison pattern, and the screen presentation angle is adjusted to reduce the degree of offset, so as to achieve rapid adjustment of screen jitter.
It effectively prevents jitter on the screen of electronic devices, improves user viewing stability and vision protection, and improves user experience.
Smart Images

Figure CN119311109A_ABST
Abstract
Description
Technical Field
[0001] The embodiments of the present application relate to information processing technology, and relate to but are not limited to a screen anti-shake method and device, equipment, and storage medium. Background Art
[0002] With the development of mobile terminal technology, electronic devices have become more and more important in users' daily lives. For example, users can watch various information such as animations, videos, and images through electronic devices.
[0003] However, most electronic devices currently do not have a shock absorption function, and the display screens of electronic devices are generally small. If a user uses an electronic device to read text or small image details while walking or on a bumpy vehicle, if the electronic device has a large shake, the text or image details on the screen will be in a shaking state at the same time, and the user's eyes will be constantly in the process of focusing and adjusting, which can easily cause eye fatigue, resulting in a poor user experience and is not conducive to the user's eyesight protection.
[0004] Therefore, how to effectively prevent screen shaking of electronic devices is a problem that needs to be solved urgently. Summary of the invention
[0005] In view of this, the screen anti-shake method, device, equipment, and storage medium provided in the embodiments of the present application can effectively prevent the screen of the electronic device from shaking and improve the user experience. The screen anti-shake method, device, equipment, and storage medium provided in the embodiments of the present application are implemented as follows:
[0006] The screen anti-shake method provided in the embodiment of the present application is applied to an electronic device, wherein the electronic device includes a screen and a support, and the screen is rotatably connected to the support. The method includes:
[0007] When the screen of the electronic device outputs a picture, acquiring a target pattern, wherein the target pattern is used to indicate a relative position relationship between the user's face and a preset direction of the screen;
[0008] Determining whether the user's face is offset from the preset direction according to the target pattern and a pre-stored comparison pattern;
[0009] When it is determined that the user's face is offset from the preset direction, the presentation angle of the screen of the electronic device is adjusted to obtain a corrected electronic device, wherein the first offset degree is greater than the second offset degree, the first offset degree is the offset degree between the user's face and the preset direction of the screen of the electronic device before correction, and the second offset degree is the offset degree between the user's face and the preset direction of the screen of the electronic device after correction.
[0010] In some embodiments, the target pattern is a multi-frame target pattern acquired within a preset time length, and before determining the first degree of deviation of the user's face from the preset direction according to the target pattern and a pre-stored comparison pattern, the method further includes:
[0011] Determining, according to the multiple frames of target patterns, that the user is in a state of gazing at the screen within a preset time period, wherein if a first target pattern includes at least a portion of a user's facial region, it indicates that the user is in a state of gazing at the screen at the moment of acquiring the first target pattern, and the first target pattern is any frame pattern of the multiple frames of target patterns;
[0012] Correspondingly, determining a first degree of deviation of the user's face from the preset direction according to the target pattern and a pre-stored contrast pattern includes:
[0013] A first offset degree of the user's face from the preset direction is determined according to a second target pattern in the multiple frames of target patterns and a pre-stored comparison pattern, wherein the second target pattern is the last frame pattern in the multiple frames of target patterns.
[0014] In some embodiments, the user wears a wearable device, and the wearable device is provided with a plurality of projection units. If the first target pattern includes at least one of the projection units, it means that the first target pattern includes at least a portion of the user's facial area. The determining, based on the multiple frames of the target pattern, that the user is in a state of looking at the screen within a preset time period includes:
[0015] Determine whether there are at least two frames of the third target pattern in the multiple frames of the target pattern, the at least two frames of the third target pattern are acquired within the preset time length, and each frame of the third target pattern includes at least one of the projection units;
[0016] If so, it is determined that the user is in a state of looking at the screen within a preset time period.
[0017] In some embodiments, before acquiring the target pattern, the method further includes:
[0018] Determining whether the user is in a jittery environment;
[0019] When the user is in the shaking environment and a picture is output on the screen of the electronic device, the target pattern is acquired.
[0020] In some embodiments, the electronic device is provided with a first motion sensor, the user wears a wearable device, the wearable device is provided with a second motion sensor, and determining whether the user is in a shaking environment includes:
[0021] Collecting a motion signal of a target device through a motion sensor, wherein the motion sensor includes the first motion sensor and / or the second motion sensor, and the target device includes the electronic device and / or the wearable device;
[0022] Determining a vibration amplitude of the target device according to the motion signal;
[0023] When the shaking amplitude is less than a threshold, it is determined whether the user is in a shaking environment.
[0024] In some embodiments, when determining that the user's face is offset from the preset direction, adjusting the presentation angle of the screen of the electronic device includes:
[0025] When it is determined that the user's face is offset from the preset direction, determining the offset direction of the user's face from the preset direction;
[0026] The presentation angle of the screen of the electronic device is adjusted according to the offset direction and the preset adjustment angle.
[0027] In some embodiments, when determining that the user's face is offset from the preset direction, adjusting the presentation angle of the screen of the electronic device includes:
[0028] When it is determined that the user's face is offset from the preset direction, determining the first offset degree according to the target pattern and a pre-stored comparison pattern;
[0029] According to the first offset degree, the presentation angle of the screen of the electronic device is adjusted.
[0030] In some embodiments, the user wears a wearable device, a plurality of projection units are provided in the wearable device, the target pattern includes the plurality of projection units, the contrast pattern is a polygonal pattern composed of the plurality of projection units, and determining the first degree of deviation according to the target pattern and a pre-stored contrast pattern includes:
[0031] Acquire the first center position coordinates of the target pattern according to the plurality of projection units in the target pattern, and acquire the second center position coordinates of the contrast pattern according to the polygonal pattern in the contrast pattern;
[0032] Determining a target offset direction between the user's face and the preset direction according to a positional relationship between the first center position coordinates and the second center position coordinates;
[0033] Acquire a first side length ratio of the target pattern and a second side length ratio of the comparison pattern;
[0034] Determining a target offset angle between the user's face and the preset direction according to the first side length ratio and the second side length ratio;
[0035] The target offset degree includes the target offset direction and the first offset angle.
[0036] In some embodiments, adjusting the presentation angle of the screen of the electronic device according to the first offset degree to obtain a corrected electronic device includes:
[0037] The screen is controlled to rotate around the support member according to the target offset angle and the target offset direction, and the presentation angle of the screen of the electronic device is adjusted so that the offset degree between the user's face and the preset direction is reduced from the first offset degree to the second offset degree.
[0038] In some embodiments, controlling the screen to rotate around the support member according to the target offset angle and the target offset direction to adjust the presentation angle of the screen of the electronic device includes:
[0039] The mechanical shaft is controlled to rotate according to the target offset angle and the target offset direction to adjust the presentation angle of the screen of the electronic device.
[0040] The screen anti-shake device provided in the embodiment of the present application includes:
[0041] An acquisition module, used for acquiring a target pattern when the screen of the electronic device outputs a picture, wherein the target pattern is used for indicating a relative position relationship between the user's face and a preset direction of the screen;
[0042] A determination module, configured to determine whether the user's face is offset from the preset direction according to the target pattern and a pre-stored comparison pattern;
[0043] An adjustment module is used to adjust the presentation angle of the screen of the electronic device when it is determined that the user face is offset from the preset direction, so as to obtain a corrected electronic device, wherein a first offset degree is greater than a second offset degree, the first offset degree is the offset degree between the user face and the preset direction of the screen of the electronic device before correction, and the second offset degree is the offset degree between the user face and the preset direction of the screen of the electronic device after correction.
[0044] The computer device provided in the embodiment of the present application includes a memory and a processor, wherein the memory stores a computer program that can be run on the processor, and when the processor executes the program, the method described in the embodiment of the present application is implemented.
[0045] The computer-readable storage medium provided in the embodiment of the present application stores a computer program thereon, and when the computer program is executed by a processor, the method provided in the embodiment of the present application is implemented.
[0046] The screen anti-shake method, device, computer device and computer-readable storage medium provided in the embodiment of the present application obtain a target pattern when the screen of the electronic device outputs a picture, and the target pattern is used to indicate the relative position relationship between the user's face and the preset direction of the screen; determine whether the user's face is offset from the preset direction according to the target pattern and the pre-stored contrast pattern; if offset occurs, adjust the presentation angle of the screen of the electronic device to obtain a corrected electronic device, and the offset degree between the user's face and the preset direction of the screen of the electronic device before correction is greater than the offset degree between the user's face and the preset direction of the screen of the corrected electronic device. In this way, the screen shake of the electronic device can be quickly adjusted, thereby improving the viewing stability of the user, protecting the user's eyesight, and solving the technical problems raised in the background technology. BRIEF DESCRIPTION OF THE DRAWINGS
[0047] The drawings herein are incorporated into the specification and constitute a part of the specification. These drawings illustrate embodiments consistent with the present application and are used together with the specification to illustrate the technical solution of the present application.
[0048] Figure 1 An application scenario diagram of the screen anti-shake method provided in an embodiment of the present application;
[0049] Figure 2 A schematic diagram of the implementation flow of the screen anti-shake method provided in an embodiment of the present application;
[0050] Figure 3 An application scenario diagram of the screen anti-shake method provided in an embodiment of the present application;
[0051] Figure 4 A schematic diagram of the implementation flow of the screen anti-shake method provided in an embodiment of the present application;
[0052] Figure 5 A schematic diagram of an implementation flow of determining whether a user is in a jittery environment provided in an embodiment of the present application;
[0053] Figure 6 A schematic diagram of the effect of a user wearing a wearable device provided in an embodiment of the present application;
[0054] Figure 7 A schematic diagram of an implementation flow of determining whether a user is looking at a screen provided in an embodiment of the present application;
[0055] Figure 8 A schematic diagram of an implementation flow of a method for determining a first offset angle provided in an embodiment of the present application;
[0056] Fig. 9 A schematic diagram of the comparison between the target pattern and the comparison pattern provided in the embodiment of the present application;
[0057] Fig.10 A schematic diagram of the effect of screen correction provided in an embodiment of the present application;
[0058] Fig.11 A schematic diagram of an implementation flow of a screen correction method provided in an embodiment of the present application;
[0059] Fig.12 A schematic diagram of the structure of a screen anti-shake device provided in an embodiment of the present application;
[0060] Fig.13 A schematic diagram of the structure of a computer device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0061] In order to make the purpose, technical solution and advantages of the embodiments of the present application clearer, the specific technical solution of the present application will be further described in detail below in conjunction with the drawings in the embodiments of the present application. The following embodiments are used to illustrate the present application, but are not used to limit the scope of the present application.
[0062] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as those commonly understood by those skilled in the art to which this application belongs. The terms used herein are only for the purpose of describing the embodiments of this application and are not intended to limit this application.
[0063] In the following description, reference is made to “some embodiments”, which describe a subset of all possible embodiments, but it will be understood that “some embodiments” may be the same subset or different subsets of all possible embodiments and may be combined with each other without conflict.
[0064] It should be pointed out that the terms "first\second\third" involved in the embodiments of the present application are used to distinguish similar or different objects, and do not represent a specific ordering of the objects. It can be understood that "first\second\third" can be interchanged in a specific order or sequence where permitted, so that the embodiments of the present application described here can be implemented in an order other than that illustrated or described here.
[0065] An embodiment of the present application provides a screen anti-shake method, which is applied to an electronic device. Figure 1 FIG. 1 is an application scenario diagram of a screen anti-shake method provided in an embodiment. Figure 1As shown, the user can carry, wear or use an electronic device 10, which may include but is not limited to a mobile phone, a wearable device (such as a smart watch, a smart bracelet, smart glasses, etc.), a tablet computer, a laptop computer, a vehicle terminal, a PC (Personal Computer), etc. The electronic device includes a screen and a support, and the screen is rotatably connected to the support. The function implemented by the method can be implemented by calling a program code by a processor in the electronic device, and of course the program code can be stored in a computer storage medium. It can be seen that the electronic device at least includes a processor and a storage medium.
[0066] In the embodiment of the present application, the electronic device 10 may include at least a screen 20 and a support 30, and the screen 20 is rotatably connected to the support 30. Optionally, the electronic device 10 may also include a processor, a power supply, a mechanical hinge, a front camera, a touch screen, a motion sensor, and a wireless connection module.
[0067] Figure 2 The following is a schematic diagram of the implementation process of the screen anti-shake method provided in the embodiment of the present application. Figure 2 As shown, the method may include the following steps 201 to 203:
[0068] Step 201 : when the screen of the electronic device outputs a picture, a target pattern is obtained, where the target pattern is used to indicate the relative position relationship between the user's face and a preset direction of the screen.
[0069] It is understandable that users often use electronic devices to view output images while walking or taking public transportation. In this case, the screen of the electronic device may shake slightly, which in turn causes the output image on the screen to shake, making it impossible for the user's line of sight to be completely in a relatively stable state with the output image, affecting the user's viewing.
[0070] In the embodiments of the present application, Figure 3 As shown, when the screen of the electronic device outputs a picture, a target pattern can be captured by the front camera 40 on the electronic device, and the target pattern can represent the relative position relationship between the user's face and the preset direction of the screen.
[0071] Optionally, the preset direction may be the center of the screen, and the target pattern may indicate whether the user's face is in relative position to the center of the screen, that is, the target pattern may indicate whether the user's face is facing the center of the screen of the electronic device.
[0072] Optionally, the preset direction may also be the user's preferred direction, that is, the viewing angle of the user when viewing the output screen in the past. For example, if the user likes to view the output screen with his head tilted to the left side of the screen, the target pattern may indicate the relative position relationship between the user's face and the left side of the screen, that is, the target pattern may indicate whether the user's face is facing the left side of the screen of the electronic device.
[0073] In the embodiment of the present application, there is no limit on the number of target patterns obtained, for example, the target pattern may be a single frame pattern or a multi-frame pattern. The target pattern may be an image containing the user's face or a polygon projected onto the screen, which is not limited in the embodiment of the present application.
[0074] Step 202: Determine whether the user's face is offset from a preset direction based on the target pattern and a pre-stored comparison pattern.
[0075] In an embodiment of the present application, the pre-stored comparison pattern corresponds to the target pattern. For example, if the target pattern is a polygonal pattern, the comparison pattern is also a polygonal pattern; if the target pattern is a face pattern, the comparison pattern is also a face pattern; if the target pattern is a text pattern, the comparison pattern is also the same text pattern.
[0076] Optionally, the position of the contrast pattern can be at the center of the screen, then determining whether the user's face is offset from the preset direction, that is, determining whether the user's face is located at the center of the screen; the position of the contrast pattern can also be set at the user's preferred viewing position, such as setting it on the left side of the screen, then determining whether the user's face is offset from the preset direction, that is, determining whether the user's face is located on the left side of the screen.
[0077] In some embodiments, when determining whether the user's face is offset from a preset direction based on a target pattern and a pre-stored comparison pattern, it can be achieved by executing steps 403 to 404 in the following embodiments.
[0078] Step 203, when it is determined that the user's face is offset from the preset direction, adjust the presentation angle of the screen of the electronic device to obtain a corrected electronic device, wherein the first offset degree is greater than the second offset degree, the first offset degree is the offset degree between the user's face and the preset direction of the screen of the electronic device before correction, and the second offset degree is the offset degree between the user's face and the preset direction of the screen of the electronic device after correction.
[0079] In some embodiments, to adjust the presentation angle of the screen of the electronic device, it can be achieved by executing steps 404 to 405 in the following embodiments.
[0080] The electronic device in the embodiment of the present application includes a screen and a support member, such as Figure 1As shown, when adjusting the display angle of the screen of the electronic device, the screen can be controlled to rotate around the support member so that the offset between the user's face and the preset direction is reduced from the first offset to the second offset, that is, the screen of the electronic device after adjustment is kept facing the user's face.
[0081] In the embodiment of the present application, when the screen of the electronic device outputs a picture, a target pattern is obtained, and the target pattern is used to indicate the relative position relationship between the user's face and the preset direction of the screen; according to the target pattern and the pre-stored contrast pattern, it is determined whether the user's face and the preset direction are offset; if offset occurs, the presentation angle of the screen of the electronic device is adjusted to obtain a corrected electronic device, and the offset degree between the user's face and the preset direction of the screen of the electronic device before correction is greater than the offset degree between the user's face and the preset direction of the screen of the corrected electronic device. In this way, the screen jitter of the electronic device can be quickly adjusted, thereby improving the viewing stability of the user and protecting the user's eyesight.
[0082] Figure 4 The following is a schematic diagram of the implementation process of the screen anti-shake method provided in the embodiment of the present application. Figure 4 As shown, the method may include the following steps 401 to 405:
[0083] Step 401, determining whether the user is in a jittery environment.
[0084] It is understandable that when the user is in a stationary state, the electronic device he is using is generally also in a stationary state, and the output image of the electronic device screen does not jitter, which is convenient for the user to watch. However, users often use electronic devices to watch output images while walking or taking public transportation. In this case, the screen of the electronic device may have slight jitters, which in turn causes the output image of the screen to jitter, making it impossible for the user's line of sight to be completely in a relatively stable state with the output image, affecting the user's viewing.
[0085] Therefore, in an embodiment of the present application, it is necessary to determine whether the user is in a jittery environment so as to correct the screen of the electronic device when the user is in a jittery environment to improve the user's viewing stability.
[0086] In some embodiments, Figure 6 As shown, the user can wear a wearable device, which can be a wireless headset, a headset, a VR device, etc. The electronic device is provided with a first motion sensor, and the wearable device is provided with a second motion sensor. Based on this, in order to determine whether the user is in a shaking environment, the following steps 501 to 503 can be performed:
[0087] Step 501: collect a motion signal of a target device through a motion sensor, where the motion sensor includes a first motion sensor and / or a second motion sensor, and the target device includes an electronic device and / or a wearable device.
[0088] Understandably, if a user uses a wearable device and an electronic device at the same time, the wearable device may shake while the electronic device does not. For example, when a user shakes his head to the rhythm of a song, the headphones may shake, but the phone does not move. Alternatively, the wearable device may not move while the electronic device may shake, for example, when a user stands still but shakes the phone left and right. Alternatively, the wearable device and the electronic device may shake at the same time.
[0089] Based on this, in an embodiment of the present application, a motion signal of an electronic device can be collected by a first motion sensor, and / or a motion signal of a wearable device can be collected by a second motion sensor, so as to determine whether the user is in a shaking environment based on the collected motion signals of one or both devices.
[0090] Step 502: Determine the vibration amplitude of the target device according to the motion signal.
[0091] It should be noted that if a user wears or carries an electronic device and / or wearable device to engage in extensive exercise such as running or playing ball, it is generally not necessary to correct the screen of the electronic device in order to improve the user's viewing stability.
[0092] Therefore, in an embodiment of the present application, after the motion signal of the electronic device and / or the wearable device is obtained, the corresponding jitter amplitude of the electronic device and / or the wearable device can be determined to determine whether the user is in a jittering environment, and whether the jittering environment is gentle or severe based on the jitter amplitude.
[0093] Step 503: When the shaking amplitude is less than the threshold, determine whether the user is in a shaking environment.
[0094] Here, there is no limitation on the setting of the threshold value, and the threshold value can be set according to actual needs. When the jitter amplitude of the electronic device and / or the wearable device is small, it can be determined that the user is in a relatively gentle jitter environment. In this environment, the screen of the electronic device can be corrected to improve the viewing stability of the user.
[0095] Step 402, when the user is in a shaking environment and the screen of the electronic device outputs a picture, a target pattern is obtained, where the target pattern is used to indicate the relative position relationship between the user's face and a preset direction of the screen.
[0096] Here, the method of acquiring the target pattern is the same as that in step 201 in the above embodiment, and will not be repeated here.
[0097] Step 403, based on the multiple-frame target patterns, determine whether the user is in a state of looking at the screen within a preset time length, wherein if the first target pattern includes at least a portion of the user's facial area, it means that the user is in a state of looking at the screen at the moment of acquiring the first target pattern, and the first target pattern is any frame pattern in the multiple-frame target patterns.
[0098] It is understandable that if a user randomly glances at the screen of an electronic device, it does not mean that the user has the intention to watch the output picture presented on the screen of the electronic device. At this time, if after obtaining a frame of target pattern, that is, after obtaining a frame of pattern of the user's face presented on the screen, the screen is corrected based on the target pattern, it may cause unnecessary power consumption.
[0099] Therefore, in some embodiments, the screen of the electronic device is corrected only after it is determined that the user has been looking at the screen of the electronic device for a period of time, that is, when it is determined that the user has the intention to watch the output image presented on the screen of the electronic device. This can avoid unnecessary power consumption caused by frequently correcting the screen angle of the electronic device.
[0100] Of course, in some embodiments, the user can also choose to set the electronic device to not judge whether the user is looking at the screen within a preset time when a frame of target pattern is acquired, that is, to perform screen correction based on the acquired frame of target pattern.
[0101] Optionally, when determining, based on the multi-frame target patterns, whether the user is in a state of looking at the screen within a preset time period, multiple methods may be included.
[0102] For example, in some embodiments, the electronic device is provided with a camera, and the acquired multi-frame target pattern is a pattern including the user's facial area acquired by the camera. When determining whether the user is looking at the screen within a preset time period based on the multi-frame target pattern, it is possible to determine whether the user is in a state of looking at the screen within the preset time period based on the completeness of the presentation of the user's face recognized in each frame of the target pattern acquired within the preset time period.
[0103] In other embodiments, Figure 6 As shown, the user wears a wearable device, and a plurality of projection units 60 are provided in the wearable device. If the first target pattern includes at least one projection unit, it means that the first target pattern includes at least a part of the user's facial area.
[0104] In some embodiments, the wearable device may also include a processor, a power supply, a microphone, a speaker, and a wireless connection module.
[0105] Specifically, each projection unit of the wearable device can emit light spots. In this way, when the user wears the wearable device, if he faces the screen of the electronic device, the front camera of the electronic device can capture the first target pattern formed by the light spots emitted by the emitting unit. When the first target pattern includes at least one light spot, it can indicate that the first target pattern includes at least part of the user's facial area.
[0106] Based on this, step 403 can be implemented by executing the following steps 701 to 702:
[0107] Step 701 : Determine whether there are at least two frames of third target patterns in multiple frames of target patterns, the at least two frames of third target patterns are acquired within a preset time length, and each frame of the third target pattern includes at least one projection unit.
[0108] Step 702: If yes, determine that the user is in a state of looking at the screen within a preset time period.
[0109] Here, when at least two consecutive target pattern frames include at least one projection unit, it can be explained that the user's face continues to face the screen of the electronic device, thereby indicating that the user is in a state of staring at the screen within the preset time length.
[0110] In addition, the embodiment of the present application does not limit the method for determining whether the target pattern includes at least part of the user's facial area. For example, the front camera of the electronic device can directly capture the user's facial image for recognition to determine whether the target pattern includes at least part of the user's facial area; or, it can be determined by the number of projection units captured by the camera. When at least one projection unit is captured, it can be considered that the target pattern includes at least part of the user's facial area.
[0111] Step 404: determining a first deviation degree of the user's face from a preset direction according to a second target pattern in the multi-frame target pattern and a pre-stored comparison pattern, wherein the second target pattern is the last frame pattern in the multi-frame target pattern.
[0112] Here, after determining that the user is looking at the screen for a preset time period based on the multi-frame target pattern, the screen of the electronic device can be corrected based on the last frame pattern (ie, the second target pattern) in the collected multi-frame target pattern.
[0113] When the screen of the electronic device is corrected based on the second target pattern and the contrast pattern, the first offset degree between the user's face and the screen of the electronic device needs to be known first, so as to perform correction according to the first offset degree.
[0114] In the embodiment of the present application, there is no limitation on the method for determining the first degree of offset between the user's face and the preset direction of the screen.
[0115] For example, in some embodiments, a user wears a wearable device, a plurality of projection units are arranged in the wearable device, the target pattern includes the plurality of projection units, the contrast pattern is a polygonal pattern composed of the plurality of projection units, and the first offset degree includes a target offset direction and a first offset angle.
[0116] Based on this, step 404 can be implemented by executing steps 801 to 804 in the following embodiment:
[0117] Step 801 : acquiring first center position coordinates of the target pattern according to a plurality of projection units in the target pattern, and acquiring second center position coordinates of the contrast pattern according to a polygonal pattern in the contrast pattern.
[0118] like Fig. 9 As shown, assuming that the contrast pattern 90 is a polygonal pattern and the target pattern 91 is also a polygonal pattern, the first center position coordinate C1 of the target pattern can be determined first, and the second center position coordinate C2 of the contrast pattern can be determined.
[0119] Step 802: Determine a target offset direction between the user's face and a preset direction according to a positional relationship between the first center position coordinates and the second center position coordinates.
[0120] After determining the first center position coordinate C1 and the second center position coordinate C2, the target offset direction between the user's face and the preset direction can be determined, such as Fig. 9 As shown, the target offset direction is to the left.
[0121] Step 803: Obtain a first side length ratio of the target pattern and a second side length ratio of the comparison pattern.
[0122] Here, the first side length ratio is the length ratio of each side length of the target pattern, and the second side length ratio is the length ratio of each side length of the comparison pattern.
[0123] Step 804: Determine a target offset angle between the user's face and a preset direction according to the first side length ratio and the second side length ratio.
[0124] By implementing the above method, the target offset direction and target offset angle between the user's face and the preset direction can be obtained.
[0125] Step 405: adjust the presentation angle of the screen of the electronic device according to the first offset degree.
[0126] In some embodiments, Fig.10As shown, after obtaining the target offset direction and target offset angle, the screen can be controlled to rotate around the support according to the target offset angle and target offset direction, so as to adjust the presentation angle of the screen of the electronic device so that the offset degree between the user's face and the preset direction is reduced from the first offset degree to the second offset degree.
[0127] Furthermore, the electronic device may also include a mechanical shaft, and the electronic device may control the mechanical shaft to rotate according to the target offset angle and the target offset direction to adjust the presentation angle of the screen of the electronic device.
[0128] In other embodiments, the degree of deviation between the user's face and the preset direction may not be specifically determined. Instead, when it is determined that the user's face is offset from the preset direction, the screen of the electronic device may be adjusted, as shown in steps 1101 to 1102 in the following embodiment:
[0129] Step 1101, when it is determined that the user's face is offset from a preset direction, determine the offset direction of the user's face from the preset direction.
[0130] Here, when it is determined that the user's face is offset from a preset direction, only the relative offset direction between the user's face and the center position of the screen or the preset position may be determined.
[0131] Step 1102: adjusting the presentation angle of the screen of the electronic device according to the offset direction and a preset adjustment angle.
[0132] It should be noted that the preset adjustment angle may be a fixed angle. For example, if it is determined that the user's face is offset to the left relative to the preset direction, the angle may be adjusted to the right by 5 degrees.
[0133] Here, when adjusting the presentation angle of the screen of the electronic device, the electronic device may also control the mechanical shaft to rotate according to the offset direction and the preset adjustment angle to adjust the presentation angle of the screen of the electronic device.
[0134] In an embodiment of the present application, it is provided to determine whether the user is in a jittery environment. When the user is in a jittery environment and the screen of the electronic device outputs a picture, a target pattern is obtained, and the target pattern is used to indicate the relative position relationship between the user's face and the preset direction of the screen; according to the multi-frame target pattern, it is determined whether the user is in a state of looking at the screen within a preset time length, and if so, the first offset degree of the user's face and the preset direction is determined according to the last frame pattern in the multi-frame target pattern and the pre-stored comparison pattern, and finally the presentation angle of the screen of the electronic device is adjusted according to the first offset degree. In this way, the screen jitter of the electronic device can be quickly adjusted, thereby improving the viewing stability of the user and protecting the user's eyesight.
[0135] It should be understood that, although the steps in the above-mentioned flowcharts are displayed in sequence according to the indication of the arrows, these steps are not necessarily executed in sequence according to the order indicated by the arrows. Unless there is a clear explanation in this article, the execution of these steps is not strictly limited in order, and these steps can be executed in other orders. Moreover, at least a part of the steps in the above-mentioned flowcharts may include multiple sub-steps or multiple stages, and these sub-steps or stages are not necessarily executed at the same time, but can be executed at different times, and the execution order of these sub-steps or stages is not necessarily to be carried out in sequence, but can be executed in turn or alternately with other steps or at least a part of the sub-steps or stages of other steps.
[0136] Based on the foregoing embodiments, an embodiment of the present application provides a screen anti-shake device, which includes the modules included and the units included in the modules, which can be implemented by a processor; of course, it can also be implemented by a specific logic circuit; in the implementation process, the processor can be a central processing unit (CPU), a microprocessor (MPU), a digital signal processor (DSP) or a field programmable gate array (FPGA), etc.
[0137] Fig.12 A schematic diagram of the structure of the screen anti-shake device provided in an embodiment of the present application is shown in FIG. Fig.12 As shown, the device 1200 includes an acquisition module 1201, a determination module 1202 and an adjustment module 1203, wherein:
[0138] An acquisition module 1201 is used to acquire a target pattern when the screen of the electronic device outputs a picture, wherein the target pattern is used to indicate a relative position relationship between a user's face and a preset direction of the screen;
[0139] A determination module 1202 is used to determine whether the user's face is offset from the preset direction according to the target pattern and a pre-stored comparison pattern;
[0140] The adjustment module 1203 is used to adjust the presentation angle of the screen of the electronic device when it is determined that the user face is offset from the preset direction, so as to obtain a corrected electronic device, wherein the first offset degree is greater than the second offset degree, the first offset degree is the offset degree between the user face and the preset direction of the screen of the electronic device before correction, and the second offset degree is the offset degree between the user face and the preset direction of the screen of the electronic device after correction.
[0141] In some embodiments, the target pattern is a multi-frame target pattern acquired within a preset time length, and the determination module 1202 includes a first determination submodule and a second determination submodule, wherein the first determination submodule is used to determine, based on the multi-frame target pattern, that the user is in a state of gazing at the screen within the preset time length, wherein if the first target pattern includes at least a portion of the user's facial area, it indicates that the user is in a state of gazing at the screen at the moment of acquiring the first target pattern, and the first target pattern is any frame pattern in the multi-frame target pattern; the second determination submodule is used to determine a first degree of deviation of the user's face from the preset direction based on a second target pattern in the multi-frame target pattern and a pre-stored comparison pattern, and the second target pattern is the last frame pattern in the multi-frame target pattern.
[0142] In some embodiments, the user wears a wearable device, and a plurality of projection units are provided in the wearable device. If the first target pattern includes at least one of the projection units, it indicates that the first target pattern includes at least a portion of the user's facial area. The first determination submodule is specifically used to determine whether there are at least two frames of third target patterns in the multiple frames of target patterns, and the at least two frames of third target patterns are acquired within the preset time length, and each frame of the third target pattern includes at least one of the projection units. If so, it is determined that the user is in a state of looking at the screen within the preset time length.
[0143] In some embodiments, the determination module 1202 also includes a third determination submodule, which is used to determine whether the user is in a jittery environment; when the user is in the jittery environment and the screen of the electronic device outputs a picture, obtain the target pattern.
[0144] In some embodiments, a first motion sensor is provided in the electronic device, the user wears a wearable device, a second motion sensor is provided in the wearable device, and the third determination submodule is specifically used to collect a motion signal of a target device through the motion sensor, the motion sensor includes the first motion sensor and / or the second motion sensor, and the target device includes the electronic device and / or the wearable device; based on the motion signal, the jitter amplitude of the target device is determined; when the jitter amplitude is less than a threshold value, it is determined whether the user is in a jittering environment.
[0145] In some embodiments, the adjustment module 1203 includes a fourth determination submodule and an adjustment submodule, wherein the fourth determination submodule is used to determine the offset direction of the user's face from the preset direction when it is determined that the user's face is offset from the preset direction; and the adjustment submodule is used to adjust the presentation angle of the screen of the electronic device according to the offset direction and the preset adjustment direction.
[0146] In some embodiments, the adjustment submodule is specifically used to determine the first degree of deviation based on the target pattern and a pre-stored contrast pattern when it is determined that the user's face is offset from the preset direction; and adjust the presentation angle of the screen of the electronic device based on the first degree of deviation.
[0147] In some embodiments, the user wears a wearable device, a plurality of projection units are provided in the wearable device, the target pattern includes the plurality of projection units, the contrast pattern is a polygonal pattern composed of the plurality of projection units, and the adjustment submodule is further used to obtain the first center position coordinates of the target pattern according to the plurality of projection units in the target pattern, and to obtain the second center position coordinates of the contrast pattern according to the polygonal pattern in the contrast pattern; determine the target offset direction of the user's face from the preset direction according to the positional relationship between the first center position coordinates and the second center position coordinates; obtain the first side length ratio of the target pattern and the second side length ratio of the contrast pattern; determine the target offset angle of the user's face from the preset direction according to the first side length ratio and the second side length ratio; the target offset degree includes the target offset direction and the first offset angle.
[0148] In some embodiments, the adjustment submodule is specifically used to control the screen to rotate around the support member according to the target offset angle and the target offset direction, so as to adjust the presentation angle of the screen of the electronic device so that the offset degree between the user's face and the preset direction is reduced from the first offset degree to the second offset degree.
[0149] The description of the above device embodiment is similar to the description of the above method embodiment, and has similar beneficial effects as the method embodiment. For technical details not disclosed in the device embodiment of the present application, please refer to the description of the method embodiment of the present application for understanding.
[0150] It should be noted that in the embodiments of this application Fig.12The division of modules in the screen anti-shake device shown is schematic and is only a logical function division. There may be other division methods in actual implementation. In addition, each functional unit in each embodiment of the present application may be integrated into a processing unit, or may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of a software functional unit. It may also be implemented in the form of a combination of software and hardware.
[0151] It should be noted that in the embodiment of the present application, if the above method is implemented in the form of a software function module and sold or used as an independent product, it can also be stored in a computer-readable storage medium. Based on such an understanding, the technical solution of the embodiment of the present application can be essentially or partly embodied in the form of a software product that contributes to the relevant technology. The computer software product is stored in a storage medium, including several instructions to enable an electronic device to execute all or part of the methods described in each embodiment of the present application. The aforementioned storage medium includes: various media that can store program codes, such as a U disk, a mobile hard disk, a read-only memory (ROM), a magnetic disk or an optical disk. In this way, the embodiment of the present application is not limited to any specific combination of hardware and software.
[0152] The embodiment of the present application provides a computer device, which may be a server, and its internal structure diagram may be as follows: Fig.13 As shown. The computer device includes a processor, a memory and a network interface connected through a system bus. Among them, the processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, a computer program and a database. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The database of the computer device is used to store data. The network interface of the computer device is used to communicate with an external terminal through a network connection. When the computer program is executed by the processor, the above method is implemented.
[0153] An embodiment of the present application provides a computer-readable storage medium on which a computer program is stored. When the computer program is executed by a processor, the steps in the method provided in the above embodiment are implemented.
[0154] An embodiment of the present application provides a computer program product including instructions, which, when executed on a computer, enables the computer to execute the steps of the method provided in the above method embodiment.
[0155] Those skilled in the art will understand that Fig.13The structure shown in the figure is only a block diagram of a part of the structure related to the solution of the present application, and does not constitute a limitation on the computer device to which the solution of the present application is applied. The specific computer device may include more or fewer components than those shown in the figure, or combine certain components, or have a different arrangement of components.
[0156] In one embodiment, the screen anti-shake device provided by the present application can be implemented in the form of a computer program. Fig.13 The computer device shown in the figure is run. The memory of the computer device can store various program modules constituting the above-mentioned device. The computer program composed of various program modules enables the processor to execute the steps in the method of each embodiment of the present application described in this specification.
[0157] It should be noted here that the description of the above storage medium and device embodiments is similar to the description of the above method embodiments, and has similar beneficial effects as the method embodiments. For technical details not disclosed in the storage medium, storage medium and device embodiments of this application, please refer to the description of the method embodiments of this application for understanding.
[0158] It should be understood that "one embodiment" or "an embodiment" or "some embodiments" mentioned throughout the specification means that specific features, structures or characteristics related to the embodiment are included in at least one embodiment of the present application. Therefore, "in one embodiment" or "in one embodiment" or "in some embodiments" appearing throughout the specification may not necessarily refer to the same embodiment. In addition, these specific features, structures or characteristics can be combined in one or more embodiments in any suitable manner. It should be understood that in various embodiments of the present application, the size of the sequence number of the above-mentioned processes does not mean the order of execution, and the execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiment of the present application. The above-mentioned sequence numbers of the embodiments of the present application are only for description and do not represent the advantages and disadvantages of the embodiments. The above description of each embodiment tends to emphasize the differences between the various embodiments, and the same or similar aspects can be referenced to each other. For the sake of brevity, this article will not repeat them.
[0159] The term "and / or" in this article is only a description of the association relationship of associated objects, indicating that there may be three relationships. For example, object A and / or object B can represent three situations: object A exists alone, object A and object B exist at the same time, and object B exists alone.
[0160] It should be noted that, in this article, the terms "include", "comprises" or any other variations 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, an element defined by the sentence "comprises a ..." does not exclude the existence of other identical elements in the process, method, article or device including the element.
[0161] In the several embodiments provided in the present application, it should be understood that the disclosed devices and methods can be implemented in other ways. The embodiments described above are only schematic. For example, the division of the modules is only a logical function division. There may be other division methods in actual implementation, such as: multiple modules or components can be combined, or can be integrated into another system, or some features can be ignored, or not executed. In addition, the coupling, direct coupling, or communication connection between the components shown or discussed can be through some interfaces, and the indirect coupling or communication connection of devices or modules can be electrical, mechanical or other forms.
[0162] The modules described above as separate components may or may not be physically separated, and the components displayed as modules may or may not be physical modules; they may be located in one place or distributed on multiple network units; some or all of the modules may be selected according to actual needs to achieve the purpose of the present embodiment.
[0163] In addition, all functional modules in the embodiments of the present application may be integrated into one processing unit, or each module may be a separate unit, or two or more modules may be integrated into one unit; the above-mentioned integrated modules may be implemented in the form of hardware or in the form of hardware plus software functional units.
[0164] A person skilled in the art can understand that all or part of the steps of implementing the above method embodiment can be completed by hardware related to program instructions, and the aforementioned program can be stored in a computer-readable storage medium. When the program is executed, it executes the steps of the above method embodiment; and the aforementioned storage medium includes: mobile storage devices, read-only memories (ROM), magnetic disks or optical disks, etc., various media that can store program codes.
[0165] Alternatively, if the above-mentioned integrated unit of the present application is implemented in the form of a software function module and sold or used as an independent product, it can also be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the embodiment of the present application can essentially or in other words, the part that contributes to the relevant technology can be embodied in the form of a software product, and the computer software product is stored in a storage medium, including a number of instructions for enabling an electronic device to execute all or part of the methods described in each embodiment of the present application. The aforementioned storage medium includes: various media that can store program codes, such as mobile storage devices, ROMs, magnetic disks, or optical disks.
[0166] The methods disclosed in several method embodiments provided in this application can be arbitrarily combined without conflict to obtain new method embodiments.
[0167] The features disclosed in several product embodiments provided in this application can be arbitrarily combined without conflict to obtain new product embodiments.
[0168] The features disclosed in several method or device embodiments provided in this application can be arbitrarily combined without conflict to obtain new method embodiments or device embodiments.
[0169] The above is only an implementation method of the present application, but the protection scope of the present application is not limited thereto. Any person skilled in the art who is familiar with the present technical field can easily think of changes or substitutions within the technical scope disclosed in the present application, which should be included in the protection scope of the present application. Therefore, the protection scope of the present application should be based on the protection scope of the claims.
Claims
1. A screen anti-shake method, characterized in that: Applied to an electronic device, the electronic device comprises a screen and a support, the screen is rotatably connected to the support, and the method comprises: When the screen of the electronic device outputs a picture, acquiring a target pattern, wherein the target pattern is used to indicate a relative position relationship between the user's face and a preset direction of the screen; Determining whether the user's face is offset from the preset direction according to the target pattern and a pre-stored comparison pattern; When it is determined that the user's face is offset from the preset direction, the presentation angle of the screen of the electronic device is adjusted to obtain a corrected electronic device, wherein the first offset degree is greater than the second offset degree, the first offset degree is the offset degree between the user's face and the preset direction of the screen of the electronic device before correction, and the second offset degree is the offset degree between the user's face and the preset direction of the screen of the electronic device after correction.
2. The method according to claim 1, characterized in that The target pattern is a multi-frame target pattern acquired within a preset time length. Before determining a first offset degree between the user's face and the preset direction according to the target pattern and a pre-stored comparison pattern, the method further includes: Determining, according to the multiple frames of target patterns, that the user is in a state of gazing at the screen within a preset time period, wherein if a first target pattern includes at least a portion of a user's facial region, it indicates that the user is in a state of gazing at the screen at the moment of acquiring the first target pattern, and the first target pattern is any frame pattern of the multiple frames of target patterns; Correspondingly, determining a first degree of deviation of the user's face from the preset direction according to the target pattern and a pre-stored contrast pattern includes: A first offset degree of the user's face from the preset direction is determined according to a second target pattern in the multiple frames of target patterns and a pre-stored comparison pattern, wherein the second target pattern is the last frame pattern in the multiple frames of target patterns.
3. The method according to claim 2, characterized in that The user wears a wearable device, and the wearable device is provided with a plurality of projection units. If the first target pattern includes at least one of the projection units, it means that the first target pattern includes at least a portion of the user's facial area. The determining, based on the multiple frames of the target pattern, that the user is in a state of looking at the screen within a preset time period includes: Determine whether there are at least two frames of the third target pattern in the multiple frames of the target pattern, the at least two frames of the third target pattern are acquired within the preset time length, and each frame of the third target pattern includes at least one of the projection units; If so, it is determined that the user is in a state of looking at the screen within a preset time period.
4. The method according to claim 1, characterized in that Before acquiring the target pattern, the method further includes: Determining whether the user is in a jittery environment; When the user is in the shaking environment and a picture is output on the screen of the electronic device, the target pattern is acquired.
5. The method according to claim 4, wherein the electronic device is provided with a first motion sensor, the user wears a wearable device, and the wearable device is provided with a second motion sensor, and the determining whether the user is in a shaking environment comprises: Collecting a motion signal of a target device through a motion sensor, wherein the motion sensor includes the first motion sensor and / or the second motion sensor, and the target device includes the electronic device and / or the wearable device; Determining a vibration amplitude of the target device according to the motion signal; When the shaking amplitude is less than a threshold, it is determined whether the user is in a shaking environment.
6. The method according to claim 1, characterized in that When it is determined that the user's face is offset from the preset direction, adjusting the presentation angle of the screen of the electronic device includes: When it is determined that the user's face is offset from the preset direction, determining the offset direction of the user's face from the preset direction; The presentation angle of the screen of the electronic device is adjusted according to the offset direction and the preset adjustment angle.
7. The method according to claim 1, characterized in that When it is determined that the user's face is offset from the preset direction, adjusting the presentation angle of the screen of the electronic device includes: When it is determined that the user's face is offset from the preset direction, determining the first offset degree according to the target pattern and a pre-stored comparison pattern; According to the first offset degree, the presentation angle of the screen of the electronic device is adjusted.
8. The method according to claim 7, wherein the user wears a wearable device, the wearable device is provided with a plurality of projection units, the target pattern includes the plurality of projection units, the contrast pattern is a polygonal pattern composed of the plurality of projection units, and the determining the first degree of deviation according to the target pattern and a pre-stored contrast pattern comprises: Acquire the first center position coordinates of the target pattern according to the plurality of projection units in the target pattern, and acquire the second center position coordinates of the contrast pattern according to the polygonal pattern in the contrast pattern; Determining a target offset direction between the user's face and the preset direction according to a positional relationship between the first center position coordinates and the second center position coordinates; Acquire a first side length ratio of the target pattern and a second side length ratio of the comparison pattern; Determining a target offset angle between the user's face and the preset direction according to the first side length ratio and the second side length ratio; The target offset degree includes the target offset direction and the first offset angle.
9. The method according to claim 7, characterized in that: The method of adjusting the presentation angle of the screen of the electronic device according to the first offset degree to obtain a corrected electronic device includes: The screen is controlled to rotate around the support member according to the target offset angle and the target offset direction, and the presentation angle of the screen of the electronic device is adjusted so that the offset degree between the user's face and the preset direction is reduced from the first offset degree to the second offset degree.
10. The method according to claim 9, characterized in that The screen and the support are connected via a mechanical shaft, and the screen is controlled to rotate around the support according to the target offset angle and the target offset direction to adjust the presentation angle of the screen of the electronic device, including: The mechanical shaft is controlled to rotate according to the target offset angle and the target offset direction to adjust the presentation angle of the screen of the electronic device.
11. A screen anti-shake device, characterized in that: include: An acquisition module, used for acquiring a target pattern when the screen of the electronic device outputs a picture, wherein the target pattern is used for indicating a relative position relationship between the user's face and a preset direction of the screen; A determination module, configured to determine whether the user's face is offset from the preset direction according to the target pattern and a pre-stored comparison pattern; An adjustment module is used to adjust the presentation angle of the screen of the electronic device when it is determined that the user face is offset from the preset direction, so as to obtain a corrected electronic device, wherein a first offset degree is greater than a second offset degree, the first offset degree is the offset degree between the user face and the preset direction of the screen of the electronic device before correction, and the second offset degree is the offset degree between the user face and the preset direction of the screen of the electronic device after correction.
12. A computer device comprising a memory and a processor, wherein the memory stores a computer program executable on the processor, wherein: When the processor executes the program, the steps of the method according to any one of claims 1 to 10 are implemented.
13. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the method according to any one of claims 1 to 10 is implemented.
Citation Information
Cited By
Screen display method and system of intelligent ring
CN120295520A