A kind of luminance video adjusting method and electronic equipment
Technical field
The present invention relates to video field, more particularly to a kind of luminance video adjusting method and electronic equipment.
Background technology
User is during instant video interactive, the environment light source where any one in video interactive both sides
When intensity is weaker, the part or all of region in video in the frame of video such as corresponding user face can be caused dimmed
Or fuzzy, the instant video interaction of influence user, so as to reduce the interactive experience of user.
When the part or all of region in frame of video is dimmed or fuzzy weaker and fuzzy due to the intensity of light source,
User can only be by adjusting the intensity of light source size of place environment or being moved to the stronger ground FT-207 of light intensity
Take above mentioned problem, but in actual applications, the light source size of environment where user be it is uncontrollable or
Regulation gets up inconvenient, and user is moved to the stronger place of light intensity and also results in user and regarded immediately
Inconvenience during frequency;In actual use, above two solution can all reduce user instant
Consumer's Experience during video.
The content of the invention
In order to improve Consumer's Experience of the user during instant video, regarded the embodiments of the invention provide one kind
Frequency brightness adjusting method and electronic equipment.The technical scheme is as follows:
First aspect includes there is provided a kind of luminance video adjusting method, methods described:
Obtain the brightness of current video frame;
According to the brightness of the current video frame and the brightness regulation parameter of preceding video frame, current video is obtained
The brightness regulation parameter of frame;
According to mapping equation corresponding with the brightness regulation parameter of the current video frame, work as forward sight described in generation
Brightness after the regulation of each pixel of frequency frame.
With reference in a first aspect, in the first possible implementation, the brightness for obtaining current video frame
Including:
If the color space of the current video frame is YUV, the data of the current video frame are obtained, are obtained
The average for taking the brightness of current video frame all pixels point is the brightness of the current video frame;
If the color space of the current video frame is RGB, the color space of the current video frame is turned
YUV is changed to, and obtains the data of the current video frame, the brightness of current video frame all pixels point is obtained
Average is the brightness of the current video frame.
With reference to the first possible implementation of first aspect or first aspect, in second of possible realization
In mode, the brightness and the brightness regulation parameter of preceding video frame according to the current video frame is obtained
Before the brightness regulation parameter of current video frame, methods described also includes:
Transition parameter and brightness regulation scope [the first brightness, the second brightness] are set;
, can at the third with reference to second of first aspect to first aspect any one possible implementation
In the implementation of energy, the brightness and the brightness of preceding video frame according to the current video frame is obtained
The brightness regulation parameter of current video frame includes:
According to the brightness of the current video frame, the brightness regulation parameter of the preceding video frame, described first
Brightness, second brightness and the transition parameter, generate the brightness regulation parameter of the current video frame.
With reference to the third possible implementation of first aspect, in the 4th kind of possible implementation, institute
State brightness according to the current video frame, it is the brightness regulation parameter of the preceding video frame, described first bright
Degree, second brightness and the transition parameter, generate the brightness regulation parameter bag of the current video frame
Include:
The minimum value between the brightness of the current video frame and the second brightness is determined, and determines the minimum value
With the maximum between first brightness;
If the maximum is less than or equal to the brightness regulation parameter of the preceding video frame, first is set
Parameter is default value;
If the maximum is more than the brightness regulation parameter of the preceding video frame, according to the transition parameter,
By the first preset formula, first parameter is calculated;
According to the brightness regulation parameter of the preceding video frame and first parameter, the current video is generated
The brightness regulation parameter of frame.
With reference to second to the 4th kind of first aspect any one possible implementation, in the 5th kind of possibility
Implementation in, basis mapping equation corresponding with the brightness regulation parameter of the current video frame,
Brightness after the regulation for each pixel for generating the current video frame includes:
According to the brightness regulation parameter and the second brightness, the mapping equation is generated;
According to the mapping equation, the brightness after the regulation for each pixel for generating the current video frame.
With reference to the 5th kind of possible implementation of first aspect, in the 6th kind of possible implementation, institute
State according to the brightness regulation parameter and second brightness, generating the mapping equation includes:
Mapping equation is generated according to the secondary Lagrange's interpolation formula of default three points, wherein, it is described pre-
If three points include the first preset, the second preset and with the brightness regulation parameter and described second
Brightness is the point of coordinate.
, can at the 7th kind with reference to the 6th kind of first aspect to first aspect any one possible implementation
In the implementation of energy, methods described also includes:
The current video frame is entered according to the brightness after the regulation of each pixel of the current video frame
Row display and/or coding.
Second aspect is there is provided a kind of electronic equipment, and the electronic equipment includes:
Luminance acquisition module, the brightness for obtaining current video frame;
Regulation parameter acquisition module, for the brightness and the brightness of preceding video frame according to the current video frame
Regulation parameter, obtains the brightness regulation parameter of current video frame;
Luminance acquisition module is adjusted, for being reflected according to corresponding with the brightness regulation parameter of the current video frame
Formula is penetrated, the brightness after the regulation for each pixel for generating the current video frame.
With reference to second aspect, in the first possible implementation, the luminance acquisition module specifically for:
If the color space of the current video frame is YUV, the data of the current video frame are obtained, are obtained
The average for taking the brightness of current video frame all pixels point is the brightness of the current video frame;
If the color space of the current video frame is RGB, the color space of the current video frame is turned
YUV is changed to, and obtains the data of the current video frame, the brightness of current video frame all pixels point is obtained
Average is the brightness of the current video frame.
With reference to the first possible implementation of second aspect or second aspect, in second of possible realization
In mode, the equipment also includes:
Setup module, for setting transition parameter and brightness regulation scope [the first brightness, the second brightness];
, can at the third with reference to second of second aspect to second aspect any one possible implementation
Can implementation in, the regulation parameter acquisition module specifically for:
According to the brightness of the current video frame, the brightness regulation parameter of the preceding video frame, described first
Brightness, second brightness and the transition parameter, generate the brightness regulation parameter of the current video frame.
With reference to the third possible implementation of second aspect, in the 4th kind of possible implementation, institute
State regulation parameter acquisition module specifically for:
The minimum value between the brightness of the current video frame and the second brightness is determined, and determines the minimum value
With the maximum between first brightness;
If the maximum is less than or equal to the brightness regulation parameter of the preceding video frame, first is set
Parameter is default value;
If the maximum is more than the brightness regulation parameter of the preceding video frame, according to the transition parameter,
By the first preset formula, first parameter is calculated;
According to the brightness regulation parameter of the preceding video frame and first parameter, the current video is generated
The brightness regulation parameter of frame.
With reference to second to the 4th kind of second aspect any one possible implementation, in the 5th kind of possibility
Implementation in, it is described regulation luminance acquisition module specifically for:
According to the brightness regulation parameter and the second brightness, the mapping equation is generated;
According to the mapping equation, the brightness after the regulation for each pixel for generating the current video frame.
With reference to the 5th kind of possible implementation of second aspect, in the 6th kind of possible implementation, institute
State regulation luminance acquisition module specifically for:
Mapping equation is generated according to the secondary Lagrange's interpolation formula of default three points, wherein, it is described pre-
If three points include the first preset, the second preset and with the brightness regulation parameter and described second
Brightness is the point of coordinate.
, can at the 7th kind with reference to the 6th kind of second aspect to second aspect any one possible implementation
In the implementation of energy, the equipment also includes:
Display and/or coding module, after the regulation according to each pixel of the current video frame
Brightness is shown and/or encoded to the current video frame.
The third aspect is there is provided a kind of electronic equipment, and the electronic equipment includes memory and deposited with described
The processor of reservoir connection, the memory is used to store batch processing code, and the processor calls described
The program code that memory is stored is used to perform following operation:
Obtain the brightness of current video frame;
According to the brightness of the current video frame and the brightness regulation parameter of preceding video frame, current video is obtained
The brightness regulation parameter of frame;
According to mapping equation corresponding with the brightness regulation parameter of the current video frame, work as forward sight described in generation
Brightness after the regulation of each pixel of frequency frame.
With reference to the third aspect, in the first possible implementation, the processor calls the memory
The program code stored is specifically for performing following operate:
If the color space of the current video frame is YUV, the data of the current video frame are obtained, are obtained
The average for taking the brightness of current video frame all pixels point is the brightness of the current video frame;
If the color space of the current video frame is RGB, the color space of the current video frame is turned
YUV is changed to, and obtains the data of the current video frame, the brightness of current video frame all pixels point is obtained
Average is the brightness of the current video frame.
With reference to the first possible implementation of the third aspect or the third aspect, in second of possible realization
In mode, the program code that the processor calls the memory to be stored is additionally operable to perform following operation:
Transition parameter and brightness regulation scope [the first brightness, the second brightness] are set;
, can at the third with reference to second of the third aspect to first aspect any one possible implementation
In the implementation of energy, the processor calls the program code that the memory is stored specifically for execution
Operate below:
According to the brightness of the current video frame, the brightness regulation parameter of the preceding video frame, described first
Brightness, second brightness and the transition parameter, generate the brightness regulation parameter of the current video frame.
With reference to the third possible implementation of the third aspect, in the 4th kind of possible implementation, institute
State processor and call the program code that the memory is stored specifically for performing following operate:
The minimum value between the brightness of the current video frame and the second brightness is determined, and determines the minimum value
With the maximum between first brightness;
If the maximum is less than or equal to the brightness regulation parameter of the preceding video frame, first is set
Parameter is default value;
If the maximum is more than the brightness regulation parameter of the preceding video frame, according to the transition parameter,
By the first preset formula, first parameter is calculated;
According to the brightness regulation parameter of the preceding video frame and first parameter, the current video is generated
The brightness regulation parameter of frame.
With reference to second to the 4th kind of the third aspect any one possible implementation, in the 5th kind of possibility
Implementation in, the processor call the program code that the memory is stored specifically for perform with
Lower operation:
According to the brightness regulation parameter and the second brightness, the mapping equation is generated;
According to the mapping equation, the brightness after the regulation for each pixel for generating the current video frame.
With reference to the 5th kind of possible implementation of the third aspect, in the 6th kind of possible implementation, institute
State processor and call the program code that the memory is stored specifically for performing following operate:
Mapping equation is generated according to the secondary Lagrange's interpolation formula of default three points, wherein, it is described pre-
If three points include the first preset, the second preset and with the brightness regulation parameter and described second
Brightness is the point of coordinate.
, can at the 7th kind with reference to the 6th kind of the third aspect to the third aspect any one possible implementation
Can implementation in, the program code that the processor calls the memory to be stored be additionally operable to perform with
Lower operation:
The current video frame is entered according to the brightness after the regulation of each pixel of the current video frame
Row display and/or coding.
The embodiments of the invention provide a kind of luminance video adjusting method and electronic equipment, including:Obtain current
The brightness of frame of video;According to the brightness of current video frame and the brightness regulation parameter of preceding video frame, obtain and work as
The brightness regulation parameter of preceding frame of video;According to mapping equation corresponding with the brightness regulation parameter of current video frame,
Brightness after the regulation for each pixel for generating current video frame.By being adjusted according to the brightness with current video frame
The corresponding mapping equation of parameter is saved, the brightness after the regulation for each pixel for generating current video frame is realized
Brightness to current video frame is adjusted so that part or all of region in the video frame is dimmed or mould
Paste due to the intensity of light source it is weaker and fuzzy when, can still keep the definition of video, exist so as to improve user
Consumer's Experience during instant video.Further, since the brightness between adjacent frame of video is related,
Brightness and the brightness regulation parameter of preceding video frame by current video frame, the brightness to current video frame are entered
Row regulation, improves the accuracy of luminance video regulation so that the luminance video after regulation is truer, from
And further increase Consumer's Experience of the user during instant video.
Brief description of the drawings
Technical scheme in order to illustrate more clearly the embodiments of the present invention, institute in being described below to embodiment
The accompanying drawing needed to use is briefly described, it should be apparent that, drawings in the following description are only the present invention
Some embodiments, for those of ordinary skill in the art, on the premise of not paying creative work,
Other accompanying drawings can also be obtained according to these accompanying drawings.
Fig. 1 is a kind of luminance video adjusting method flow chart provided in an embodiment of the present invention;
Fig. 2 is a kind of luminance video adjusting method flow chart provided in an embodiment of the present invention;
Fig. 3 is a kind of electronic equipment structural representation provided in an embodiment of the present invention;
Fig. 4 is a kind of electronic equipment structural representation provided in an embodiment of the present invention.
Embodiment
To make the object, technical solutions and advantages of the present invention clearer, below in conjunction with the embodiment of the present invention
In accompanying drawing, the technical scheme in the embodiment of the present invention is clearly and completely described, it is clear that retouched
The embodiment stated is only a part of embodiment of the invention, rather than whole embodiments.Based in the present invention
Embodiment, those of ordinary skill in the art obtained under the premise of creative work is not made it is all its
His embodiment, belongs to the scope of protection of the invention.
Embodiment one is a kind of luminance video adjusting method provided in an embodiment of the present invention, shown in reference picture 1,
Methods described includes:
101st, the brightness of current video frame is obtained.
If specifically, the color space of current video frame be YUV (also referred to as YCrCb, wherein, " Y " represent
Lightness (Luminance or Luma), that is, grey decision-making;And " U " and " V " expression is then colourity
(Chrominance or Chroma), effect is description colors of image and saturation degree, the face for specified pixel
Color), then the data of current video frame are obtained, the average for obtaining the brightness of current video frame all pixels point is to work as
The brightness of preceding frame of video;
If the color space of current video frame is that (R, Red, represent red to RGB, and G, Green are represented green
Color, B, Blue represent blueness), then the color space of current video frame is converted into YUV, and obtain current
The data of frame of video, the average for obtaining the brightness of current video frame all pixels point is the brightness of current video frame.
102nd, according to the brightness of current video frame and the brightness regulation parameter of preceding video frame, current video is obtained
The brightness regulation parameter of frame.
Specifically, according to the brightness of current video frame, the brightness regulation parameter of preceding video frame, the first brightness,
Second brightness and transition parameter, generate the brightness regulation parameter of current video frame, and the process can be:
The minimum value between the brightness of current video frame and the second brightness is determined, and determines the minimum value and first
Maximum between brightness;
If the maximum is less than or equal to the brightness regulation parameter of preceding video frame, the first parameter is set to be
Default value;
If the maximum is more than the brightness regulation parameter of preceding video frame, according to transition parameter, pass through first
Preset formula, calculates the first parameter;
According to the brightness regulation parameter and the first parameter of preceding video frame, the brightness regulation of current video frame is generated
Parameter.
Optionally, before step 102, methods described also includes:
Transition parameter and brightness regulation scope [the first brightness, the second brightness] are set;
103rd, according to mapping equation corresponding with the brightness regulation parameter of current video frame, current video frame is generated
Each pixel regulation after brightness.
Specifically, according to brightness regulation parameter and the second brightness, generating mapping equation;
According to mapping equation, the brightness after the regulation for each pixel for generating current video frame.
Wherein, according to brightness regulation parameter and the second brightness, the process of generation mapping equation can be:
Mapping equation is generated according to the secondary Lagrange's interpolation formula of default three points, wherein, it is default
Three points include the first preset, the second preset and using brightness regulation parameter and the second brightness as coordinate
Point.
Optionally, after step 103, methods described also includes:
Current video frame is shown according to the brightness after the regulation of each pixel of current video frame and/or
Coding.
The embodiments of the invention provide a kind of luminance video adjusting method, by according to bright with current video frame
The corresponding mapping equation of regulation parameter is spent, the brightness after the regulation for each pixel for generating current video frame is real
Showed the brightness to current video frame to be adjusted so that part or all of region in the video frame it is dimmed or
Person it is fuzzy due to the intensity of light source it is weaker and fuzzy when, the definition of video can be still kept, so as to improve use
Consumer's Experience of the family during instant video.Further, since the brightness between adjacent frame of video is related
, brightness and the brightness regulation parameter of preceding video frame by current video frame, to the bright of current video frame
Degree is adjusted, and improves the accuracy of luminance video regulation so that the luminance video after regulation is truer,
So as to further increase Consumer's Experience of the user during instant video.
Embodiment two is a kind of luminance video adjusting method provided in an embodiment of the present invention, shown in reference picture 2,
Methods described includes:
201st, the color space for judging current video frame is YUV or RGB, if the color of current video frame
Space is YUV, then performs step 202, if the color space of current video frame is RGB, perform step
203。
Specifically, from the video format information of current video frame, obtaining the color space letter of current video frame
Breath, the color space information can be the color space description field included by the description field of current video frame,
The embodiment of the present invention is not limited to specific acquisition modes;
According to the color space information of current video frame, the color space for judging current video frame be YUV or
It is to carry out matching realization according to color space description field and the description field that prestores in RGB, the deterministic process
, the embodiment of the present invention is not limited to specific judgment mode.
202nd, the data of current video frame are obtained, the average for obtaining the brightness of current video frame all pixels point is
The brightness of current video frame.After step 202, step 204 is performed.
Specifically, the average of the brightness of current video frame all pixels point is obtained, and it is current using the average as this
The brightness of frame of video, in yuv space, the brightness of pixel can be the Y-component in yuv data, institute
The process of stating can realize that the mean value formula can be by default mean value formula:
Wherein, YavgFor the average of the brightness of all pixels point, yiFor current video frame in ith pixel point
Brightness value, N is the number of current video frame in pixel.
203rd, the color space of current video frame is converted into YUV, and obtains the data of current video frame, obtained
The average for taking the brightness of current video frame all pixels point is the brightness of current video frame.After step 203,
Perform step 204.
Specifically, the color space of current video frame is converted into YUV by RGB, the transfer process can be root
Realized according to default conversion formula, the conversion formula can be:
Y=(B*1868+G*9617+R*4899+8192)/16384;
U=((B-Y) * 9241+8192)/16384+128;
V=((R-Y) * 11682+8192)/16384+128;
The average of the brightness of current video frame all pixels point is obtained, and using the average as the current video frame
Brightness, in yuv space, the brightness of pixel can be the Y-component in yuv data, the process and step
Process described in rapid 202 is identical, is not repeated here herein.
It is worth noting that, step 201 to step 203 is to realize the process for the brightness for obtaining current video frame,
In addition to the mode described in the process, the process can also be realized by other means, and the present invention is implemented
Example is not limited to specific mode.
204th, determine the minimum value between the brightness of current video frame and the second brightness, and determine minimum value and the
Maximum between one brightness.
Specifically, the minimum value between the brightness and the second brightness for determining current video frame, and determine most
The process of maximum between small value and the first brightness can be realized by the default formula that compared, the ratio
Can be compared with formula:
Yavg=MAX (MIN (Yavg,T1),T0)
Wherein, YavgFor the brightness of current video frame, T0For the first brightness, T1For the second brightness, respectively work as
Two end points of the brightness regulation scope of preceding frame of video, wherein T1More than T0, brightness regulation scope can be expressed as
[T0, T1]
If the 205, maximum is less than or equal to the brightness regulation parameter of preceding video frame, the first parameter is set
For default value.After step 205, step 207 is performed.
Specifically, the brightness regulation parameter can be expressed as D0;
If YavgLess than or equal to D0, then it is preset value to set the first parameter, in actual applications, and this is preset
Value can be 0.
If the 206, maximum is more than the brightness regulation parameter of preceding video frame, according to transition parameter, by the
One preset formula, calculates the first parameter.After step 206, step 207 is performed.
If specifically, YavgMore than D0, then according to transition parameter, by the first preset formula, calculate first and join
Count, first preset formula can be:
DeltaD=(Yavg-D0)×(100-G0)/100
Wherein, deltaD is the first parameter, G0For transition parameter, YavgFor the brightness of current video frame, D0For
Brightness regulation parameter.
207th, according to the brightness regulation parameter and the first parameter of preceding video frame, the brightness of current video frame is generated
Regulation parameter.
Specifically, the process can be realized by the second preset formula, second preset formula can be:
D1=D0+deltaD
Wherein, D1For the brightness regulation parameter of current video frame, deltaD is the first parameter, D0For brightness regulation
Parameter.
It is worth noting that, step 204 to step 207 be realize according to the brightness of current video frame with previously
The brightness regulation parameter of frame of video, obtains the process of the brightness regulation parameter of current video frame, and the step is
By the brightness according to current video frame, the brightness regulation parameter of preceding video frame, the first brightness, second bright
Degree and transition parameter, the brightness regulation parameter of generation current video frame realize the brightness according to current video frame
With the brightness regulation parameter of preceding video frame, the process of the brightness regulation parameter of current video frame is obtained, except
Outside the mode, the process can also be realized by other means, the embodiment of the present invention is to specific side
Formula is not limited.
Because the brightness between adjacent frame of video is related, pass through brightness and the first forward sight of current video frame
The brightness regulation parameter of frequency frame, the brightness to current video frame is adjusted, and improves luminance video regulation
Accuracy so that the luminance video after regulation is truer, so as to further increase user in instant video
During Consumer's Experience.
Optionally, before the step 204, it can also carry out step:
Transition parameter and brightness regulation scope [the first brightness, the second brightness] are set.
Specifically, the embodiment of the present invention is not limited to specific setting up procedure.
It should be noted that in actual applications, the transition parameter set before and brightness can be used to adjust
Adjusting range, without before step 204 is performed every time, being carried out the setting transition parameter and brightness
The step of adjustable range [the first brightness, the second brightness].
If moreover, it is noted that current video frame is the first frame of video, the brightness of current video frame
The as brightness regulation parameter of current video frame;If current video frame is not the first frame of video, according to step
204 to the Procedure Acquisition current video frame described in step 207 brightness regulation parameter.
208th, mapping equation is generated according to the secondary Lagrange's interpolation formula of default three points, wherein, in advance
If three points include the first preset, the second preset and using brightness regulation parameter and the second brightness for seat
Target point.
Specifically, in actual applications, the coordinate of the first preset can be (0,0), the second preset
Coordinate can be (255,255), should can be expressed as the point of coordinate with the second brightness using brightness regulation parameter
(D1, T1), corresponding, the mapping equation can be:
Y=ax2+bx
Wherein, if Y value is less than 0, it is 0 to set Y, if Y value is more than 255, setting Y is
255。
According to the first preset, the second preset and using brightness regulation parameter and the second brightness as the point of coordinate
The value for determining a and b is respectively:
A=(D1-T1)/[D1×(255-D1)]
B=(255 × T1-D1 2)/[D1×(255-D1)]
209th, according to mapping equation, the brightness after the regulation for each pixel for generating current video frame.
Specifically, the brightness value of current video frame in all pixels point is brought into mapping equation, generation is with working as
Brightness after the regulation of each pixel of preceding frame of video;
It is worth noting that, step 208 to step 209 is to realize the brightness regulation according to current video frame
The corresponding mapping equation of parameter, the process of the brightness after the regulation for each pixel for generating current video frame, is removed
Outside mode described in the step, the process, the embodiment of the present invention can also be realized by other means
Specific mode is not limited.
Optionally, after step 209, methods described also includes:
210th, according to the brightness after the regulation of each pixel of current video frame current video frame is shown and
/ or coding.
Specifically, according to default idsplay order, control display device is according to the brightness after regulation to working as forward sight
Frequency frame is shown;And/or
According to default coded command, control display device is carried out according to the brightness after regulation to current video frame
Coding.
The embodiment of the present invention is not limited to specific display mode and coded system.
The embodiments of the invention provide a kind of luminance video adjusting method, by according to bright with current video frame
The corresponding mapping equation of regulation parameter is spent, the brightness after the regulation for each pixel for generating current video frame is real
Showed the brightness to current video frame to be adjusted so that part or all of region in the video frame it is dimmed or
Person it is fuzzy due to the intensity of light source it is weaker and fuzzy when, the definition of video can be still kept, so as to improve use
Consumer's Experience of the family during instant video.Further, since the brightness between adjacent frame of video is related
, brightness and the brightness regulation parameter of preceding video frame by current video frame, to the bright of current video frame
Degree is adjusted, and improves the accuracy of luminance video regulation so that the luminance video after regulation is truer,
So as to further increase Consumer's Experience of the user during instant video.
Embodiment three is a kind of electronic equipment provided in an embodiment of the present invention, shown in reference picture 3, the electronics
Equipment includes:
Luminance acquisition module 301, the brightness for obtaining current video frame;
Regulation parameter acquisition module 302, is adjusted for the brightness according to current video frame and the brightness of preceding video frame
Parameter is saved, the brightness regulation parameter of current video frame is obtained;
Luminance acquisition module 303 is adjusted, for according to mapping corresponding with the brightness regulation parameter of current video frame
Formula, the brightness after the regulation for each pixel for generating current video frame.
Optionally, luminance acquisition module 301 specifically for:
If the color space of current video frame is YUV, the data of current video frame are obtained, forward sight is worked as in acquisition
The average of the brightness of frequency frame all pixels point is the brightness of current video frame;
If the color space of current video frame is RGB, the color space of current video frame is converted into YUV,
And the data of current video frame are obtained, the average for obtaining the brightness of current video frame all pixels point is to work as forward sight
The brightness of frequency frame.
Optionally, equipment also includes:
Setup module 304, for setting transition parameter and brightness regulation scope [the first brightness, the second brightness];
Optionally, regulation parameter acquisition module 302 specifically for:
According to the brightness of current video frame, the brightness regulation parameter of preceding video frame, the first brightness, second bright
Degree and transition parameter, generate the brightness regulation parameter of current video frame.
Optionally, regulation parameter acquisition module 302 specifically for:
The minimum value between the brightness of current video frame and the second brightness is determined, and determines that minimum value is bright with first
Maximum between degree;
If maximum is less than or equal to the brightness regulation parameter of preceding video frame, it is pre- to set the first parameter
If numerical value;
If maximum is more than the brightness regulation parameter of preceding video frame, pre- by first according to transition parameter
If formula, the first parameter is calculated;
According to the brightness regulation parameter and the first parameter of preceding video frame, the brightness regulation of current video frame is generated
Parameter.
Optionally, regulation luminance acquisition module 303 specifically for:
According to brightness regulation parameter and the second brightness, mapping equation is generated;
According to mapping equation, the brightness after the regulation for each pixel for generating current video frame.
Optionally, regulation parameter acquisition module 303 specifically for:
Mapping equation is generated according to the secondary Lagrange's interpolation formula of default three points, wherein, it is default
Three points include the first preset, the second preset and using brightness regulation parameter and the second brightness as coordinate
Point.
Optionally, equipment also includes:
Display and/or coding module 305, for the brightness after the regulation according to each pixel of current video frame
Current video frame is shown and/or encoded.
The embodiments of the invention provide a kind of electronic equipment, the electronic equipment passes through basis and current video frame
The corresponding mapping equation of brightness regulation parameter, the brightness after the regulation for each pixel for generating current video frame,
Realize the brightness to current video frame to be adjusted so that part or all of region in the video frame is dimmed
Or it is fuzzy due to the intensity of light source it is weaker and fuzzy when, the definition of video can be still kept, so as to improve
Consumer's Experience of the user during instant video.Further, since the brightness between adjacent frame of video is phase
Close, brightness and the brightness regulation parameter of preceding video frame by current video frame, to current video frame
Brightness is adjusted, and improves the accuracy of luminance video regulation so that the luminance video after regulation is trueer
It is real, so as to further increase Consumer's Experience of the user during instant video.
Example IV is a kind of electronic equipment provided in an embodiment of the present invention, shown in reference picture 4, the electronics
Equipment includes memory 401 and the processor 402 being connected with memory, and memory 401 is used to store one group
Program code, the program code that processor 402 calls memory 401 to be stored is used to perform following operation:
Obtain the brightness of current video frame;
According to the brightness of current video frame and the brightness regulation parameter of preceding video frame, current video frame is obtained
Brightness regulation parameter;
According to mapping equation corresponding with the brightness regulation parameter of current video frame, the every of current video frame is generated
Brightness after the regulation of individual pixel.
Optionally, processor 402 calls the program code that memory 401 is stored following specifically for performing
Operation:
If the color space of current video frame is YUV, the data of current video frame are obtained, forward sight is worked as in acquisition
The average of the brightness of frequency frame all pixels point is the brightness of current video frame;
If the color space of current video frame is RGB, the color space of current video frame is converted into YUV,
And the data of current video frame are obtained, the average for obtaining the brightness of current video frame all pixels point is to work as forward sight
The brightness of frequency frame.
Optionally, the program code that processor 402 calls memory 401 to be stored is additionally operable to perform following behaviour
Make:
Transition parameter and brightness regulation scope [the first brightness, the second brightness] are set;
Optionally, processor 402 calls the program code that memory 401 is stored following specifically for performing
Operation:
According to the brightness of current video frame, the brightness regulation parameter of preceding video frame, the first brightness, second bright
Degree and transition parameter, generate the brightness regulation parameter of current video frame.
Optionally, processor 402 calls the program code that memory 401 is stored following specifically for performing
Operation:
The minimum value between the brightness of current video frame and the second brightness is determined, and determines that minimum value is bright with first
Maximum between degree;
If maximum is less than or equal to the brightness regulation parameter of preceding video frame, it is pre- to set the first parameter
If numerical value;
If maximum is more than the brightness regulation parameter of preceding video frame, pre- by first according to transition parameter
If formula, the first parameter is calculated;
According to the brightness regulation parameter and the first parameter of preceding video frame, the brightness regulation of current video frame is generated
Parameter.
Optionally, processor 402 calls the program code that memory 401 is stored following specifically for performing
Operation:
According to brightness regulation parameter and the second brightness, mapping equation is generated;
According to mapping equation, the brightness after the regulation for each pixel for generating current video frame.
Optionally, processor 402 calls the program code that memory 401 is stored following specifically for performing
Operation:
Mapping equation is generated according to the secondary Lagrange's interpolation formula of default three points, wherein, it is default
Three points include the first preset, the second preset and using brightness regulation parameter and the second brightness as coordinate
Point.
Optionally, equipment also includes display module 403 and coding module 404, and processor 402 calls memory
401 program codes stored are additionally operable to perform following operation:
Control coding module 404 according to the brightness after the regulation of each pixel of current video frame to current video
Frame is encoded;And/or
Control display module 403 according to the brightness after the regulation of each pixel of current video frame to current video
Frame is shown.
The embodiments of the invention provide a kind of electronic equipment, the electronic equipment passes through basis and current video frame
The corresponding mapping equation of brightness regulation parameter, the brightness after the regulation for each pixel for generating current video frame,
Realize the brightness to current video frame to be adjusted so that part or all of region in the video frame is dimmed
Or it is fuzzy due to the intensity of light source it is weaker and fuzzy when, the definition of video can be still kept, so as to improve
Consumer's Experience of the user during instant video.Further, since the brightness between adjacent frame of video is phase
Close, brightness and the brightness regulation parameter of preceding video frame by current video frame, to current video frame
Brightness is adjusted, and improves the accuracy of luminance video regulation so that the luminance video after regulation is trueer
It is real, so as to further increase Consumer's Experience of the user during instant video.
Above-mentioned all optional technical schemes, can form the alternative embodiment of the present invention using any combination,
This is no longer repeated one by one.
It should be noted that:Above-described embodiment provide electronic equipment perform luminance video adjusting method when,
, can as needed will be upper only with the division progress of above-mentioned each functional module for example, in practical application
State function distribution to be completed by different functional modules, i.e., the internal structure of equipment is divided into different function moulds
Block, to complete all or part of function described above.In addition, the luminance video that above-described embodiment is provided
Adjusting method belongs to same design with electronic equipment embodiment, and it implements process and refers to embodiment of the method,
Here repeat no more.
One of ordinary skill in the art will appreciate that realizing all or part of step of above-described embodiment can pass through
Hardware is completed, and the hardware of correlation can also be instructed to complete by program, described program can be stored in
In a kind of computer-readable recording medium, storage medium mentioned above can be read-only storage, disk or
CD etc..
Presently preferred embodiments of the present invention is the foregoing is only, is not intended to limit the invention, it is all the present invention's
Within spirit and principle, any modifications, equivalent substitutions and improvements made etc. should be included in the present invention's
Within protection domain.