CN114697597A - Frame rate switching control method and device, terminal equipment and readable storage medium - Google Patents

Frame rate switching control method and device, terminal equipment and readable storage medium Download PDF

Info

Publication number
CN114697597A
CN114697597A CN202011604787.4A CN202011604787A CN114697597A CN 114697597 A CN114697597 A CN 114697597A CN 202011604787 A CN202011604787 A CN 202011604787A CN 114697597 A CN114697597 A CN 114697597A
Authority
CN
China
Prior art keywords
sampling
frame rate
pixel
rate switching
preset
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202011604787.4A
Other languages
Chinese (zh)
Inventor
黄南燕
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Oneplus Technology Shenzhen Co Ltd
Original Assignee
Oneplus Technology Shenzhen Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Oneplus Technology Shenzhen Co Ltd filed Critical Oneplus Technology Shenzhen Co Ltd
Priority to CN202011604787.4A priority Critical patent/CN114697597A/en
Priority to PCT/CN2021/128955 priority patent/WO2022142732A1/en
Publication of CN114697597A publication Critical patent/CN114697597A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N5/00Details of television systems
    • H04N5/14Picture signal circuitry for video frequency region
    • H04N5/20Circuitry for controlling amplitude response
    • H04N5/202Gamma control
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N7/00Television systems
    • H04N7/01Conversion of standards, e.g. involving analogue television standards or digital television standards processed at pixel level
    • H04N7/0127Conversion of standards, e.g. involving analogue television standards or digital television standards processed at pixel level by changing the field or frame frequency of the incoming video signal, e.g. frame rate converter
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N7/00Television systems
    • H04N7/01Conversion of standards, e.g. involving analogue television standards or digital television standards processed at pixel level

Landscapes

  • Engineering & Computer Science (AREA)
  • Multimedia (AREA)
  • Signal Processing (AREA)
  • Control Of Indicators Other Than Cathode Ray Tubes (AREA)
  • Controls And Circuits For Display Device (AREA)

Abstract

The embodiment of the application provides a frame rate switching control method, a device, a terminal device and a readable storage medium, wherein the frame rate switching control method comprises the following steps: responding to a frame rate switching instruction, and acquiring an image currently displayed by the terminal equipment; performing pixel sampling on the image according to a preset sampling rule and calculating the gray scale of a sampling pixel; and when the gray scale judgment of the sampling pixel of the image meets the preset frame rate switching condition, controlling to switch the frame rate. According to the technical scheme, the gray scale of the currently displayed image is calculated through screenshot and pixel sampling, and the calculated gray scale is used as a judgment condition for frame rate switching, so that the problem of flicker during frame rate switching is effectively solved, the precision and time consumption during image gray scale calculation can be well balanced, and the like.

Description

