Image processing method and device, storage medium and electronic equipment
By determining the target time interval based on the screen refresh rate in the terminal device, ensuring stable frame display of each frame of the image during the inertial sliding process, the problem of image jitter is solved and the sliding fluency and user experience is improved.
Patent Information
- Application Number
- CN202311754939.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-12-19
- Publication Date
- 2025-06-20
AI Technical Summary
In terminal devices, the image jitters slightly during inertial sliding, affecting the user experience.
By determining the current screen refresh rate of the terminal device, the display position of each frame of the image during the inertial sliding process is determined based on the target time interval, and the corresponding image is rendered to ensure the steady frame display of the image during the inertial sliding process.
Reduces the number of times the image shakes during inertial sliding, improves the smoothness of sliding, and improves the user experience.
Smart Images

Figure CN120186466A_ABST
Abstract
Description
Technical Field
[0001] The technical solution of the present disclosure relates to the field of computer technologies, and in particular, to an image processing method, an apparatus, a storage medium, and an electronic device. Background Art
[0002] Generally, when a user quickly swipes a finger on some pages displayed on a terminal device, for example, quickly swiping upward on a WeChat Moments page, inertial scrolling will be triggered.
[0003] In related technical solutions, no frame stabilization operation is performed on the above inertial scrolling process. Therefore, the images displayed on the terminal device will slightly jitter during the inertial scrolling process. Summary of the Invention
[0004] In view of this, embodiments of the present disclosure provide an image processing method, an apparatus, a storage medium, and an electronic device.
[0005] According to a first aspect of the present disclosure, an image processing method is proposed. The method includes:
[0006] When it is determined that the page currently displayed on the terminal device is in an inertial scrolling state, based on a target time interval, each frame of the image displayed on the terminal device during the current inertial scrolling is determined;
[0007] Each frame of the image is sequentially displayed on the screen of the terminal device.
[0008] In combination with any implementation manner provided by the present disclosure, the determining, based on the target time interval, each frame of the image displayed on the terminal device during the current inertial scrolling includes:
[0009] After calculating the total displacement of the current inertial scrolling, based on the following steps, the target frame image to be displayed on the terminal device is determined:
[0010] Based on the target time interval, the target position corresponding to the target frame image in the total displacement of the inertial scrolling is determined;
[0011] The target frame image corresponding to the target position is rendered.
[0012] In combination with any implementation manner provided by the present disclosure, the target time interval is determined based on the following steps:
[0013] Determine the current screen refresh rate of the terminal device;
[0014] Based on the screen refresh rate, the target time interval is determined.
[0015] In combination with any implementation manner provided by the present disclosure,
[0016] The method further includes: determining an alternative image set; the alternative image set is used to store images to be displayed.
[0017] Determining each frame of image displayed by the terminal device during the current inertial sliding based on the target time interval includes:
[0018] Adjusting the frequency of determining each frame of image based on the target time interval so that the number of images to be displayed stored in the alternative image set remains within a preset range.
[0019] Combined with any implementation manner provided by the present disclosure, the method further includes:
[0020] In response to detecting that a touch operation on the screen of the terminal device meets a preset touch condition and the currently displayed page supports inertial sliding, determining that the currently displayed page of the terminal device is in the inertial sliding state.
[0021] Combined with any implementation manner provided by the present disclosure, the preset touch condition includes:
[0022] When the sliding is released, the sliding speed in the target direction is greater than a preset speed threshold.
[0023] According to a second aspect of the present disclosure, there is provided an image processing apparatus, the apparatus includes:
[0024] An image determination module, configured to determine each frame of image displayed by the terminal device during the current inertial sliding based on a target time interval when it is determined that the currently displayed page of the terminal device is in the inertial sliding state;
[0025] An image display module, configured to sequentially display each frame of image on the screen of the terminal device.
[0026] According to a third aspect of the present disclosure, there is provided a computer-readable storage medium, the machine-readable storage medium stores machine-readable instructions, and when the machine-readable instructions are called and executed by a processor, the processor is caused to implement the image processing method of any embodiment of the present disclosure.
[0027] According to a fourth aspect of the present disclosure, there is provided an electronic device, including
[0028] A processor;
[0029] A memory for storing processor-executable instructions;
[0030] Wherein, the processor is configured to execute the image processing method of any embodiment of the present disclosure.
[0031] The technical solutions provided by the embodiments of the present disclosure may include the following beneficial effects:
[0032] In the image processing method, apparatus, storage medium, and electronic device provided by the embodiments of the present disclosure, when it is determined that the page currently displayed on the terminal device is in an inertial sliding state, each frame of image displayed on the terminal device during this inertial sliding process may be determined based on a target time interval, and then each frame of image is sequentially displayed on the screen of the terminal device. In the image processing method provided by the embodiments of the present disclosure, determining each frame of image displayed on the terminal device during this inertial sliding process based on the same target time interval can reduce the number of slight jitters of the images displayed on the terminal device during inertial sliding and improve the smoothness of inertial sliding.
[0033] It should be understood that the above general description and the following detailed description are only exemplary and explanatory, and cannot limit the present disclosure. BRIEF DESCRIPTION OF THE DRAWINGS
[0034] The accompanying drawings herein are incorporated into the specification and form a part of the specification, showing embodiments consistent with the present disclosure and, together with the specification, are used to explain the principles of the present disclosure.
[0035] Figure 1 is a flowchart of an image processing method according to an exemplary embodiment of the present disclosure;
[0036] Figure 2 is a comparison diagram before and after frame stabilization optimization according to an exemplary embodiment of the present disclosure;
[0037] Figure 3 is a flowchart of another image processing method according to an exemplary embodiment of the present disclosure;
[0038] Figure 4 is a flowchart of another image processing method according to an exemplary embodiment of the present disclosure;
[0039] Figure 5 is a schematic structural diagram of an image processing apparatus according to an exemplary embodiment of the present disclosure;
[0040] Figure 6 is a schematic structural diagram of an electronic device according to an exemplary embodiment of the present disclosure. DETAILED DESCRIPTION OF THE EMBODIMENTS
[0041] Exemplary embodiments will be described in detail herein, and examples thereof are shown in the accompanying drawings. When the following description refers to the accompanying drawings, unless otherwise indicated, the same numbers in different drawings represent the same or similar elements. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with the present disclosure. On the contrary, they are merely examples of devices and methods consistent with some aspects of the present disclosure as detailed in the appended claims.
[0042] The terms used in the present disclosure are for the purpose of describing particular embodiments only and are not intended to limit the present disclosure. The singular forms "a", "the", and "said" used in the present disclosure and the appended claims are also intended to include the plural forms unless the context clearly dictates otherwise. It should also be understood that the term "and / or" as used herein refers to and encompasses any and all possible combinations of one or more of the associated listed items.
[0043] It should be understood that although the terms first, second, third, etc. may be used in the present disclosure to describe various information, such information should not be limited to these terms. These terms are only used to distinguish the same type of information from each other. For example, without departing from the scope of the present disclosure, the first information may also be referred to as the second information, and similarly, the second information may also be referred to as the first information. Depending on the context, the word "if" as used herein may be interpreted as "when" or "while" or "in response to determining".
[0044] Generally speaking, when the user slides a finger on certain pages displayed on the terminal device at a speed exceeding a preset speed threshold, for example, when the speed of sliding a finger upward on the friend list page of WeChat exceeds the preset speed threshold, the friend list page of WeChat can start inertial sliding with the speed at which the finger leaves the screen as the initial speed of inertial sliding.
[0045] In related technical solutions, the terminal device can use the following formula (1) to determine the total sliding time of the above inertial sliding:
[0046]
[0047] Use the following formula (2) to determine the total sliding displacement of the above inertial sliding:
[0048]
[0049] Among them, the initial velocity is the velocity when the hand leaves the screen as described above. The stop velocity and the friction coefficient can be preset by relevant staff. For example, the stop velocity can be preset to 50 px / s, and the friction coefficient can be preset to -2.15. Alternatively, the stop velocity can be preset to 60 px / s, and the friction coefficient can be preset to -2.45. The specific values of the stop velocity and the friction coefficient can be set by relevant staff based on the actual situation, and the present disclosure does not limit this.
[0050] After calculating the aforementioned total sliding time and total sliding displacement, at any time point within the total sliding time, it is determined at what speed the page displayed by the terminal device should slide and at which position within the total sliding displacement.
[0051] In related technical solutions, when the terminal device performs screen refreshing, the terminal device can determine the current frame velocity corresponding to the current frame image based on the current frame time using the following formula (3):
[0052] Current frame velocity = previous frame velocity * e (当前帧时间-上一次刷新的时间)*摩擦系数 (3)
[0053] Among them, the previous frame velocity is the sliding velocity corresponding to the previous frame image, and the current frame time is the actual time of this refresh.
[0054] Furthermore, the terminal device can use the following formula (4) to determine the sliding displacement of the current frame image compared to the previous frame image:
[0055]
[0056] Based on the aforementioned method, it is possible to determine the position corresponding to each frame image displayed by the terminal device within the total sliding displacement during the inertial sliding process. Then, the terminal device can render an image corresponding to the calculated position and display it on the screen of the terminal device in sequence.
[0057] As can be seen from the above, in the above-mentioned related technical solutions, when calculating the current frame velocity corresponding to the current frame image, it is calculated based on the current frame time - the time of the previous refresh. In practical applications, affected by factors such as the load of the processor or graphics processor, other running application programs or system processes, and the unfixed running time of the program itself, the calculation result of the current frame time - the time of the previous refresh is not fixed.
[0058] Taking the screen refresh rate of the terminal device as 120Hz as an example, theoretically, it should be refreshed every 8.33 milliseconds. However, in actual applications, the time interval between the current frame time and the previous refresh time, that is, the time interval between two refreshes, may be 8.2 milliseconds, 8.3 milliseconds, 8.4 milliseconds, or even 10 milliseconds. This results in the displacement of each frame of the image calculated based on the aforementioned formula (4) relative to the previous frame of the image may not be gradually decreasing.
[0059] Taking the displacements of three consecutive frames of images calculated as an example, they may be: 4.2px, 4.3px, 4.1px respectively. At this time, a jittery feeling will appear visually.
[0060] In view of this, the embodiments of the present disclosure provide an image processing method. In this example method, the terminal device can determine each frame of the image displayed by the terminal device during the inertial sliding process based on the same target time interval, in order to reduce the number of slight jitters of the images displayed by the terminal device during the inertial sliding process and improve the smoothness of the inertial sliding.
[0061] Next, with reference to the accompanying drawings, the image processing method provided by the embodiments of the present disclosure will be described in detail.
[0062] Figure 1 FIG. is a flowchart of an image processing method shown according to an exemplary embodiment of the present disclosure. This method can be applied to a terminal device. As Figure 1 shown, the method of this exemplary embodiment may include the following steps:
[0063] In step 101, when it is determined that the page currently displayed by the terminal device is in an inertial sliding state, each frame of the image displayed by the terminal device during this inertial sliding process is determined based on the target time interval.
[0064] Among them, the target time interval is determined based on the screen refresh rate of the terminal device.
[0065] When the current screen refresh rate of the terminal device is 120Hz, the target time interval may be 1000 / 120≈8.33 milliseconds. When the current screen refresh rate of the terminal device is 60Hz, the target time interval may be 1000 / 60≈16.67 milliseconds.
[0066] Taking the target time interval as 8.33 milliseconds as an example, in this example, after it is determined that the page currently displayed by the terminal device is in an inertial sliding state, each frame of the image displayed by the terminal device during this inertial sliding process can be determined with 8.33 milliseconds as the target time interval.
[0067] In other words, in this example, 8.33 milliseconds can be used to replace the current frame time - the time of the previous refresh in the foregoing formula (3), calculate the current frame speed of each frame of image, and further obtain the sliding displacement of each frame of image relative to the previous frame of image.
[0068] It is easy to obtain that after using 8.33 milliseconds to replace the current frame time - the time of the previous refresh in the foregoing formula (3), the current frame speed of each frame of image calculated based on formula (3) gradually decreases. Further, the displacement of each frame of image relative to the previous frame of image calculated based on the foregoing formula (4) also gradually decreases, so the number of jitters can be reduced.
[0069] Based on the method of this example, that is, the displacement of each frame of image displayed by the terminal device relative to the previous frame of image during the inertial sliding process can be determined. Further, the position corresponding to each frame of image in the foregoing total sliding displacement can be determined. Then, the terminal device can render each frame of image corresponding to the calculated position.
[0070] For ease of understanding, the following is a detailed description by way of example:
[0071] Take the example that the terminal device displays three frames of images during the foregoing inertial sliding process, including the first frame of image, the second frame of image, and the third frame of image.
[0072] The terminal device can use 8.33 milliseconds to replace the current frame time - the time of the previous refresh in the foregoing formula (3), calculate the current frame speed of the first frame of image, and further calculate the displacement of the first frame of image relative to the image currently displayed by the terminal device based on the foregoing formula (4). Then, the terminal device can determine the position corresponding to the first frame of image in the foregoing total sliding displacement based on this displacement. Finally, the terminal device can render the first frame of image corresponding to the calculated position.
[0073] Similar to the process of calculating the displacement of the first frame of image relative to the image currently displayed by the terminal device, the terminal device can calculate the displacement of the second frame of image relative to the first frame of image. Then, the terminal device can determine the position corresponding to the second frame of image in the foregoing total sliding displacement based on this displacement. Finally, the terminal device can render the second frame of image corresponding to the calculated position.
[0074] The process of rendering the third frame of image is similar to the process of rendering the second frame of image described above, and will not be elaborated here. For details, reference can be made to the description of the process of rendering the second frame of image above.
[0075] In step 102, each frame of image is sequentially displayed on the screen of the terminal device.
[0076] The terminal device can, based on the aforementioned 8.33 milliseconds, determine each frame of the image displayed by the terminal device during the current inertial sliding process, and display each frame of the image on the screen of the terminal device in sequence.
[0077] Still taking the aforementioned terminal device that displays three frames of images during inertial sliding as an example for description:
[0078] The terminal device can, each time the screen is refreshed, display the aforementioned first frame of image, second frame of image, and third frame of image obtained by rendering on the screen of the terminal device in sequence from front to back.
[0079] Such as Figure 2 FIG. is a comparison diagram before and after frame stabilization optimization shown by the present disclosure according to an exemplary embodiment. Among them, the left figure is a schematic diagram before optimization, and the right figure is a schematic diagram after optimization using the image processing method of the embodiment of the present disclosure.
[0080] In both figures, the abscissa is the number of frames, and the ordinate is the displacement of each frame. It can be seen that there is more jitter before optimization, and after optimization using the image processing method of the embodiment of the present disclosure, the displacement of each frame of image gradually decreases, and the number of jitter times significantly decreases.
[0081] In the image processing method provided by the embodiment of the present disclosure, when it is determined that the page currently displayed by the terminal device is in an inertial sliding state, based on the target time interval, each frame of the image displayed by the terminal device during the current inertial sliding process is determined, and each frame of the image is displayed on the screen of the terminal device in sequence. In the image processing method provided by the embodiment of the present disclosure, the same target time interval can be used to determine each frame of the image displayed by the terminal device during the current inertial sliding process, thereby reducing the number of slight jitters of the images displayed by the terminal device during inertial sliding and improving the smoothness of inertial sliding.
[0082] In one embodiment, after calculating the total sliding displacement of the current inertial sliding, as Figure 3 shown, the target frame of the image to be displayed by the terminal device can be determined based on the following steps:
[0083] In step 301, based on the target time interval, the target position of the target frame of the image in the total sliding displacement during the inertial sliding is determined.
[0084] Still taking the target time interval as 8.33 milliseconds, that is, the screen refresh rate of the terminal device is 120Hz, as an example for introduction.
[0085] When it is determined that the page currently displayed on the terminal device is in the inertial sliding state and the total sliding displacement of the current inertial sliding is obtained based on the foregoing formula (2), the target frame image to be displayed by the terminal device can be determined based on the method of this example.
[0086] Taking the target frame image as the first frame image displayed after entering the inertial sliding state as an example, the terminal device can determine the current frame speed of the first frame image based on the following formula (5):
[0087] The current frame speed of the first frame image = the previous frame speed * e 8. 33 * coefficient of friction (5)
[0088] The previous frame speed here is the initial speed mentioned above.
[0089] Furthermore, the sliding displacement of the first frame image can be determined based on the following formula (6):
[0090]
[0091] Furthermore, the target position corresponding to the first frame image mentioned above in the calculated total sliding displacement can be determined during the current inertial sliding.
[0092] In step 302, render the target frame image corresponding to the target position.
[0093] After calculating the target position corresponding to the first frame image mentioned above in the total sliding displacement, the first frame image corresponding to the target position can be rendered.
[0094] The foregoing takes the target frame image to be displayed by the terminal device as the first frame image after entering the inertial sliding state as an example for introduction. Similarly, the second frame image, the third frame image, etc. after entering the inertial sliding state can all be determined based on the method of this example, which will not be elaborated here.
[0095] In one embodiment, since some terminal devices have the adaptive refresh rate function, that is, the terminal device can dynamically adjust the screen refresh rate according to the content requirements. Therefore, in the method of this example, before determining each target frame image to be displayed by the terminal device, the terminal device can first determine the current screen refresh rate of the terminal device, and then determine the target time interval based on the current screen refresh rate.
[0096] For example, when it is determined that the current screen refresh rate of the terminal device is 60 Hz, the target time interval is 1000 / 60 ≈ 16.67 milliseconds. When the current screen refresh rate of the terminal device is 90 Hz, the target time interval can be 1000 / 90 ≈ 11.11 milliseconds.
[0097] In the image processing method provided by the embodiments of the present disclosure, after the terminal device calculates the total displacement of the current inertial slide, it can determine the position of each frame of the image displayed by the terminal device in the total displacement of the inertial slide based on the target time interval. Then, render the image at the corresponding position and display it on the screen of the terminal device. Among them, the target time interval is determined by the current screen refresh rate of the terminal device. In other words, as long as the screen refresh rate of the terminal device remains unchanged, the target time interval remains unchanged. Compared with the related technical solutions, in which the time interval is irregular to determine each frame of the image to be displayed by the terminal device, the number of slight jitters of the image displayed by the terminal device during the inertial slide can be reduced, and the smoothness of the inertial slide can be improved.
[0098] Figure 4 is a flowchart of another image processing method shown according to an exemplary embodiment of the present disclosure. This method can be applied to a terminal device. As Figure 4 shown, the method of this exemplary embodiment may include the following steps:
[0099] In step 401, determine an alternative image set.
[0100] Among them, the alternative image set is used to store the images to be displayed.
[0101] In this example, the terminal device can store the images to be displayed by the terminal device during the current inertial slide, which are determined based on the aforementioned target time interval, in this alternative image set.
[0102] In step 402, adjust the frequency of each frame of the image determined based on the target time interval so that the number of the images to be displayed stored in the alternative image set remains within a preset number range.
[0103] When the screen of the terminal device is refreshed, an image with the earliest save time can be determined from the aforementioned alternative image set and displayed on the screen of the terminal device.
[0104] In this example, the terminal device can adjust the frequency of each frame of the image determined based on the target time interval so that the number of the images to be displayed stored in the aforementioned alternative image set remains within a preset number range, such as within 2 to 3 frames.
[0105] Specifically, in actual applications, when the page currently displayed by the terminal device just enters the inertial slide state, the frequency of each frame of the image determined based on the target time interval should be greater than the frequency of the screen refresh of the terminal device, so as to ensure that there are redundant images to be displayed that can be temporarily stored in the alternative image set.
[0106] When the number of images to be displayed in the alternative image set reaches the aforementioned 2 to 3 frames, the frequency of each frame of image determined based on the target time interval should be equal to the frequency at which the screen of the terminal device is refreshed, so as to ensure that the number of images to be displayed in the alternative images can be maintained within the aforementioned 2 to 3 frames, and avoid the situation that after the user suddenly stops the inertial sliding, the terminal device still needs a long time to consume the images to be displayed in the alternative image set.
[0107] When the terminal device cannot determine the next frame of image based on the target time interval due to network jamming, the terminal device can still continue to consume the images to be displayed stored in the alternative image set, so as to further avoid the situation of screen jamming and improve the user experience.
[0108] Furthermore, after the network returns to normal, the frequency of determining each frame of image based on the target time interval should be greater than the frequency at which the screen of the terminal device is refreshed again, so as to obtain redundant images to be displayed and temporarily store them in the alternative image set for use when the network jams again later.
[0109] In the image processing method provided by the embodiments of the present disclosure, the terminal device can adjust the frequency of determining each frame of image based on the target time interval, so that the number of images to be displayed stored in the alternative image set is kept within a preset range, thereby avoiding the situation that after the user suddenly stops the inertial sliding, the terminal device still needs a long time to consume the images to be displayed in the alternative image set. Moreover, saving redundant images to be displayed can also avoid the screen jamming situation caused by the terminal device being unable to determine the next frame of image based on the target time interval due to network reasons, and can improve the user experience.
[0110] In one embodiment, when the terminal device detects that a touch operation on the screen of the terminal device meets a preset touch condition and the currently displayed page supports inertial sliding, it can determine that the currently displayed page of the terminal device is in the inertial sliding state, and then perform subsequent operations.
[0111] Optionally, the aforementioned preset touch condition can be that when the sliding is released, the sliding speed in the target direction is greater than a preset speed threshold. For example, it can be that when the sliding is released, the sliding speed when sliding up or down is greater than the preset speed threshold.
[0112] In the image processing method provided by the embodiments of the present disclosure, when the terminal device detects that a touch operation on the screen of the terminal device meets a preset touch condition and the currently displayed page supports inertial sliding, it can determine that the currently displayed page of the terminal device is in the inertial sliding state, and then perform subsequent operations, which is highly practical.
[0113] For each of the foregoing method embodiments, for the sake of simple description, they are all expressed as a series of action combinations. However, those skilled in the art should know that the present disclosure is not limited by the described action sequence, because according to the present disclosure, certain steps can be performed in other sequences or simultaneously.
[0114] Secondly, those skilled in the art should also know that the embodiments described in the specification are all optional embodiments, and the actions and modules involved are not necessarily essential to the present disclosure.
[0115] Corresponding to the foregoing method embodiments for realizing application functions, the present disclosure also provides embodiments of an apparatus for realizing application functions and a corresponding terminal.
[0116] Figure 5 is a schematic structural diagram of an image processing apparatus shown according to an exemplary embodiment of the present disclosure. The apparatus is applied to a terminal device, such as Figure 5 As shown, the image processing apparatus may include:
[0117] An image determination module 51, configured to, when determining that the page currently displayed on the terminal device is in an inertial sliding state, determine each frame of image displayed by the terminal device during the current inertial sliding based on a target time interval.
[0118] An image display module 52, configured to sequentially display each frame of image on the screen of the terminal device.
[0119] Optionally, when the image determination module 51 is configured to determine each frame of image displayed by the terminal device during the current inertial sliding based on a target time interval, it includes:
[0120] After calculating the total sliding displacement of the current inertial sliding, determine the target frame image to be displayed by the terminal device based on the following steps:
[0121] Based on the target time interval, determine the target position of the target frame image in the total sliding displacement during the inertial sliding.
[0122] Render the target frame image corresponding to the target position.
[0123] Optionally, the target time interval is determined based on the following steps:
[0124] Determine the current screen refresh rate of the terminal device.
[0125] Based on the screen refresh rate, determine the target time interval.
[0126] Optionally, in Figure 5Based on the modules shown, the image processing device may further include:
[0127] A set determination module, configured to determine an alternative image set; the alternative image set is used to store images to be displayed.
[0128] When the image determination module 51 is configured to determine each frame of image displayed by the terminal device during the current inertial sliding based on a target time interval, it includes:
[0129] Adjust the frequency of determining each frame of image based on the target time interval, so that the number of images to be displayed stored in the alternative image set remains within a preset range.
[0130] Optionally, on the basis of Figure 5 Based on the modules shown, the image processing device may further include:
[0131] A state determination module, configured to determine that the page currently displayed by the terminal device is in the inertial sliding state in response to detecting that a touch operation on the screen of the terminal device satisfies a preset touch condition and the currently displayed page supports inertial sliding.
[0132] Optionally, the preset touch condition includes:
[0133] When the sliding is released, the sliding speed in the target direction is greater than a preset speed threshold.
[0134] For the device embodiments, since they basically correspond to the method embodiments, the relevant parts can be referred to the partial descriptions of the method embodiments. The device embodiments described above are only illustrative. The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed to multiple network units. Some or all of the modules can be selected according to actual needs to achieve the purpose of the solution of the present disclosure. Those of ordinary skill in the art can understand and implement it without creative efforts.
[0135] Figure 6 It is a schematic structural diagram of an electronic device 600 shown according to an exemplary embodiment. For example, the electronic device 600 may be a terminal device, and may specifically be a mobile phone, a tablet computer, a foldable screen device, etc.
[0136] Refer to Figure 6, the electronic device 600 may include one or more of the following components: a processing component 602, a memory 604, a power component 606, a multimedia component 608, an audio component 610, an input / output (I / O) interface 612, a sensor component 614, and a communication component 616.
[0137] The processing component 602 generally controls the overall operation of the electronic device 600, such as operations associated with display, telephone calls, data communications, camera operations, and recording operations. The processing component 602 may include one or more processors 620 to execute instructions to complete all or part of the steps of the above methods. In addition, the processing component 602 may include one or more modules to facilitate the interaction between the processing component 602 and other components. For example, the processing component 602 may include a multimedia module to facilitate the interaction between the multimedia component 608 and the processing component 602.
[0138] The memory 604 is configured to store various types of data to support the operation of the device 600. Examples of such data include instructions for any application or method operating on the electronic device 600, contact data, phone book data, messages, pictures, videos, etc. The memory 604 may be implemented by any type of volatile or non-volatile storage device or a combination thereof, such as static random access memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic memory, flash memory, a magnetic disk, or an optical disk.
[0139] The power component 606 provides power to the various components of the electronic device 600. The power component 606 may include a power management system, one or more power supplies, and other components associated with generating, managing, and distributing power for the electronic device 600.
[0140] The multimedia component 608 includes a screen that provides an output interface between the electronic device 600 and the user. In some embodiments, the screen may include a liquid crystal display (LCD) and a touch panel (TP). If the screen includes a touch panel, the screen can be implemented as a touch screen to receive input signals from the user. The touch panel includes one or more touch sensors to sense touches, swipes, and gestures on the touch panel. The touch sensors can sense not only the boundaries of touch or swipe actions but also detect the duration and pressure associated with the touch or swipe operations. In some embodiments, the multimedia component 608 includes a front camera and / or a rear camera. When the electronic device 600 is in an operating mode, such as a shooting mode or a video mode, the front camera and / or the rear camera can receive external multimedia data. Each of the front camera and the rear camera can be a fixed optical lens system or have a focal length and optical zoom capabilities.
[0141] The audio component 610 is configured to output and / or input audio signals. For example, the audio component 610 includes a microphone (MIC) that is configured to receive external audio signals when the electronic device 600 is in an operating mode, such as a call mode, a recording mode, and a voice recognition mode. The received audio signals can be further stored in the memory 604 or transmitted via the communication component 616. In some embodiments, the audio component 610 further includes a speaker for outputting audio signals.
[0142] The I / O interface 612 provides an interface between the processing component 602 and a peripheral interface module, and the peripheral interface module can be a keyboard, a click wheel, buttons, etc. These buttons can include but are not limited to: a home button, a volume button, a power button, and a lock button.
[0143] The sensor component 614 includes one or more sensors for providing a status assessment of various aspects of the electronic device 600. For example, the sensor component 614 can detect the on / off state of the electronic device 600, the relative positioning of components, such as the display and the keypad of the electronic device 600. The sensor component 614 can also detect a change in the position of the electronic device 600 or a component of the electronic device 600, the presence or absence of user contact with the electronic device 600, the orientation or acceleration / deceleration of the electronic device 600, and the temperature change of the electronic device 600. The sensor component 614 can include a proximity sensor configured to detect the presence of nearby objects without any physical contact. The sensor component 614 can also include a light sensor, such as a CMOS or a CCD image sensor, for use in imaging applications. In some embodiments, the sensor component 614 can further include an acceleration sensor, a gyroscope sensor, a magnetic sensor, a pressure sensor, or a temperature sensor.
[0144] The communication component 616 is configured to facilitate communication between the electronic device 600 and other devices in a wired or wireless manner. The electronic device 600 can access a communication standard-based wireless network, such as WiFi, 4G or 5G, 4G LTE, 5G NR, or a combination thereof. In an exemplary embodiment, the communication component 616 receives a broadcast signal or broadcast-related information from an external broadcast management system via a broadcast channel. In an exemplary embodiment, the communication component 616 further includes a Near Field Communication (NFC) module to facilitate short-range communication. For example, the NFC module can be implemented based on Radio Frequency Identification (RFID) technology, Infrared Data Association (IrDA) technology, Ultra-Wideband (UWB) technology, Bluetooth (BT) technology, and other technologies.
[0145] In an exemplary embodiment, the electronic device 600 can be implemented by one or more Application Specific Integrated Circuits (ASICs), Digital Signal Processors (DSPs), Digital Signal Processing Devices (DSPDs), Programmable Logic Devices (PLDs), Field Programmable Gate Arrays (FPGAs), controllers, microcontrollers, microprocessors, or other electronic components for performing the above method.
[0146] In an exemplary embodiment, a non-transitory computer-readable storage medium is also provided, such as a memory 604 including instructions, which when executed by a processor 620 of the electronic device 600, enables the electronic device 600 to perform the following image processing method:
[0147] When it is determined that the page currently displayed on the terminal device is in an inertial sliding state, each frame of the image displayed by the terminal device during this inertial sliding process is determined based on a target time interval.
[0148] Each frame of the image is sequentially displayed on the screen of the terminal device.
[0149] The non-transitory computer-readable storage medium can be a ROM, Random Access Memory (RAM), CD-ROM, magnetic tape, floppy disk, and optical data storage device, etc.
[0150] Those skilled in the art will readily conceive of other embodiments of the present disclosure after considering the specification and practicing the invention disclosed herein. The present disclosure is intended to cover any variations, uses, or adaptations of the present disclosure that follow the general principles of the present disclosure and include known common knowledge or conventional technical means in the technical field not disclosed by the present disclosure. The specification and embodiments are only to be considered as exemplary, and the true scope and spirit of the present disclosure are pointed out by the following claims.
[0151] It should be understood that the present disclosure is not limited to the exact structures described above and shown in the drawings, and various modifications and changes can be made without departing from its scope. The scope of the present disclosure is limited only by the appended claims.
Claims
1. An image processing method, characterized in that, The method includes: When it is determined that the page currently displayed on the terminal device is in an inertial sliding state, each frame image displayed by the terminal device during the current inertial sliding is determined based on a target time interval; The each frame image is sequentially displayed on the screen of the terminal device.
2. The method according to claim 1, characterized in that, The determining, based on a target time interval, each frame image displayed by the terminal device during the current inertial sliding includes: After calculating the total sliding displacement of the current inertial sliding, the target frame image to be displayed by the terminal device is determined based on the following steps: Based on the target time interval, determine the target position corresponding to the target frame image in the total sliding displacement during the inertial sliding; Render the target frame image corresponding to the target position.
3. The method according to any one of claims 1 or 2, characterized in that, The target time interval is determined based on the following steps: Determine the current screen refresh rate of the terminal device; Based on the screen refresh rate, determine the target time interval.
4. The method according to claim 1, characterized in that, The method further includes: determining an alternative image set; the alternative image set is used to store images to be displayed; The determining, based on a target time interval, each frame image displayed by the terminal device during the current inertial sliding includes: Adjust the frequency of determining each frame image based on the target time interval so that the number of images to be displayed stored in the alternative image set remains within a preset range.
5. The method according to claim 1, characterized in that, The method further includes: In response to detecting that a touch operation on the screen of the terminal device meets a preset touch condition and the currently displayed page supports inertial sliding, determine that the page currently displayed on the terminal device is in the inertial sliding state.
6. The method according to claim 5, characterized in that, The preset touch condition includes: When the sliding is released, the sliding speed in the target direction is greater than a preset speed threshold.
7. An image processing apparatus, characterized in that, The device includes: An image determination module, configured to, when it is determined that the page currently displayed on the terminal device is in an inertial sliding state, determine each frame image displayed by the terminal device during the current inertial sliding based on a target time interval; An image display module, configured to sequentially display the each frame image on the screen of the terminal device.
8. The apparatus according to claim 7, characterized in that, When the image determination module is configured to determine each frame image displayed by the terminal device during the current inertial sliding based on a target time interval, it includes: After calculating the total sliding displacement of the current inertial sliding, the target frame image to be displayed by the terminal device is determined based on the following steps: Based on the target time interval, determine the target position corresponding to the target frame image in the total sliding displacement during the inertial sliding; Render the target frame image corresponding to the target position.
9. A computer-readable storage medium, on which a computer program is stored, and when the program is executed by a processor, the steps of the method according to any one of claims 1 - 6 are implemented.
10. An electronic device, comprising: A processor; A memory for storing instructions executable by the processor; Wherein, the processor is configured to execute the steps of the method according to any one of claims 1-6.