The control method of video broadcasting at night and system
Technical field
The present invention relates to video playback field, particularly relate to control method and the system of the broadcasting at night of a kind of video.
Background technology
Popularizing of electronic equipment; increasing people uses electronic equipment; especially mobile terminal; but current mobile terminal not yet has again the function protected human eye, particularly at night; user is when using mobile terminal player; manually adjusting screen brightness can only reduce screen to the thorn of human eye along with swashing, this method regulates inconvenient, can not regulate screen intensity intelligently.
In prior art, some relevant technology have been had in TV industry, such as CN101090450A discloses a kind of implementation method and device of night mode of display equipment, by regulating the television image at night, to protect eyes: when TV is switched to Night, according to the associated analog amount of preset in advance value change TV, image or audio frequency are processed, but, the viewing TV if user starts shooting for second day by day, because the state of watching TV night can not meet demand when seeing TV daytime, watch under again must adjusting to adapt to daylight environment, the more important thing is, this technology only recognize night watching mode and conventional watching mode between the difference that exists, give the working mechanism matched with two kinds of watching modes, but the solution of watching mode is simple and crude for night, the direct adjusting screen brightness of parameter only by preset in advance, the mode of contrast and volume, the display effect of screen at night can not be improved, because the external environment condition light brightness at daytime and night is different, when watching night, human eye is not only have requirement to screen intensity, also need the monochrome information of video image to coordinate with each side such as colouring information and pixel and just can reach reasonable viewing effect.Particularly at mobile terminal, mode conventionally manually reduces screen intensity, still very large to the stimulation of human eye, and changes the sense of discomfort that also can cause a period of time to user due to unexpected brightness.
The present invention proposes control method and the system of the broadcasting at night of a kind of video, environmentally can regulate monochrome information and the chrominance information of video playback picture frame by bright intensity automatic order, with eye, protection is formed to the user watching video night.
Summary of the invention
For overcoming the deficiencies in the prior art; the object of the invention is: control method and system that the broadcasting at night of a kind of video is provided; environmentally can regulate monochrome information and the chrominance information of video playback picture frame by bright intensity automatic order, with eye, protection is formed to the user watching video night.
In order to solve the technical problem in background technology, the invention provides the control method of a kind of video broadcasting at night, comprising the following steps:
S1, under night play mode, obtain video single-frame images information successively according to video playback order, calculate brightness value and the chromatic value of each pixel in described image;
The brightness range that S2, the brightness value reducing each pixel extremely set;
S3, the chrominance information of each pixel to be compensated;
Image after S4, Drazin inverse;
S5, step according to S2 to S4, process the multiple image of video successively until video playback terminates.
Preferably, described step S2 is specially: the brightness value of each pixel is reduced 85%-95%.
Correspondingly, described step S3 is specially: mix in proportion with chrominance information the monochrome information after each pixel adjustment, and the proportion of monochrome information and chrominance information is 0.85:0.15 to 0.95:0.05.
Alternatively, by defining the time period mode of Night, sensors sense environmental brightness mode or manually opened mode, video play mode is switched to play mode at night.
Particularly, described step S4 also comprise to the audio-frequency information of video carry out flat regulate arrange, and synchronism output regulate after image information and audio-frequency information.
Present invention also offers the regulating system of a kind of video broadcasting at night, comprise with lower module:
Decoder module, for obtaining the single-frame images of the video under play mode at night;
Computing module, for calculating pixel brightness value and the chromatic value of obtained image;
Luminance adjustment module, the brightness range that the brightness value for reducing each pixel extremely sets;
Chromatic compensation module, for compensating the chrominance information of each pixel;
Output module, for having exported the video image that YC regulates continuously in units of frame.
Preferably, the brightness value of each pixel is reduced 85%-95% by described luminance adjustment module.
Further, described chromatic compensation module mixes with chrominance information in proportion to the monochrome information after each pixel adjustment, and the proportion of monochrome information and chrominance information is 0.85:0.15 to 0.95:0.05.
Alternatively, by defining the time period mode of Night, sensors sense environmental brightness mode or manually opened mode, video play mode is switched to play mode at night.
Preferably, the regulating system of video of the present invention broadcasting at night also comprises audio frequency adjustment module, regulates setting, the image information after described output module synchronism output regulates and audio-frequency information for carrying out flat to the audio-frequency information of video.
Adopt technique scheme, the control method of video of the present invention broadcasting at night and system environmentally can regulate monochrome information and the chrominance information of video playback picture frame by bright intensity automatic order, form protection to the user watching video night with eye.
Accompanying drawing explanation
In order to be illustrated more clearly in technical scheme of the present invention, be briefly described to the accompanying drawing used required in embodiment or description of the prior art below, apparently, accompanying drawing in the following describes is only some embodiments of the present invention, for those of ordinary skill in the art, under the prerequisite not paying creative work, other accompanying drawing can also be obtained according to these accompanying drawings.
Fig. 1 is the flow chart of the control method of the video broadcasting at night that the embodiment of the present invention provides;
Fig. 2 is the system block diagram of the regulating system of the video broadcasting at night that the embodiment of the present invention provides.
Embodiment
Below in conjunction with the accompanying drawing in the embodiment of the present invention, be clearly and completely described the technical scheme in the embodiment of the present invention, obviously, described embodiment is only the present invention's part embodiment, instead of whole embodiments.Based on the embodiment in the present invention, the every other embodiment that those of ordinary skill in the art obtain under the prerequisite of not making creative work, all belongs to the scope of protection of the invention.
The flow chart of the control method of the video broadcasting at night that embodiment 1: Fig. 1 provides for the embodiment of the present invention, can clearly be seen that from figure, and the control method of the video broadcasting at night that the present embodiment provides comprises the following steps:
S1, under night play mode, obtain video single-frame images information successively according to video playback order, calculate brightness value and the chromatic value of each pixel in described image;
The brightness range that S2, the brightness value reducing each pixel extremely set;
S3, the chrominance information of each pixel to be compensated;
Image after S4, Drazin inverse;
S5, step according to S2 to S4, process the multiple image of video successively until video playback terminates.
In the present embodiment, the media of displaying video is mobile terminal, such as smart mobile phone, the smart machine such as panel computer or notebook computer, and adopt the time period mode of definition Night to carry out the handover operation of video play mode, the time period of presetting Night on mobile terminals in video player is that evening 7 is to point in morning 7 next day, so after opening video player application, processor judges whether current time is in the above-mentioned Night time period, the video content be in beyond the above-mentioned time period is play by normal mode, the video content be within the above-mentioned time period is play by Night, concrete adjustment process is as follows:
First for video first two field picture entering the above-mentioned time period, obtain the yuv data information of described image, wherein " Y " represents lightness (Luminance or Luma), that " U " and " V " represents is then colourity (Chrominance or Chroma), effect describes colors of image and saturation, be used to specify the color of pixel, can find out, the Y-component of image described in analytical calculation can obtain the brightness value of each pixel in image, the U of image described in analytical calculation, V component can obtain the chromatic value of each pixel in image, then disposable completing carries out reducing the adjustment operation of brightness to the monochrome information of each pixel, the brightness value of each pixel reduces 85%-95% simultaneously, the brightness value of each pixel after namely regulating is only the 5%-15% of former pixel brightness value.After having regulated the brightness of pixel, monochrome information after each pixel adjustment is mixed in proportion with colouring information, based on brightness, colourity is taken second place, in the present embodiment, both ratios are 0.85:0.15, be specially, according to the brightness value of each pixel after adjustment and the ratio of brightness value and chromatic value, calculate the chromatic value of each pixel after adjustment, finally obtain brightness value and the chromatic value of each pixel, complete brightness and the color adaptation of single frame video image, and this two field picture completing adjustment operation is outputted on the display screen of mobile terminal, circulation obtains and processes the next frame image of described video successively, until video playback is complete, or user exits video player application, or leave the definition time section of described Night.
The present embodiment additionally provides the regulating system of a kind of video broadcasting at night, the system block diagram of the regulating system of the video broadcasting at night that Fig. 2 provides for the embodiment of the present invention, can clearly be seen that from figure, the regulating system of the video broadcasting at night that the present embodiment provides comprises with lower module:
Decoder module, for obtaining the single-frame images of the video under play mode at night;
Computing module, for calculating pixel brightness value and the chromatic value of obtained image;
Luminance adjustment module, the brightness range that the brightness value for reducing each pixel extremely sets;
Chromatic compensation module, for compensating the chrominance information of each pixel;
Output module, for having exported the video image that YC regulates continuously in units of frame.
Preferably, the brightness value of each pixel is reduced 85%-95% by described luminance adjustment module.
Further, described chromatic compensation module mixes with chrominance information in proportion to the monochrome information after each pixel adjustment, and the proportion of monochrome information and chrominance information is 0.85:0.15.
Particularly, video play mode is switched to Night by the time period mode by defining Night.
Embodiment 2: with embodiment 1 different be, the information obtaining video single-frame images in the present embodiment is RGB data information, and brightness value and the chromatic value of each pixel in image is calculated according to RGB information, in electronic display screen, the what is called of RGB " how much " just refer to brightness, and use integer to represent, under normal circumstances, R, G, B respectively has 256 grades of brightness, according to calculating, the rgb color of 256 grades can be combined into about 1,678 ten thousand kinds of colors altogether, different RGB numerical value represents a kind of color, can find out, the R of image described in analytical calculation, G, B component can obtain brightness value and the chromatic value of each pixel in image respectively.
In the present embodiment, alternatively, the ratio of brightness value and chromatic value is set as 0.95:0.05, the chromatic value of each pixel after adjusted according to this ratio, correspondingly, the chromatic compensation module of the regulating system of described video broadcasting at night mixes with chrominance information in proportion to the monochrome information after each pixel adjustment, and the proportion of monochrome information and chrominance information is 0.95:0.05.
Embodiment 3: with embodiment 1 or 2 unlike, adopt sensors sense environmental brightness mode to realize the switching of video play mode in the present embodiment, the brightness information detected is sent to controller by described transducer, controller determines whether video play mode to be switched to Night according to the brightness scope of Night preset and the comparison value of described Detection Information result, be specially, Detection Information result is in the brightness scope of default Night, then controller controls video player and enters play mode at night, correspondingly, also be switch Night by sensors sense environmental brightness mode in the regulating system of described video broadcasting at night.
Embodiment 4: with embodiment 1 or 2 unlike, adopt in the present embodiment the mode of manually opened Switch Video play mode to realize video Night play handover operation.After opening video player application, be provided with manual switchover button, press described button, Night can be switched to by normal play mode, or be switched to normal play mode by Night, correspondingly, in the regulating system that described video is play night be also manually opening ways to switch Night.
Embodiment 5: with embodiment 1-4 unlike, in the present embodiment, the control method play at video night also comprises and carries out flat to the audio-frequency information of video and regulate and arrange, the volume of video playback is reduced to default audiorange automatically, have a rest to avoid affecting other people at night, and synchronism output regulate after image information and audio-frequency information, correspondingly, the regulating system of described video broadcasting at night also comprises audio frequency adjustment module, setting is regulated for carrying out flat to the audio-frequency information of video, image information after described output module synchronism output regulates and audio-frequency information.
The control method of video of the present invention broadcasting at night and system environmentally can regulate monochrome information and the chrominance information of video playback picture frame by bright intensity automatic order, form protection to the user watching video night with eye.
Above disclosedly be only several preferred embodiment of the present invention, certainly can not limit the interest field of the present invention with this, therefore according to the equivalent variations that the claims in the present invention are done, still belong to the scope that the present invention is contained.