Summary of the invention
In view of above-mentioned the deficiencies in the prior art, the object of the present invention is to provide the method and system regulating display screen refreshing frequency according to the light frequency of lamp source, be intended to solve the problem that prior art can not cause display screen to glimmer when the light frequency of the refreshing frequency of display screen and lamp source does not exist integral multiple relation.
Compared with prior art, the invention provides following technical scheme:
Regulate the method for display screen refreshing frequency according to the light frequency of lamp source, comprise the following steps:
The light frequency F1 of A, acquisition lamp source;
The current refreshing frequency F2 of B, acquisition display screen;
C, judge whether K=F1/F2 is integer, if not, then perform step D;
The refreshing frequency F2 of D, adjustment display screen, makes K be integer.
The described light frequency according to lamp source regulates the method for display screen refreshing frequency, and wherein, described steps A specifically comprises:
A100, obtain the luminance brightness maximal value of lamp source by mobile terminal optical sensor, and record current time T1;
A200, obtain adjacent next luminance brightness maximal value, and record current time T2;
The light frequency F1=1/(T2-T1 of A300, calculating lamp source).
The described light frequency according to lamp source regulates the method for display screen refreshing frequency, and wherein, it is characterized in that, K is 1.
The described light frequency according to lamp source regulates the method for display screen refreshing frequency, and wherein, described step C also comprises: if so, then inoperation.
The described light frequency according to lamp source regulates the method for display screen refreshing frequency, and wherein, it is characterized in that, described steps A 100 specifically comprises:
Steps A 110, the brightness value L X clearing of will preserve in advance;
Steps A 120, by the current luminance brightness of optical sensor Real-time Obtaining, when optical sensor induction brightness values LY be more than or equal to brightness preserve module preserve brightness value L X, make LX equal LY, and record current time;
Steps A 130, do not change the value of LX when the brightness values LY obtained is less than the brightness value L X of preservation, and obtain the time of last time T1 when changing LX value as luminance brightness maximal value, then execution steps A 110.
Corresponding with said method, present invention also offers the system regulating display screen refreshing frequency according to the light frequency of lamp source, comprising:
Light frequency acquisition module, for obtaining the light frequency F1 of lamp source;
Refreshing frequency acquisition module, for obtaining the current refreshing frequency F2 of display screen;
Judge module, for judging whether K=F1/F2 is integer, if not, then starts adjusting module;
Frequency regulation block, for adjusting the refreshing frequency F2 of display screen, makes K be integer.
The described light frequency according to lamp source regulates the system of display screen refreshing frequency, and wherein, described light frequency acquisition module specifically comprises:
A luminance brightness acquisition module, for being obtained the luminance brightness maximal value of lamp source by mobile terminal optical sensor, and records current time T1;
Secondary light luminance acquisition module, for obtaining adjacent next luminance brightness maximal value, and records current time T2;
Light frequency computing module, for calculating the light frequency F1=1/(T2-T1 of lamp source).
The described light frequency according to lamp source regulates the system of display screen refreshing frequency, and wherein, K is 1.
The described light frequency according to lamp source regulates the system of display screen refreshing frequency, and wherein, described judge module is also for being integer, then inoperation as K=F1/F2.
The described light frequency according to lamp source regulates the system of display screen refreshing frequency, and wherein, a described luminance brightness acquisition module specifically comprises:
Dump block, resets for the brightness value L X that will preserve in advance;
Assignment module, for passing through the current luminance brightness of optical sensor Real-time Obtaining, when the brightness values LY of optical sensor induction is more than or equal to the brightness value L X that module preservation is preserved in brightness, makes LX equal LY, and recording current time;
Maximal value time-obtaining module, does not change the value of LX during for being less than the brightness value L X of preservation as the brightness values LY obtained, and time T1 when obtaining last change LX value is as the time of luminance brightness maximal value, then starts dump block.
Compared with prior art, light frequency according to lamp source provided by the present invention regulates the method and system of display screen refreshing frequency, the light frequency of lamp source is obtained by optical sensor, then the current refreshing frequency of display screen is obtained, both compared, whether both judgements exist integral multiple relation, if both do not exist integral multiple relation, then adjust the refreshing frequency of display screen, make both proportionate relationships be integer.Provide the method and system regulating display screen refreshing frequency according to the light frequency of lamp source, regulate the refreshing frequency of display screen according to the light frequency of lamp source, under avoiding lamp source, display screen glimmers, and can not damage the eyes of beholder.
Embodiment
The invention provides the method and system regulating display screen refreshing frequency according to the light frequency of lamp source, for making object of the present invention, technical scheme and effect clearly, clearly, referring to accompanying drawing examples, the present invention is described in more detail.Should be appreciated that specific embodiment described herein only in order to explain the present invention, be not intended to limit the present invention.
Refer to Fig. 1, Fig. 1 is the method flow diagram that the light frequency according to lamp source of the present invention regulates display screen refreshing frequency.As shown in Figure 1, the light frequency according to lamp source of the present invention regulates the method for display screen refreshing frequency, comprises the following steps:
The light frequency F1 of step 101, acquisition lamp source; The light frequency method obtaining lamp source is a lot, as obtained two adjacent luminance brightness maximal values or minimum value, then calculates light frequency according to the time interval of two maximal values or minimum value.Certainly, also can be obtained by the value of acquisition same light brightness, brightness values as obtained is not maximal value or minimum value, light according to lamp source changes, after obtaining first value, then obtain the 3rd identical value, and obtain the corresponding time and can calculate light frequency, this is because: if acquisition is not maximal value or minimum value, in a cycle period, there are two brightness values to be identical.
The current refreshing frequency F2 of step 102, acquisition display screen; Display screen displaying contents is realized by each pixel in redraw, and because the time interval of refreshing is very short and persistence of vision, the displaying contents that therefore user sees is always constant.Refreshing frequency refers to the number of times that in the unit interval, screen content refreshes, refresh and once referred to that all pixels from the high order end pixel of display screen first trip to display screen last column low order end pixel refresh, refreshing is that often row pixel from left to right according to each row pixel from top to bottom.Specifically as shown in Figure 3, Fig. 3 is the pixel refreshing schematic diagram of described display screen.In figure 3,301 display pixels referring to display screen, 302 refer to the display pixel of often going.The refreshing frequency of display screen can control, and only need obtain set refreshing frequency value during acquisition.
Step 103, judge whether K=F1/F2 is integer, if not, then perform step 104; After obtaining the light frequency F1 of lamp source and the current refreshing frequency F1 of display screen, both compared, judge whether K=F1/F2 is integer, if integer, then inoperation, if not integer, then performs step 104.
The refreshing frequency F2 of step 104, adjustment display screen, makes K be integer.The refreshing frequency F2 of display screen is adjusted, the ratio K of F1/F2 is adjusted to integer, preferably, make K=1.Namely K=1 is the refreshing frequency that light frequency equals display screen, adjustment display screen refreshing frequency is identical with mains frequency just can avoid light under display screen glimmer.
Method as above, is applicable to various display, comprises computer monitor, mobile terminal display etc., its method obtaining the light frequency of lamp source has a lot, carries out input computer, and then adjust the refreshing frequency of display screen after being obtained by optical sensor.
Based on such scheme, the invention provides preferred the next scheme, step 101 is limited.Described step 101 specifically comprises:
Step one, obtain the luminance brightness maximal value of lamp source by mobile terminal optical sensor, and record current time T1; This process is specific as follows: reset by the brightness value L X preserved in advance; By the luminance brightness that optical sensor Real-time Obtaining is current, when the brightness values LY of optical sensor induction is more than or equal to the brightness value L X that module preservation is preserved in brightness, makes LX equal LY, and record current time; Do not change the value of LX when the brightness values LY obtained is less than the brightness value L X of preservation, and time T1 when obtaining last change LX value is as the time of luminance brightness maximal value, then performs steps A 110.
Step 2, obtain adjacent next luminance brightness maximal value, and record current time T2, identical with step one.
The light frequency F1=1/(T2-T1 of step 3, calculating lamp source).
The preferred version of step 101 as above, described method is made to be applicable to mobile terminal, at mobile terminal, optical sensor is set, the luminance brightness maximal value (identical with acquisition principle of minimum) of lamp source is obtained by optical sensor, obtain the mistiming of two adjacent luminance brightness maximal values, calculate light frequency according to the mistiming.For mobile terminal adds the function regulating refreshing frequency, the mobile terminal display screen carried is made to there will not be scintillation, because mobile terminal (mobile phone) is often carried at any time by user, therefore enable mobile terminal regulate the refreshing frequency of display screen, can facilitate and often travel to and fro between the differentiated user in mains frequency area.
Refer to Fig. 2, Fig. 2 is the system construction drawing that the light frequency according to lamp source of the present invention regulates display screen refreshing frequency.As shown in Figure 2, the light frequency according to lamp source of the present invention regulates the system of display screen refreshing frequency, comprising:
Light frequency acquisition module 201, for obtaining the light frequency F1 of lamp source;
Refreshing frequency acquisition module 202, for obtaining the current refreshing frequency F2 of display screen;
Judge module 203, for judging whether K=F1/F2 is integer, if not, then starts adjusting module;
Frequency regulation block 204, for adjusting the refreshing frequency F2 of display screen, makes K be integer.
System as above, is applicable to various display, comprises computer monitor, mobile terminal display etc., its method obtaining the light frequency of lamp source has a lot, inputs computer, and then adjust the refreshing frequency of computer display screen after being obtained by optical sensor.
Based on such scheme, the invention provides preferred the next scheme, step 101 is limited.Described light frequency acquisition module 201 specifically comprises:
A luminance brightness acquisition module, for being obtained the luminance brightness maximal value of lamp source by mobile terminal optical sensor, and records current time T1; Optical sensor is set at mobile terminal, is obtained the luminance brightness maximal value (identical with acquisition principle of minimum) of lamp source by optical sensor, obtain the mistiming of two adjacent luminance brightness maximal values, calculate light frequency according to the mistiming.For mobile terminal adds the function regulating refreshing frequency, the mobile terminal display screen carried is made to there will not be scintillation, because mobile terminal (mobile phone) is often carried at any time by user, therefore enable mobile terminal regulate the refreshing frequency of display screen, can facilitate and often travel to and fro between the differentiated user in mains frequency area.
Secondary light luminance acquisition module, for obtaining adjacent next luminance brightness maximal value, and records current time T2;
Light frequency computing module, for calculating the light frequency F1=1/(T2-T1 of lamp source).
Above-mentioned preferred version, make described system be applicable to mobile terminal, optical sensor is set at mobile terminal, obtained the luminance brightness maximal value (identical with acquisition principle of minimum) of lamp source by optical sensor, obtain the mistiming of two adjacent luminance brightness maximal values, calculate light frequency according to the mistiming.For mobile terminal adds the function regulating refreshing frequency, the mobile terminal display screen carried is made to there will not be scintillation, because mobile terminal (mobile phone) is often carried at any time by user, therefore enable mobile terminal regulate the refreshing frequency of display screen, can facilitate and often travel to and fro between the differentiated user in mains frequency area.
The described light frequency according to lamp source regulates the system of display screen refreshing frequency, and wherein, K is 1.
The described light frequency according to lamp source regulates the system of display screen refreshing frequency, and wherein, described judge module is also for being integer, then inoperation as K=F1/F2.
The described light frequency according to lamp source regulates the system of display screen refreshing frequency, and wherein, a described luminance brightness acquisition module specifically comprises:
Dump block, resets for the brightness value L X that will preserve in advance;
Assignment module, for passing through the current luminance brightness of optical sensor Real-time Obtaining, when the brightness values LY of optical sensor induction is more than or equal to the brightness value L X that module preservation is preserved in brightness, makes LX equal LY, and recording current time;
Maximal value time-obtaining module, does not change the value of LX during for being less than the brightness value L X of preservation as the brightness values LY obtained, and time T1 when obtaining last change LX value is as the time of luminance brightness maximal value, then starts dump block.
In sum, light frequency according to lamp source provided by the present invention regulates the method and system of display screen refreshing frequency, the light frequency of lamp source is obtained by optical sensor, then the current refreshing frequency of display screen is obtained, both compared, whether both judgements exist integral multiple relation, if both do not exist integral multiple relation, then adjust the refreshing frequency of display screen, make both proportionate relationships be integer.Provide the method and system regulating display screen refreshing frequency according to the light frequency of lamp source, regulate the refreshing frequency of display screen according to the light frequency of lamp source, under avoiding lamp source, display screen glimmers, and can not damage the eyes of beholder.
Should be understood that, application of the present invention is not limited to above-mentioned citing, for those of ordinary skills, can be improved according to the above description or convert, and all these improve and convert the protection domain that all should belong to claims of the present invention.