Picture jitter compensation method and device, electronic equipment and computer storage medium
By recognizing user status and intent, calculating the jitter displacement of the user terminal and rendering the display interface, the problem of image jitter in motion is solved, achieving high-quality image compensation and improved user experience.
Patent Information
- Application Number
- CN202311070570.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-08-24
- Publication Date
- 2026-03-17
- Estimated Expiration
- 2043-08-24
AI Technical Summary
When in motion, screen jitter on the user's device makes it difficult to maintain a high-quality display, affecting the user experience.
By acquiring user status and intent, the instantaneous acceleration of the user terminal is identified, jitter displacement is calculated, and the display interface is rendered to achieve motion compensation.
It improves the accuracy of image compensation, thereby enhancing the display quality and user experience of the user terminal when in motion.
Smart Images

Figure CN117041414B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of image display technology, specifically to a method, apparatus, electronic device, and computer storage medium for image jitter compensation. Background Technology
[0002] With the rapid development of communication technology, mobile phones have become indispensable tools for people. People use their phones in various situations, such as checking the time or maps while walking or running. However, in many situations, users in motion do not want to stop their current activity but rather maintain it. Although users may manually stabilize their phones to see the text or images on the screen, it is still difficult for phones to maintain a high-quality display during motion. Summary of the Invention
[0003] This application provides a method, apparatus, electronic device, and computer storage medium for screen shake compensation, which can solve the technical problem of screen shake on user terminals during motion.
[0004] This application provides a method for image shake compensation, including:
[0005] Obtain the current user state, determine whether the user state is in motion state, and when the user state is in motion state, identify the user's user intent;
[0006] When the user's intention is to view the user terminal they are carrying, the first instantaneous acceleration of the user terminal in the x-axis direction and the second instantaneous acceleration in the y-axis direction are obtained respectively. The first jitter displacement of the user terminal is calculated based on the first instantaneous acceleration, and the second jitter displacement of the user terminal is calculated based on the second instantaneous acceleration.
[0007] The display interface of the user terminal is rendered based on the first jitter displacement and the second jitter displacement to obtain the motion-compensated image of the user terminal.
[0008] Further, determining whether the user state is in motion includes:
[0009] Obtain the user terminal carried by the user, and acquire the user's status data based on the sensors of the user terminal;
[0010] The user's motion cycle and peak data are identified based on the status data, and the user's status is determined to be in motion state based on the motion cycle and peak data.
[0011] Furthermore, determining whether the user's state is in motion based on the motion cycle and peak data includes:
[0012] Obtain the preset period range and peak range;
[0013] When the peak data is greater than the maximum peak value of the peak range and the motion cycle is less than the minimum cycle of the cycle range, the user state is determined to be in motion state.
[0014] When the peak data is greater than the minimum peak value of the peak range and the movement cycle is less than the maximum cycle of the cycle range, the user state is determined to be walking state.
[0015] Furthermore, the step of calculating the first jitter displacement of the user terminal based on the first instantaneous acceleration and the second jitter displacement of the user terminal based on the second instantaneous acceleration includes:
[0016] The first historical displacement of the user terminal in the x-axis direction and the second historical displacement in the y-axis direction are obtained respectively.
[0017] The first historical displacement and the second historical displacement are adjusted according to the first instantaneous acceleration and the second instantaneous acceleration respectively to obtain a first jitter displacement and a second jitter displacement. The first jitter displacement is the jitter displacement in the x-axis direction obtained by adjusting the first historical displacement, and the second jitter displacement is the jitter displacement in the y-axis direction obtained by adjusting the second historical displacement.
[0018] Furthermore, the step of adjusting the first historical displacement and the second historical displacement according to the first instantaneous acceleration and the second instantaneous acceleration respectively to obtain the first jitter displacement and the second jitter displacement includes:
[0019] Obtain the time difference between the current detection time and the historical detection time of the first historical displacement;
[0020] The first historical displacement is adjusted according to the time difference and the first instantaneous acceleration to obtain a first jitter displacement. The second historical displacement is adjusted according to the time difference and the second instantaneous acceleration to obtain a second jitter displacement.
[0021] Further, after adjusting the first historical displacement according to the time difference and the first instantaneous acceleration to obtain a first jitter displacement, and adjusting the second historical displacement according to the time difference and the second instantaneous acceleration to obtain a second jitter displacement, the process includes:
[0022] Obtain the preset attenuation threshold;
[0023] The first jitter displacement and the second jitter displacement are attenuated according to the attenuation threshold to obtain the corrected first jitter displacement and the corrected second jitter displacement.
[0024] Furthermore, the step of rendering the display interface of the user terminal based on the first jitter displacement and the second jitter displacement to obtain the motion-compensated image of the user terminal includes:
[0025] Obtain the interface content of the displayed interface;
[0026] The motion-compensated image is obtained by reducing the first jitter displacement in the x-axis direction and the second jitter displacement in the y-axis direction on the interface content.
[0027] Accordingly, embodiments of this application provide a screen shake compensation device, including:
[0028] The identification module is used to obtain the current user's user state, determine whether the user state is a motion state, and identify the user's user intent when the user state is a motion state.
[0029] The confirmation module is used to, when the user's intention is to view the user terminal being carried, acquire the first instantaneous acceleration of the user terminal in the x-axis direction and the second instantaneous acceleration in the y-axis direction, calculate the first jitter displacement of the user terminal based on the first instantaneous acceleration, and calculate the second jitter displacement of the user terminal based on the second instantaneous acceleration;
[0030] The rendering module is used to render the display interface of the user terminal based on the first jitter displacement and the second jitter displacement to obtain the motion-compensated image of the user terminal.
[0031] Furthermore, this application also provides an electronic device, including a processor and a memory, wherein the memory stores a computer program, and the processor is used to run the computer program in the memory to implement the image jitter compensation method provided in this application.
[0032] Furthermore, embodiments of this application also provide a computer-readable storage medium storing a computer program adapted for loading by a processor to execute any of the image jitter compensation methods provided in embodiments of this application.
[0033] Furthermore, this application also provides a computer program product, including a computer program, which, when executed by a processor, implements any of the image shake compensation methods provided in this application.
[0034] In this embodiment, by acquiring the current user state, it is determined whether the user state is in motion. When the user state is in motion, the user's intention is identified, enabling precise determination of the compensation time for the screen based on the user's intention. Subsequently, when the user's intention is to view the user terminal being carried, the first instantaneous acceleration of the user terminal in the x-axis direction and the second instantaneous acceleration in the y-axis direction are acquired. The first jitter displacement of the user terminal is calculated based on the first instantaneous acceleration, and the second jitter displacement is calculated based on the second instantaneous acceleration, achieving precise acquisition of jitter displacement in the x-axis and y-axis directions. Finally, the display interface of the user terminal is rendered based on the first and second jitter displacements to obtain the motion-compensated screen of the user terminal, realizing automatic jitter compensation for the user terminal, improving screen compensation accuracy, and enhancing user experience. Attached Figure Description
[0035] To more clearly illustrate the technical solutions in the embodiments of this application, the accompanying drawings used in the description of the embodiments will be briefly introduced below. Obviously, the accompanying drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0036] Figure 1 This is a flowchart illustrating the image shake compensation method provided in an embodiment of this application;
[0037] Figure 2 This is a schematic diagram of the image shake compensation device provided in the embodiments of this application;
[0038] Figure 3 This is a schematic diagram of the structure of the electronic device provided in the embodiments of this application. Detailed Implementation
[0039] The technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, and not all embodiments. Based on the embodiments of this application, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application.
[0040] This application provides a method, apparatus, electronic device, and computer storage medium for image shake compensation. The image shake compensation apparatus can be integrated into an electronic device, which can be a server, a terminal, or other similar device.
[0041] The server can be a standalone physical server, a server cluster or distributed system consisting of multiple physical servers, or a cloud server that provides basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communication, middleware services, domain name services, security services, network acceleration services (Content Delivery Network, CDN), as well as big data and artificial intelligence platforms.
[0042] The terminal can be a smartphone, tablet, laptop, desktop computer, smart speaker, smartwatch, etc., but is not limited to these. The terminal and the server can be connected directly or indirectly through wired or wireless communication, which is not limited herein.
[0043] Furthermore, in the embodiments of this application, "multiple" refers to two or more. The terms "first" and "second," etc., in the embodiments of this application are used for distinguishing descriptions and should not be construed as implying relative importance.
[0044] The following sections provide detailed descriptions of each example. It should be noted that the order in which the embodiments are described is not intended to limit the preferred order of the embodiments.
[0045] Please see Figure 1 , Figure 1 This is a schematic flowchart of a screen shake compensation method provided in an embodiment of this application. The screen shake compensation method may include:
[0046] S101. Obtain the current user state, determine whether the user state is in motion state, and when the user state is in motion state, identify the user intention of the user.
[0047] In this embodiment, the user state includes walking state and movement state. The current user state is acquired, and when the user state is in a movement state, the user's intention is identified. Specifically, the user carries a user terminal, which can be a mobile phone or other functional device with a display screen. The current user state can be detected using sensors on the user terminal. If the sensor detects that the current user's movement cycle is within a preset movement range, the user state is determined to be in a movement state; if the sensor detects that the current user's movement cycle is outside the preset movement range, the user state is determined to be walking state.
[0048] User intent refers to whether the user intends to view the user terminal they are carrying. After determining that the user is in motion, if the duration of this motion reaches a preset time period, such as 10 seconds, the vibration amplitude of the user terminal within that preset time period is detected. Based on the vibration amplitude, it is determined whether the user intends to view the user terminal. Specifically, the vibration amplitude of the user terminal can be the amplitude of displacement change or acceleration change. If the amplitude of displacement change or acceleration change of the user terminal is within the corresponding preset amplitude range, it is determined that the user intends to view the user terminal; if the amplitude of displacement change or acceleration change of the user terminal is not within the corresponding preset amplitude range, it is determined that the user does not intend to view the user terminal. For example, if the current user's acceleration change amplitude is 0.2g, and the preset amplitude threshold is 0.1g, comparing the acceleration change amplitude with the preset amplitude threshold, if the acceleration change amplitude is greater than the preset amplitude threshold, it is determined that the acceleration change amplitude is not within the preset amplitude range, and the user does not intend to view the user terminal. In addition, the user's posture while using the user terminal can also be detected by the user terminal's sensors to determine whether the user intends to view the user terminal.
[0049] S102. When the user intends to view the user terminal they are carrying, the user terminal's first instantaneous acceleration in the x-axis direction and second instantaneous acceleration in the y-axis direction are obtained respectively. The user terminal's first jitter displacement is calculated based on the first instantaneous acceleration, and the user terminal's second jitter displacement is calculated based on the second instantaneous acceleration.
[0050] In this embodiment, when a user intends to view their portable user terminal, the jitter displacement of the user terminal's display interface is calculated. Specifically, when the user's intention to view their portable user terminal is detected, the first instantaneous acceleration of the user terminal in the x-axis direction, the second instantaneous acceleration in the y-axis direction, and the previously calculated first historical displacement in the x-axis direction and second historical displacement in the y-axis direction are obtained. Based on the first historical displacement and the first instantaneous acceleration in the x-axis direction, the first jitter displacement of the user terminal in the x-axis direction at the current moment is calculated; based on the second historical displacement and the second instantaneous acceleration in the y-axis direction, the second jitter displacement of the user terminal in the y-axis direction at the current moment is calculated.
[0051] S103. Render the display interface of the user terminal according to the first jitter displacement and the second jitter displacement to obtain the motion-compensated screen of the user terminal.
[0052] In this embodiment, the jitter displacement includes a first jitter displacement in the x-axis direction and a second jitter displacement in the y-axis direction. Based on the first and second jitter displacements, the display content of the user terminal's display interface is rendered in reverse from the x-axis and y-axis directions respectively to obtain the motion-compensated image of the user terminal. Finally, the motion-compensated image is displayed on the user terminal's display interface.
[0053] Furthermore, after displaying the motion-compensated image on the user terminal's display interface, the user's intent is further identified to determine whether the current user intent is to abandon viewing the user terminal. Specifically, after displaying the motion-compensated image on the user terminal's display interface, the peak data of the user terminal's sensors is acquired, and it is determined whether this peak data exceeds a preset peak threshold, such as 0.2g. If the peak data exceeds the preset peak threshold, the user intent is determined to be to abandon viewing the user terminal, and jitter compensation is turned off.
[0054] This embodiment obtains the current user state to determine whether the user is in motion. When the user is in motion, the user's intention is identified. When the user's intention is to view the user terminal they are carrying, the first instantaneous acceleration of the user terminal in the x-axis direction and the second instantaneous acceleration in the y-axis direction are obtained respectively. The first jitter displacement of the user terminal is calculated based on the first instantaneous acceleration, and the second jitter displacement of the user terminal is calculated based on the second instantaneous acceleration. The display interface of the user terminal is rendered based on the first jitter displacement and the second jitter displacement to obtain the motion-compensated image of the user terminal. This realizes automatic jitter compensation for the user terminal, improves the image compensation accuracy, and enhances the user experience.
[0055] In some embodiments of this application, determining whether the user state is in a motion state includes:
[0056] Obtain the user terminal carried by the user, and acquire the user's status data based on the sensors of the user terminal;
[0057] The user's motion cycle and peak data are identified based on the status data, and the user's status is determined to be in motion state based on the motion cycle and peak data.
[0058] In this embodiment, when determining whether a user is in a motion state, the user's mobile terminal is acquired, and the user's state data is detected based on the sensors of the mobile terminal. Specifically, the sensors of the mobile terminal can be accelerometers, gyroscopes, or orientation sensors. The current user's state data is determined by superimposing the accelerometer, gyroscope, or orientation sensor data onto the accelerometer. This state data is the data detected by the corresponding sensor, such as the acceleration detected by the accelerometer. When the state data is obtained, it is smoothed, such as by averaging the acceleration every 0.1 seconds, or by other smoothing methods, to obtain smoothed data. Then, peak detection is performed on the smoothed data to obtain the current user's motion cycle and peak data. Based on the motion cycle and peak data, it is determined whether the current user is in a motion state. If both the motion cycle and peak data are within the cycle range and peak range corresponding to the motion state, the current user is determined to be in a motion state; if either the motion cycle or peak data is not within the cycle range and peak range corresponding to the motion state, the current user is determined to be in a walking state.
[0059] In addition, user status can be determined through coordinate positioning. For example, when a user terminal has location services enabled, the user's current speed is calculated based on the location. If the speed is between 6 and 20 km / h, the user's status is determined to be in motion; if the speed is between 1 and 6 km / h, the user's status is determined to be walking.
[0060] This embodiment acquires user status data through the user terminal's sensors, identifies the user's motion cycle and peak data based on the status data, and determines whether the user is in motion by using the motion cycle and peak data, thus achieving accurate identification of the user's motion state and enabling precise determination of the timing for image compensation based on the user's status.
[0061] In some embodiments of this application, determining whether the user state is in motion using the motion cycle and peak data includes:
[0062] Obtain the preset period range and peak range;
[0063] When the peak data is greater than the maximum peak value of the peak range and the motion cycle is less than the minimum cycle of the cycle range, the user state is determined to be in motion state.
[0064] When the peak data is greater than the minimum peak value of the peak range and the movement cycle is less than the maximum cycle of the cycle range, the user state is determined to be walking state.
[0065] In this embodiment, the user's state can also be determined by the extreme values corresponding to the preset period range and peak range. Specifically, when the user is walking, the user's peak acceleration is typically around 0.4g (i.e., gravitational acceleration of 9.8 m / s²). 2 The peak value (0.4 times the maximum value) is between 0.4g and 1g, and the walking cycle is between 0.46s and 0.67s. 0.4g is used as the minimum peak value within the preset peak range, and 1g as the maximum peak value within the preset peak range; 0.46s is used as the minimum cycle value within the preset cycle range, and 0.67s as the maximum cycle value within the preset cycle range. If the current user's peak value is greater than the maximum peak value within the preset peak range, and the walking cycle is less than the minimum cycle value within the preset cycle range, then the current user's state is determined to be in an active state; if the current user's peak value is greater than the minimum peak value within the preset peak range, and the walking cycle is less than the maximum cycle value within the preset cycle range, then the current user's state is determined to be in a walking state. If a value simultaneously satisfies all the conditions for both active and walking states, then the user's state is determined to be abnormal.
[0066] This embodiment determines the user status by using the extreme values of the period range and the peak range, which further improves the accuracy of user status judgment.
[0067] In some embodiments of this application, the above-described calculation of the first jitter displacement of the user terminal based on the first instantaneous acceleration and the calculation of the second jitter displacement of the user terminal based on the second instantaneous acceleration include:
[0068] The first historical displacement of the user terminal in the x-axis direction and the second historical displacement in the y-axis direction are obtained respectively.
[0069] The first historical displacement and the second historical displacement are adjusted according to the first instantaneous acceleration and the second instantaneous acceleration respectively to obtain a first jitter displacement and a second jitter displacement. The first jitter displacement is the jitter displacement in the x-axis direction obtained by adjusting the first historical displacement, and the second jitter displacement is the jitter displacement in the y-axis direction obtained by adjusting the second historical displacement.
[0070] In this embodiment, the first jitter displacement is the jitter displacement in the x-axis direction, and the second jitter displacement is the jitter displacement in the y-axis direction; the first instantaneous acceleration and the second instantaneous acceleration are the instantaneous accelerations of the user terminal in the x-axis direction and the y-axis direction, respectively. Upon obtaining the first instantaneous acceleration in the x-axis direction and the second instantaneous acceleration in the y-axis direction of the user terminal, the first historical displacement in the x-axis direction and the second historical displacement in the y-axis direction of the user terminal are acquired. The first historical displacement is adjusted based on the first instantaneous acceleration to obtain the first jitter displacement; the second historical displacement is adjusted based on the second instantaneous acceleration to obtain the second jitter displacement.
[0071] Specifically, the user terminal's first acceleration in the x-axis direction and second acceleration in the y-axis direction are acquired using its accelerometer. The first average acceleration in the x-axis direction and the second average acceleration in the y-axis direction are calculated. Based on the first acceleration and the first average acceleration, the first target average acceleration in the x-axis direction at the current moment is calculated. Based on the second acceleration and the second average acceleration, the first target average acceleration in the y-axis direction at the current moment is calculated. The formulas for calculating the first target average acceleration and the second target average acceleration are as follows:
[0072] X2 = X * 0.01 + X1 * 0.99
[0073] Y2 = Y * 0.01 + Y1 * 0.99
[0074] Where X2 is the first target average acceleration, X1 is the first average acceleration, and X is the first acceleration; Y2 is the second target average acceleration, Y1 is the second average acceleration, and Y is the second acceleration.
[0075] When calculating the first target average acceleration and the second target average acceleration, the difference between the first acceleration and the first target average acceleration is calculated to obtain the first instantaneous acceleration; the difference between the second acceleration and the second target average acceleration is calculated to obtain the second instantaneous acceleration. Then, the first historical displacement of the user terminal in the x-axis direction and the second historical displacement in the y-axis direction are acquired. These first and second historical displacements are the displacements of the user terminal in the x-axis and y-axis directions, respectively, calculated based on the acceleration previously reported by the sensors. The first and second historical displacements are adjusted according to the first and second instantaneous accelerations to obtain the first jitter displacement and the second jitter displacement.
[0076] This embodiment adjusts the first historical displacement and the second historical displacement by using the first instantaneous acceleration and the second instantaneous acceleration respectively to obtain the first jitter displacement and the second jitter displacement, thereby achieving accurate acquisition of the jitter displacement and further improving the accuracy of image compensation.
[0077] In some embodiments of this application, the above-mentioned adjustment of the first historical displacement and the second historical displacement based on the first instantaneous acceleration and the second instantaneous acceleration respectively to obtain the first jitter displacement and the second jitter displacement includes:
[0078] Obtain the time difference between the current detection time and the historical detection time of the first historical displacement;
[0079] The first historical displacement is adjusted according to the time difference and the first instantaneous acceleration to obtain a first jitter displacement. The second historical displacement is adjusted according to the time difference and the second instantaneous acceleration to obtain a second jitter displacement.
[0080] In this embodiment, when adjusting the first historical displacement and the second historical displacement according to the first instantaneous acceleration and the second instantaneous acceleration respectively, the time difference between the current sensor detection time and the historical detection time of the first historical displacement is obtained. The historical detection time of the first historical displacement is the time when the sensor last reported acceleration. The time difference between the current sensor detection time and the historical detection time is calculated, and the first historical displacement is adjusted according to this time difference and the first instantaneous acceleration to obtain the first jitter displacement; the second historical displacement is adjusted according to the time difference and the second instantaneous acceleration to obtain the second jitter displacement. The calculation formulas for the first jitter displacement and the second jitter displacement are as follows:
[0081] X4 = X3 + X5 * T 2
[0082] Y4 = Y3 + Y5 * T 2
[0083] Where X5 is the first instantaneous acceleration, X3 is the first historical displacement, X4 is the first jitter displacement, and T is the time difference; Y5 is the second instantaneous acceleration, Y3 is the second historical displacement, and Y4 is the second jitter displacement.
[0084] This embodiment calculates the jitter displacement on the x-axis and y-axis by using time difference and instantaneous acceleration respectively, thereby achieving precise determination of the jitter displacement in the x-axis and y-axis directions and further improving the accuracy of adjustment.
[0085] In some embodiments of this application, after adjusting the first historical displacement according to the time difference and the first instantaneous acceleration to obtain a first jitter displacement, and adjusting the second historical displacement according to the time difference and the second instantaneous acceleration to obtain a second jitter displacement, the method includes:
[0086] Obtain the preset attenuation threshold;
[0087] The first jitter displacement and the second jitter displacement are attenuated according to the attenuation threshold to obtain the corrected first jitter displacement and the corrected second jitter displacement.
[0088] In this embodiment, after obtaining the first jitter displacement and the second jitter displacement, a preset attenuation threshold can be obtained. The first and second jitter displacements are then attenuated according to this attenuation threshold to eliminate the positional offset error caused by data errors, resulting in corrected first and second jitter displacements. The attenuation coefficient can be 0.95. Multiplying this attenuation coefficient by the first and second jitter displacements respectively yields the corrected first and second jitter displacements.
[0089] This embodiment uses an attenuation coefficient to attenuate the first jitter displacement and the second jitter displacement, thereby correcting the first jitter displacement and the second jitter displacement and avoiding data errors.
[0090] In some embodiments of this application, the above-described rendering of the user terminal's display interface based on the first jitter displacement and the second jitter displacement to obtain the motion-compensated image of the user terminal includes:
[0091] Obtain the interface content of the displayed interface;
[0092] The motion-compensated image is obtained by reducing the first jitter displacement in the x-axis direction and the second jitter displacement in the y-axis direction on the interface content.
[0093] In this embodiment, when rendering the user terminal's display interface based on the first jitter displacement and the second jitter displacement, the display content of the display interface is obtained. This display content includes information such as images and text. By reducing the first jitter displacement from the display content along the x-axis and the second jitter displacement along the y-axis, a motion-compensated image is obtained.
[0094] This embodiment achieves precise compensation for the image by moving the content of the display interface by corresponding jitter displacements in the x-axis and y-axis directions respectively.
[0095] To facilitate better implementation of the image shake compensation method provided in the embodiments of this application, the embodiments of this application also provide an apparatus based on the above-described image shake compensation method. The meanings of the terms used are the same as in the above-described image shake compensation method, and specific implementation details can be found in the descriptions in the method embodiments.
[0096] For example, such as Figure 2 As shown, the image shake compensation device may include: an identification module 201, a confirmation module 202, and a rendering module 203. Among them,
[0097] The identification module 201 is used to obtain the current user's user state, determine whether the user state is a motion state, and identify the user's user intent when the user state is a motion state.
[0098] The confirmation module 202 is used to, when the user's intention is to view the user terminal being carried, acquire the first instantaneous acceleration of the user terminal in the x-axis direction and the second instantaneous acceleration in the y-axis direction, calculate the first jitter displacement of the user terminal based on the first instantaneous acceleration, and calculate the second jitter displacement of the user terminal based on the second instantaneous acceleration;
[0099] The rendering module 203 is used to render the display interface of the user terminal based on the first jitter displacement and the second jitter displacement to obtain the motion-compensated image of the user terminal.
[0100] In one embodiment of this application, the identification module 201 includes:
[0101] The first acquisition unit is used to acquire the user terminal carried by the user and acquire the user's status data based on the sensors of the user terminal.
[0102] The first confirmation unit is used to identify the user's motion cycle and peak data based on the status data, and to determine whether the user's status is in motion state based on the motion cycle and peak data.
[0103] In one embodiment of this application, the first confirmation unit includes:
[0104] The second acquisition unit is used to acquire the preset period range and peak range;
[0105] The second confirmation unit is used to determine that the user state is in motion state when the peak data is greater than the maximum peak value of the peak range and the motion cycle is less than the minimum cycle of the cycle range.
[0106] The third confirmation unit is used to determine that the user's state is walking when the peak data is greater than the minimum peak value of the peak range and the movement cycle is less than the maximum cycle of the cycle range.
[0107] In one embodiment of this application, the confirmation module 202 includes:
[0108] The third acquisition unit is used to acquire the first historical displacement of the user terminal in the x-axis direction and the second historical displacement in the y-axis direction, respectively.
[0109] The first adjustment unit is used to adjust the first historical displacement and the second historical displacement according to the first instantaneous acceleration and the second instantaneous acceleration respectively, to obtain a first jitter displacement and a second jitter displacement. The first jitter displacement is the jitter displacement in the x-axis direction obtained by adjusting the first historical displacement, and the second jitter displacement is the jitter displacement in the y-axis direction obtained by adjusting the second historical displacement.
[0110] In one embodiment of this application, the first adjustment unit includes:
[0111] The fourth acquisition unit is used to acquire the time difference between the current detection time and the historical detection time of the first historical displacement;
[0112] The second adjustment unit is used to adjust the first historical displacement according to the time difference and the first instantaneous acceleration to obtain a first jitter displacement, and to adjust the second historical displacement according to the time difference and the second instantaneous acceleration to obtain a second jitter displacement.
[0113] In one embodiment of this application, the first adjustment unit further includes:
[0114] The fifth acquisition unit is used to acquire a preset attenuation threshold;
[0115] The correction unit is used to attenuate the first jitter displacement and the second jitter displacement according to the attenuation threshold, respectively, to obtain the corrected first jitter displacement and the corrected second jitter displacement.
[0116] In one embodiment of this application, the rendering module 203 includes:
[0117] The sixth acquisition unit is used to acquire the interface content of the display interface;
[0118] The compensation unit is used to reduce the first jitter displacement of the interface content in the x-axis direction and reduce the second jitter displacement in the y-axis direction to obtain the motion-compensated screen.
[0119] The image shake compensation device proposed in this application realizes automatic shake compensation for user terminals, improves image compensation accuracy, and enhances user experience.
[0120] In practice, each of the above modules can be implemented as an independent entity or can be combined arbitrarily to be implemented as the same or several entities. For the specific implementation methods and corresponding beneficial effects of each of the above modules, please refer to the previous method embodiments, which will not be repeated here.
[0121] This application also provides an electronic device, which may be a server or a terminal, etc. Figure 3 As shown, it illustrates a structural schematic diagram of the electronic device involved in the embodiments of this application, specifically:
[0122] The electronic device may include components such as a processor 601 with one or more processing cores, a memory 602 with one or more computer-readable storage media, a power supply 603, and an input unit 604. Those skilled in the art will understand that... Figure 3 The electronic device structure shown does not constitute a limitation on the electronic device and may include more or fewer components than shown, or combine certain components, or have different component arrangements. Wherein:
[0123] The processor 601 is the control center of the electronic device, connecting various parts of the device via various interfaces and lines. It executes computer programs and / or modules stored in the memory 602, and calls data stored in the memory 602, to perform various functions and process data. Optionally, the processor 601 may include one or more processing cores; preferably, the processor 601 may integrate an application processor and a modem processor, wherein the application processor mainly handles the operating system, user interface, and applications, and the modem processor mainly handles wireless communication. It is understood that the modem processor may not be integrated into the processor 601.
[0124] The memory 602 can be used to store computer programs and modules. The processor 601 executes various functional applications and data processing by running the computer programs and modules stored in the memory 602. The memory 602 may mainly include a program storage area and a data storage area. The program storage area may store the operating system, computer programs required for at least one function (such as sound playback function, image playback function, etc.), etc.; the data storage area may store data created according to the use of the electronic device, etc. In addition, the memory 602 may include high-speed random access memory, and may also include non-volatile memory, such as at least one disk storage device, flash memory device, or other volatile solid-state storage device. Accordingly, the memory 602 may also include a memory controller to provide the processor 601 with access to the memory 602.
[0125] The electronic device also includes a power supply 603 that supplies power to the various components. Preferably, the power supply 603 can be logically connected to the processor 601 through a power management system, thereby enabling functions such as charging, discharging, and power consumption management through the power management system. The power supply 603 may also include one or more DC or AC power supplies, recharging systems, power fault detection circuits, power converters or inverters, power status indicators, and other arbitrary components.
[0126] The electronic device may also include an input unit 604, which can be used to receive input digital or character information and generate keyboard, mouse, joystick, optical or trackball signal inputs related to user settings and function control.
[0127] Although not shown, the electronic device may also include a display unit, etc., which will not be described in detail here. Specifically, in this embodiment, the processor 601 in the electronic device loads the executable files corresponding to the processes of one or more computer programs into the memory 602 according to the following instructions, and the processor 601 runs the computer programs stored in the memory 602 to realize various functions, such as:
[0128] Obtain the current user state, determine whether the user state is in motion state, and when the user state is in motion state, identify the user's user intent;
[0129] When the user's intention is to view the user terminal they are carrying, the first instantaneous acceleration of the user terminal in the x-axis direction and the second instantaneous acceleration in the y-axis direction are obtained respectively. The first jitter displacement of the user terminal is calculated based on the first instantaneous acceleration, and the second jitter displacement of the user terminal is calculated based on the second instantaneous acceleration.
[0130] The display interface of the user terminal is rendered based on the first jitter displacement and the second jitter displacement to obtain the motion-compensated image of the user terminal.
[0131] For details on the specific implementation methods and corresponding beneficial effects of the above operations, please refer to the detailed description of the image shake compensation method above, which will not be repeated here.
[0132] Those skilled in the art will understand that all or part of the steps in the various methods of the above embodiments can be performed by a computer program, or by a computer program controlling related hardware. The computer program can be stored in a computer-readable storage medium and loaded and executed by a processor.
[0133] Therefore, embodiments of this application provide a computer-readable storage medium storing a computer program that can be loaded by a processor to execute the steps of any of the image shake compensation methods provided in embodiments of this application. For example, the computer program can execute the following steps:
[0134] Obtain the current user state, determine whether the user state is in motion state, and when the user state is in motion state, identify the user's user intent;
[0135] When the user's intention is to view the user terminal they are carrying, the first instantaneous acceleration of the user terminal in the x-axis direction and the second instantaneous acceleration in the y-axis direction are obtained respectively. The first jitter displacement of the user terminal is calculated based on the first instantaneous acceleration, and the second jitter displacement of the user terminal is calculated based on the second instantaneous acceleration.
[0136] The display interface of the user terminal is rendered based on the first jitter displacement and the second jitter displacement to obtain the motion-compensated image of the user terminal.
[0137] For details on the specific implementation methods and corresponding beneficial effects of the above operations, please refer to the previous embodiments, which will not be repeated here.
[0138] The computer-readable storage medium may include: read-only memory (ROM), random access memory (RAM), disk or optical disk, etc.
[0139] Since the computer program stored in the computer-readable storage medium can execute the steps of any of the image shake compensation methods provided in the embodiments of this application, the beneficial effects that any of the image shake compensation methods provided in the embodiments of this application can achieve can be realized. For details, please refer to the previous embodiments, which will not be repeated here.
[0140] According to one aspect of this application, a computer program product or computer program is provided, comprising computer instructions stored in a computer-readable storage medium. A processor of a computer device reads the computer instructions from the computer-readable storage medium and executes the computer instructions, causing the computer device to perform the aforementioned image jitter compensation method.
[0141] The foregoing has provided a detailed description of a screen shake compensation method, apparatus, electronic device, and computer storage medium provided in the embodiments of this application. Specific examples have been used to illustrate the principles and implementation methods of this application. The descriptions of the above embodiments are only for the purpose of helping to understand the method and core ideas of this application. At the same time, for those skilled in the art, there will be changes in the specific implementation methods and application scope based on the ideas of this application. Therefore, the content of this specification should not be construed as a limitation of this application.
Claims
1. A picture jitter compensation method, characterized by, The method comprises: acquiring a user state of a current user, determining whether the user state is a motion state, and identifying a user intention of the user when the user state is the motion state; when the user intention is to view a user terminal carried by the user, acquiring a first instantaneous acceleration of the user terminal in an x-axis direction and a second instantaneous acceleration of the user terminal in a y-axis direction respectively, calculating a first jitter displacement of the user terminal according to the first instantaneous acceleration, and calculating a second jitter displacement of the user terminal according to the second instantaneous acceleration; rendering a display interface of the user terminal according to the first jitter displacement and the second jitter displacement to obtain a motion compensation picture of the user terminal; the method further comprises: acquiring a first historical displacement of the user terminal in the x-axis direction and a second historical displacement of the user terminal in the y-axis direction respectively; adjusting the first historical displacement and the second historical displacement according to the first instantaneous acceleration and the second instantaneous acceleration respectively to obtain the first jitter displacement and the second jitter displacement, wherein the first jitter displacement is a jitter displacement in the x-axis direction obtained by adjusting the first historical displacement, and the second jitter displacement is a jitter displacement in the y-axis direction obtained by adjusting the second historical displacement.
2. The picture jitter compensation method of claim 1, wherein, the method further comprises: acquiring a user terminal carried by the user, and acquiring state data of the user based on a sensor of the user terminal; identifying a motion period and peak value data of the user according to the state data, and determining whether the user state is a motion state through the motion period and the peak value data.
3. The picture jitter compensation method of claim 2, wherein, the method further comprises: acquiring a preset period range and a peak value range; when the peak value data is greater than a maximum peak value of the peak value range and the motion period is less than a minimum period of the period range, determining that the user state is a motion state; when the peak value data is greater than a minimum peak value of the peak value range and the motion period is less than a maximum period of the period range, determining that the user state is a walking state.
4. The picture jitter compensation method of claim 1, wherein, the method further comprises: acquiring a time difference between a current detection time and a historical detection time of the first historical displacement; adjusting the first historical displacement according to the time difference and the first instantaneous acceleration to obtain the first jitter displacement, and adjusting the second historical displacement according to the time difference and the second instantaneous acceleration to obtain the second jitter displacement.
5. The picture jitter compensation method of claim 4, wherein, after adjusting the first historical displacement according to the time difference and the first instantaneous acceleration to obtain the first jitter displacement, and adjusting the second historical displacement according to the time difference and the second instantaneous acceleration to obtain the second jitter displacement, the method further comprises: obtaining a preset damping threshold; damping the first jitter displacement and the second jitter displacement according to the damping threshold respectively, to obtain a corrected first jitter displacement and a corrected second jitter displacement.
6. The picture jitter compensation method of claim 1, wherein, The rendering of the display interface of the user terminal according to the first jitter displacement and the second jitter displacement to obtain a motion compensation picture of the user terminal comprises: obtaining interface content of the display interface; decreasing the first jitter displacement from the x-axis direction and decreasing the second jitter displacement from the y-axis direction on the interface content to obtain the motion compensation picture.
7. A picture jitter compensation apparatus, characterized by comprising: comprise: The identification module is configured to obtain a user state of a current user, determine whether the user state is a motion state, and identify a user intention of the user when the user state is the motion state. The confirmation module is configured to obtain a first instantaneous acceleration of the user terminal in an x-axis direction and a second instantaneous acceleration of the user terminal in a y-axis direction when the user intention is to view a carried user terminal, calculate a first jitter displacement of the user terminal according to the first instantaneous acceleration, and calculate a second jitter displacement of the user terminal according to the second instantaneous acceleration. The rendering module is configured to render a display interface of the user terminal according to the first jitter displacement and the second jitter displacement to obtain a motion compensation picture of the user terminal. The calculation of the first jitter displacement of the user terminal according to the first instantaneous acceleration and the calculation of the second jitter displacement of the user terminal according to the second instantaneous acceleration comprise: obtaining a first historical displacement of the user terminal in an x-axis direction and a second historical displacement of the user terminal in a y-axis direction respectively; adjusting the first historical displacement and the second historical displacement according to the first instantaneous acceleration and the second instantaneous acceleration respectively to obtain a first jitter displacement and a second jitter displacement, the first jitter displacement being a jitter displacement in the x-axis direction obtained by adjusting the first historical displacement, and the second jitter displacement being a jitter displacement in the y-axis direction obtained by adjusting the second historical displacement.
8. An electronic device, comprising: The device comprises a processor and a memory, the memory stores a computer program, and the processor is configured to run the computer program in the memory to execute the picture jitter compensation method in any one of claims 1 to 6.
9. A computer-readable storage medium, characterized in that, The computer readable storage medium stores a computer program, and the computer program is adapted to be loaded by a processor to execute the picture jitter compensation method in any one of claims 1 to 6.
Citation Information
Patent Citations
Screen anti-shake methods and device, mobile terminal and readable memory medium
CN109547635A