CN110708587A - Window image refreshing frequency determining method and device, computer equipment and medium - Google Patents

Window image refreshing frequency determining method and device, computer equipment and medium Download PDF

Info

Publication number
CN110708587A
CN110708587A CN201910934480.1A CN201910934480A CN110708587A CN 110708587 A CN110708587 A CN 110708587A CN 201910934480 A CN201910934480 A CN 201910934480A CN 110708587 A CN110708587 A CN 110708587A
Authority
CN
China
Prior art keywords
window
time
frequency
image
refreshing
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
CN201910934480.1A
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.)
Nantong Clear Technology Co Ltd
Nanyang Clear Technology Co Ltd
Original Assignee
Nantong Clear Technology 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 Nantong Clear Technology Co Ltd filed Critical Nantong Clear Technology Co Ltd
Priority to CN201910934480.1A priority Critical patent/CN110708587A/en
Publication of CN110708587A publication Critical patent/CN110708587A/en
Pending legal-status Critical Current

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/40Client devices specifically adapted for the reception of or interaction with content, e.g. set-top-box [STB]; Operations thereof
    • H04N21/43Processing of content or additional data, e.g. demultiplexing additional data from a digital video stream; Elementary client operations, e.g. monitoring of home network or synchronising decoder's clock; Client middleware
    • H04N21/431Generation of visual interfaces for content selection or interaction; Content or additional data rendering
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/40Client devices specifically adapted for the reception of or interaction with content, e.g. set-top-box [STB]; Operations thereof
    • H04N21/43Processing of content or additional data, e.g. demultiplexing additional data from a digital video stream; Elementary client operations, e.g. monitoring of home network or synchronising decoder's clock; Client middleware
    • H04N21/431Generation of visual interfaces for content selection or interaction; Content or additional data rendering
    • H04N21/4312Generation of visual interfaces for content selection or interaction; Content or additional data rendering involving specific graphical features, e.g. screen layout, special fonts or colors, blinking icons, highlights or animations
    • H04N21/4316Generation of visual interfaces for content selection or interaction; Content or additional data rendering involving specific graphical features, e.g. screen layout, special fonts or colors, blinking icons, highlights or animations for displaying supplemental content in a region of the screen, e.g. an advertisement in a separate window
    • 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

Abstract

The embodiment of the invention discloses a method, a device, computer equipment and a medium for determining window image refreshing frequency, wherein the method comprises the following steps: acquiring a first refreshing frequency of a view window, wherein the first refreshing frequency is a refreshing frequency corresponding to the last refreshing of the view window; acquiring first drawing time of the view window, wherein the first drawing time is time consumed for drawing an image to be displayed in the view window last time; and determining a second refreshing frequency of the view window according to the first refreshing frequency and the first drawing time, wherein the second refreshing frequency is a refreshing frequency corresponding to the current refreshing of the view window. The window image refreshing frequency determining method can determine a proper second refreshing frequency, and meets the requirements of image refreshing on non-blocking and timeliness to the greatest extent.

Description

