The adjusting method and system that video night plays
Technical field
The adjusting method and system played the present invention relates to video broadcasting field more particularly to a kind of video night.
Background technique
Electronic equipment is popularized, and more and more people use electronic equipment, especially mobile terminal, still, current
There has been no the functions of being protected to human eye again for mobile terminal, and especially at night, user is when using mobile terminal player, only
Screen can be reduced by manually adjusting screen intensity to the thorn of human eye with swashing, it is inconvenient that this method is adjusted, can not intelligence
Screen intensity is adjusted in energy ground.
In the prior art, there are some relevant technologies in TV industry, such as CN101090450A discloses one kind
The implementation method and device of night mode of display equipment, are adjusted by the television image to night, to protect eyes: working as electricity
When depending on being switched to Night, the relevant mode analog quantity of TV is changed according to preset in advance value, image or audio are handled, but
It is, if the user second day viewing TV that is switched on daytime, to see TV daytime since the state of night viewing TV is not able to satisfy
When demand, it is necessary to be adapted to watch under daylight environment again;Importantly, the technology is only only aware of night viewing
Existing difference between mode and conventional watching mode, gives the working mechanism matched with two kinds of watching modes, but for
The solution of night watching mode is simple and crude, directly adjusts screen intensity, contrast only by the parameter of preset in advance
And the mode of volume, the display effect of night screen can not be improved, because the external environment light brightness at daytime and night is not
Equally, when watching at night, human eye is not only to require to screen intensity, it is also necessary to the luminance information and color of video image
The cooperation of the various aspects such as information and pixel can be only achieved relatively good viewing effect.Especially in mobile terminal, according to the prior art
Mode reduce screen intensity manually, it is still very big to the stimulation of human eye, and since unexpected brightness change can also be to user
Cause the sense of discomfort of a period of time.
The adjusting method and system played the invention proposes a kind of video night, can be automatic according to environment bright intensity
Orderly adjust video playing picture frame luminance information and chrominance information, to night viewing video user with eye-shaped at protection.
Summary of the invention
In order to overcome the deficiencies of the prior art, the object of the present invention is to provide a kind of video night play adjusting method and
System can adjust the luminance information and chrominance information of video playing picture frame, to night according to environment bright intensity automatic order
Between watch video user with eye-shaped at protection.
In order to solve the technical problem in background technique, the present invention provides a kind of video night play adjusting method,
The following steps are included:
S1, under night play mode, video single-frame images information is successively obtained according to video playing sequence, described in calculating
The brightness value and chromatic value of each pixel in image;
S2, the brightness value of each pixel is reduced to the brightness range of setting;
S3, the chrominance information of each pixel is compensated;
Image after S4, output adjusting;
S5, according to S2 to S4 the step of, successively handle video multiple image until video playing terminate.
Preferably, the step S2 specifically: by the luminance-value reduction 85%-95% of each pixel.
Correspondingly, the step S3 specifically: to after each pixel adjustment luminance information and chrominance information in proportion into
The proportional region of row mixing, luminance information and chrominance information is 0.85:0.15 to 0.95:0.05.
Optionally, by defining the time segmented mode of Night, sensors sense environmental brightness mode or manually opening
It opens mode and video play mode is switched to night play mode.
Specifically, the step S4 further includes carrying out flat to the audio-frequency information of video to adjust setting, and synchronism output tune
Image information and audio-frequency information after section.
The present invention also provides the regulating systems that a kind of video night plays, and comprise the following modules:
Decoder module, for obtaining the single-frame images of the video under night play mode;
Computing module, for calculating the pixel brightness value and chromatic value of acquired image;
Luminance adjustment module, for reducing the brightness range of the brightness value extremely setting of each pixel;
Chromatic compensation module is compensated for the chrominance information to each pixel;
Output module, for continuously the video image that brightness and color is adjusted to be completed in output as unit of frame.
Preferably, the luminance adjustment module is by the luminance-value reduction 85%-95% of each pixel.
Further, the chromatic compensation module to after each pixel adjustment luminance information and chrominance information in proportion into
The proportional region of row mixing, luminance information and chrominance information is 0.85:0.15 to 0.95:0.05.
Optionally, by defining the time segmented mode of Night, sensors sense environmental brightness mode or manually opening
It opens mode and video play mode is switched to night play mode.
Preferably, the regulating system that video night of the invention plays further includes audio adjustment module, for video
Audio-frequency information carries out flat and adjusts setting, image information and audio-frequency information after the output module synchronism output adjusting.
By adopting the above technical scheme, the adjusting method and system that video night of the invention plays can be according to environment brights
Intensity automatic order adjusts the luminance information and chrominance information of video playing picture frame, to user's eye-shaped of night viewing video
At protection.
Detailed description of the invention
It, below will be to required in embodiment or description of the prior art in order to illustrate more clearly of technical solution of the present invention
The attached drawing used is briefly described, it should be apparent that, drawings in the following description are only some embodiments of the invention, right
For those of ordinary skill in the art, without creative efforts, it can also be obtained according to these attached drawings
Its attached drawing.
Fig. 1 is the flow chart of the adjusting method played at video night provided in an embodiment of the present invention;
Fig. 2 is the system block diagram of the regulating system played at video night provided in an embodiment of the present invention.
Specific embodiment
Following will be combined with the drawings in the embodiments of the present invention, and technical solution in the embodiment of the present invention carries out clear, complete
Site preparation description, it is clear that described embodiments are only a part of the embodiments of the present invention, instead of all the embodiments.It is based on
Embodiment in the present invention, those of ordinary skill in the art without creative labor it is obtained it is all its
His embodiment, shall fall within the protection scope of the present invention.
Embodiment 1: Fig. 1 is the flow chart of the adjusting method played at video night provided in an embodiment of the present invention, Cong Tuzhong
It can be clearly seen that the adjusting method that plays of video night provided in this embodiment the following steps are included:
S1, under night play mode, video single-frame images information is successively obtained according to video playing sequence, described in calculating
The brightness value and chromatic value of each pixel in image;
S2, the brightness value of each pixel is reduced to the brightness range of setting;
S3, the chrominance information of each pixel is compensated;
Image after S4, output adjusting;
S5, according to S2 to S4 the step of, successively handle video multiple image until video playing terminate.
In the present embodiment, the media medium for playing video is mobile terminal, such as smart phone, tablet computer or notebook
The smart machines such as computer, and the handover operation of video play mode, In are carried out using the time segmented mode for defining Night
The period for presetting Night on mobile terminal in video player is 7 points of evening to 7 points of morning next day, then opening video
After player application, processor judges whether current time is in the above-mentioned Night period, is in the above-mentioned period
Video content in addition is played by normal mode, and the video content within the above-mentioned period is played by Night, specifically
Adjustment process is as follows:
Firstly for the video first frame image for entering the above-mentioned period, the yuv data information of described image is obtained, wherein
" Y " indicates brightness (Luminance or Luma);And that " U " and " V " is indicated is then coloration (Chrominance or Chroma),
Effect is description colors of image and saturation degree, the color for specified pixel, it can be seen that the Y of analytical calculation described image points
Measure the brightness value of each pixel in available image, it is each in the available image of U, V component of analytical calculation described image
The chromatic value of pixel, it is then disposable to complete the adjusting for carrying out reducing brightness to the luminance information of each pixel operation, each picture
The brightness value of element reduces 85%-95% simultaneously, that is, the brightness value of each pixel after adjusting is only the 5%- of original pixel brightness value
15%.After the brightness for having adjusted pixel, the luminance information after each pixel adjustment is mixed in proportion with colouring information,
Based on brightness, coloration is taken second place, and in the present embodiment, the two ratio is 0.85:0.15, specifically, according to each picture after adjusting
The brightness value of element and the ratio of brightness value and chromatic value, are calculated the chromatic value of each pixel after adjusting, finally obtain
The brightness value and chromatic value of each pixel complete the brightness and color adaptation of single frame video image, and will complete to adjust operation
The frame image is output on the display screen of mobile terminal, is circuited sequentially acquisition and is handled the next frame image of the video, directly
It is finished to video playing or user exits video player application or leaves the definition time of the Night
Section.
The present embodiment additionally provides a kind of regulating system that video night plays, and Fig. 2 is view provided in an embodiment of the present invention
The system block diagram for the regulating system that frequency night plays, from the figures it is clear that video night provided in this embodiment is broadcast
The regulating system put comprises the following modules:
Decoder module, for obtaining the single-frame images of the video under night play mode;
Computing module, for calculating the pixel brightness value and chromatic value of acquired image;
Luminance adjustment module, for reducing the brightness range of the brightness value extremely setting of each pixel;
Chromatic compensation module is compensated for the chrominance information to each pixel;
Output module, for continuously the video image that brightness and color is adjusted to be completed in output as unit of frame.
Preferably, the luminance adjustment module is by the luminance-value reduction 85%-95% of each pixel.
Further, the chromatic compensation module to after each pixel adjustment luminance information and chrominance information in proportion into
The proportional region of row mixing, luminance information and chrominance information is 0.85:0.15.
Specifically, video play mode is switched to Night by defining the time segmented mode of Night.
Embodiment 2: different with embodiment 1, the information that video single-frame images is obtained in the present embodiment is RGB number
It is believed that ceasing, and the brightness value and chromatic value of each pixel in image, in electronic display screen, RGB are calculated according to RGB information
It is so-called it is " how many " just refer to brightness, and indicated using integer, it is generally the case that R, G, B respectively have 256 grades of brightness, according to meter
It calculates, 256 grades of rgb color can be combined into about 16,780,000 kinds of colors in total, and different RGB numerical value represents a kind of color, can see
Out, the R, G, B component of analytical calculation described image distinguish the brightness value and chromatic value of each pixel in available image.
In the present embodiment, optionally, the ratio of both brightness value and chromatic value is set as 0.95:0.05, according to this ratio
Example is adjusted after each pixel chromatic value, correspondingly, the coloration benefit for the regulating system that video night plays
Module is repaid to mix the luminance information after each pixel adjustment in proportion with chrominance information, luminance information and chrominance information
Proportional region is 0.95:0.05.
Embodiment 3: unlike embodiment 1 or 2, using sensors sense environmental brightness mode come real in the present embodiment
The switching of existing video play mode, the brightness information that the sensor will test are sent to controller, and controller is according to default
The fiducial value of brightness range and the detection information result of Night determine whether to switch video play mode
To Night, specifically, detection information result is in the brightness range of preset Night, then controller controls video
Player enters night play mode, is also to pass through sensor in the regulating system that the video night plays correspondingly
Ambient brightness mode is detected to switch Night.
Embodiment 4: unlike embodiment 1 or 2, using manually opened Switch Video play mode in the present embodiment
Mode come realize video Night play handover operation.After opening video player application, it is provided with and cuts manually
Button is changed, the button is pressed, Night can be switched to by normal play mode, or be switched to normally by Night
Play mode is also correspondingly to switch night by manually opened mode in the regulating system that the video night plays
Between mode.
Embodiment 5: unlike embodiment 1-4, in the present embodiment, the adjusting method that video night plays further includes pair
The audio-frequency information of video carries out flat and adjusts setting, and the volume of video playing is automatically lowered to preset audio range,
It rests to avoid other people are influenced at night, and image information and audio-frequency information after synchronism output adjusting, it is correspondingly, described
The regulating system that video night plays further includes audio adjustment module, carries out flat adjusting for the audio-frequency information to video and sets
It sets, image information and audio-frequency information after the output module synchronism output adjusting.
The adjusting method and system that video night of the invention plays can be adjusted according to environment bright intensity automatic order
The luminance information and chrominance information of video playing picture frame, to night viewing video user with eye-shaped at protection.
Above disclosed be only several preferred embodiments of the invention, cannot limit the present invention's certainly with this
Interest field, therefore equivalent changes made in accordance with the claims of the present invention, are still within the scope of the present invention.