CN103841337B - The method and apparatus of BLC - Google Patents

The method and apparatus of BLC Download PDF

Info

Publication number
CN103841337B
CN103841337B CN201210484614.2A CN201210484614A CN103841337B CN 103841337 B CN103841337 B CN 103841337B CN 201210484614 A CN201210484614 A CN 201210484614A CN 103841337 B CN103841337 B CN 103841337B
Authority
CN
China
Prior art keywords
component
current frame
frame image
threshold value
average
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
CN201210484614.2A
Other languages
Chinese (zh)
Other versions
CN103841337A (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.)
Beijing Baidu Netcom Science and Technology Co Ltd
Original Assignee
Beijing Baidu Netcom Science and Technology 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 Beijing Baidu Netcom Science and Technology Co Ltd filed Critical Beijing Baidu Netcom Science and Technology Co Ltd
Priority to CN201210484614.2A priority Critical patent/CN103841337B/en
Publication of CN103841337A publication Critical patent/CN103841337A/en
Application granted granted Critical
Publication of CN103841337B publication Critical patent/CN103841337B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Abstract

The present invention proposes a kind of method and apparatus of BLC, and the method is comprised the following steps:Current frame image is obtained, and is judged whether in backlight state;If being in the backlight state, the average contrast of corresponding first component of current frame image is obtained, and judges average contrast whether more than the first predetermined threshold value;If less than or be equal to the first predetermined threshold value, then the regulation coefficient of the first component is obtained according to average contrast, and the average of the corresponding second component of current frame image is obtained;Judge average whether more than the second predetermined threshold value;If less than or be equal to the second predetermined threshold value, then according to average obtain second component regulation coefficient;And adjust the first component and second component respectively to carry out BLC to current frame image according to the regulation coefficient of the regulation coefficient and second component of the first component.Method according to embodiments of the present invention, can significantly lift image of the photographic head under backlight state or video capture quality, lift Consumer's Experience.

Description