Window image refreshing frequency determining method and device, computer equipment and medium
Technical Field
The invention relates to the technical field of window image refreshing, in particular to a method and a device for determining window image refreshing frequency, computer equipment and a medium.
Background
The display of medical images in the view window needs to be refreshed continuously for continuous viewing by the physician. The existing refreshing mode generally refreshes the image by adopting the same refreshing frequency.
During real-time refreshing, if a higher refreshing frequency is adopted, the conditions of message overload and interface jam can be caused by the real-time refreshing; if a lower refresh frequency is used, the image timeliness cannot be well satisfied.
Therefore, the existing refreshing method cannot solve the problems of refreshing blockage and timeliness.
Disclosure of Invention
Therefore, it is necessary to provide a method, an apparatus, a computer device and a medium for determining a window image refresh frequency to solve the problems of the prior art that refresh is stuck and cannot meet timeliness.
A method of determining a window image refresh frequency, the method comprising:
acquiring a first refreshing frequency of a view window, wherein the first refreshing frequency is a refreshing frequency corresponding to the last refreshing of the view window;
acquiring first drawing time of the view window, wherein the first drawing time is time consumed for drawing an image to be displayed in the view window last time;
and determining a second refreshing frequency of the view window according to the first refreshing frequency and the first drawing time, wherein the second refreshing frequency is a refreshing frequency corresponding to the current refreshing of the view window.
In one embodiment, the obtaining the first drawing time of the view window includes:
the method comprises the steps of obtaining image processing time for processing an image to be displayed in a view window, and determining first drawing time of the view window according to the image processing time.
In one embodiment, the view window comprises a plurality of sub-view windows, each of the sub-view windows being for displaying at least one image;
the acquiring of the image processing time for performing image processing on the image to be displayed in the view window includes:
acquiring a first time point at which image processing is started earliest and a second time point at which image processing is completed latest in the plurality of sub-view windows;
and taking the difference value of the second time point and the first time point as the image processing time.
In one embodiment, said determining a second refresh frequency for said view window based on said first refresh frequency and said first rendering time comprises:
calculating to obtain the reciprocal of the first refreshing frequency, and taking the reciprocal as first refreshing time;
calculating to obtain the ratio of the first drawing time to the first refreshing time;
if the ratio is larger than a preset ratio and smaller than 1, taking the first refresh frequency as an initial refresh frequency value;
if the ratio is smaller than a preset ratio, increasing the first refresh frequency until the ratio is larger than the preset ratio and smaller than 1, and taking the increased first refresh frequency as an initial value of the refresh frequency;
if the ratio is larger than 1, reducing the first refreshing frequency until the ratio is larger than a preset ratio and smaller than 1, and taking the reduced first refreshing frequency as an initial value of the refreshing frequency;
and determining a second refresh frequency according to the refresh frequency initial value.
In one embodiment, the determining the second refresh frequency according to the initial refresh frequency value includes:
acquiring a first drawing parameter, wherein the first drawing parameter is an image parameter corresponding to an image to be displayed in a view window in the last drawing;
acquiring a second drawing parameter, wherein the second drawing parameter is an image parameter corresponding to the image to be displayed in the view window in the current drawing process;
determining a correction coefficient according to the first drawing parameter and the second drawing parameter;
and determining a second refresh frequency according to the refresh frequency initial value and the correction coefficient.
In one embodiment, after said determining a second refresh frequency of said view window according to said first refresh frequency and said first rendering time, further comprises:
and generating a current drawing instruction according to the second refreshing frequency so as to finish the current drawing of the view window according to the current drawing instruction.
A windowed image refresh frequency determination apparatus, the apparatus comprising:
the device comprises a first obtaining module, a second obtaining module and a display module, wherein the first obtaining module is used for obtaining a first refreshing frequency of a view window, and the first refreshing frequency is a refreshing frequency corresponding to the last refreshing of the view window;
the second acquisition module is used for acquiring first drawing time of the view window, wherein the drawing time is the time for drawing the image in the view window last time;
and the frequency determining module is used for determining a second refreshing frequency of the view window according to the first refreshing frequency and the first drawing time, wherein the second refreshing frequency is a refreshing frequency corresponding to the current refreshing of the view window.
In one embodiment, the second obtaining module includes: the image processing time acquisition module is used for acquiring the image processing time for processing the image to be displayed in the view window and determining the first drawing time of the view window according to the image processing time.
In one embodiment, the view window includes a plurality of sub-view windows, each of the sub-view windows is used for displaying at least one image, and the image processing time obtaining module includes: a time point obtaining module, configured to obtain a first time point at which image processing is started earliest and a second time point at which image processing is completed latest in the multiple sub-view windows; and taking the difference value of the second time point and the first time point as the image processing time.
In one embodiment, the frequency determination module comprises: the refresh frequency initial value determining module is used for calculating to obtain the reciprocal of the first refresh frequency and taking the reciprocal as first refresh time; calculating to obtain the ratio of the first drawing time to the first refreshing time; if the ratio is larger than a preset ratio and smaller than 1, taking the first refresh frequency as an initial refresh frequency value; if the ratio is smaller than a preset ratio, increasing the first refresh frequency until the ratio is larger than the preset ratio and smaller than 1, and taking the increased first refresh frequency as an initial value of the refresh frequency; if the ratio is larger than 1, reducing the first refreshing frequency until the ratio is larger than a preset ratio and smaller than 1, and taking the reduced first refreshing frequency as an initial value of the refreshing frequency; and determining a second refresh frequency according to the refresh frequency initial value.
In one embodiment, the refresh frequency determination module includes: the second refresh frequency determination module is used for acquiring a first drawing parameter, wherein the first drawing parameter is an image parameter corresponding to an image to be displayed in the view window in the last drawing; acquiring a second drawing parameter, wherein the second drawing parameter is an image parameter corresponding to the image to be displayed in the view window in the current drawing process; determining a correction coefficient according to the first drawing parameter and the second drawing parameter; and determining a second refresh frequency according to the refresh frequency initial value and the correction coefficient.
In one embodiment, the apparatus further comprises: and the drawing instruction generating module is used for generating a current drawing instruction according to the second refreshing frequency so as to finish the current drawing of the view window according to the current drawing instruction.
A computer-readable storage medium storing a computer program which, when executed by a processor, causes the processor to perform the steps of:
acquiring a first refreshing frequency of a view window, wherein the first refreshing frequency is a refreshing frequency corresponding to the last refreshing of the view window;
acquiring first drawing time of the view window, wherein the first drawing time is time consumed for drawing an image to be displayed in the view window last time;
and determining a second refreshing frequency of the view window according to the first refreshing frequency and the first drawing time, wherein the second refreshing frequency is a refreshing frequency corresponding to the current refreshing of the view window.
A computer device comprising a memory and a processor, the memory storing a computer program that, when executed by the processor, causes the processor to perform the steps of:
acquiring a first refreshing frequency of a view window, wherein the first refreshing frequency is a refreshing frequency corresponding to the last refreshing of the view window;
acquiring first drawing time of the view window, wherein the first drawing time is time consumed for drawing an image to be displayed in the view window last time;
and determining a second refreshing frequency of the view window according to the first refreshing frequency and the first drawing time, wherein the second refreshing frequency is a refreshing frequency corresponding to the current refreshing of the view window.
The embodiment of the invention has the following beneficial effects:
the invention provides a window image refreshing frequency determining method, a window image refreshing frequency determining device, computer equipment and a medium. Under the normal condition, the difference between the refresh frequency corresponding to the last refresh and the refresh frequency corresponding to the current refresh is not large, and the second refresh frequency, namely the refresh frequency corresponding to the current refresh can be obtained according to the first refresh frequency and the first drawing time, so that when multiple images need to be displayed, the situation that the previous batch of images are not displayed or the current batch of images are displayed or drawn after the previous batch of images are drawn is avoided, and the problem of blockage in refreshing is solved to a certain extent; meanwhile, a certain display time is reserved after the image is drawn, the display time can be determined according to the refresh frequency and the drawing time corresponding to the last refresh, namely the current display time is determined on the basis of the last display time, so that the image parameter characteristics are considered in the setting of each display time, the finally set display time is not too long or too short, the timeliness is met to a certain extent, for example, when the display time is too long, the refresh frequency can be increased, the display time is reduced, and therefore the proper second refresh frequency can be obtained.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below, it is obvious that the drawings in the following description are only some embodiments of the present invention, and for those skilled in the art, other drawings can be obtained according to the drawings without creative efforts.
Wherein:
FIG. 1 is a schematic diagram illustrating an implementation flow of a method for determining a window image refresh frequency according to an embodiment;
FIG. 2 is a schematic diagram illustrating an implementation flow of a method for determining a window image refresh frequency according to another embodiment;
FIG. 3 is a schematic diagram illustrating an implementation flow of a method for determining a window image refresh frequency according to another embodiment;
FIG. 4 is a schematic diagram illustrating an implementation flow of a method for determining a window image refresh frequency according to another embodiment;
FIG. 5 is a schematic diagram illustrating an implementation flow of a method for determining a window image refresh frequency according to another embodiment;
FIG. 6 is a schematic diagram illustrating an implementation flow of a method for determining a window image refresh frequency according to another embodiment;
FIG. 7 is a schematic structural diagram of a window image refresh frequency determination apparatus according to an embodiment;
FIG. 8 is a block diagram of a computer device in one embodiment.
Detailed Description
The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
As shown in fig. 1, in one embodiment, a window image refresh frequency determination method is provided, which may be applied to both a terminal and a server, where the server includes but is not limited to a high-performance computer and a high-performance computer cluster, the terminal includes but is not limited to a mobile terminal device including but not limited to a mobile phone, a tablet computer, a smart watch and a notebook computer, and a desktop terminal device including but not limited to a desktop computer and a vehicle-mounted computer. The method for determining the window image refreshing frequency in the embodiment of the invention specifically comprises the following steps:
step 102, obtaining a first refresh frequency of a view window, where the first refresh frequency is a refresh frequency corresponding to a last refresh of the view window.
Herein, the view window refers to a display window for displaying an image.
The refreshing is a process of replacing the last displayed image in the view window with the current batch of images and displaying the current batch of images until the current batch of images is replaced. For example, assuming that the images displayed last time in the view window are images A, B and C, the images to be displayed for the current batch are images D, E and F, and the refreshing refers to a process of preprocessing the images D, E and F and replacing the images A, B and C displayed last time in the view window with the preprocessed images D, E and F, so that the view window displays the preprocessed images D, E and F for a while. Therefore, the refresh time corresponding to the refresh frequency refers to a time t2 from a time t1 at which the preprocessing of the images D, E and F is started to a time at which the display is completed, and thus, the refresh frequency corresponding to the refresh process of the current batch can be determined according to t1 and t 2.
In order to display a plurality of images, a plurality of sub-view windows are arranged in one view window, at least one image is displayed in each sub-view window, and at this time, refreshing of the view window means that all the sub-view windows have completed replacing the image and are displayed for a period of time.
The first refreshing frequency is the refreshing frequency corresponding to the last refreshing of the view window, and reflects the image replacement speed in the view window to a certain extent.
And 104, acquiring first drawing time of the view window, wherein the first drawing time is the time consumed for drawing the image to be displayed in the view window last time.
In the embodiment of the present invention, the drawing of the image to be displayed in the view window refers to a process of performing image processing on the image to be displayed in the view window, so that the drawn image can meet the display requirements of the window, for example, meet the requirements of the window size and the pixels, and sending the drawn image to the view window.
Since the images received by the sub-view windows in the view window are different in image parameters such as image size and pixels, in order to adapt to the display conditions of the sub-view windows and display the images in the sub-view windows, the images need to be drawn to obtain suitable drawn images. Since the image parameters of each image may be different, the rendering time for the image rendering in each sub-view window will also be different. The drawing time of the view window refers to the total time taken when the images in all the sub-view windows are finished with one image drawing.
And 106, determining a second refreshing frequency of the view window according to the first refreshing frequency and the first drawing time, wherein the second refreshing frequency is a refreshing frequency corresponding to the current refreshing of the view window.
For example, the drawing time of the previous image is 25ms, and the refresh time corresponding to the set refresh frequency is 20ms, that is, when the previous image has not been drawn, the current image is refreshed, which may cause a stuck phenomenon in the device. For another example, the drawing time of the previous image batch is 25ms, the refresh time corresponding to the refresh frequency set at this time is 50ms, the previous image batch is displayed for 25ms after the previous image batch is drawn, the current image batch can be drawn, too much dead time occurs, and in order to ensure that the next image batch can be drawn timely, the second refresh frequency needs to be increased.
According to the window image refresh frequency determining method, the first refresh frequency of the view window is obtained, the first drawing time of the view window is obtained at the same time, and the second refresh frequency of the view window is determined according to the first refresh frequency and the first drawing time. Under the normal condition, the difference between the refresh frequency corresponding to the last refresh and the refresh frequency corresponding to the current refresh is not large, and the second refresh frequency, namely the refresh frequency corresponding to the current refresh can be obtained according to the first refresh frequency and the first drawing time, so that when multiple images need to be displayed, the situation that the previous batch of images are not displayed or the current batch of images are displayed or drawn after the previous batch of images are drawn is avoided, and the problem of blockage in refreshing is solved to a certain extent; meanwhile, a certain display time is reserved after the image is drawn, the display time can be determined according to the refresh frequency and the drawing time corresponding to the last refresh, namely the current display time is determined on the basis of the last display time, so that the image parameter characteristics are considered in the setting of each display time, the finally set display time is not too long or too short, the timeliness is met to a certain extent, for example, when the display time is too long, the refresh frequency can be increased, the display time is reduced, and therefore the proper second refresh frequency can be obtained.
As shown in fig. 2, in an embodiment, a method for determining a window image refresh frequency is provided, which further includes the following steps:
and 108, generating a current drawing instruction according to the second refreshing frequency so as to finish the current drawing of the view window according to the current drawing instruction.
Wherein the current drawing instruction indicates that the previous batch of images displayed in the view window is to be replaced by the current batch of images. When a current drawing instruction is received, drawing of the current batch of images needs to be started immediately, and the drawn current batch of images needs to be displayed in a view window for a period of time.
In one implementation, a Windows message loop is also provided for controlling program looping. With this loop windows message loop, the application can execute all the time (unless we click to close, jump out of the loop, and the program will end), otherwise the program will execute the same as the console program and automatically exit. The loop can also be used for acquiring and converting messages, and acquiring and converting messages generated by a keyboard, a mouse and the like to be handed to a window to process the messages and reflect the user operation. For example, when a command from the keyboard stop program is received, the window stops drawing and refreshing the image.
The window image refreshing frequency determining method can start current image drawing according to the newly generated drawing instruction, can ensure that the image is always in a refreshing state, and can also well ensure the timeliness of the image.
As shown in fig. 3, in one embodiment, a method for determining a window image refresh frequency is provided, which includes the following steps:
step 302, obtaining a first refresh frequency of a view window, where the first refresh frequency is a refresh frequency corresponding to a last refresh of the view window.
Step 304, acquiring image processing time for performing image processing on an image to be displayed in the view window, and determining first drawing time of the view window according to the image processing time, wherein the first drawing time is time consumed for drawing the image to be displayed in the view window last time.
The image to be displayed in the view window refers to an image which has not completed image processing and an image which has completed image processing but has not been transmitted to the view window for display. Image processing refers to a process of performing a series of adjustments on image parameters of an image to meet display requirements of a view window, for example, the display requirements of the view window are requirements on image size and resolution, so as to perform display in the view window. The rendering time includes an image processing time and a transmission time for transmitting an image for which the image processing is completed to the view window.
In one embodiment, the image processing includes bilinear interpolation processing of the image. The view windows are provided with sub-view windows, the size of the image sent to each sub-view window is different, and the image needs to be zoomed in order to obtain the image which is in accordance with the size of the sub-view window. The detail of the image can be degraded due to the smoothing effect of the bilinear interpolation processing, the phenomenon is particularly obvious when the image is amplified, the image can be well amplified without being over blurred, and meanwhile, the image can be reduced due to the bilinear interpolation processing. Similarly, domain difference methods may be used to obtain a properly scaled image. Of course, in other embodiments, other methods of scaling the image may be used to obtain an image that fits the size of the sub-view window.
In one embodiment, the image processing further comprises window-width window-level processing the image. The window width and the window level set for the same image are different, and the observation effect is also different. The window width and level processing is a display technology for observing different tissues or lesions, and comprises the window width processing and the window level processing. The window width is a range of CT values (a measure of the density of a local tissue or organ in a human body) displayed on a CT image, and within the range of CT values, both the tissue and the lesion are displayed in different simulated gray scales. The simulated gray scale is a reaction to the density of the local tissue or organ, and the color of the displayed simulated gray scale is darker as the density of the local tissue or organ in the image is higher. Tissues and lesions with CT values higher than the range are all displayed in white shadow; on the contrary, tissues below the CT value range are all shown in black shadow. The window level is the center position of the window. For example, if the window width is WW 60 and the window level is WL 0, the CT value obtained is in the range of-30 to + 30. Therefore, by setting the window width and window level of each sub-view window image in a consistent manner, a consistent image display effect can be obtained in the view window, which is beneficial to observation and is convenient for further adjustment of the window width and window level of the image in the follow-up process.
Step 306, determining a second refresh frequency of the view window according to the first refresh frequency and the first drawing time, where the second refresh frequency is a refresh frequency corresponding to the current refresh of the view window.
According to the window image refreshing frequency determining method, all images can meet the display requirements of the view window by performing image processing on the images to be displayed in the view window, so that the images can be smoothly displayed in the view window. The image displayed in the view window can have better display effect, and is convenient to observe.
In one embodiment, as shown in fig. 4, the view window includes a plurality of sub-view windows, each of which is used for displaying at least one image; the step 304 of acquiring an image processing time for performing image processing on an image to be displayed in the view window includes:
in step 304A, a first time point at which image processing is started earliest and a second time point at which image processing is completed latest in the plurality of sub-view windows are obtained.
The first time point is a time starting point when image processing of a certain batch of images is started, namely, a time when image processing is started for an image which is first started to perform image processing in the batch of images, and the second time point is a time ending point when the image processing is completed, namely, a time when image processing is completed for an image which is last completed in the batch of images. For example, a view window is provided with 4 × 4 sub-view windows, each of which displays at least one image. Further optionally, each sub-view window comprises 4 × 4 minimum sub-view windows, each minimum sub-view window displaying one image. In the actual acquisition process, the time point of the image which starts image processing at first in 256 minimum sub-view windows needs to be acquired, and the time point is taken as a first time point; and acquiring the time point of the image which is finally finished with the image processing in the 256 minimum sub-view windows, and taking the time point as a second time point.
Step 304B, taking the difference value between the second time point and the first time point as the image processing time.
According to the window image refreshing frequency determining method, the image processing time is determined by acquiring the first time point at which the image processing is started at first and the second time point at which the image processing is completed at latest, the image processing time at which all the images in the view window are processed can be acquired, and the images can be guaranteed to be processed.
In one embodiment, as shown in fig. 5, the step 106 determines a second refresh frequency of the view window according to the first refresh frequency and the first drawing time, where the second refresh frequency is a refresh frequency corresponding to a current refresh of the view window, and includes:
step 502, calculating to obtain the reciprocal of the first refresh frequency, and taking the reciprocal as a first refresh time.
The first refresh time and the first refresh frequency are reciprocal. For example, if the refresh frequency is f, the refresh time corresponding to the refresh frequency is 1/f.
Step 504, calculating a ratio between the first drawing time and the first refreshing time.
The ratio is used for calculating the ratio of the first drawing time in the first refreshing time, and when the ratio is larger and smaller than 1, the larger the ratio is, the smaller the additional display time of a single image is, the more time the image is in the drawing stage, and the faster the current drawn image replaces the last drawn image, so that the refreshing is realized. When the ratio is greater than 1, which indicates that the first drawing time is greater than the first refresh time, the view window may start drawing the current image without completing the previous image drawing, and thus may be stuck. The refresh frequency is usually preset according to the drawing time of the view window for the general image, the refresh time corresponding to the refresh frequency should be longer than the image drawing time, and if the drawing time of the image is usually 20ms, the refresh time corresponding to the refresh frequency may be preset to 25ms-30ms, and then the refresh frequency is set.
Step 506, if the ratio is greater than a preset ratio and less than 1, the first refresh frequency is used as an initial value of the refresh frequency.
The initial value of the refresh frequency is a refresh frequency which basically meets the requirement that the current image in the view window finishes the current image drawing, and the refresh frequency is a pre-estimated value of the second refresh frequency and can be adjusted according to the drawing time of the current image. The display of the image is a continuous process, the last image drawn in the view window is close to the image which needs to be drawn in the view window currently, so the drawing time of the last image is not completely different from the drawing time of the current image, but the consumption time of the last image and the consumption time of the current image are basically similar, and based on the consumption time, the initial value of the refresh frequency can be preset according to the initial value of the refresh frequency obtained by the known first refresh frequency and the known first drawing time.
The preset ratio is a preset value which is preset and used for judging whether the ratio of the first drawing time to the first refreshing time is suitable or not, and when the ratio is between the preset ratio and 1, the requirements of image refreshing on non-blockage and timeliness can be guaranteed. And when the obtained ratio is larger than the preset ratio, the set first refreshing frequency meets the timeliness requirement of image refreshing. And when the obtained ratio is less than 1, the set first refresh frequency meets the requirement of image refresh on non-unsmooth. For example, the first drawing time is 20ms, the first refresh time corresponding to the first refresh frequency is 25ms, the preset ratio is 0.7, and the ratio between the first drawing time and the first refresh time is 0.8, which satisfies the requirement of being greater than the preset ratio and less than 1, so that the first refresh frequency can be used as the initial value of the refresh frequency.
Step 508, if the ratio is smaller than a preset ratio, increasing the first refresh frequency until the ratio is larger than the preset ratio and smaller than 1, and using the increased first refresh frequency as an initial value of the refresh frequency.
For example, the first drawing time is 20ms, the first refresh time corresponding to the first refresh frequency is 25ms, the preset ratio is 0.85, the ratio between the first drawing time and the first refresh time is 0.8, and the ratio is smaller than the preset ratio, so that the refresh frequency needs to be increased, that is, the refresh time needs to be decreased. For example, the first refresh time is reduced to 22ms, and the ratio between the first rendering time and the first refresh time is greater than the preset ratio and less than 1, and the increased first refresh frequency may be used as the initial value of the refresh frequency.
Step 510, if the ratio is greater than 1, decreasing the first refresh frequency until the ratio is greater than a preset ratio and less than 1, and taking the decreased first refresh frequency as an initial value of the refresh frequency.
For example, the first drawing time is 25ms, the first refresh time corresponding to the first refresh frequency is 20ms, the preset ratio is 0.8, and the ratio between the first drawing time and the first refresh time is 1.25. Since the ratio is larger than the preset ratio, it is necessary to reduce the refresh frequency, i.e., to increase the refresh time. For example, if the first refresh time is increased to 30ms, and the ratio 5/6 between the first drawing time and the first refresh time satisfies a condition that the ratio is greater than a preset ratio and less than 1, the first refresh frequency after the decrease may be used as the initial value of the refresh frequency.
And step 512, determining a second refresh frequency according to the initial refresh frequency value.
According to the window image refresh frequency determination method, the preset ratio is set, the ratio of the adjusted first drawing time to the first refresh time is larger than the preset ratio and smaller than 1, and the adjusted first refresh time is taken as the initial value of the refresh frequency. The initial value of the refresh frequency obtained in this way can be realized, and when the obtained ratio is larger than the preset ratio, the set initial value of the refresh frequency meets the requirement of image refresh on timeliness. And when the obtained ratio is less than 1, the set initial value of the refresh frequency meets the requirement of image refresh on non-unsmooth image refresh. The set initial value of the refresh frequency can meet the requirements of image refresh on non-unsmooth and timeliness.
In one embodiment, as shown in fig. 6, the determining the second refresh frequency according to the initial refresh frequency value in step 512 includes:
step 512A, a first drawing parameter is obtained, wherein the first drawing parameter is an image parameter corresponding to an image to be displayed in the view window in the last drawing.
The image parameters include an image size, an image scaling, a window width and a window level, and may even be processing speeds corresponding to different image processing methods, which are not specifically limited herein.
And step 512B, acquiring a second drawing parameter, wherein the second drawing parameter is an image parameter corresponding to the image to be displayed in the view window in the current drawing process.
And 512C, determining a correction coefficient according to the first drawing parameter and the second drawing parameter.
The correction coefficient is a coefficient which is obtained according to the first drawing parameter and the second drawing parameter, embodies different degrees of influence of the first drawing parameter and the second drawing parameter on the image drawing time, and is used for correcting the initial value of the refresh frequency.
The display of the image is a continuous process, the last image drawn in the view window is close to the image which needs to be drawn in the view window currently, so the first drawing time is also close to the drawing time of the current image, but the first drawing time is different from the drawing time of the current image because the first drawing parameter (the image parameter of the last image) is different from the second drawing parameter (the image parameter of the current image). In order to enable the adjusted initial value of the refresh frequency and the rendering time of the current image to still meet the requirements of image refresh on non-stuttering and timeliness, a correction coefficient needs to be determined according to the first rendering parameter and the second rendering parameter, and the correction coefficient is used for adjusting the initial value of the refresh frequency.
For example, the image magnification ratio in the first acquired rendering parameter is 4 times, the image magnification ratio in the second acquired rendering parameter is 5 times, the two magnification ratios have different degrees of influence on the rendering time, and the correction coefficient may be determined to be 0.8 according to the ratio of the two magnification ratios. For example, the time consumed for image reduction is generally shorter than the time consumed for image enlargement, and the correction coefficient can be obtained from the difference in the degree of influence by using the bilinear interpolation processing and the domain interpolation processing at different processing speeds.
And step 512D, determining a second refresh frequency according to the refresh frequency initial value and the correction coefficient.
The method for determining the second refresh frequency according to the initial value of the refresh frequency and the correction factor may be: the second refresh frequency is the correction factor × the initial value of the refresh frequency + d, where d is a preset constant, and may be set according to the specific situation, for example, d is set to 0. For example, if the calculated correction coefficient is 0.8, the second refresh frequency is equal to the initial refresh frequency value.
The window image refresh frequency determination method also determines the second refresh frequency more suitable for the current rendering time by considering the difference between the first rendering parameter and the second rendering parameter, thereby further meeting the requirements on non-unsmooth and timeliness in the current image refresh.
As shown in fig. 7, in one embodiment, a window image refresh frequency determination apparatus is provided, the apparatus including:
a first obtaining module 702, configured to obtain a first refresh frequency of a view window, where the first refresh frequency is a refresh frequency corresponding to a last refresh of the view window;
a second obtaining module 704, configured to obtain a first drawing time of the view window, where the drawing time is a time when an image in the view window is drawn last time;
a frequency determining module 706, configured to determine a second refresh frequency of the view window according to the first refresh frequency and the first drawing time, where the second refresh frequency is a refresh frequency corresponding to a current refresh of the view window.
The window image refresh frequency determination device determines the second refresh frequency of the view window according to the first refresh frequency and the first drawing time by acquiring the first refresh frequency of the view window and simultaneously acquiring the first drawing time of the view window. Under the normal condition, the difference between the refresh frequency corresponding to the last refresh and the refresh frequency corresponding to the current refresh is not large, and the second refresh frequency, namely the refresh frequency corresponding to the current refresh can be obtained according to the first refresh frequency and the first drawing time, so that when multiple images need to be displayed, the situation that the previous batch of images are not displayed or the current batch of images are displayed or drawn after the previous batch of images are drawn is avoided, and the problem of blockage in refreshing is solved to a certain extent; meanwhile, a certain display time is reserved after the image is drawn, the display time can be determined according to the refresh frequency and the drawing time corresponding to the last refresh, namely the current display time is determined on the basis of the last display time, so that the image parameter characteristics are considered in the setting of each display time, the finally set display time is not too long or too short, the timeliness is met to a certain extent, for example, when the display time is too long, the refresh frequency can be increased, the display time is reduced, and therefore the proper second refresh frequency can be obtained.
In one embodiment, the second obtaining module 704 includes: the image processing time acquisition module is used for acquiring the image processing time for processing the image to be displayed in the view window and determining the first drawing time of the view window according to the image processing time.
In one embodiment, the view window includes a plurality of sub-view windows, each of the sub-view windows is used for displaying at least one image, and the image processing time obtaining module includes: a time point obtaining module, configured to obtain a first time point at which image processing is started earliest and a second time point at which image processing is completed latest in the multiple sub-view windows; and taking the difference value of the second time point and the first time point as the image processing time.
In one embodiment, the frequency determination module 706 includes: the refresh frequency initial value determining module is used for calculating to obtain the reciprocal of the first refresh frequency and taking the reciprocal as first refresh time; calculating to obtain the ratio of the first drawing time to the first refreshing time; if the ratio is larger than a preset ratio and smaller than 1, taking the first refresh frequency as an initial refresh frequency value; if the ratio is smaller than a preset ratio, increasing the first refresh frequency until the ratio is larger than the preset ratio and smaller than 1, and taking the increased first refresh frequency as an initial value of the refresh frequency; if the ratio is larger than 1, reducing the first refreshing frequency until the ratio is larger than a preset ratio and smaller than 1, and taking the reduced first refreshing frequency as an initial value of the refreshing frequency; and determining a second refresh frequency according to the refresh frequency initial value.
In one embodiment, the refresh frequency determination module includes: the second refresh frequency determination module is used for acquiring a first drawing parameter, wherein the first drawing parameter is an image parameter corresponding to an image to be displayed in the view window in the last drawing; acquiring a second drawing parameter, wherein the second drawing parameter is an image parameter corresponding to the image to be displayed in the view window in the current drawing process; determining a correction coefficient according to the first drawing parameter and the second drawing parameter; and determining a second refresh frequency according to the refresh frequency initial value and the correction coefficient.
In one embodiment, the apparatus further comprises: and the drawing instruction generating module is used for generating a current drawing instruction according to the second refreshing frequency so as to finish the current drawing of the view window according to the current drawing instruction.
FIG. 8 is a diagram illustrating an internal structure of a computer device in one embodiment. The computer device may specifically be a server and a terminal device. As shown in fig. 8, the computer device includes a processor, a memory, and a network interface connected by a system bus. Wherein the memory includes a non-volatile storage medium and an internal memory. The non-volatile storage medium of the computer device stores an operating system and may also store a computer program that, when executed by the processor, causes the processor to implement the window image refresh frequency determination method. The internal memory may also have a computer program stored therein, which when executed by the processor, causes the processor to perform the method for determining the window image refresh rate. Those skilled in the art will appreciate that the architecture shown in fig. 8 is merely a block diagram of some of the structures associated with the disclosed aspects and is not intended to limit the computing devices to which the disclosed aspects apply, as particular computing devices may include more or less components than those shown, or may combine certain components, or have a different arrangement of components.
A computer device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, the processor implementing the following steps when executing the computer program:
acquiring a first refreshing frequency of a view window, wherein the first refreshing frequency is a refreshing frequency corresponding to the last refreshing of the view window;
acquiring first drawing time of the view window, wherein the first drawing time is time consumed for drawing an image to be displayed in the view window last time;
and determining a second refreshing frequency of the view window according to the first refreshing frequency and the first drawing time, wherein the second refreshing frequency is a refreshing frequency corresponding to the current refreshing of the view window.
A computer-readable storage medium storing a computer program, the computer program when executed by a processor implementing the steps of:
acquiring a first refreshing frequency of a view window, wherein the first refreshing frequency is a refreshing frequency corresponding to the last refreshing of the view window;
acquiring first drawing time of the view window, wherein the first drawing time is time consumed for drawing an image to be displayed in the view window last time;
and determining a second refreshing frequency of the view window according to the first refreshing frequency and the first drawing time, wherein the second refreshing frequency is a refreshing frequency corresponding to the current refreshing of the view window.
It should be noted that the method, the apparatus, the computer device and the computer-readable storage medium for determining the window image refresh frequency belong to a general inventive concept, and the contents in the embodiments of the method, the apparatus, the computer device and the computer-readable storage medium for determining the window image refresh frequency are mutually applicable.
It will be understood by those skilled in the art that all or part of the processes of the methods of the embodiments described above can be implemented by a computer program, which can be stored in a non-volatile computer-readable storage medium, and can include the processes of the embodiments of the methods described above when the program is executed. Any reference to memory, storage, database, or other medium used in the embodiments provided herein may include non-volatile and/or volatile memory, among others. Non-volatile memory can include read-only memory (ROM), Programmable ROM (PROM), Electrically Programmable ROM (EPROM), Electrically Erasable Programmable ROM (EEPROM), or flash memory. Volatile memory can include Random Access Memory (RAM) or external cache memory. By way of illustration and not limitation, RAM is available in a variety of forms such as Static RAM (SRAM), Dynamic RAM (DRAM), Synchronous DRAM (SDRAM), Double Data Rate SDRAM (DDRSDRAM), Enhanced SDRAM (ESDRAM), Synchronous Link DRAM (SLDRAM), Rambus Direct RAM (RDRAM), direct bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM).
The technical features of the above embodiments can be arbitrarily combined, and for the sake of brevity, all possible combinations of the technical features in the above embodiments are not described, but should be considered as the scope of the present specification as long as there is no contradiction between the combinations of the technical features.
The above-mentioned embodiments only express several embodiments of the present application, and the description thereof is more specific and detailed, but not construed as limiting the scope of the present application. It should be noted that, for a person skilled in the art, several variations and modifications can be made without departing from the concept of the present application, which falls within the scope of protection of the present application. Therefore, the protection scope of the present patent shall be subject to the appended claims. Please enter the implementation content part.