Frame rate switching control method and device, terminal equipment and readable storage medium
Technical Field
The present application relates to the field of image processing technologies, and in particular, to a frame rate switching control method, an apparatus, a terminal device, and a readable storage medium.
Background
With the increasing switchable range of the display frame rate of the terminals such as the mobile phone and the tablet, for the terminal using the display screen such as the OLED (organic light-Emitting Diode), the problem of screen flicker is easily caused when the different screen frame rates are switched, so that the user experience is reduced.
Disclosure of Invention
In view of the above, an object of the present application is to provide a frame rate switching control method, apparatus, terminal device and readable storage medium to overcome the disadvantages in the prior art.
An embodiment of the present application provides a frame rate switching control method, including:
responding to a frame rate switching instruction, and acquiring an image currently displayed by the terminal equipment;
performing pixel sampling on the image according to a preset sampling rule and calculating the gray scale of a sampling pixel;
and when the gray scale of the sampling pixel of the image meets a preset frame rate switching condition, controlling to switch the frame rate.
In an embodiment, the acquiring an image currently displayed by a terminal device includes:
and calling a system screen capture service interface to perform screen capture on the content currently displayed by the terminal equipment.
In one embodiment, the preset sampling rule includes a preset sampling step size and a sampling matrix size, where the sampling step size includes a first direction sampling step size and a second direction sampling step size, and the pixel sampling and calculating a gray scale of a sampling pixel according to the preset sampling rule includes:
selecting a pixel sampling starting point in the image according to a preset selection rule;
sampling at intervals according to a preset sampling route and the size of the sampling matrix from the starting point, wherein the sampling matrix samples in a first direction of the image according to the sampling step length of the first direction, and samples in a second direction of the image according to the sampling step length of the second direction;
and calculating the gray scale of each sampling pixel in each sampling matrix according to a pixel gray scale conversion algorithm.
In an embodiment, the determining whether a preset frame rate switching condition is satisfied according to a gray scale of a sampling pixel of the image includes:
counting the number of pixels of which the gray scales are lower than a preset gray scale threshold value in all the sampling matrixes;
judging whether the ratio of the number of the pixels to the total number of the sampling pixels is higher than a preset ratio threshold value or not;
if the frame rate is higher than the preset frame rate, judging that the preset frame rate switching condition is not met, otherwise, judging that the preset frame rate switching condition is met.
In one embodiment, the sampling matrix samples in a serpentine path, row-by-row or column-by-column path.
In an embodiment, each of the sampling step lengths is greater than the width and the height of the sampling matrix, and the first direction sampling step length and the second direction sampling step length are respectively selected to be 3% to 10% of the total number of the first direction pixels and the total number of the second direction pixels of the terminal device.
In one embodiment, the width and the height of the sampling matrix respectively have a value ranging from 3 to 10 pixels.
In an embodiment, when selecting a starting point of pixel sampling in the image, the preset selection rule includes:
and determining the coordinate position of the starting point in the height direction of the status bar according to the pixel height of the status bar in the image, wherein the value of the coordinate position is greater than or equal to the pixel height of the status bar.
In one embodiment, the pixel grayscale conversion algorithm is a monochrome component algorithm, an averaging algorithm, a shifting algorithm, a shaping value-taking algorithm, a floating point value-taking algorithm, or a Gamma calibration algorithm.
Preferably, the pixel gray scale conversion algorithm adopts a Gamma calibration algorithm. Wherein, the Gamma calibration algorithm is as follows:
Figure BDA0002871645650000031
wherein R, G and B are the red, green, and blue components of a single sampled pixel in that order; g is a preset calibration value; gray is the Gray level of the sampled pixel.
An embodiment of the present application further provides a frame rate switching control apparatus, including:
the acquisition module is used for responding to the frame rate switching instruction and acquiring the image currently displayed by the terminal equipment;
the gray scale calculation module is used for carrying out pixel sampling on the image according to a preset sampling rule and calculating the gray scale of the sampling pixel;
the judging module is used for judging whether a preset frame rate switching condition is met according to the gray scale of the sampling pixel of the image;
and the control module is used for controlling the frame rate switching when the gray scale of the sampling pixel of the image meets the preset frame rate switching condition.
An embodiment of the present application further provides a terminal device, where the terminal device includes a display screen, a processor, and a memory, where the display screen is used to display an image, the memory stores a computer program, and the processor is used to execute the computer program to implement the frame rate switching control method.
Embodiments of the present application also provide a readable storage medium storing a computer program, which when executed implements the frame rate switching control method described above.
The embodiment of the application has the following beneficial effects:
according to the frame rate switching control method, the currently displayed content is obtained through the system screenshot, the gray scale of the current image is calculated by using the preset pixel sampling rule, then the calculated gray scale is used as the frame rate switching judgment condition, the flicker problem occurring in frame rate switching can be effectively solved, meanwhile, the good balance between the precision and the time consumption can be achieved when the image gray scale is calculated, and therefore user experience is improved.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings that are required to be used in the embodiments will be briefly described below, it should be understood that the following drawings only illustrate some embodiments of the present application and therefore should not be considered as limiting the scope, and for those skilled in the art, other related drawings can be obtained from the drawings without inventive effort.
Fig. 1 shows a schematic structural diagram of a terminal provided in an embodiment of the present application;
fig. 2 is a schematic diagram illustrating a first flow of a frame rate switching control method according to an embodiment of the present application;
FIG. 3 is a schematic diagram illustrating a pixel sampling of a frame rate switching control method according to an embodiment of the present application;
fig. 4 is a schematic diagram illustrating a second flow of the frame rate switching control method according to the embodiment of the present application;
fig. 5 is a schematic diagram illustrating an application of selecting a starting point in a frame rate switching control method according to an embodiment of the present application;
fig. 6a, fig. 6b and fig. 6c are schematic diagrams illustrating several sampling routes of a frame rate switching control method according to an embodiment of the present application;
fig. 7 shows a third flow chart of the frame rate switching control method according to the embodiment of the present application;
fig. 8 is a schematic structural diagram illustrating a frame rate switching control apparatus according to an embodiment of the present application.
Detailed Description
The technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application, and it is obvious that the described embodiments are only a part of the embodiments of the present application, and not all of the embodiments.
The components of the embodiments of the present application, generally described and illustrated in the figures herein, can be arranged and designed in a wide variety of different configurations. Thus, the following detailed description of the embodiments of the present application, presented in the accompanying drawings, is not intended to limit the scope of the claimed application, but is merely representative of selected embodiments of the application. All other embodiments, which can be derived by a person skilled in the art from the embodiments of the present application without making any creative effort, shall fall within the protection scope of the present application.
The embodiments described below can be applied to a terminal device such as a mobile phone, a tablet, etc. as shown in fig. 1. Fig. 1 shows a block diagram of a mobile phone terminal, and the mobile phone 100 includes: an RF (Radio Frequency) circuit 110, a memory 120, an input unit 130, a display unit 140, a photographing unit 150, an audio circuit 160, a WiFi (wireless fidelity) module 170, a processor 180, and a power supply 190. Among other things, the RF circuitry 110 may be used to receive and transmit wireless signals, etc.; the memory 120 can be used for storing applications and user-related file information required for the operation of the mobile phone 100. The input unit 130 may include keys, a touch panel, and may also include other input devices, etc. for receiving information input from a user, etc.; the display unit 140 mainly includes a display screen, and can be used for displaying information such as images and characters; the shooting unit 150 mainly includes front and rear cameras and the like, and is mainly used for shooting pictures, videos and the like; the audio circuit 160 is connected to sound output devices such as a receiver and a speaker and sound input devices such as a microphone, and can be used for recording or playing voice and the like; the WiFi module 170 may be used to transmit and receive WiFi signals to achieve information transmission, etc. The processor 180 is used as a control center of the mobile phone 100, and is mainly used for enabling other units or modules to execute corresponding functions and the like; and the power supply 190 mainly includes a battery device for supplying a required operating voltage and the like to each module or unit in the cellular phone 100.
Those skilled in the art will appreciate that the configuration of the handset 100 shown in fig. 1 is not intended to be limiting and may include more or fewer components than those shown, or some components may be combined, or a different arrangement of components. The technical solution of the present application is described below by taking a terminal device as an example, wherein the terminal device is not limited to be applied to a mobile phone, but may be applied to a tablet, a notebook, and the like. The present application will now be described with reference to specific examples, but the present application is not limited to these specific examples.
The terminal device includes a display screen, for example, an OLED display screen may be adopted, where the OLED may be divided into an Active AMOLED (Active matrix OLED) and a passive pmoled (passive matrix OLED) according to a driving manner. As the screen display frame rate supported by the terminal device is higher, the user may be allowed to manually switch the display frame rate in order to provide the user with a better viewing experience. However, for the display screens such as the OLED driven by the TFT driving circuit, when the frame rate is switched, the problem of screen flicker is easily caused, which greatly reduces the user experience.
In contrast, the inventor has found that if the gray scale (also called gray scale) of the content displayed on the screen is lower than a certain threshold, a certain degree of screen color difference appears due to the difference of Gamma values at two different frame rates, and screen flicker occurs. The Gamma parameter refers to a Gamma (Gamma) parameter of the display, and is a curve obtained by summarizing brightness data under different gray scales according to the reaction color, and is also called a Gamma curve. Therefore, the present application provides a frame rate switching control method, which determines whether to switch a frame rate based on a gray scale of a display content, thereby effectively avoiding a screen flicker, and moreover, when calculating the gray scale of the display content, the gray scale calculation duration and accuracy of a display image are also considered, so that efficient, fast and accurate calculation can be achieved, the processing efficiency is improved, and the user waiting time is reduced. The frame rate switching control method of the present application is described below with reference to specific embodiments.
Example 1
Referring to fig. 2, an embodiment of the present application provides a frame rate switching control method, which can be applied to various terminal devices with display screens, such as mobile phones, tablets, computers, and the like. The frame rate switching control method will be described in detail below.
Step S10, in response to the frame rate switching instruction, acquires an image currently displayed by the terminal device.
For example, when the terminal device receives a frame rate switching instruction input by a user, the terminal device acquires an image currently displayed on a screen, and further determines whether to respond to frame rate switching currently according to image gray levels of display contents. Alternatively, the frame rate switching instruction may be triggered by the terminal device itself, for example, when some preset pictures to be displayed are detected, and the preset pictures are usually preset with the specified frame rate. If the content of the specific picture needs to be switched and displayed, the terminal device can automatically trigger a frame rate switching instruction and the like so as to realize the best viewing effect and the like.
In one embodiment, the terminal device performs screenshot on the currently displayed content by calling a system screenshot service interface, so as to obtain a screenshot image. For example, taking a terminal of an android system as an example, a screen capture may be performed by calling a related screen capture service API interface of the surface flanger, such as capturescapeencommon, so as to directly acquire a display image of a current screen. Typically, the display image is an RGB image composed of three primary colors, and the image captured through the system native interface can directly obtain R, G and B components of each pixel in the RGB image.
After the image is acquired, the pixel gray scale of the image is calculated so as to judge whether the frame rate is switched.
Step S20, sampling pixels of the image according to a preset sampling rule and calculating gray scales of the sampled pixels.
Generally, there are many methods for calculating the gray level of an image, for example, a commonly used gray level average value calculation method, i.e., calculating the gray level of each pixel of an image and then averaging the gray levels of the entire image. However, the inventors have found that this calculation method has a problem of inaccurate calculation, for example, when an image is divided into two color blocks, one of the color blocks has low brightness but large gray scale value, and if the average calculation is performed, the overall gray scale value is raised, and if the average calculation is performed, the flicker problem is likely to occur. On the other hand, as the display screen is larger and larger, and the resolution of the device is higher and higher, such as a mobile phone, the current mainstream resolution is 1080P or more, the number of pixels is more and more, and accordingly, the pixel gray scale calculation is more and more time-consuming. Therefore, in order to be compatible with the calculation precision, the calculation speed and the like of the image gray scale, the embodiment of the application provides that the image is subjected to pixel sampling, and the gray scale of the image is calculated by using the sampled pixels, so that the more accurate image gray scale can be calculated efficiently and quickly.
In one embodiment, the preset sampling rule may include interval sampling based on a pixel matrix form, for example, a matrix size is preset, and interval moving sampling is performed in the image according to the set matrix size, as shown in fig. 3, so as to obtain a plurality of pixel matrices of each area in the image.
Wherein, the sampling step length when the interval moves can be preset according to the actual screen width and the like. In general, in the case of spaced sampling, the sampling step size is usually larger than the width and height of the pixel matrix, so that when the sampling is shifted, the occurrence of repeated sampling of pixels and the like can be avoided. It is understood that the width and height of the matrix can be set according to actual requirements, for example, if the length and width of the matrix are the same, sampling is performed in a square matrix form, and the like. The sampling may be performed based on other forms of a predetermined pattern, and the sampling is not limited herein.
And then, performing gray scale calculation on the pixel matrix obtained by sampling based on a pixel gray scale conversion formula. Exemplarily, the pixel gray-scale conversion formula may include, but is not limited to, a monochrome component algorithm, an averaging algorithm, a shifting algorithm, a reshaping value algorithm, a floating point value algorithm, or a Gamma calibration algorithm. The monochromatic component algorithm can select the blue component in the RGB image for calculation.
Step S30, determining whether the gray scale of the sampled pixel of the image satisfies a predetermined frame rate switching condition.
For example, in one embodiment, the preset frame rate switching condition may include that the ratio of the number of pixels exceeding the preset gray scale threshold in all the sampling pixels is lower than the preset ratio threshold, and the like. The preset gray scale threshold and the preset duty threshold can be selected according to actual test results, for example, the preset duty threshold can be set to 50% -55% of the total number of the whole sampling pixels.
For the sampled pixel matrixes, the embodiment performs frame rate switching by counting the number of pixels meeting a specific gray scale condition in the pixel matrixes, and if the counted gray scale result meets a preset frame rate switching condition, the frame rate switching is performed, otherwise, the switching is not allowed. It can be understood that, considering that the average value calculation method may raise the overall gray scale calculation result, the statistical result is used to estimate the gray scale of the overall pixel in the image, so as to ensure that the result obtained by calculation better conforms to the display result observed by human eyes, thereby improving the gray scale calculation accuracy and the like.
In step S40, if the gray scale of the sampling pixel of the image satisfies the predetermined frame rate switching condition, the frame rate is switched.
And if so, executing frame rate switching operation. Exemplarily, the terminal device may obtain the target frame rate according to the frame rate switching instruction, and control to switch the current frame rate to the target frame rate when determining that the preset frame rate switching condition is satisfied.
Further optionally, if the gray scale of the sampling pixel of the image does not satisfy the preset frame rate switching condition, the frame rate switching is not performed. Exemplarily, when it is determined that the preset frame rate switching condition is not satisfied, the current frame rate is maintained. Optionally, the terminal device performs delayed switching, for example, may acquire a subsequent image frame in real time, and immediately perform frame rate switching when it is determined that a displayed image frame meets the preset frame rate switching condition.
It can be understood that, in the frame rate switching control method of the embodiment of the present application, before performing frame rate switching, pixel sampling is performed on the currently displayed image gray scale, and then the obtained sampled pixels are used as a gray scale calculation basis to calculate the gray scale information of the image, and whether the switching condition is satisfied is determined by counting the pixel number ratio of the pixel gray scale satisfying the preset gray scale condition, so that not only the efficiency of image gray scale calculation can be improved, but also higher gray scale calculation accuracy and the like can be ensured.
It should be understood that the image gray level calculation method of the present embodiment may be used not only in the frame rate switching scenario, but also in other scenarios requiring image gray level calculation, for example, performing other display control or parameter adjustment on the current image. In addition, the image gray scale calculation method is not only suitable for images displayed by OLED display screens and the like, but also suitable for images displayed by other display screens without Gamma value difference, such as LCD display screens or extended sub-display screens thereof, for example, LTPS-LCD (low temperature polysilicon liquid crystal display), SLCD (splicing dedicated liquid crystal display) and the like.
Fig. 4 shows another flow chart of the frame rate switching control method according to the embodiment of the present application. In step S20, the frame rate switching control method includes:
step S210, selecting a starting point of pixel sampling in the image according to a preset selection rule.
Generally, the terminal device will select a starting point in the image before starting sampling. For example, in one embodiment, the preset selection rule may include: and determining the coordinate position of the starting point in the height direction of the status bar according to the pixel height of the status bar in the image, wherein the coordinate position is greater than or equal to the pixel height of the status bar.
Taking a mobile phone as an example, as shown in fig. 5, the height of a status bar displayed on a display screen of the mobile phone is usually fixed, after a screenshot image is obtained, the upper left corner of the image is taken as the origin of coordinates, and if the status bar occupies 300 pixel units in the height direction, the pixel point position of the origin in the height direction may be selected to be greater than or equal to 300. And the pixel point position in the width direction of the start point may be randomly set, such as the 100 th pixel shown in fig. 5, etc., so that the start point of (100, 300) may be obtained. Alternatively, if the starting point is taken as a vertex of the sampling matrix, for example, the pixel matrix sampling is taken as the top right vertex, the pixel position of the starting point in the width direction of the screen may be set to be larger than the sampling step size in the width direction, so that it is ensured that the pixels between the first pixel and the sampling step size can be sampled.
And step S220, starting from the starting point, carrying out interval sampling according to a preset sampling route by the set size of a sampling matrix, wherein the sampling matrix carries out sampling according to a sampling step length in a first direction of the image, and carries out sampling according to a sampling step length in a second direction of the image.
Typically, the first direction and the second direction are perpendicular directions, for example, the first direction may be a transverse direction of the display screen, and the second direction may be a longitudinal direction of the display screen, etc. The sampling matrix can start from a starting point, and perform moving sampling in the image according to a preset sampling route according to a preset sampling step length.
The preset sampling route may include, but is not limited to, a serpentine route, a line-by-line route or a column-by-column route, etc., i.e., the specific sampling route is not limited. The first direction sampling step length and the second direction sampling step length may be selected according to actual requirements, for example, may be selected according to a total number of pixels of a display screen of the terminal device in the first direction and the second direction. In some embodiments, the first direction sampling step size and the second direction sampling step size may be selected to be 3% to 10% of the total number of the first direction pixels and the total number of the second direction pixels of the display screen, and the like.
For example, if a mobile phone with a 2K pixel display screen is taken as an example, if the size of the sampling matrix is set to 5 × 5, i.e. the width and the height are both 5 pixel units, if the first direction is the horizontal direction and the first direction step is 100 pixels, and the second direction is the vertical direction and the second direction step is 150 pixels, then the sampling matrix may perform sampling according to a snake-shaped route as shown in fig. 6a, or according to a row-by-row route as shown in fig. 6b, or according to a column-by-column route as shown in fig. 6c, etc.
Step S230, calculating the gray scale of each sampling pixel in each sampling matrix according to the pixel gray scale conversion algorithm.
When a plurality of pixel matrices are obtained, calculation can be performed according to a pixel gray scale conversion algorithm. For the pixel gray scale conversion algorithms listed above, in this embodiment, a Gamma calibration algorithm is preferably selected, where R, G and B are the red, green and blue components of a single sampled pixel in turn; g is a preset calibration value; gray is the Gray level of the sampled pixel. Typically, the preset calibration value g may be chosen to be 2.2. The Gamma calibration algorithm is then calculated as follows:
Figure BDA0002871645650000121
wherein each algorithm has its own characteristics. The Gamma calibration algorithm is selected because in the actual mass test process, the monochromatic component algorithm calculated by taking the blue component is found, the speed is fastest, the average value algorithm is second, the shift algorithm and the shaping value algorithm are closer, the floating point value algorithm is slower, and the Gamma calibration algorithm is slowest. However, from the grayscale accuracy point of view, the Gamma calibration algorithm is fastest, the floating point value algorithm is second, the rest are similar, and the monochrome component algorithm is worst. In the embodiment, a Gamma calibration algorithm with optimal precision is selected, and the pixel sampling mode and the statistical calculation rule are combined to perform image gray scale calculation, so that the gray scale calculation speed and the calculation precision are well compatible, and the overall performance of the terminal equipment is ensured.
For example, in the actual testing process of a certain terminal device, after the Gamma calibration algorithm and the pixel matrix sampling manner are adopted, the average calculation time can be controlled to be about 5ms, compared with a scheme of calculating gray scales of all pixels and then calculating a gray scale average value, the calculation speed of the embodiment is improved, and the calculated gray scale deviation can be controlled within 5%, which is enough to meet the performance requirement and the like.
After the sampling pixels are obtained, whether to perform frame rate switching is determined based on the sampling pixels. If the gray levels of the sampling pixels of the image satisfy the preset frame rate switching condition, performing frame rate switching, i.e. performing step S40, otherwise performing step S50, i.e. not performing frame rate switching.
In one embodiment, as shown in fig. 7, the step S30 may include:
step S310, counting the number of pixels of which the gray levels are lower than a preset gray level threshold value in all the sampling matrixes.
Step S320, determining whether the ratio of the counted number of the pixels to the total number of the sampled pixels is higher than a preset ratio threshold. If yes, go to step S330, otherwise go to step S340.
Step S330, determining that the preset frame rate switching condition is not satisfied.
In step S340, it is determined that the preset frame rate switching condition is satisfied.
Exemplarily, if it is determined that the ratio of the number of pixels having a gray level lower than the preset gray level threshold is set at the preset ratio threshold, that is, the gray level of the image is higher, it is indicated that the display content is gray, and therefore, the frame rate switching is not allowed. Otherwise, if the ratio is lower than or equal to the preset ratio threshold, the gray scale of the image is lower, and the frame rate switching is allowed.
The preset gray level threshold value can be obtained according to actual test or empirical value. It can be understood that the problem of inaccuracy existing when the average value is adopted to calculate the gray scale can be effectively solved by counting the gray scale proportion of the specific sampling pixel, so that on the premise of ensuring that the calculation time meets the requirement, higher gray scale calculation precision is also ensured, and the user experience is further improved.
The frame rate switching control method of this embodiment samples the currently displayed image gray scale in the form of a preset pixel matrix, and then determines whether the switching condition is satisfied by counting the ratio of the gray scale of the sampling pixels in the pixel matrix to the gray scale greater than the preset gray scale threshold, so that not only the efficiency of image gray scale calculation can be improved, but also higher gray scale calculation accuracy and the like can be ensured.
Example 2
Referring to fig. 8, based on the method of embodiment 1, the present embodiment provides a frame rate switching control device 200, where the frame rate switching control device 200 exemplarily includes:
the obtaining module 210 is configured to respond to the frame rate switching instruction, and obtain an image currently displayed by the terminal device.
The gray scale calculation module 220 is configured to perform pixel sampling on the image according to a preset sampling rule and calculate a gray scale of a sampled pixel.
The determining module 230 is configured to determine whether a preset frame rate switching condition is satisfied according to a gray scale of a sampling pixel of the image.
The control module 240 is configured to control frame rate switching when the gray scale of the sampling pixel of the image meets a preset frame rate switching condition.
The preset sampling rule comprises a preset sampling step length and a sampling matrix size, wherein the sampling step length comprises a first direction sampling step length and a second direction sampling step length. In one embodiment, the gray scale calculation module 220 includes a selection sub-module, a matrix sampling sub-module, and a gray scale conversion sub-module.
The selection submodule is used for selecting a starting point of pixel sampling in an image according to a preset selection rule; the matrix sampling submodule is used for carrying out interval sampling according to the size of the sampling matrix from the starting point and a preset sampling route, wherein the sampling matrix carries out sampling according to the sampling step length in the first direction of the image and the sampling step length in the second direction of the image; and the gray scale conversion sub-module is used for calculating the gray scale of each sampling pixel in each sampling matrix according to a pixel gray scale conversion algorithm.
In one embodiment, the determining module 230 includes a pixel counting sub-module, a ratio comparing sub-module and a determination output sub-module, wherein the pixel counting sub-module is configured to count the number of pixels in which the gray levels of the pixels in all the sampling matrices are lower than a preset gray level threshold; the ratio comparison submodule is used for judging whether the ratio of the number of the pixels to the total number of the sampling pixels is higher than a preset ratio threshold value; and the judgment output submodule is used for judging that the preset frame rate switching condition is not met if the judgment result is higher than the preset frame rate switching condition, and otherwise, judging that the preset frame rate switching condition is met.
It is to be understood that the apparatus of the present embodiment corresponds to the method of embodiment 1 described above, and the alternatives of embodiment 1 described above are equally applicable to the present embodiment, and therefore, the description thereof will not be repeated.
The application also provides a terminal device, for example, the terminal device may include a mobile phone, a tablet, a notebook computer, and the like. The terminal device comprises a display screen, a memory and a processor, wherein the display screen is used for displaying images, the memory stores a computer program, and the processor enables the mobile terminal to execute the functions of each module in the frame rate switching control method or the frame rate switching control device by operating the computer program.
The memory may include a storage program area and a storage data area, wherein the storage program area may store an operating system, an application program required for at least one function; the storage data area may store data created according to the use of the mobile terminal, such as image data, a gray scale conversion algorithm, a preset sampling rule, and the like. Further, the memory may include high speed random access memory, and may also include non-volatile memory, such as at least one magnetic disk storage device, flash memory device, or other volatile solid state storage device.
The application also provides a computer storage medium for storing the computer program used in the terminal device.
In the embodiments provided in the present application, it should be understood that the disclosed apparatus and method can be implemented in other ways. The apparatus embodiments described above are merely illustrative and, for example, the flowchart and block diagrams in the figures illustrate the architecture, functionality, and operation of possible implementations of apparatus, methods and computer program products according to various embodiments of the present application. In this regard, each block in the flowchart or block diagrams may represent a module, segment, or portion of code, which comprises one or more executable instructions for implementing the specified logical function(s). It should also be noted that, in alternative implementations, the functions noted in the block may occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently, or the blocks may sometimes be executed in the reverse order, depending upon the functionality involved. It will also be noted that each block of the block diagrams and/or flowchart illustration, and combinations of blocks in the block diagrams and/or flowchart illustration, can be implemented by special purpose hardware-based systems which perform the specified functions or acts, or combinations of special purpose hardware and computer instructions.
In addition, each functional module or unit in each embodiment of the present application may be integrated together to form an independent part, or each module may exist separately, or two or more modules may be integrated to form an independent part.
The functions may be stored in a computer-readable storage medium if they are implemented in the form of software functional modules and sold or used as separate products. Based on such understanding, the technical solution of the present application or portions thereof that substantially contribute to the prior art may be embodied in the form of a software product stored in a storage medium and including instructions for causing a computer device (which may be a smart phone, a personal computer, a server, or a network device) to execute all or part of the steps of the method according to the embodiments of the present application. And the aforementioned storage medium includes: a U-disk, a removable hard disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a magnetic disk or an optical disk, and other various media capable of storing program codes.
The above description is only for the specific embodiments of the present application, but the scope of the present application is not limited thereto, and any person skilled in the art can easily think of the changes or substitutions within the technical scope of the present application, and shall be covered by the scope of the present application.