The method and apparatus of BLC
Technical field
The present invention relates to technical field of image processing, more particularly to a kind of method and apparatus of BLC.
Background technology
When user is shot using camera or recorded a video, backlight scene is frequently encountered, the photographic head under backlight scene is because exposure When the target deviation of time control reference and reason the causes imaging such as electrooptical device dynamic range is limited, picture main body is bright The not enough defect of degree, causes picture than dark, has had a strong impact on the effect taken pictures.
In order to solve the above problems, pre-treatment end compensating technology and post processing end correction technology are mainly adopted at present.Wherein, Pre-treatment end compensating technology is by controlling imaging process come the improvement or control for image device, such as re-expose mode Deng, post processing end compensating technology by being analyzed to image, and generate one for zones of different, different illumination intensity from The offset of dynamic adjustment carries out BLC.Such as traditional histogram equalizing method, curve mapping method, the increasing based on the colour of skin Strong compensation method etc..
There is problems with post processing end compensating technology at present:(1)The backlight area of detection is forbidden, and causes in compensation process It is middle that to there is a problem of that balancing force is spent big or too small;(2)In the case where compensate for brightness, the flatness of image and naturality are received To loss, it is impossible to meet the requirement of human eye comfortableness;(3)Computation complexity cannot meet the intelligent mobile terminals such as Android Process demand.
The content of the invention
It is contemplated that at least solving one of above-mentioned technical problem.
For this purpose, first purpose of the present invention is to propose a kind of method of BLC, the method significantly can be carried Image of the photographic head under backlight state or video capture quality are risen, Consumer's Experience is lifted.
Second object of the present invention is to propose a kind of device of BLC.
To achieve these goals, the method for the BLC of embodiment includes following step according to a first aspect of the present invention Suddenly:Current frame image is obtained, and judges the current frame image whether in backlight state;If the current frame image is in The backlight state, then obtain the average contrast of corresponding first component of the current frame image, and judge described average right Whether the first predetermined threshold value is more than than degree;If the average contrast is less than or equal to first predetermined threshold value, basis The average contrast obtains the regulation coefficient of first component, and obtains the corresponding second component of the current frame image Average;Judge the average whether more than the second predetermined threshold value;If the average is less than or equal to second predetermined threshold value, The regulation coefficient of the second component is obtained according to the average then;And the regulation coefficient according to first component and described The regulation coefficient of second component adjusts first component and the second component to carry on the back the current frame image respectively Light is compensated.
The method of BLC according to embodiments of the present invention, process is simple and takes relatively low CPU, while can be significantly Image of the photographic head under backlight state or video capture quality are lifted, it is not single to lift brightness(By chrominance component), but also Color saturation is improved accordingly(By saturation component), it is greatly enhanced the mobile terminals such as android smart phone Consumer's Experience.
To achieve these goals, the device of the BLC of embodiment includes according to a second aspect of the present invention:First obtains Delivery block, for obtaining current frame image;First judge module, for judging the current frame image whether in backlight shape State;Second acquisition module, for when first judge module judges that the current frame image is in the backlight state, obtaining Take the average contrast of corresponding first component of the current frame image;Second judge module, for judging the mean comparisons Whether degree is more than the first predetermined threshold value;3rd acquisition module, for judging the average contrast in second judge module During less than or equal to first predetermined threshold value, the regulation coefficient of first component is obtained according to the average contrast;The Four acquisition modules, for obtaining the average of the corresponding second component of the current frame image;4th judge module, for judging Average is stated whether more than the second predetermined threshold value;5th acquisition module, for judging that the average is little in the 4th judge module In or when being equal to second predetermined threshold value, the regulation coefficient of the second component is obtained according to the average;And adjustment mould Block, the regulation coefficient for regulation coefficient and the second component according to first component adjust first component respectively With the second component carrying out BLC to the current frame image.
The device of BLC according to embodiments of the present invention, process is simple and takes relatively low CPU, while can be significantly Image of the photographic head under backlight state or video capture quality are lifted, it is not single to lift brightness(By chrominance component), but also Color saturation is improved accordingly(By saturation component), it is greatly enhanced the mobile terminals such as android smart phone Consumer's Experience.
The additional aspect of the present invention and advantage will be set forth in part in the description, and partly will become from the following description Obtain substantially, or recognized by the practice of the present invention.
Description of the drawings
Of the invention above-mentioned and/or additional aspect and advantage will become from the following description of the accompanying drawings of embodiments It is substantially and easy to understand, wherein,
Fig. 1 is the flow chart of the method for BLC according to an embodiment of the invention;
Fig. 2 is the flow chart of the method for BLC in accordance with another embodiment of the present invention;
Fig. 3 is the flow chart of the method for the BLC according to another embodiment of the invention;
Fig. 4 is the structured flowchart of the device of BLC according to an embodiment of the invention;
Fig. 5 is the structured flowchart of the device of BLC in accordance with another embodiment of the present invention;
Fig. 6 is the structured flowchart of the device of the BLC according to another embodiment of the invention;And
Fig. 7 is the structured flowchart of the device of the BLC according to further embodiment of the present invention.
Specific embodiment
Embodiments of the invention are described below in detail, the example of the embodiment is shown in the drawings, wherein from start to finish Same or similar label represents same or similar element or the element with same or like function.Below with reference to attached The embodiment of figure description is exemplary, is only used for explaining the present invention, and is not considered as limiting the invention.Conversely, this Inventive embodiment includes all changes fallen in the range of the spirit and intension of attached claims, modification and is equal to Thing.
In describing the invention, it is to be understood that term " first ", " second " etc. are not only used for describing purpose, and not It is understood that to indicate or implying relative importance.In describing the invention, it should be noted that unless otherwise clearly regulation And restriction, term " being connected ", " connection " should be interpreted broadly, for example, it may be fixedly connected, or be detachably connected, Or be integrally connected;Can be mechanically connected, or electrically connect;Can be joined directly together, it is also possible to by intermediary It is indirectly connected to.For the ordinary skill in the art, above-mentioned term tool in the present invention can be understood with concrete condition Body implication.Additionally, in describing the invention, unless otherwise stated, " multiple " are meant that two or more.
In flow chart or here any process described otherwise above or method description are construed as, expression includes It is one or more for realizing specific logical function or process the step of the module of code of executable instruction, fragment or portion Point, and the scope of the preferred embodiment of the present invention includes other realization, wherein the suitable of shown or discussion can not be pressed Sequence, including according to involved function by it is basic simultaneously in the way of or in the opposite order, carry out perform function, this should be of the invention Embodiment person of ordinary skill in the field understood.
Below with reference to the accompanying drawings the method and apparatus for describing BLC according to embodiments of the present invention.
A kind of method of BLC, comprises the following steps:Current frame image is obtained, and judges whether current frame image is located In backlight state;If current frame image is in the backlight state, the flat of corresponding first component of current frame image is obtained Equal contrast, and judge average contrast whether more than the first predetermined threshold value;If average contrast is pre- less than or equal to first The regulation coefficient of the first component if threshold value, is then obtained according to average contrast, and obtains the corresponding second component of current frame image Average;Judge average whether more than the second predetermined threshold value;If average is less than or equal to the second predetermined threshold value, according to average Obtain the regulation coefficient of second component;And adjusted according to the regulation coefficient of the regulation coefficient and second component of the first component respectively First component and second component are carrying out BLC to current frame image.
Fig. 1 is the flow chart of the method for BLC according to an embodiment of the invention.
As shown in figure 1, the method for BLC comprises the steps.
Whether step S101, obtain current frame image, and judge current frame image in backlight state.
Step S102, if current frame image is in backlight state, obtains corresponding first component of current frame image Average contrast, and judge average contrast whether more than the first predetermined threshold value.Wherein, the first component can be empty for HSV colors Between chrominance component V, can also be other image spaces represent the tone i.e. component of brightness.
In one embodiment of the invention, the first predetermined threshold value can be 70 ~ 80, wherein 60 is preferred value.
Step S103, if average contrast is less than or equal to the first predetermined threshold value, obtains the according to average contrast The regulation coefficient of one component, and obtain the average of the corresponding second component of current frame image.Wherein, second component can be HSV The saturation component S of color space, can also be the component of the expression saturation of other image spaces.
Wherein, if average contrast is more than the first predetermined threshold value, terminate.
Whether step S104, judge average more than the second predetermined threshold value.
In one embodiment of the invention, the second predetermined threshold value can be 40 ~ 60, wherein 50 is preferred value.
Step S105, if average is less than or equal to the second predetermined threshold value, obtains the adjustment of second component according to average Coefficient.
Wherein, if average is more than the second predetermined threshold value, terminate.
Step S106, according to the regulation coefficient of the regulation coefficient and second component of the first component adjust respectively the first component and Second component is carrying out BLC to current frame image.
The method of BLC according to embodiments of the present invention, process is simple and takes relatively low CPU, while can be significantly Image of the photographic head under backlight state or video capture quality are lifted, it is not single to lift brightness(By chrominance component), but also Color saturation is improved accordingly(By saturation component), it is greatly enhanced the mobile terminals such as android smart phone Consumer's Experience.
Fig. 2 is the flow chart of the method for BLC in accordance with another embodiment of the present invention.
As shown in Fig. 2 the method for BLC comprises the steps.
Step S201, obtains current frame image, and current frame image is converted to HSV color space images, wherein, HSV Color space image includes form and aspect component H, saturation component S and chrominance component V.
Whether step S202, judge current frame image in backlight state.
Step S203, if current frame image is in backlight state, obtains corresponding first component of current frame image Average contrast, and judge average contrast whether more than the first predetermined threshold value.Wherein, the first component can be empty for HSV colors Between chrominance component V, can also be other image spaces represent the tone i.e. component of brightness.
In one embodiment of the invention, the first predetermined threshold value can be 70 ~ 80, wherein 60 is preferred value.
Step S204, if average contrast is less than or equal to the first predetermined threshold value, obtains the according to average contrast The regulation coefficient of one component, and obtain the average of the corresponding second component of current frame image.Wherein, second component can be HSV The saturation component S of color space, can also be the component of the expression saturation of other image spaces.
Wherein, if average contrast is more than the first predetermined threshold value, terminate.
Specifically, the first component can be the chrominance component V of HSV color spaces, and second component can be saturation component S.It should be appreciated that can also be the component of the expression hue and luminance of other image spaces.
Whether step S205, judge average more than the second predetermined threshold value.
In one embodiment of the invention, the second predetermined threshold value can be 40 ~ 60, wherein 50 is preferred value.
Step S206, if average is less than or equal to the second predetermined threshold value, obtains the adjustment of second component according to average Coefficient.
Wherein, if average is more than the second predetermined threshold value, terminate.
Step S207, according to the regulation coefficient of the regulation coefficient and second component of the first component adjust respectively the first component and Second component is carrying out BLC to current frame image.
We have found that, it is also possible to detection and the BLC of brightness are carried out in YUV color spaces, but color can be caused to satisfy Not enough with degree, Consumer's Experience is bad.
The method of BLC according to embodiments of the present invention, by current frame image is converted to HSV color space figures As with to brightness(By chrominance component)And color saturation(By saturation component)BLC is carried out, further greatly Improve the Consumer's Experience of the mobile terminals such as android smart phone.
Fig. 3 is the flow chart of the method for the BLC according to another embodiment of the invention.
As shown in figure 3, the method for BLC comprises the steps.
Step S301, obtains current frame image, and current frame image is converted to HSV color space images, wherein, HSV Color space image includes form and aspect component H, saturation component S and chrominance component V.
Whether step S302, obtain the backlight coefficient of current frame image, and judge backlight coefficient more than the 3rd predetermined threshold value.
Specifically, first, meansigma methodss avgV and meansquaredeviationσ of chrominance component V are obtained2, wherein meansigma methodss avgV and mean square Difference σ2Acquisition process be conventional computational methods, will not be described here, then, according to meansigma methodss avgV and meansquaredeviationσ2According to Below equation obtains backlight coefficient B Kflag,
BKflag=(((log102)+avgV)/128)2-TH×((log102)+avgV)/128)3/100)
Wherein, TH is empirical coefficient, can be with value as 0.7, and the 3rd predetermined threshold value can be with value as 1.
Step S303, if backlight coefficient is less than or equal to the 3rd predetermined threshold value, current frame image is in backlight state, The average contrast of corresponding first component of current frame image is then obtained, and judges average contrast whether more than the first default threshold Value.Wherein, the first component can be the chrominance component V of HSV color spaces, can also be the expression tone of other image spaces i.e. The component of brightness.
In one embodiment of the invention, the first predetermined threshold value can be 70 ~ 80, wherein 60 is preferred value.
In one embodiment of the invention, obtain the mistake of the average contrast of the corresponding chrominance component V of current frame image Journey is specific as follows, first, obtains the rectangular histogram Hist [V of chrominance component Vi], i ∈ [0, W × H), then, according to rectangular histogram Hist [Vi] contrast C of each pixel is determined according to below equationj,
Cj=Hist[Vj]×abs(Vj-avgV)
Afterwards, the contrast C according to each pixeljThe average contrast of chrominance component V is obtained according to below equation AvgC,
Wherein, height value and width value for current frame image of W, H.
Step S304, if average contrast is less than or equal to the first predetermined threshold value, obtains the according to average contrast The regulation coefficient of one component, and obtain the average of the corresponding second component of current frame image.Wherein, second component can be HSV The saturation component S of color space, can also be the component of the expression saturation of other image spaces.
Wherein, if average contrast is more than the first predetermined threshold value, terminate.
Specifically, the first component can be the chrominance component V of HSV color spaces, and second component can be saturation component S.It should be appreciated that can also be the component of the expression hue and luminance of other image spaces.
In one embodiment of the invention, obtain chrominance component V according to below equation according to average contrast avgC Regulation coefficient Rv,
Rv=a-avgC
Wherein, a is the first predetermined threshold value.
In one embodiment of the invention, average avgS of saturation component S is obtained according to below equation,
Whether step S305, judge average more than the second predetermined threshold value.
In one embodiment of the invention, the second predetermined threshold value can be 40 ~ 60, wherein 50 is preferred value.
Step S306, if average is less than or equal to the second predetermined threshold value, obtains the adjustment of second component according to average Coefficient.
Wherein, if average is more than the second predetermined threshold value, terminate.
In one embodiment of the invention, the adjustment of saturation component S is obtained according to average avgS according to below equation Coefficients Rs,
Rs=b-avgS
Wherein, b is the second predetermined threshold value.
Step S307, according to the regulation coefficient of the regulation coefficient and second component of the first component adjust respectively the first component and Second component is carrying out BLC to current frame image.
In one embodiment of the invention, the regulation coefficient R according to chrominance component VvTone is adjusted according to below equation Component V,
V′j=255-(255-Vj)×(1+Rv/100)
Wherein, V 'jFor the chrominance component after adjustment.
In one embodiment of the invention, the regulation coefficient R according to saturation component SsIt is full according to below equation adjustment With degree component S,
S′j=(Sj×(1+Rs/100)-50)×128/(Sj-50)
Wherein, S 'jFor the saturation component after adjustment.
The method of BLC according to embodiments of the present invention, process are simple, save program and resource, particularly The mobile terminals such as android smart phone, so as to further lift Consumer's Experience.
Fig. 4 is the structured flowchart of the device of BLC according to an embodiment of the invention.
As shown in figure 4, the device of BLC includes:First acquisition module 100, the first judge module 200, second are obtained Module 300, the second judge module 400, the 3rd acquisition module 500, the 4th acquisition module 600, the 4th judge module the 700, the 5th Acquisition module 800 and adjusting module 900.
Specifically, the first acquisition module 100 is used to obtain current frame image.
Whether the first judge module 200 is used to judge current frame image in backlight state.
Second acquisition module 300 for the first judge module 200 judge current frame image be in backlight state when, obtain The average contrast of corresponding first component of current frame image.Wherein, the first component can be the chrominance component of HSV color spaces V, can also be other image spaces represent the tone i.e. component of brightness.
Whether the second judge module 400 is used to judge average contrast more than the first predetermined threshold value.Wherein first default threshold Value can be preferred value for 70 ~ 80,60.
In the second judge module 400,3rd acquisition module 500 is for judging that average contrast is default less than or equal to first During threshold value, the regulation coefficient of the first component is obtained according to average contrast.
4th acquisition module 600 is used to obtain the average of the corresponding second component of current frame image.Wherein, second component can Think the saturation component S of HSV color spaces, can also be the component of the expression saturation of other image spaces.
Whether the 4th judge module 700 is used to judge average more than the second predetermined threshold value.Wherein, the second predetermined threshold value can be 40 ~ 60,50 is preferred value.
5th acquisition module 800 for the 4th judge module 700 judge average be less than or equal to the second predetermined threshold value when, The regulation coefficient of second component is obtained according to average.
Adjusting module 900 adjusts first respectively for the regulation coefficient of regulation coefficient and second component according to the first component Component and second component are carrying out BLC to current frame image.
The device of BLC according to embodiments of the present invention, process is simple and takes relatively low CPU, while can be significantly Image of the photographic head under backlight state or video capture quality are lifted, it is not single to lift brightness(By chrominance component), but also Color saturation is improved accordingly(By saturation component), it is greatly enhanced the mobile terminals such as android smart phone Consumer's Experience.
Fig. 5 is the structured flowchart of the device of BLC in accordance with another embodiment of the present invention.
As shown in figure 5, the device of BLC also includes on the basis of shown in Fig. 4:Modular converter 1000.
Specifically, modular converter 1000 is for being converted to HSV color space images by current frame image, wherein, HSV colors Spatial image includes form and aspect component H, saturation component S and chrominance component V.
We have found that, it is also possible to detection and the BLC of brightness are carried out in YUV color spaces, but color can be caused to satisfy Not enough with degree, Consumer's Experience is bad.Thus using modular converter 1000 by current frame image is converted to HSV color space figures As with to brightness(By chrominance component)And color saturation(By saturation component)BLC is carried out, further greatly Improve the Consumer's Experience of the mobile terminals such as android smart phone.
Fig. 6 is the structured flowchart of the device of the BLC according to another embodiment of the invention.
As shown in fig. 6, the device of BLC also includes on the basis of shown in Fig. 5:Acquiring unit 210 and judging unit 220, wherein the first judge module 200 includes acquiring unit 210 and judging unit 220.
Specifically, acquiring unit 210 is used for the backlight coefficient for obtaining current frame image.More specifically, first, acquiring unit 210 meansigma methodss avgV and meansquaredeviationσ for obtaining chrominance component V2, wherein meansigma methodss avgV and meansquaredeviationσ2Acquisition process be normal Computational methods, will not be described here, and then, acquiring unit 210 is according to meansigma methodss avgV and meansquaredeviationσ2According to following public affairs Formula obtains backlight coefficient B Kflag,
BKflag=(((log102)+avgV)/128)2-TH×((log102)+avgV)/128)3/100)
Wherein, TH is empirical coefficient, can be with value as 0.7.
Judging unit 220 is used to judge backlight coefficient whether more than the 3rd predetermined threshold value, wherein, the 3rd predetermined threshold value can be with Value is 1.If backlight coefficient is less than or equal to the 3rd predetermined threshold value, current frame image is in the backlight state.
Thus, it is possible to easily judge the image or video of camera shooting whether in backlight state.
Fig. 7 is the structured flowchart of the device of the BLC according to further embodiment of the present invention.
As shown in fig. 7, the device of BLC also includes on the basis of shown in Fig. 6:First acquisition unit 310, determination Unit 320 and second acquisition unit 330, wherein the second acquisition module 300 includes first acquisition unit 310,320 and of determining unit Second acquisition unit 330.
Specifically, first acquisition unit 310 is used for the rectangular histogram Hist [V for obtaining chrominance component Vi],i∈[0,W×H)。 Determining unit 320 is for according to rectangular histogram Hist [Vi] contrast C of each pixel is determined according to below equationj,
Cj=Hist[Vj]×abs(Vj-avgV)
Second acquisition unit 330 is for the contrast C according to each pixeljChrominance component V is obtained according to below equation Average contrast avgC,
Wherein, W, H are the height value and width value of the current frame image.
In one embodiment of the invention, the 3rd acquisition module 500 according to average contrast avgC according to below equation Obtain the regulation coefficient R of chrominance component Vv,
Rv=a-avgC
Wherein, a is the first predetermined threshold value.
In one embodiment of the invention, the 4th acquisition module 600 obtains the equal of saturation component S according to below equation Value avgS,
In one embodiment of the invention, the 5th acquisition module 800 obtains full according to below equation according to average avgS With the regulation coefficient R of degree component Ss,
Rs=b-avgS
Wherein, b is the second predetermined threshold value.
In one embodiment of the invention, regulation coefficient R of the adjusting module 900 according to chrominance component VvAccording to following public affairs Formula adjusts chrominance component V,
V'j=255-(255-Vj)×(1+Rv/100)
Wherein, V'jFor the chrominance component after adjustment.
In one embodiment of the invention, regulation coefficient R of the adjusting module 900 according to saturation component SsAccording to following Formula adjusts saturation component S,
S′j=(Sj×(1+Rs/100)-50)×128/(Sj-50)
Wherein, S 'jFor the saturation component after adjustment.
The device of BLC according to embodiments of the present invention, process are simple, save program and resource, particularly The mobile terminals such as android smart phone, so as to further lift Consumer's Experience.
It should be appreciated that each several part of the present invention can be realized with hardware, software, firmware or combinations thereof.Above-mentioned In embodiment, the software that multiple steps or method can be performed in memory and by suitable instruction execution system with storage Or firmware is realizing.For example, if realized with hardware, and in another embodiment, can be with well known in the art Any one of row technology or their combination are realizing:With for the logic gates of logic function is realized to data signal Discrete logic, the special IC with suitable combinational logic gate circuit, programmable gate array(PGA), scene Programmable gate array(FPGA)Deng.
In the description of this specification, reference term " one embodiment ", " some embodiments ", " example ", " specifically show Example ", or the description of " some examples " etc. mean specific features with reference to the embodiment or example description, structure, material or spy Point is contained at least one embodiment or example of the present invention.In this manual, to the schematic representation of above-mentioned term not Identical embodiment or example are referred to necessarily.And, the specific features of description, structure, material or feature can be any One or more embodiments or example in combine in an appropriate manner.
Although an embodiment of the present invention has been shown and described, for the ordinary skill in the art, can be with Understanding can carry out various changes, modification, replacement to these embodiments without departing from the principles and spirit of the present invention And modification, the scope of the present invention is by claims and its is equal to limit.