Claims (10)

1. A method for determining a refresh frequency of a window image, the method comprising:
acquiring a first refreshing frequency of a view window, wherein the first refreshing frequency is a refreshing frequency corresponding to the last refreshing of the view window;
acquiring first drawing time of the view window, wherein the first drawing time is time consumed for drawing an image to be displayed in the view window last time;
and determining a second refreshing frequency of the view window according to the first refreshing frequency and the first drawing time, wherein the second refreshing frequency is a refreshing frequency corresponding to the current refreshing of the view window.
2. The method of claim 1, wherein obtaining the first rendering time of the view window comprises:
the method comprises the steps of obtaining image processing time for processing an image to be displayed in a view window, and determining first drawing time of the view window according to the image processing time.
3. The method of claim 2, wherein the view window comprises a plurality of sub-view windows, each of the sub-view windows being configured to display at least one image;
the acquiring of the image processing time for performing image processing on the image to be displayed in the view window includes:
acquiring a first time point at which image processing is started earliest and a second time point at which image processing is completed latest in the plurality of sub-view windows;
and taking the difference value of the second time point and the first time point as the image processing time.
4. The method of claim 1, wherein determining a second refresh frequency for the view window based on the first refresh frequency and the first rendering time comprises:
calculating to obtain the reciprocal of the first refreshing frequency, and taking the reciprocal as first refreshing time;
calculating to obtain the ratio of the first drawing time to the first refreshing time;
if the ratio is larger than a preset ratio and smaller than 1, taking the first refresh frequency as an initial refresh frequency value;
if the ratio is smaller than a preset ratio, increasing the first refresh frequency until the ratio is larger than the preset ratio and smaller than 1, and taking the increased first refresh frequency as an initial value of the refresh frequency;
if the ratio is larger than 1, reducing the first refreshing frequency until the ratio is larger than a preset ratio and smaller than 1, and taking the reduced first refreshing frequency as an initial value of the refreshing frequency;
and determining a second refresh frequency according to the refresh frequency initial value.
5. The method of claim 4, wherein determining the second refresh rate according to the initial refresh rate value comprises:
acquiring a first drawing parameter, wherein the first drawing parameter is an image parameter corresponding to an image to be displayed in a view window in the last drawing;
acquiring a second drawing parameter, wherein the second drawing parameter is an image parameter corresponding to the image to be displayed in the view window in the current drawing process;
determining a correction coefficient according to the first drawing parameter and the second drawing parameter;
and determining a second refresh frequency according to the refresh frequency initial value and the correction coefficient.
6. The method of claim 1, further comprising, after said determining a second refresh frequency for the view window based on the first refresh frequency and the first rendering time:
and generating a current drawing instruction according to the second refreshing frequency so as to finish the current drawing of the view window according to the current drawing instruction.
7. A window image refresh frequency determination apparatus, characterized in that the apparatus comprises:
the device comprises a first obtaining module, a second obtaining module and a display module, wherein the first obtaining module is used for obtaining a first refreshing frequency of a view window, and the first refreshing frequency is a refreshing frequency corresponding to the last refreshing of the view window;
the second acquisition module is used for acquiring first drawing time of the view window, wherein the drawing time is the time for drawing the image in the view window last time;
and the frequency determining module is used for determining a second refreshing frequency of the view window according to the first refreshing frequency and the first drawing time, wherein the second refreshing frequency is a refreshing frequency corresponding to the current refreshing of the view window.
8. The apparatus of claim 7, wherein the obtaining the first drawing time of the view window comprises:
the third acquisition module is used for acquiring the image processing time for processing the image to be displayed in the view window and determining the first drawing time of the view window according to the image processing time.
9. A computer-readable storage medium, storing a computer program which, when executed by a processor, causes the processor to carry out the steps of the method according to any one of claims 1 to 6.
10. A computer device comprising a memory and a processor, the memory storing a computer program that, when executed by the processor, causes the processor to perform the steps of the method according to any one of claims 1 to 6.
CN201910934480.1A 2019-09-29 2019-09-29 Window image refreshing frequency determining method and device, computer equipment and medium Pending CN110708587A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910934480.1A CN110708587A (en) 2019-09-29 2019-09-29 Window image refreshing frequency determining method and device, computer equipment and medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910934480.1A CN110708587A (en) 2019-09-29 2019-09-29 Window image refreshing frequency determining method and device, computer equipment and medium