Claims (12)

1. A frame rate switching control method, comprising:
responding to a frame rate switching instruction, and acquiring an image currently displayed by the terminal equipment;
performing pixel sampling on the image according to a preset sampling rule and calculating the gray scale of a sampling pixel;
and when the gray scale of the sampling pixel of the image meets a preset frame rate switching condition, controlling to switch the frame rate.
2. The frame rate switching control method according to claim 1, wherein the acquiring an image currently displayed by the terminal device includes:
and calling a system screen capture service interface to perform screen capture on the content currently displayed by the terminal equipment.
3. The frame rate switching control method according to claim 1 or 2, wherein the preset sampling rule includes a preset sampling step size and a sampling matrix size, wherein the sampling step size includes a first direction sampling step size and a second direction sampling step size, and the pixel sampling and calculating the gray scale of the sampling pixel according to the preset sampling rule includes:
selecting a pixel sampling starting point in the image according to a preset selection rule;
sampling at intervals according to a preset sampling route and the size of the sampling matrix from the starting point, wherein the sampling matrix samples in a first direction of the image according to the sampling step length of the first direction, and samples in a second direction of the image according to the sampling step length of the second direction;
and calculating the gray scale of each sampling pixel in each sampling matrix according to a pixel gray scale conversion algorithm.
4. The method as claimed in claim 3, wherein the determining whether the gray scale of the sampled pixel of the image satisfies a predetermined frame rate switching condition comprises:
counting the number of pixels of which the gray scales are lower than a preset gray scale threshold value in all the sampling matrixes;
judging whether the ratio of the number of the pixels to the total number of the sampling pixels is higher than a preset ratio threshold value or not;
if the frame rate is higher than the preset frame rate, judging that the preset frame rate switching condition is not met, otherwise, judging that the preset frame rate switching condition is met.
5. The frame rate switching control method according to claim 3, wherein the sampling matrix samples according to a serpentine path, a row-by-row path, or a column-by-column path.
6. The frame rate switching control method according to claim 3, wherein each of the sampling steps is larger than the width and height of the sampling matrix, and the first direction sampling step and the second direction sampling step are respectively selected to be 3% to 10% of the total number of the first direction pixels and the total number of the second direction pixels of the terminal device;
the width and the height of the sampling matrix respectively take values in a range of 3-10 pixels.
7. The frame rate switching control method according to claim 3, wherein when selecting the starting point of pixel sampling in the image, the preset selection rule comprises:
and determining the coordinate position of the starting point in the height direction of the status bar according to the pixel height of the status bar in the image, wherein the value of the coordinate position is greater than or equal to the pixel height of the status bar.
8. The frame rate switching control method according to claim 3, wherein the pixel gray scale conversion algorithm is a monochrome component algorithm, an averaging algorithm, a shift algorithm, a shaping value-taking algorithm, a floating point value-taking algorithm, or a Gamma calibration algorithm.
9. The frame rate switching control method according to claim 8, wherein the Gamma calibration algorithm is:
Figure FDA0002871645640000021
wherein R, G and B are the red, green, and blue components of a single sampled pixel in that order; g is a preset calibration value; gray is the Gray level of the sampled pixel.
10. A frame rate switching control apparatus, comprising:
the acquisition module is used for responding to the frame rate switching instruction and acquiring the image currently displayed by the terminal equipment;
the gray scale calculation module is used for carrying out pixel sampling on the image according to a preset sampling rule and calculating the gray scale of the sampling pixel;
the judging module is used for judging whether a preset frame rate switching condition is met according to the gray scale of the sampling pixel of the image;
and the control module is used for controlling the frame rate switching when the gray scale of the sampling pixel of the image meets the preset frame rate switching condition.
11. A terminal device, characterized in that the terminal device comprises a display screen for displaying images, a processor and a memory, the memory storing a computer program, the processor being configured to execute the computer program to implement the frame rate switching control method according to any one of claims 1 to 9.
12. A readable storage medium storing a computer program which, when executed, implements the frame rate switching control method according to any one of claims 1 to 9.
CN202011604787.4A 2020-12-30 2020-12-30 Frame rate switching control method and device, terminal equipment and readable storage medium Pending CN114697597A (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
CN202011604787.4A CN114697597A (en) 2020-12-30 2020-12-30 Frame rate switching control method and device, terminal equipment and readable storage medium
PCT/CN2021/128955 WO2022142732A1 (en) 2020-12-30 2021-11-05 Frame rate switching control method and apparatus, terminal device, and readable storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202011604787.4A CN114697597A (en) 2020-12-30 2020-12-30 Frame rate switching control method and device, terminal equipment and readable storage medium

Publications (1)

Publication Number Publication Date
CN114697597A true CN114697597A (en) 2022-07-01

Family

ID=82131753

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202011604787.4A Pending CN114697597A (en) 2020-12-30 2020-12-30 Frame rate switching control method and device, terminal equipment and readable storage medium

Country Status (2)

Country Link
CN (1) CN114697597A (en)
WO (1) WO2022142732A1 (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117894270A (en) * 2024-03-14 2024-04-16 集创北方(珠海)科技有限公司 LED display driving method and device, chip and electronic equipment

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104813392A (en) * 2012-11-20 2015-07-29 夏普株式会社 Control device, display device, and display device control method
US20160093239A1 (en) * 2014-09-29 2016-03-31 Apple Inc. Content dependent display variable refresh rate
CN106710540A (en) * 2015-11-12 2017-05-24 小米科技有限责任公司 Liquid crystal display method and device
CN108811055A (en) * 2018-03-27 2018-11-13 广东欧珀移动通信有限公司 Frame per second method of adjustment, device, terminal device and storage medium
CN110751933A (en) * 2019-12-04 2020-02-04 京东方科技集团股份有限公司 Display method and device for refresh rate switching, computer equipment and medium

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR102174236B1 (en) * 2014-02-11 2020-11-05 삼성디스플레이 주식회사 Method of driving display panel and display apparatus for performing the method
CN106710539B (en) * 2015-11-12 2020-06-02 小米科技有限责任公司 Liquid crystal display method and device
JP2017161680A (en) * 2016-03-09 2017-09-14 キヤノン株式会社 Liquid crystal display device
CN106373516B (en) * 2016-10-31 2019-08-13 北京集创北方科技股份有限公司 LED display and its driving method

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104813392A (en) * 2012-11-20 2015-07-29 夏普株式会社 Control device, display device, and display device control method
US20160093239A1 (en) * 2014-09-29 2016-03-31 Apple Inc. Content dependent display variable refresh rate
CN106710540A (en) * 2015-11-12 2017-05-24 小米科技有限责任公司 Liquid crystal display method and device
CN108811055A (en) * 2018-03-27 2018-11-13 广东欧珀移动通信有限公司 Frame per second method of adjustment, device, terminal device and storage medium
CN110751933A (en) * 2019-12-04 2020-02-04 京东方科技集团股份有限公司 Display method and device for refresh rate switching, computer equipment and medium

Also Published As

Publication number Publication date
WO2022142732A1 (en) 2022-07-07

Similar Documents

Publication Publication Date Title
US9858885B2 (en) Method and device for reducing display brightness
CN104599642B (en) Backlight control method and backlight control device
US10176769B2 (en) Liquid crystal display method and device, and storage medium
US9773460B2 (en) System, method, and computer program product for combining low motion blur and variable refresh rate in a display
US20150116544A1 (en) Method and apparatus of working mode control, and electronic device
US20220319394A1 (en) Display device and driving method thereof
US20170140713A1 (en) Liquid crystal display method, device, and storage medium
CN112262427B (en) Smear evaluation method, smear improvement method, and electronic device
US9892524B2 (en) Image displaying methods, devices, and storage media
RU2667381C2 (en) Image processing method, apparatus and electronic device
US10109248B2 (en) Method and device for adjusting liquid crystal display
CN111341254B (en) Brightness adjusting method and device of display screen
CN107170403B (en) Picture frame display method and device
WO2015110876A1 (en) Method and apparatus for controlling a work mode, and electronic device
CN107465811B (en) Method for reducing temperature rise, computer readable storage medium and electronic equipment
US20200192554A1 (en) Terminal device, display control method implemented by the terminal device, computer readable storage medium and computer program product
CN105338403B (en) Filter processing method and device and electronic equipment
CN113885824A (en) Screen control method and device, electronic equipment and storage medium
CN114697597A (en) Frame rate switching control method and device, terminal equipment and readable storage medium
CN104536713B (en) Method and device for displaying characters in image
JP2007036702A (en) Personal digital assistant and display control method
CN108986753B (en) Interface display method and device
CN115880193A (en) Image processing method, image processing device, electronic equipment and storage medium
CN107256137B (en) Picture processing method and device
CN108538261B (en) Display control method and device and display equipment

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
RJ01 Rejection of invention patent application after publication

Application publication date: 20220701

RJ01 Rejection of invention patent application after publication