Claims (18)

1. a kind of method of BLC, it is characterised in that comprise the following steps:
Current frame image is obtained, and judges the current frame image whether in backlight state;
If the current frame image is in the backlight state, the flat of corresponding first component of the current frame image is obtained Equal contrast, and judge the average contrast whether more than the first predetermined threshold value;
If the average contrast is less than or equal to first predetermined threshold value, according to the average contrast obtains The regulation coefficient of the first component, and obtain the average of the corresponding second component of the current frame image;
Judge the average whether more than the second predetermined threshold value;
If the average is less than or equal to second predetermined threshold value, the tune of the second component is obtained according to the average Integral coefficient;And
According to the regulation coefficient of the regulation coefficient and the second component of first component adjust respectively first component and The second component is carrying out BLC to the current frame image;
It is further comprising the steps of:
The current frame image is converted to into HSV color space images, wherein, the HSV color spaces image includes form and aspect point Amount H, saturation component S and chrominance component V;
It is described whether to judge current frame image in backlight state, it is further comprising the steps:
The backlight coefficient of the current frame image is obtained, and judges the backlight coefficient whether more than the 3rd predetermined threshold value;And
If the backlight coefficient is less than or equal to the 3rd predetermined threshold value, the current frame image is in the backlight state;
The backlight coefficient for obtaining current frame image, it is further comprising the steps:
Obtain meansigma methodss avgV and meansquaredeviationσ of the chrominance component V2;And
According to meansigma methodss avgV and the meansquaredeviationσ2Backlight coefficient B K is obtained according to below equationflag,
BKflag=(((log102)+avgV)/128)2-TH×((log102)+avgV)/128)3/100)
Wherein, TH is empirical coefficient.
2. method according to claim 1, it is characterised in that first component is the chrominance component V, described second Component is saturation component S.
3. method according to claim 2, it is characterised in that obtain the corresponding chrominance component of the current frame image The average contrast of V, it is further comprising the steps:
Obtain the rectangular histogram Hist [V of the chrominance component Vi],i∈[0,W×H);
According to the rectangular histogram Hist [Vi] contrast C of each pixel is determined according to below equationj,
Cj=Hist [Vj]×abs(Vj-avgV)
According to the contrast C of each pixeljThe average contrast avgC of the chrominance component V is obtained according to below equation,
a v g C = ( Σ j W × H C j ) / ( W × H )
Wherein, W, H are the height value and width value of the current frame image.
4. method according to claim 3, it is characterised in that obtained according to below equation according to the average contrast avgC Take the regulation coefficient R of the chrominance component Vv,
Rv=a-avgC
Wherein, a is first predetermined threshold value.
5. method according to claim 2, it is characterised in that obtain the equal of the saturation component S according to below equation Value avgS,
a v g S = ( Σ 0 W × H - 1 C j ) / ( W × H ) .
6. method according to claim 5, it is characterised in that according to average avgS is obtained according to below equation The regulation coefficient R of saturation component Ss,
Rs=b-avgS
Wherein, b is second predetermined threshold value.
7. method according to claim 4, it is characterised in that according to the regulation coefficient R of the chrominance component VvAccording to following Formula adjusts the chrominance component V,
V′j=255- (255-Vj)×(1+Rv/100)
Wherein, V 'jThe chrominance component after for adjustment.
8. method according to claim 6, it is characterised in that according to the regulation coefficient R of the saturation component SsAccording to Lower formula adjusts the saturation component S,
S'j=(Sj×(1+Rs/100)-50)×128/(Sj-50)
Wherein, S'jThe saturation component after for adjustment.
9. the method according to claim 4 or 6, it is characterised in that first predetermined threshold value is 70~80, described second Predetermined threshold value is 40~60.
10. a kind of device of BLC, it is characterised in that include:
First acquisition module, for obtaining current frame image;
First judge module, for judging the current frame image whether in backlight state;
Second acquisition module, for first judge module judge the current frame image be in the backlight state when, Obtain the average contrast of corresponding first component of the current frame image;
Second judge module, for judging the average contrast whether more than the first predetermined threshold value;
3rd acquisition module, for judging that the average contrast is pre- less than or equal to described first in second judge module If during threshold value, obtaining the regulation coefficient of first component according to the average contrast;
4th acquisition module, for obtaining the average of the corresponding second component of the current frame image;
4th judge module, for judging the average whether more than the second predetermined threshold value;
5th acquisition module, for judging that the average is less than or equal to second predetermined threshold value in the 4th judge module When, the regulation coefficient of the second component is obtained according to the average;And
Adjusting module, the regulation coefficient for regulation coefficient and the second component according to first component adjust institute respectively State the first component and the second component to carry out BLC to the current frame image;
Also include:
Modular converter, for the current frame image is converted to HSV color space images, wherein, the HSV color space figures As including form and aspect component H, saturation component S and chrominance component V;
First judge module includes:
Acquiring unit, for obtaining the backlight coefficient of the current frame image;And
Judging unit, for whether judging the backlight coefficient more than the 3rd predetermined threshold value,
If wherein described backlight coefficient is less than or equal to the 3rd predetermined threshold value, the current frame image is in the backlight shape State;
The acquiring unit specifically for:
Obtain meansigma methodss avgV and meansquaredeviationσ of the chrominance component V2, and according to meansigma methodss avgV and the meansquaredeviationσ2 Backlight coefficient B K is obtained according to below equationflag,
BKflag=(((log102)+avgV)/128)2-TH×((log102)+avgV)/128)3/100)
Wherein, TH is empirical coefficient.
11. devices according to claim 10, it is characterised in that first component is the chrominance component V, described the Two components are saturation component S.
12. devices according to claim 11, it is characterised in that second acquisition module includes:
First acquisition unit, for obtaining the rectangular histogram Hist [V of the chrominance component Vi],i∈[0,W×H);
Determining unit, for according to the rectangular histogram Hist [Vi] contrast C of each pixel is determined according to below equationj,
Cj=Hist [Vj]×abs(Vj-avgV)
Second acquisition unit, for the contrast C according to each pixeljThe chrominance component V is obtained according to below equation Average contrast avgC,
a v g C = ( Σ j W × H C j ) / ( W × H )
Wherein, W, H are the height value and width value of the current frame image.
13. devices according to claim 12, it is characterised in that the 3rd acquisition module is according to the average contrast AvgC obtains the regulation coefficient R of the chrominance component V according to below equationv,
Rv=a-avgC
Wherein, a is first predetermined threshold value.
14. devices according to claim 11, it is characterised in that the 4th acquisition module obtains institute according to below equation Average avgS of saturation component S is stated,
a v g S = ( Σ 0 W × H - 1 C j ) / ( W × H ) .
15. devices according to claim 14, it is characterised in that the 5th acquisition module is pressed according to average avgS The regulation coefficient R of the saturation component S is obtained according to below equations,
Rs=b-avgS
Wherein, b is second predetermined threshold value.
16. devices according to claim 13, it is characterised in that tune of the adjusting module according to the chrominance component V Integral coefficient RvThe chrominance component V is adjusted according to below equation,
V′j=255- (255-Vj)×(1+Rv/100)
Wherein, V 'jThe chrominance component after for adjustment.
17. devices according to claim 15, it is characterised in that the adjusting module is according to the saturation component S's Regulation coefficient RsThe saturation component S is adjusted according to below equation,
S'j=(Sj×(1+Rs/100)-50)×128/(Sj-50)
Wherein, S'jThe saturation component after for adjustment.
18. devices according to claim 13 or 15, it is characterised in that first predetermined threshold value is 70~80, described Second predetermined threshold value is 40~60.
CN201210484614.2A 2012-11-23 2012-11-23 The method and apparatus of BLC Active CN103841337B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201210484614.2A CN103841337B (en) 2012-11-23 2012-11-23 The method and apparatus of BLC

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201210484614.2A CN103841337B (en) 2012-11-23 2012-11-23 The method and apparatus of BLC

