CN106954055B - A kind of luminance video adjusting method and electronic equipment - Google Patents

A kind of luminance video adjusting method and electronic equipment Download PDF

Info

Publication number
CN106954055B
CN106954055B CN201610023312.3A CN201610023312A CN106954055B CN 106954055 B CN106954055 B CN 106954055B CN 201610023312 A CN201610023312 A CN 201610023312A CN 106954055 B CN106954055 B CN 106954055B
Authority
CN
China
Prior art keywords
brightness
video frame
current video
parameter
adjusting
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201610023312.3A
Other languages
Chinese (zh)
Other versions
CN106954055A (en
Inventor
焦华龙
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Xiao Feng
Original Assignee
Zhang Ying Information Technology (shanghai) Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Zhang Ying Information Technology (shanghai) Co Ltd filed Critical Zhang Ying Information Technology (shanghai) Co Ltd
Priority to CN201610023312.3A priority Critical patent/CN106954055B/en
Publication of CN106954055A publication Critical patent/CN106954055A/en
Application granted granted Critical
Publication of CN106954055B publication Critical patent/CN106954055B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N9/00Details of colour television systems
    • H04N9/77Circuits for processing the brightness signal and the chrominance signal relative to each other, e.g. adjusting the phase of the brightness signal relative to the colour signal, correcting differential gain or differential phase

Abstract

An embodiment of the present invention provides a kind of luminance video adjusting method and electronic equipments, belong to video field, including:Obtain the brightness of current video frame;According to the brightness regulation parameter of the brightness of current video frame and preceding video frame, the brightness regulation parameter of current video frame is obtained;According to mapping equation corresponding with the brightness regulation parameter of current video frame, the brightness after the adjusting of each pixel of current video frame is generated.By according to mapping equation corresponding with the brightness regulation parameter of current video frame, generate the brightness after the adjusting of each pixel of current video frame, when not only so that region is dimmed or fuzzy weaker and fuzzy due to the intensity of light source some or all of in the video frame, keep the clarity of video, also it is adjusted by the brightness of current video frame and the correlation of preceding video frame, improve the accuracy of luminance video adjusting, so that the luminance video after adjusting is truer, to further improve user experience of user during instant video.

Description

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 during instant video interactive, where any one in video interactive both sides environment light source intensity compared with It when weak, can cause in video that region is dimmed or fuzzy some or all of in the video frame such as corresponding user face, influence to use The instant video at family interacts, to reduce the interactive experience of user.
When region is dimmed or fuzzy weaker and fuzzy due to the intensity of light source some or all of in video frame, user is only The above problem can be overcome by adjusting the intensity of light source size of place environment or being moved to the stronger place of light intensity, still In practical applications, the light source size of environment where user is uncontrollable or adjusts inconvenience, and user moves It moves to the stronger place of light intensity and also results in inconvenience of user during instant video;In actual use, on User experience of user during instant video can be reduced by stating two kinds of solutions all.
Invention content
In order to improve user experience of user during instant video, an embodiment of the present invention provides a kind of luminance videos Adjusting method and electronic equipment.The technical solution is as follows:
In a first aspect, a kind of luminance video adjusting method is provided, the method includes:
Obtain the brightness of current video frame;
According to the brightness regulation parameter of the brightness of the current video frame and preceding video frame, the bright of current video frame is obtained Spend adjustment parameter;
According to mapping equation corresponding with the brightness regulation parameter of the current video frame, the current video frame is generated Brightness after the adjusting of each pixel.
With reference to first aspect, in the first possible implementation, it is described obtain current video frame brightness include:
If the color space of the current video frame is YUV, the data of the current video frame are obtained, are obtained current The mean value of the brightness of 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 converted to YUV, and the data of the current video frame are obtained, the mean value for obtaining the brightness of current video frame all pixels point is described current The brightness of video frame.
With reference to first aspect or the first possible realization method of first aspect, in second of possible realization method In, it is described according to the brightness of the current video frame and the brightness regulation parameter of preceding video frame, obtain the bright of current video frame It spends before adjustment parameter, the method further includes:
Transition parameter and brightness regulation range [the first brightness, the second brightness] are set;
With reference to first aspect to second of first aspect any one possible realization method, in the third possible reality It is described according to the brightness of the current video frame and the brightness of preceding video frame in existing mode, obtain the brightness of current video frame Adjustment parameter includes:
According to the brightness of the current video frame, the brightness regulation parameter of the preceding video frame, first brightness, institute The second brightness and the transition parameter are stated, the brightness regulation parameter of the current video frame is generated.
The third possible realization method with reference to first aspect, in the 4th kind of possible realization method, the basis The brightness of the current video frame, the brightness regulation parameter of the preceding video frame, first brightness, second brightness with And the transition parameter, the brightness regulation parameter for generating the current video frame include:
Determine the minimum value between the brightness of the current video frame and the second brightness, and determine the minimum value with it is described Maximum value between first brightness;
If the maximum value is less than or equal to the brightness regulation parameter of the preceding video frame, the first parameter, which is arranged, is Default value;
If the brightness regulation parameter that the maximum value is more than the preceding video frame passes through according to the transition parameter First preset formula calculates first parameter;
According to the brightness regulation parameter of the preceding video frame and first parameter, the bright of the current video frame is generated Spend adjustment parameter.
Second with reference to first aspect is to the 4th kind of any one possible realization method, in the 5th kind of possible realization In mode, basis mapping equation corresponding with the brightness regulation parameter of the current video frame generates the current video Brightness after the adjusting of each pixel of 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 adjusting of each pixel of the current video frame is generated.
The 5th kind of possible realization method with reference to first aspect, in the 6th kind of possible realization method, the basis 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 preset three points, wherein described preset three A point includes the first preset, the second preset and using the brightness regulation parameter and second brightness as the point of coordinate.
With reference to first aspect to the 6th kind of first aspect any one possible realization method, in the 7th kind of possible reality In existing mode, the method further includes:
The current video frame is shown according to the brightness after the adjusting of each pixel of the current video frame Show and/or encodes.
Second aspect, provides a kind of electronic equipment, and the electronic equipment includes:
Luminance acquisition module, the brightness for obtaining current video frame;
Adjustment parameter acquisition module, for being joined according to the brightness of the current video frame and the brightness regulation of preceding video frame Number, obtains the brightness regulation parameter of current video frame;
Luminance acquisition module is adjusted, for public according to mapping corresponding with the brightness regulation parameter of the current video frame Formula generates the brightness after the adjusting of each pixel of the current video frame.
In conjunction with second aspect, in the first possible implementation, the luminance acquisition module is specifically used for:
If the color space of the current video frame is YUV, the data of the current video frame are obtained, are obtained current The mean value of the brightness of 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 converted to YUV, and the data of the current video frame are obtained, the mean value for obtaining the brightness of current video frame all pixels point is described current The brightness of video frame.
In conjunction with the possible realization method of the first of second aspect or second aspect, in second of possible realization method In, the equipment further includes:
Setup module, for transition parameter and brightness regulation range [the first brightness, the second brightness] to be arranged;
In conjunction with second of second aspect to second aspect any one possible realization method, in the third possible reality In existing mode, the adjustment parameter acquisition module is specifically used for:
According to the brightness of the current video frame, the brightness regulation parameter of the preceding video frame, first brightness, institute The second brightness and the transition parameter are stated, the brightness regulation parameter of the current video frame is generated.
In conjunction with the third possible realization method of second aspect, in the 4th kind of possible realization method, the adjusting Parameter acquisition module is specifically used for:
Determine the minimum value between the brightness of the current video frame and the second brightness, and determine the minimum value with it is described Maximum value between first brightness;
If the maximum value is less than or equal to the brightness regulation parameter of the preceding video frame, the first parameter, which is arranged, is Default value;
If the brightness regulation parameter that the maximum value is more than the preceding video frame passes through according to the transition parameter First preset formula calculates first parameter;
According to the brightness regulation parameter of the preceding video frame and first parameter, the bright of the current video frame is generated Spend adjustment parameter.
In conjunction with second to the 4th kind of second aspect any one possible realization method, in the 5th kind of possible realization In mode, the adjusting luminance acquisition module is specifically used 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 adjusting of each pixel of the current video frame is generated.
In conjunction with the 5th kind of possible realization method of second aspect, in the 6th kind of possible realization method, the adjusting Luminance acquisition module is specifically used for:
Mapping equation is generated according to the secondary Lagrange's interpolation formula of preset three points, wherein described preset three A point includes the first preset, the second preset and using the brightness regulation parameter and second brightness as the point of coordinate.
In conjunction with the 6th kind of second aspect to second aspect any one possible realization method, in the 7th kind of possible reality In existing mode, the equipment further includes:
Display and/or coding module, for according to the brightness after the adjusting of each pixel of the current video frame The current video frame is shown and/or encoded.
The third aspect, provides a kind of electronic equipment, and the electronic equipment includes memory and connects with the memory The processor connect, for the memory for storing batch processing code, the processor calls the journey that the memory is stored Sequence code is for performing the following operations:
Obtain the brightness of current video frame;
According to the brightness regulation parameter of the brightness of the current video frame and preceding video frame, the bright of current video frame is obtained Spend adjustment parameter;
According to mapping equation corresponding with the brightness regulation parameter of the current video frame, the current video frame is generated Brightness after the adjusting of each pixel.
In conjunction with the third aspect, in the first possible implementation, the processor calls the memory to be stored Program code be specifically used for executing following operation:
If the color space of the current video frame is YUV, the data of the current video frame are obtained, are obtained current The mean value of the brightness of 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 converted to YUV, and the data of the current video frame are obtained, the mean value for obtaining the brightness of current video frame all pixels point is described current The brightness of video frame.
In conjunction with the possible realization method of the first of the third aspect or the third aspect, in second of possible realization method In, the program code that the processor calls the memory to be stored is additionally operable to execute following operation:
Transition parameter and brightness regulation range [the first brightness, the second brightness] are set;
In conjunction with second of the third aspect to first aspect any one possible realization method, in the third possible reality In existing mode, the program code that the processor calls the memory to be stored is specifically used for executing following operation:
According to the brightness of the current video frame, the brightness regulation parameter of the preceding video frame, first brightness, institute The second brightness and the transition parameter are stated, the brightness regulation parameter of the current video frame is generated.
In conjunction with the third possible realization method of the third aspect, in the 4th kind of possible realization method, the processing The program code that device calls the memory to be stored is specifically used for executing following operation:
Determine the minimum value between the brightness of the current video frame and the second brightness, and determine the minimum value with it is described Maximum value between first brightness;
If the maximum value is less than or equal to the brightness regulation parameter of the preceding video frame, the first parameter, which is arranged, is Default value;
If the brightness regulation parameter that the maximum value is more than the preceding video frame passes through according to the transition parameter First preset formula calculates first parameter;
According to the brightness regulation parameter of the preceding video frame and first parameter, the bright of the current video frame is generated Spend adjustment parameter.
In conjunction with second to the 4th kind of the third aspect any one possible realization method, in the 5th kind of possible realization In mode, the program code that the processor calls the memory to be stored is specifically used for executing following 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 adjusting of each pixel of the current video frame is generated.
In conjunction with the 5th kind of possible realization method of the third aspect, in the 6th kind of possible realization method, the processing The program code that device calls the memory to be stored is specifically used for executing following operation:
Mapping equation is generated according to the secondary Lagrange's interpolation formula of preset three points, wherein described preset three A point includes the first preset, the second preset and using the brightness regulation parameter and second brightness as the point of coordinate.
In conjunction with the 6th kind of the third aspect to the third aspect any one possible realization method, in the 7th kind of possible reality In existing mode, the program code that the processor calls the memory to be stored is additionally operable to execute following operation:
The current video frame is shown according to the brightness after the adjusting of each pixel of the current video frame Show and/or encodes.
An embodiment of the present invention provides a kind of luminance video adjusting method and electronic equipments, including:Obtain current video frame Brightness;According to the brightness regulation parameter of the brightness of current video frame and preceding video frame, the brightness tune of current video frame is obtained Save parameter;According to mapping equation corresponding with the brightness regulation parameter of current video frame, each pixel of current video frame is generated Adjusting after brightness.By according to mapping equation corresponding with the brightness regulation parameter of current video frame, generating current video Brightness after the adjusting of each pixel of frame, realizes and the brightness of current video frame is adjusted so that in the video frame When partly or entirely region is dimmed or fuzzy weaker and fuzzy due to the intensity of light source, the clarity of video can be still kept, from And improve user experience of user during instant video.In addition, since the brightness between adjacent video frame is related , by the brightness of current video frame and the brightness regulation parameter of preceding video frame, the brightness of current video frame is adjusted, Improve the accuracy of luminance video adjusting so that the luminance video after adjusting is truer, to further improve user User experience during instant video.
Description of the drawings
To describe the technical solutions in the embodiments of the present invention more clearly, make required in being described below to embodiment Attached drawing is briefly described, it should be apparent that, drawings in the following description are only some embodiments of the invention, for For those of ordinary skill in the art, without creative efforts, other are can also be obtained according to these attached drawings Attached drawing.
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 schematic diagram provided in an embodiment of the present invention;
Fig. 4 is a kind of electronic equipment structural schematic diagram provided in an embodiment of the present invention.
Specific implementation mode
To make the object, technical solutions and advantages of the present invention clearer, below in conjunction with attached in the embodiment of the present invention Figure, technical scheme in the embodiment of the invention is clearly and completely described, it is clear that described embodiment is only this Invention a part of the embodiment, instead of all the embodiments.Based on the embodiments of the present invention, those of ordinary skill in the art exist The every other embodiment obtained under the premise of creative work is not made, shall fall within the protection scope of the present invention.
Embodiment one is a kind of luminance video adjusting method provided in an embodiment of the present invention, shown referring to Fig.1, the method Including:
101, the brightness of current video frame is obtained.
Specifically, if the color space of current video frame is YUV (also referred to as YCrCb, wherein " Y " represents brightness (Luminance or Luma), that is, grayscale value;And that " U " and " V " is indicated is then coloration (Chrominance or Chroma), Effect is description colors of image and saturation degree, is used for the color of specified pixel), then the data of current video frame are obtained, acquisition is worked as The mean value of the brightness of preceding video frame all pixels point is the brightness of current video frame;
If the color space of current video frame be RGB (R, Red indicate red, G, Green, indicate green, B, Blue, Indicate blue), then the color space of current video frame is converted into YUV, and obtain the data of current video frame, forward sight is worked as in acquisition The mean value of the brightness of frequency frame all pixels point is the brightness of current video frame.
102, according to the brightness regulation parameter of the brightness of current video frame and preceding video frame, the bright of current video frame is obtained Spend adjustment parameter.
Specifically, 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, which can be:
Determine the minimum value between the brightness of current video frame and the second brightness, and determine the minimum value and the first brightness it Between maximum value;
If the maximum value is less than or equal to the brightness regulation parameter of preceding video frame, it is present count that the first parameter, which is arranged, Value;
If the maximum value is more than the brightness regulation parameter of preceding video frame, according to transition parameter, pass through the first default public affairs Formula calculates the first parameter;
According to the brightness regulation parameter and the first parameter of preceding video frame, the brightness regulation parameter of current video frame is generated.
Optionally, before step 102, the method further includes:
Transition parameter and brightness regulation range [the first brightness, the second brightness] are set;
103, according to mapping equation corresponding with the brightness regulation parameter of current video frame, each of current video frame is generated Brightness after the adjusting of pixel.
Specifically, according to brightness regulation parameter and the second brightness, mapping equation is generated;
According to mapping equation, the brightness after the adjusting of each pixel of current video frame is generated.
Wherein, according to brightness regulation parameter and the second brightness, generating the process of mapping equation can be:
Mapping equation is generated according to the secondary Lagrange's interpolation formula of preset three points, wherein preset three points Including the first preset, the second preset and using brightness regulation parameter and the second brightness as the point of coordinate.
Optionally, after step 103, the method further includes:
Current video frame is shown and/or encoded according to the brightness after the adjusting of each pixel of current video frame.
An embodiment of the present invention provides a kind of luminance video adjusting methods, by according to the brightness regulation with current video frame The corresponding mapping equation of parameter generates the brightness after the adjusting of each pixel of current video frame, realizes to current video frame Brightness be adjusted so that region is dimmed or fuzzy since the intensity of light source is weaker and mould some or all of in the video frame When paste, the clarity of video can be still kept, to improve user experience of user during instant video.In addition, by Brightness between adjacent video frame is relevant, is joined by the brightness of current video frame and the brightness regulation of preceding video frame Number, is adjusted the brightness of current video frame, improves the accuracy of luminance video adjusting so that the luminance video after adjusting It is more true, to further improve user experience of user during instant video.
Embodiment two is a kind of luminance video adjusting method provided in an embodiment of the present invention, with reference to shown in Fig. 2, the method Including:
201, judge that the color space of current video frame is YUV or RGB, if the color space of current video frame is YUV thens follow the steps 202, if the color space of current video frame is RGB, thens follow the steps 203.
Specifically, from the video format information of current video frame, the color space information of current video frame is obtained, the color Color space information can be the color space description field included by the description field of current video frame, and the embodiment of the present invention is to tool The acquisition modes of body are not limited;
According to the color space information of current video frame, judge that the color space of current video frame is YUV or RGB, it should It is to be carried out matching realization, the embodiment of the present invention pair with the description field to prestore according to color space description field in deterministic process Specific judgment mode is not limited.
202, the data of current video frame are obtained, the mean value for obtaining the brightness of current video frame all pixels point is to work as forward sight The brightness of frequency frame.After step 202, step 204 is executed.
Specifically, the mean value of the brightness of current video frame all pixels point is obtained, and with the mean value for the current video frame Brightness, in yuv space, the brightness of pixel can be the Y-component in yuv data, and the process can be by default Mean value formula realize, which can be:
Wherein, YavgFor the mean value of the brightness of all pixels point, yiFor the brightness value of ith pixel point in current video frame, N is the number of pixel in current video frame.
203, the color space of current video frame is converted into YUV, and obtains the data of current video frame, forward sight is worked as in acquisition The mean value of the brightness of frequency frame all pixels point is the brightness of current video frame.After step 203, step 204 is executed.
Specifically, the color space of current video frame is converted to YUV by RGB, which can be according to default Conversion formula realize, which 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 mean value of the brightness of current video frame all pixels point is obtained, and is the brightness of the current video frame with the mean value, In yuv space, the brightness of pixel can be the Y-component in yuv data, the process and the process phase described in step 202 Together, it 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 institute State except the mode described in process, can also realize the process by other means, the embodiment of the present invention to specific mode not It is limited.
204, it determines the minimum value between the brightness of current video frame and the second brightness, and determines minimum value and the first brightness Between maximum value.
Specifically, the minimum value between the brightness and the second brightness of the determining current video frame, and determine minimum value with The process of maximum value between first brightness can realize that the comparison formula can be by preset relatively formula:
Yavg=MAX (MIN (Yavg,T1),T0)
Wherein, YavgFor the brightness of current video frame, T0For the first brightness, T1For the second brightness, respectively current video frame Brightness regulation range two endpoints, wherein T1More than T0, brightness regulation range can be expressed as [T0, T1]
If 205, maximum value is less than or equal to the brightness regulation parameter of preceding video frame, it is default that the first parameter, which is arranged, Numerical value.After step 205, step 207 is executed.
Specifically, the brightness regulation parameter can be expressed as D0
If YavgLess than or equal to D0, then it is preset value that the first parameter, which is arranged, and in practical applications, which can be with It is 0.
It is default by first according to transition parameter if 206, maximum value is more than the brightness regulation parameter of preceding video frame Formula calculates the first parameter.After step 206, step 207 is executed.
If specifically, YavgMore than D0, then according to transition parameter, by the first preset formula, the first parameter is calculated, this One 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.
207, according to the brightness regulation parameter of preceding video frame and the first parameter, the brightness regulation ginseng of current video frame is generated Number.
Specifically, the process can be realized by the second preset formula, which 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 is brightness and the preceding video frame realized according to current video frame Brightness regulation parameter, obtains the process of the brightness regulation parameter of current video frame, and the step is by according to current video frame Brightness, preceding video frame brightness regulation parameter, the first brightness, the second brightness and transition parameter, generate current video frame Brightness regulation parameter realize according to the brightness of current video frame and the brightness regulation parameter of preceding video frame, obtain current video The process of the brightness regulation parameter of frame can also realize the process by other means other than the mode, the present invention Embodiment is not limited specific mode.
Since the brightness between adjacent video frame is relevant, pass through the brightness of current video frame and preceding video frame The brightness of current video frame is adjusted in brightness regulation parameter, improves the accuracy of luminance video adjusting so that after adjusting Luminance video it is truer, to further improve user experience of user during instant video.
Optionally, before the step 204, step can also be performed:
Transition parameter and brightness regulation range [the first brightness, the second brightness] are set.
Specifically, the embodiment of the present invention is not limited specific setting up procedure.
It should be noted that in practical applications, the transition parameter and brightness regulation range that can be set before use, Without before executing step 204 every time, be carried out the setting transition parameter and brightness regulation range [the first brightness, Second brightness] the step of.
Moreover, it is noted that if current video frame is the first frame of video, the brightness of current video frame is as current The brightness regulation parameter of video frame;If current video frame is not the first frame of video, according to step 204 to step 207 Process obtains the brightness regulation parameter of current video frame.
208, mapping equation is generated according to the secondary Lagrange's interpolation formula of preset three points, wherein preset three A point includes the first preset, the second preset and using brightness regulation parameter and the second brightness as the point of coordinate.
Specifically, in practical applications, the coordinate of the first preset can be (0,0), and the coordinate of the second preset can be with For (255,255), (D should can be expressed as the point of coordinate using brightness regulation parameter and the second brightness1, T1), corresponding, this is reflected Penetrating formula can be:
Y=ax2+bx
Wherein, if the value of Y is less than 0, it is 0 that Y, which is arranged, if the value of Y is more than 255, it is 255 that Y, which is arranged,.
According to the first preset, the second preset and using brightness regulation parameter and the second brightness a is determined as the point of coordinate Value with b is respectively:
A=(D1-T1)/[D1×(255-D1)]
B=(255 × T1-D1 2)/[D1×(255-D1)]
209, according to mapping equation, the brightness after the adjusting of each pixel of current video frame is generated.
Specifically, the brightness value of all pixels point in current video frame is brought into mapping equation, generation and current video Brightness after the adjusting of each pixel of frame;
It is worth noting that, step 208 to step 209 is realized according to corresponding with the brightness regulation parameter of current video frame Mapping equation, the process of the brightness after the adjusting of each pixel of current video frame is generated, in addition to the side described in the step Except formula, it can also realize that the process, the embodiment of the present invention are not limited specific mode by other means.
Optionally, after step 209, the method further includes:
210, current video frame is shown and/or is compiled according to the brightness after the adjusting of each pixel of current video frame Code.
Specifically, according to preset idsplay order, control display device according to the brightness after adjusting to current video frame into Row display;And/or
According to preset coded command, control display device encodes current video frame according to the brightness after adjusting.
The embodiment of the present invention is not limited specific display mode and coding mode.
An embodiment of the present invention provides a kind of luminance video adjusting methods, by according to the brightness regulation with current video frame The corresponding mapping equation of parameter generates the brightness after the adjusting of each pixel of current video frame, realizes to current video frame Brightness be adjusted so that region is dimmed or fuzzy since the intensity of light source is weaker and mould some or all of in the video frame When paste, the clarity of video can be still kept, to improve user experience of user during instant video.In addition, by Brightness between adjacent video frame is relevant, is joined by the brightness of current video frame and the brightness regulation of preceding video frame Number, is adjusted the brightness of current video frame, improves the accuracy of luminance video adjusting so that the luminance video after adjusting It is more true, to further improve user experience of user during instant video.
Embodiment three is a kind of electronic equipment provided in an embodiment of the present invention, with reference to shown in Fig. 3, the electronic equipment packet It includes:
Luminance acquisition module 301, the brightness for obtaining current video frame;
Adjustment parameter acquisition module 302, for being joined according to the brightness of current video frame and the brightness regulation of preceding video frame Number, obtains the brightness regulation parameter of current video frame;
Luminance acquisition module 303 is adjusted, is used for according to mapping equation corresponding with the brightness regulation parameter of current video frame, Generate the brightness after the adjusting of each pixel of current video frame.
Optionally, luminance acquisition module 301 is specifically used for:
If the color space of current video frame is YUV, the data of current video frame are obtained, obtain current video frame institute It is the brightness of current video frame to have the mean value of the brightness of pixel;
If the color space of current video frame is RGB, the color space of current video frame is converted into YUV, and obtain The data of current video frame are taken, the mean value for obtaining the brightness of current video frame all pixels point is the brightness of current video frame.
Optionally, equipment further includes:
Setup module 304, for transition parameter and brightness regulation range [the first brightness, the second brightness] to be arranged;
Optionally, adjustment parameter acquisition module 302 is specifically used for:
According to the brightness of current video frame, the brightness regulation parameter of preceding video frame, the first brightness, the second brightness and mistake Parameter is crossed, the brightness regulation parameter of current video frame is generated.
Optionally, adjustment parameter acquisition module 302 is specifically used for:
It determines the minimum value between the brightness of current video frame and the second brightness, and determines between minimum value and the first brightness Maximum value;
If maximum value is less than or equal to the brightness regulation parameter of preceding video frame, it is present count that the first parameter, which is arranged, Value;
If maximum value is more than the brightness regulation parameter of preceding video frame, according to transition parameter, by the first preset formula, Calculate the first parameter;
According to the brightness regulation parameter and the first parameter of preceding video frame, the brightness regulation parameter of current video frame is generated.
Optionally, luminance acquisition module 303 is adjusted to be specifically used for:
According to brightness regulation parameter and the second brightness, mapping equation is generated;
According to mapping equation, the brightness after the adjusting of each pixel of current video frame is generated.
Optionally, adjustment parameter acquisition module 303 is specifically used for:
Mapping equation is generated according to the secondary Lagrange's interpolation formula of preset three points, wherein preset three points Including the first preset, the second preset and using brightness regulation parameter and the second brightness as the point of coordinate.
Optionally, equipment further includes:
Display and/or coding module 305 are used for according to the brightness after the adjusting of each pixel of current video frame to current Video frame is shown and/or is encoded.
An embodiment of the present invention provides a kind of electronic equipment, which passes through according to the brightness tune with current video frame The corresponding mapping equation of parameter is saved, the brightness after the adjusting of each pixel of current video frame is generated, realizes to current video The brightness of frame is adjusted so that some or all of in the video frame region it is dimmed or it is fuzzy since the intensity of light source is weaker and When fuzzy, the clarity of video can be still kept, to improve user experience of user during instant video.In addition, Since the brightness between adjacent video frame is relevant, pass through the brightness of current video frame and the brightness regulation of preceding video frame The brightness of current video frame is adjusted in parameter, improves the accuracy of luminance video adjusting so that the video after adjusting is bright Degree is truer, to further improve user experience of user during instant video.
Example IV is a kind of electronic equipment provided in an embodiment of the present invention, and with reference to shown in Fig. 4, the electronic equipment includes Memory 401 and the processor 402 being connect with memory, memory 401 is for storing batch processing code, processor 402 Call the program code that memory 401 is stored for performing the following operations:
Obtain the brightness of current video frame;
According to the brightness regulation parameter of the brightness of current video frame and preceding video frame, the brightness tune of current video frame is obtained Save parameter;
According to mapping equation corresponding with the brightness regulation parameter of current video frame, each pixel of current video frame is generated Adjusting after brightness.
Optionally, the program code that processor 402 calls memory 401 to be stored is specifically used for executing following operation:
If the color space of current video frame is YUV, the data of current video frame are obtained, obtain current video frame institute It is the brightness of current video frame to have the mean value of the brightness of pixel;
If the color space of current video frame is RGB, the color space of current video frame is converted into YUV, and obtain The data of current video frame are taken, the mean value for obtaining the brightness of current video frame all pixels point is the brightness of current video frame.
Optionally, the program code that processor 402 calls memory 401 to be stored is additionally operable to execute following operation:
Transition parameter and brightness regulation range [the first brightness, the second brightness] are set;
Optionally, the program code that processor 402 calls memory 401 to be stored is specifically used for executing following operation:
According to the brightness of current video frame, the brightness regulation parameter of preceding video frame, the first brightness, the second brightness and mistake Parameter is crossed, the brightness regulation parameter of current video frame is generated.
Optionally, the program code that processor 402 calls memory 401 to be stored is specifically used for executing following operation:
It determines the minimum value between the brightness of current video frame and the second brightness, and determines between minimum value and the first brightness Maximum value;
If maximum value is less than or equal to the brightness regulation parameter of preceding video frame, it is present count that the first parameter, which is arranged, Value;
If maximum value is more than the brightness regulation parameter of preceding video frame, according to transition parameter, by the first preset formula, Calculate the first parameter;
According to the brightness regulation parameter and the first parameter of preceding video frame, the brightness regulation parameter of current video frame is generated.
Optionally, the program code that processor 402 calls memory 401 to be stored is specifically used for executing following operation:
According to brightness regulation parameter and the second brightness, mapping equation is generated;
According to mapping equation, the brightness after the adjusting of each pixel of current video frame is generated.
Optionally, the program code that processor 402 calls memory 401 to be stored is specifically used for executing following operation:
Mapping equation is generated according to the secondary Lagrange's interpolation formula of preset three points, wherein preset three points Including the first preset, the second preset and using brightness regulation parameter and the second brightness as the point of coordinate.
Optionally, equipment further includes display module 403 and coding module 404, and processor 402 calls memory 401 to be deposited The program code of storage is additionally operable to execute following operation:
Coding module 404 is controlled to carry out current video frame according to the brightness after the adjusting of each pixel of current video frame Coding;And/or
Display module 403 is controlled to carry out current video frame according to the brightness after the adjusting of each pixel of current video frame Display.
An embodiment of the present invention provides a kind of electronic equipment, which passes through according to the brightness tune with current video frame The corresponding mapping equation of parameter is saved, the brightness after the adjusting of each pixel of current video frame is generated, realizes to current video The brightness of frame is adjusted so that some or all of in the video frame region it is dimmed or it is fuzzy since the intensity of light source is weaker and When fuzzy, the clarity of video can be still kept, to improve user experience of user during instant video.In addition, Since the brightness between adjacent video frame is relevant, pass through the brightness of current video frame and the brightness regulation of preceding video frame The brightness of current video frame is adjusted in parameter, improves the accuracy of luminance video adjusting so that the video after adjusting is bright Degree is truer, to further improve user experience of user during instant video.
The alternative embodiment that any combination forms the present invention may be used, herein no longer in above-mentioned all optional technical solutions It repeats one by one.
It should be noted that:Above-described embodiment provide electronic equipment when executing luminance video adjusting method, only more than The division progress of each function module is stated for example, in practical application, it can be as needed and by above-mentioned function distribution by difference Function module complete, i.e., the internal structure of equipment is divided into different function modules, with complete it is described above whole or Person's partial function.In addition, the luminance video adjusting method that above-described embodiment provides belongs to same design with electronic equipment embodiment, Its specific implementation process refers to embodiment of the method, and which is not described herein again.
One of ordinary skill in the art will appreciate that realizing that all or part of step of above-described embodiment can pass through hardware It completes, relevant hardware can also be instructed to complete by program, the program can be stored in a kind of computer-readable In storage medium, storage medium mentioned above can be read-only memory, disk or CD etc..
The foregoing is merely presently preferred embodiments of the present invention, is not intended to limit the invention, it is all the present invention spirit and Within principle, any modification, equivalent replacement, improvement and so on should all be included in the protection scope of the present invention.

Claims (6)

1. a kind of luminance video adjusting method, which is characterized in that the method includes:
Obtain the brightness of current video frame;
Transition parameter and brightness regulation range [the first brightness, the second brightness] are set;
According to the brightness of the current video frame, the brightness regulation parameter of preceding video frame, first brightness, described second bright Degree and the transition parameter, generate the brightness regulation parameter of current video frame;
According to mapping equation corresponding with the brightness regulation parameter of the current video frame, each of described current video frame is generated Brightness after the adjusting of pixel;
It is described according to the brightness of the current video frame, the brightness regulation parameter of preceding video frame, first brightness, described Two brightness and the transition parameter, the brightness regulation parameter for generating current video frame include:
Determine the minimum value between the brightness of the current video frame and second brightness, and determine the minimum value with it is described Maximum value between first brightness;
If the maximum value is less than or equal to the brightness regulation parameter of the preceding video frame, it is default that the first parameter, which is arranged, Numerical value;
If the brightness regulation parameter that the maximum value is more than the preceding video frame passes through first according to the transition parameter Preset formula calculates first parameter;First preset formula is:DeltaD=(Yavg-D0)×(100-G0)/100;Its In, deltaD is the first parameter, G0For transition parameter, YavgFor the brightness of current video frame, D0For the brightness tune of preceding video frame Save parameter;
According to the brightness regulation parameter of the preceding video frame and first parameter, by the second preset formula, described in generation The brightness regulation parameter D of current video frame1;Second preset formula is:D1=D0+deltaD。
2. according to the method described in claim 1, it is characterized in that, the brightness for obtaining current video frame includes:
If the color space of the current video frame is YUV, the data of the current video frame are obtained, obtain current video The mean value of the brightness of 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 converted into YUV, And the data of the current video frame are obtained, the mean value for obtaining the brightness of current video frame all pixels point is the current video The brightness of frame.
3. according to the method described in claim 1, it is characterized in that, the basis and the brightness regulation of the current video frame are joined The corresponding mapping equation of number, generating the brightness after the adjusting of each pixel of the current video frame includes:
According to the brightness regulation parameter of the current video frame and second brightness, the mapping equation is generated;
According to the mapping equation, the brightness after the adjusting of each pixel of the current video frame is generated.
4. a kind of electronic equipment, which is characterized in that the electronic equipment includes:
Luminance acquisition module, the brightness for obtaining current video frame;
Adjustment parameter acquisition module, for transition parameter and brightness regulation range [the first brightness, the second brightness] to be arranged;According to institute State the brightness of current video frame, the brightness regulation parameter of preceding video frame, first brightness, second brightness and described Transition parameter generates the brightness regulation parameter of current video frame;
Luminance acquisition module is adjusted, for according to mapping equation corresponding with the brightness regulation parameter of the current video frame, life At the brightness after the adjusting of each pixel of the current video frame;
The adjustment parameter acquisition module is specifically used for:
It determines the minimum value between the brightness of the current video frame and the second brightness, and determines the minimum value and described first Maximum value between brightness;
If the maximum value is less than or equal to the brightness regulation parameter of the preceding video frame, it is default that the first parameter, which is arranged, Numerical value;
If the brightness regulation parameter that the maximum value is more than the preceding video frame passes through first according to the transition parameter Preset formula calculates first parameter;First preset formula is:DeltaD=(Yavg-D0)×(100-G0)/100;Its In, deltaD is the first parameter, G0For transition parameter, YavgFor the brightness of current video frame, D0For the brightness tune of preceding video frame Save parameter;
According to the brightness regulation parameter of the preceding video frame and first parameter, by the second preset formula, described in generation The brightness regulation parameter D of current video frame1;Second preset formula is:D1=D0+deltaD。
5. equipment according to claim 4, which is characterized in that the luminance acquisition module is specifically used for:
If the color space of the current video frame is YUV, the data of the current video frame are obtained, obtain current video The mean value of the brightness of 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 converted into YUV, And the data of the current video frame are obtained, the mean value for obtaining the brightness of current video frame all pixels point is the current video The brightness of frame.
6. equipment according to claim 4, which is characterized in that the adjusting luminance acquisition module is specifically used for:
According to the brightness regulation parameter of the current video frame and second brightness, the mapping equation is generated;
According to the mapping equation, the brightness after the adjusting of each pixel of the current video frame is generated.
CN201610023312.3A 2016-01-14 2016-01-14 A kind of luminance video adjusting method and electronic equipment Active CN106954055B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201610023312.3A CN106954055B (en) 2016-01-14 2016-01-14 A kind of luminance video adjusting method and electronic equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201610023312.3A CN106954055B (en) 2016-01-14 2016-01-14 A kind of luminance video adjusting method and electronic equipment

Publications (2)

Publication Number Publication Date
CN106954055A CN106954055A (en) 2017-07-14
CN106954055B true CN106954055B (en) 2018-10-16

Family

ID=59465987

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201610023312.3A Active CN106954055B (en) 2016-01-14 2016-01-14 A kind of luminance video adjusting method and electronic equipment

Country Status (1)

Country Link
CN (1) CN106954055B (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109862389B (en) * 2018-11-20 2021-08-20 北京奇艺世纪科技有限公司 Video processing method, device, server and storage medium
CN111182351A (en) * 2020-03-17 2020-05-19 惠州Tcl移动通信有限公司 Video playing processing method and device, storage medium and terminal

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1472954A (en) * 2002-07-15 2004-02-04 ���ǵ�����ʽ���� Circuit and method for improving image quality by fram correlation
CN1673667A (en) * 2004-03-22 2005-09-28 奥林巴斯株式会社 Inspection apparatus
CN1729482A (en) * 2002-12-20 2006-02-01 皇家飞利浦电子股份有限公司 Enhancing video images depending on prior image enhancements
CN101340511A (en) * 2008-08-07 2009-01-07 中兴通讯股份有限公司 Adaptive video image enhancing method based on lightness detection
CN102480626A (en) * 2010-11-29 2012-05-30 索尼公司 Image processing apparatus, display apparatus and image processing program
CN103593830A (en) * 2013-11-29 2014-02-19 大连理工大学 Low-light video image reinforcing method

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1472954A (en) * 2002-07-15 2004-02-04 ���ǵ�����ʽ���� Circuit and method for improving image quality by fram correlation
CN1729482A (en) * 2002-12-20 2006-02-01 皇家飞利浦电子股份有限公司 Enhancing video images depending on prior image enhancements
CN1673667A (en) * 2004-03-22 2005-09-28 奥林巴斯株式会社 Inspection apparatus
CN101340511A (en) * 2008-08-07 2009-01-07 中兴通讯股份有限公司 Adaptive video image enhancing method based on lightness detection
CN102480626A (en) * 2010-11-29 2012-05-30 索尼公司 Image processing apparatus, display apparatus and image processing program
CN103593830A (en) * 2013-11-29 2014-02-19 大连理工大学 Low-light video image reinforcing method

Also Published As

Publication number Publication date
CN106954055A (en) 2017-07-14

Similar Documents

Publication Publication Date Title
CN107438178B (en) A kind of image color antidote and electronic equipment
US9472162B2 (en) Method of mapping source colors from a source color gamut into a target color gamut
US7443453B2 (en) Dynamic image saturation enhancement apparatus
CN104809694B (en) Digital image processing method and device
CN110349097B (en) Color enhancement method for image significance and image processing device
CN104581103A (en) Image processing method and device
CN107820069A (en) A kind of video monitoring equipment ISP adjustment methods
CN106954055B (en) A kind of luminance video adjusting method and electronic equipment
CN108200420A (en) Picture adjustment methods, device, readable storage medium storing program for executing and terminal
WO2006085274A2 (en) Method of displaying an image and correspond image-display system
KR101225059B1 (en) Apparatus and method for enhancing color device-adaptively
WO2023241339A1 (en) Color cast correction method and apparatus, device, storage medium and program product
CN108846871A (en) A kind of image processing method and device
CN104715735A (en) Backlight adjusting method and device
CN116453477A (en) Backlight processing method and device based on local dimming, backlight equipment and projector
TWI531246B (en) Color adjustment method and its system
CN112581390B (en) Image color enhancement method, device, equipment and readable storage medium
US8284316B2 (en) Real-time image processing circuit capable of enhancing brightness contrast and color saturation
CN106993176A (en) A kind of method and electronic equipment for adjusting luminance video
CN111613168B (en) Image display processing method and device and computer readable storage medium
EP1383345B1 (en) Vectorscope
US10504452B2 (en) Pixel contrast control systems and methods
TWI495352B (en) Color adjustment device and color adjustment method
CN114697624A (en) Laser projection equipment and display method of projected image thereof
CN102164289B (en) Method and/or apparatus for implementing a color management module

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant
TR01 Transfer of patent right

Effective date of registration: 20200710

Address after: 603a, block a, Xinghe world, No.1 Yabao Road, Longgang District, Shenzhen City, Guangdong Province

Patentee after: Shenzhen Weiwu Technology Co., Ltd

Address before: 200063, Shanghai, Putuo District, home on the first floor of the cross road, No. 28

Patentee before: Palmwin Information Technology (Shanghai) Co.,Ltd.

TR01 Transfer of patent right
TR01 Transfer of patent right

Effective date of registration: 20210207

Address after: 518051 2503, building 15, Longhai homeland, 5246 Yihai Avenue, baonanshan District, Shenzhen City, Guangdong Province

Patentee after: Xiao Feng

Address before: 603a, block a, Xinghe world, No.1, Yabao Road, Longgang District, Shenzhen, Guangdong 518035

Patentee before: Shenzhen Weiwu Technology Co., Ltd

TR01 Transfer of patent right