Publications (1)

Publication Number Publication Date
CN110708587A true CN110708587A (en) 2020-01-17

Family

ID=69197237

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910934480.1A Pending CN110708587A (en) 2019-09-29 2019-09-29 Window image refreshing frequency determining method and device, computer equipment and medium

Country Status (1)

Country Link
CN (1) CN110708587A (en)

Citations (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106941563A (en) * 2017-03-10 2017-07-11 广东欧珀移动通信有限公司 A kind of control method, device and the mobile terminal of mobile terminal refresh rate
CN106997348A (en) * 2016-01-22 2017-08-01 腾讯科技(深圳)有限公司 A kind of data method for drafting and device
CN107193515A (en) * 2017-04-10 2017-09-22 腾讯科技(深圳)有限公司 Animation shows monitoring method, device and its equipment of fluency
US20180061364A1 (en) * 2016-02-25 2018-03-01 Nvidia Corporation Variable refresh rate video capture and playback
US20180174550A1 (en) * 2016-12-19 2018-06-21 Mediatek Singapore Pte. Ltd. Method for adjusting the adaptive screen-refresh rate and device thereof
US20180247616A1 (en) * 2015-03-18 2018-08-30 Ati Technologies Ulc Method and apparatus for compensating for variable refresh rate display range limitations
CN108628562A (en) * 2017-03-23 2018-10-09 中科创达软件股份有限公司 A kind of screen refresh method and system
CN108762881A (en) * 2018-06-21 2018-11-06 广州酷狗计算机科技有限公司 Interface method for drafting, device, terminal and storage medium
CN109640168A (en) * 2018-11-27 2019-04-16 Oppo广东移动通信有限公司 Method for processing video frequency, device, electronic equipment and computer-readable medium
CN110175062A (en) * 2019-05-20 2019-08-27 努比亚技术有限公司 A kind of screen-refresh frame per second method, mobile terminal and the storage medium of mobile terminal

Patent Citations (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20180247616A1 (en) * 2015-03-18 2018-08-30 Ati Technologies Ulc Method and apparatus for compensating for variable refresh rate display range limitations
CN106997348A (en) * 2016-01-22 2017-08-01 腾讯科技(深圳)有限公司 A kind of data method for drafting and device
US20180061364A1 (en) * 2016-02-25 2018-03-01 Nvidia Corporation Variable refresh rate video capture and playback
US20180174550A1 (en) * 2016-12-19 2018-06-21 Mediatek Singapore Pte. Ltd. Method for adjusting the adaptive screen-refresh rate and device thereof
CN106941563A (en) * 2017-03-10 2017-07-11 广东欧珀移动通信有限公司 A kind of control method, device and the mobile terminal of mobile terminal refresh rate
CN108628562A (en) * 2017-03-23 2018-10-09 中科创达软件股份有限公司 A kind of screen refresh method and system
CN107193515A (en) * 2017-04-10 2017-09-22 腾讯科技(深圳)有限公司 Animation shows monitoring method, device and its equipment of fluency
CN108762881A (en) * 2018-06-21 2018-11-06 广州酷狗计算机科技有限公司 Interface method for drafting, device, terminal and storage medium
CN109640168A (en) * 2018-11-27 2019-04-16 Oppo广东移动通信有限公司 Method for processing video frequency, device, electronic equipment and computer-readable medium
CN110175062A (en) * 2019-05-20 2019-08-27 努比亚技术有限公司 A kind of screen-refresh frame per second method, mobile terminal and the storage medium of mobile terminal

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
林赞: ""分布式网络视频显示同步时钟的设计与实现"", 《中国优秀硕士学位论文全文数据库》 *

Similar Documents

Publication Publication Date Title
US10210845B2 (en) Method and apparatus for compensating for variable refresh rate display range limitations
US9894287B2 (en) Method and apparatus for acquiring a high dynamic image using multiple cameras
US10714056B2 (en) Extending the range of variable refresh rate displays
CN105183322B (en) Progress bar display methods and device
US8390542B2 (en) Apparatus, method, and program for processing image
CN108924525B (en) Image brightness adjusting method and device, computer equipment and storage medium
WO2017206859A1 (en) Method, apparatus and terminal for controlling cpu power consumption
US20210056693A1 (en) Tissue nodule detection and tissue nodule detection model training method, apparatus, device, and system
CN110708587A (en) Window image refreshing frequency determining method and device, computer equipment and medium
CN110717878A (en) Image fusion method and device, computer equipment and storage medium
CN110570407A (en) image processing method, storage medium and computer device
CN109036296B (en) Screen backlight brightness adjusting method and device, terminal and storage medium
CN109165103A (en) Frame rate control method, device, terminal and storage medium
US10943372B2 (en) GUI display method and apparatus, and terminal device
CN107817935A (en) Display methods, device, terminal and the computer-readable recording medium of application interface
EP2926723A1 (en) Fundus image output device and method, and program
US20210166457A1 (en) Graphic drawing method and apparatus, device, and storage medium
WO2021129415A1 (en) Frame rate adjusting method and apparatus for display screen, terminal, and storage medium
CN110580693A (en) Image processing method, image processing device, computer equipment and storage medium
CN110049299B (en) Trapezoidal correction method and device, computer equipment and storage medium
CN111986088A (en) Image processing method, image processing device, storage medium and terminal equipment
CN111611043A (en) Image display method, image display device, electronic equipment and computer readable storage medium
CN108737744B (en) Image display method and device
CN110738598A (en) Image adaptation method, electronic device and storage medium
CN108170349A (en) A kind of medical image display method, device, equipment and storage medium

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