Publications (2)

Publication Number Publication Date
CN103841337A CN103841337A (en) 2014-06-04
CN103841337B true CN103841337B (en) 2017-04-05

Family

ID=50804434

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201210484614.2A Active CN103841337B (en) 2012-11-23 2012-11-23 The method and apparatus of BLC

Country Status (1)

Country Link
CN (1) CN103841337B (en)

Families Citing this family (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105335939B (en) * 2014-08-15 2020-01-10 腾讯科技(深圳)有限公司 Image processing method and device
CN105049743B (en) * 2015-08-21 2019-03-22 宇龙计算机通信科技(深圳)有限公司 Backlighting detecting, backlight detection system, photographing device and terminal
CN106875344B (en) * 2016-12-21 2019-09-17 浙江大华技术股份有限公司 A kind of light filling processing method and processing device of video image
CN108540740B (en) * 2018-05-08 2020-08-04 海信视像科技股份有限公司 Image compensation method, device and terminal
CN109711328B (en) * 2018-12-25 2021-07-30 上海众源网络有限公司 Face recognition method and device and electronic equipment
CN116508326A (en) * 2020-11-06 2023-07-28 Oppo广东移动通信有限公司 Tone mapping method and apparatus, computer usable medium storing software for implementing the method
CN113870800B (en) * 2021-09-22 2022-12-02 东莞市金锐显数码科技有限公司 Backlight adjusting method and device, terminal equipment and storage medium

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1674643A (en) * 2004-03-22 2005-09-28 Lg电子有限公司 Apparatus for digital video processing and method thereof
CN101826282A (en) * 2010-04-16 2010-09-08 北京巨数数字技术开发有限公司 Liquid crystal display device and processing method of digital image signal
CN102013006A (en) * 2009-09-07 2011-04-13 泉州市铁通电子设备有限公司 Method for automatically detecting and identifying face on the basis of backlight environment
CN102547132A (en) * 2011-12-31 2012-07-04 蔡静 Method and device for carrying out shooting under backlighting condition, and camera

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7592996B2 (en) * 2006-06-02 2009-09-22 Samsung Electronics Co., Ltd. Multiprimary color display with dynamic gamut mapping
KR100843090B1 (en) * 2006-10-25 2008-07-02 삼성전자주식회사 Apparatus and method for improving a flicker for images
CN102780889B (en) * 2011-05-13 2015-04-01 中兴通讯股份有限公司 Video image processing method, device and equipment
CN102724405B (en) * 2012-06-21 2015-04-08 无锡鸿图微电子技术有限公司 Method and device for automatic exposure compensation of backlit scenes in video imaging system

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1674643A (en) * 2004-03-22 2005-09-28 Lg电子有限公司 Apparatus for digital video processing and method thereof
CN102013006A (en) * 2009-09-07 2011-04-13 泉州市铁通电子设备有限公司 Method for automatically detecting and identifying face on the basis of backlight environment
CN101826282A (en) * 2010-04-16 2010-09-08 北京巨数数字技术开发有限公司 Liquid crystal display device and processing method of digital image signal
CN102547132A (en) * 2011-12-31 2012-07-04 蔡静 Method and device for carrying out shooting under backlighting condition, and camera

Also Published As

Publication number Publication date
CN103841337A (en) 2014-06-04

Similar Documents

Publication Publication Date Title
CN103841337B (en) The method and apparatus of BLC
JP5171434B2 (en) Imaging apparatus, imaging method, program, and integrated circuit
KR100983037B1 (en) Method for controlling auto white balance
US8254675B2 (en) Image processing apparatus, imaging apparatus and image processing program
US8229217B2 (en) Image processing method and apparatus, image processing program and medium storing this program
CN112752023B (en) Image adjusting method and device, electronic equipment and storage medium
KR101700362B1 (en) Image processing method and image processing apparatus
CN102065224B (en) Image capture apparatus and image capturing method
CN107820069B (en) Video monitoring equipment ISP debugging method
CN107396079B (en) White balance adjustment method and device
US8885078B2 (en) Image processing apparatus, image processing method, and recording medium storing image processing program
CN110278425A (en) Image enchancing method, device, equipment and storage medium
US20170154437A1 (en) Image processing apparatus for performing smoothing on human face area
US7421121B2 (en) Spectral normalization using illuminant exposure estimation
CN105960658A (en) Image processing device, imaging device, image processing method, computer-processable non-temporary storage medium
WO2018113050A1 (en) Drive method and drive apparatus of display panel
CN107580205B (en) White balance adjustment method and device
US9013605B2 (en) Apparatus and method for processing intensity of image in digital camera
CN106550227A (en) A kind of image saturation method of adjustment and device
KR101854432B1 (en) Method and apparatus for detecting and compensating back light frame
JP2015139082A (en) Image processor, image processing method, program and electronic apparatus
US8154618B2 (en) Imaging apparatus and method for setting the same
US20080012958A1 (en) White balance system and the method thereof
CN110166716B (en) Image processing apparatus and image processing method
JP2001057680A (en) Method and device for adjusting white balance and recording medium

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant