Embodiment
When the embodiment of the invention belongs to brightness section at the brightness value of image, judge further whether the overexposure zone is arranged in the image, and when the overexposure zone is arranged, adjust the automatic exposure parameter value, with the exposure of minimizing, thereby reduced the image overexposure, improved the display effect of image image.And when no overexposure zone, adjust the automatic exposure parameter value, to increase exposure, improved the display effect of image to image.
Image in the present embodiment comprises picture and video image.
Referring to Fig. 1, it is as follows in the present embodiment image to be carried out the main method flow process of automatic exposure:
Step 101: the brightness value that obtains image.The brightness value of this image is the average brightness value of entire image, or the weighted mean brightness value of entire image, but or the brightness value of other presentation video overall brightness.
Step 102: whether the brightness value of judging image belongs to default brightness section.This brightness section can adopt brightness range [Y of the prior art
Target-Y
Thd, Y
Target+ Y
Thd].Present embodiment is preset as [Y in order to reduce the image overexposure with brightness section
Target1-Y
Thd1, Y
Target1+ Y
Thd1], Y wherein
Target1The central value of expression scope, Y
Thd1Expression is with respect to Y
Target1Side-play amount.The lower limit of brightness section that should be default is less than the lower limit Y of brightness range in the prior art
Target-Y
Thd, i.e. Y
Target1-Y
Thd1<Y
Target-Y
Thd, upper limit Y
Target1+ Y
Thd1Can with Y
Target+ Y
ThdIdentical.
Step 103: when the brightness value of image belongs to brightness section, judge whether the overexposure zone is arranged in the image.
Step 104: when the overexposure zone is arranged, adjust the automatic exposure parameter value, to reduce exposure to image.
When the brightness value of image does not belong to brightness section, adjust step-length according to first and adjust the automatic exposure parameter value, increase or reduce and expose, so that the brightness value of image is adjusted to default brightness section.If the automatic exposure parameter value exposes completely stronger and stronger, then the brightness value of image is less than Y
Target1-Y
Thd1Shi Tigao automatic exposure parameter value increases exposure, or the brightness value of image is greater than Y
Target1+ Y
Thd1In time, reduces the automatic exposure parameter value and reduces exposure, and vice versa.After the brightness value of image belongs to default brightness section, judge further whether the overexposure zone is arranged in the image.When image has the overexposure zone, adjust step-length according to second and adjust the automatic exposure parameter value, to reduce exposure to image.Wherein second adjust step-length less than the first adjustment step-length.That is to say, when the brightness value of image does not belong to brightness section, the automatic exposure parameter value is carried out rapid adjustment, when the brightness value of image belongs to brightness section, the automatic exposure parameter value is adjusted at a slow speed, referring to shown in Figure 2.
Judging in the present embodiment has the mode in overexposure zone to comprise one of following manner at least:
The value of information OverExposeRatio of mode one, overexposure point is greater than the first default overexposure point threshold value OERatioTHHigh.
Wherein, the overexposure point is meant the pixel of brightness value in the overexposure brightness range of [OEPixelTHLow, OEPixelTHHigh2] (wherein, OEPixelTHLow represents the lower limit of this brightness range, and OEPixelTHHigh2 represents the upper limit of this brightness range).OEPixelTHLow is higher than Ytarget1+Ythd1 greater than 180 in the present embodiment, and OEPixelTHHigh2 is slightly smaller than maximum brightness value 255.The overexposure point can be the overexposure point in the entire image, also can be the overexposure point in the area-of-interest.When the value of information of overexposure point during for the value of information of image overexposure point, default overexposure point threshold value is default image overexposure point threshold value; When the value of information of overexposure point during for the value of information of area-of-interest overexposure point, default overexposure point threshold value is default area-of-interest overexposure point threshold value.The value of information of overexposure point is the quantitative value that can refer to overexposure point, be in the entire image brightness value at [OEPixelTHLow, OEPixelTHHigh2] the interior pixel sum of scope, or the pixel sum of brightness value in [OEPixelTHLow, OEPixelTHHigh2] scope in the area-of-interest.The value of information of overexposure point also can be the ratio value of overexposure point, it is the ratio value of the sum of pixel in the sum of overexposure point in the entire image and the entire image, or the ratio value of the sum of pixel in the sum of overexposure point and the area-of-interest in the area-of-interest, or the ratio value of the sum of pixel in the sum of overexposure point and the entire image in the area-of-interest.The value of information of overexposure point can also be other value of information that can represent overexposure number of spots or ratio.
The brightness value CenterYmean of mode two, area-of-interest is greater than the first default area-of-interest luminance threshold CenterYmeanTH
High
The difference of the value of information of the value of information of mode three, image overexposure point and area-of-interest overexposure point is not more than default overexposure point difference threshold.
Mode one is that the ratio that accounts for all pixels for quantity or overexposure point at overexposure point reduces exposure when too high.Mode two is can be too not high for the brightness that makes area-of-interest, reduces exposure when the brightness value of area-of-interest is excessive, at this moment CenterYmeanTH
HighPreferably be not less than 160.Mode three is to reduce exposure during for the excessive number of the overexposure point of area-of-interest.Can also there be other judgement that the method in overexposure zone is arranged, all be applicable to present embodiment, not enumerate one by one herein.
When satisfying mode for the moment; further; when the brightness value CenterYmean of area-of-interest protects threshold value greater than default area-of-interest brightness; determine to need to adjust exposure parameter values; can be too not low with the brightness that guarantees area-of-interest; otherwise influence image effect, area-of-interest brightness protection this moment threshold value is preferably a value between 90~120.And/or
When satisfying one of above-mentioned three kinds of modes at least, further, at the brightness value Ymean of image greater than the first default luminance threshold Y
MeanTH
LowThe time, determine to need to adjust exposure parameter values, come the brightness of control chart picture too not low with this, to avoid concussion adjustment.Preferable, Y
MeanTH
LowBe lower than Y
Target1
Area-of-interest can be central area, human face region or other setting regions of image in the present embodiment.
May there be such a case, when the brightness value of overexposure point concentrates in the lower scope, still the automatic exposure parameter value is adjusted and reduced exposure, then may make the image exposure deficiency, may need then the automatic exposure parameter value to be adjusted increases exposure again, and can produce the overexposure zone after increasing, and then once more the automatic exposure parameter value is adjusted and is reduced exposure, and so forth, then can produce concussion.In order to reduce the generation that concussion is adjusted, need to judge whether the brightness value of overexposure point concentrates in the lower scope [OEPixelTHLow, OEPixelTHHigh1], and wherein OEPixelTHHigh1 is less than OEPixelTHHigh2.If then do not adjust the automatic exposure parameter value, otherwise adjust the automatic exposure parameter value to reduce exposure to image.
Whether the brightness value of judging overexposure point concentrates in the lower scope multiple implementation, for example: brightness value is belonged to [OEPixelTHLow, OEPixelTHHigh1] pixel in (wherein OEPixelTHHigh1 represents the upper limit of this scope) scope is defined as time overexposure point, and whether the ratio of the value of information of judging the value of information of time overexposure point and overexposure point is greater than the inferior overexposure proportion threshold value of presetting; Whether the difference of the value of information of perhaps judging overexposure point and the value of information of time overexposure point is greater than the inferior overexposure difference threshold of presetting.When the ratio of the value of information of the value of information of inferior overexposure point and overexposure point is not more than default inferior overexposure difference threshold greater than the difference of the value of information of the value of information of default inferior overexposure proportion threshold value or overexposure point and inferior overexposure point, the brightness value of determining overexposure point concentrates in the lower scope, does not then need by adjusting the exposure of automatic exposure parameter value minimizing to image.
A preferred embodiment in the present embodiment, referring to shown in Figure 3, the detailed method flow process of image being carried out automatic exposure is as follows:
Step 301: the brightness value that obtains image.
Step 302: whether the brightness value of judging image belongs to default brightness section, if then continue step 304, otherwise continue step 303.
Step 303: adjust step-length according to first and adjust the automatic exposure parameter value, to increase or to reduce exposure.
Step 304: if whether the value of information of judging overexposure point then continue step 305, otherwise continues step 309 greater than the first default overexposure point threshold value.
Step 305: whether the brightness value of judging area-of-interest is greater than the first default area-of-interest luminance threshold, if then continue step 306, otherwise continue step 309.
Step 306: whether the difference of the value of information of judging overexposure point and the value of information of time overexposure point greater than default inferior overexposure difference threshold, if, then continue step 307, otherwise continuation step 309.
Step 307: whether the brightness value of image is greater than the first default luminance threshold, if then continue step 308, otherwise continue step 309.
Above step 304-307 comprehensively judges whether to occur overexposure from a plurality of angles such as entire image, area-of-interest and inferior overexposure points, and whether needs to adjust the automatic exposure parameter value.When satisfying above-mentioned four conditions, determine to occur overexposure, need to adjust the automatic exposure parameter value, this is a kind of preferable implementation.And do not have strict execution between the step 304-307 successively, which condition of judgement all can earlier.
Step 308: adjust the automatic exposure parameter value, to reduce exposure to image.
Step 309: keep current automatic exposure parameter value.
Wherein, in step 308, Ytarget2=Ymean-SlowAdjustSpeed is set.Ytarget2 represents target brightness value, the brightness value of the image before Ymean represents to adjust, SlowAdjustSpeed represents the variable quantity of target brightness value Ytarget2 with respect to the brightness value of image, relevant with the second adjustment step-length, generally should not be too big, SlowAdjustSpeed in the present embodiment<10.When needs reduce exposure, Ytarget2 then is set, make it less than Ymean.By adjusting the automatic exposure parameter value, make adjusted Ymean at [Ytarget2-Ythd2, Ytarget2+Ythd2] then, wherein Ythd2 is less than Ythd1.Here need to satisfy Ymean>Ytarget2+Ythd2, then SlowAdjustSpeed>Ythd2 in the present embodiment.Preferable, the desirable value that is slightly larger than Ytarget1-Ythd1+SlowAdjustSpeed+Ythd2 of YmeanTHLow.
Do not having overexposure when zone, though the brightness value of image in luminance threshold, it is bright more good more at the situation hypograph of avoiding overexposure to wish, with the sharpness of raising image, implementation can be referring to the following examples.
Referring to Fig. 4, it is as follows image to be carried out the main method flow process of automatic exposure during no overexposure zone in the present embodiment:
Step 401: the brightness value that obtains image.
Step 402: whether the brightness value of judging image belongs to default brightness section.
Step 403: when the brightness value of image belongs to brightness section, judge whether do not have the overexposure zone in the image.
Step 404: when no overexposure zone, adjust the automatic exposure parameter value, to increase exposure to image.
When the brightness of image does not belong to brightness section, adjust step-length according to first and adjust the automatic exposure parameter value, to increase or to reduce exposure, make the brightness value of adjusted image belong to brightness section.When no overexposure zone, adjust step-length according to second and adjust the automatic exposure parameter value, to increase exposure to image; Wherein second adjust step-length less than the first adjustment step-length.
The mode of judging no overexposure zone in the present embodiment comprises one of following manner at least:
The value of information of mode one, overexposure point is not more than the first default overexposure point threshold value;
The brightness value of mode two, area-of-interest is not more than the first default area-of-interest luminance threshold;
The difference of the value of information of the value of information of mode three, image overexposure point and area-of-interest overexposure point is greater than default overexposure point difference threshold.
Though the brightness value of image is in brightness section, but may be still darker, increase exposure that can be an amount of is to improve the sharpness of image, then present embodiment is when no overexposure zone, and whether the brightness information value that can further judge image is less than default shading value threshold value.Less than default shading value threshold value the time, determine dark images, adjust the automatic exposure parameter value, to increase exposure to image.
The brightness information value comprises at least one in the brightness value of the value of information of overexposure point and area-of-interest; Accordingly, the shading value threshold value comprises at least one item in the second overexposure point threshold value and the second area-of-interest luminance threshold; Wherein the second overexposure point threshold value is less than the first overexposure point threshold value, and the second area-of-interest luminance threshold (preferable, this moment, the second area-of-interest luminance threshold was not more than 90) is less than the first area-of-interest luminance threshold.That is to say, determine that the mode of dark images comprises one of following manner at least:
The value of information of mode one, overexposure point is less than the second overexposure point threshold value, i.e. OverExposeRatio<OERatioTHLow, and wherein OERatioTHLow is less than OERatioDiff.Inferior overexposure point is reducing might all to become non-overexposure point after the exposure, and the remaining value of information that also belongs to overexposure point must be greater than OERatioTHLow, otherwise reducing can to satisfy OverExposeRatio<OERatioTHLow again after the exposure, needing so again increases exposure, thereby shakes.Dimension only increases exposure during less than OERatioDiff at OERatioTHLow, just can effectively avoid concussion.
The brightness value of mode two, area-of-interest is less than second area-of-interest luminance threshold, the i.e. CenterYmean<CenterYmeanTHLow.
When satisfying mode one and/or mode two, whether cross the bright brightness value that can also judge image less than second luminance threshold in order to prevent image, less than the time, be Ymean<YmeanTHHigh, adjust exposure parameter values, to increase exposure, wherein second luminance threshold is greater than first luminance threshold.
When needs increase exposure, Ytarget2=Ymean+SlowAdjustSpeed then is set, make it greater than Ymean.Guarantee to satisfy Ymean<Ytarget2-Ythd2, then SlowAdjustSpeed>Ythd2.Wherein YmeanTHHigh is less than Ytarget1+Ythd1-SlowAdjustSpeed-Ythd2.
A preferred embodiment in the present embodiment, referring to shown in Figure 5, the detailed method flow process of image being carried out automatic exposure is as follows:
Step 501: the brightness value that obtains image.
Step 502: whether the brightness value of judging image belongs to default brightness section, if then continue step 504, otherwise continue step 503.
Step 503: adjust step-length according to first and adjust the automatic exposure parameter value, to increase or to reduce exposure.
Step 504: whether the value of information of judging overexposure point is less than the second overexposure point threshold value, if then continue step 506, otherwise continue step 505.
Step 505: whether the brightness value of judging area-of-interest is less than the second area-of-interest luminance threshold, if then continue step 506, otherwise continue step 508.
Step 506: whether the brightness value of judging image is less than second luminance threshold, if then continue step 507, otherwise continue step 508.
Step 504-506 is the judgement of carrying out from different perspectives, when satisfying above-mentioned three conditions, determines no overexposure, can adjust the automatic exposure parameter value, and this is a kind of preferable implementation.And do not have strict execution between the step 504-506 successively, which condition of judgement all can earlier.
Step 507: adjust the automatic exposure parameter value, to increase exposure to image.
Step 508: keep current automatic exposure parameter value.
Understood the implementation procedure of image being carried out automatic exposure by above description, this process can realize that inner structure and the function to this device is introduced below by device.
Referring to Fig. 6, the device that is used for image is carried out automatic exposure in the present embodiment comprises: first control module 601, second control module 602 and adjusting module 603.
First control module 601 is used to judge whether the brightness value of image belongs to default brightness section.
Second control module 602 is used for judging whether image has the overexposure zone.
Adjusting module 603 is used to adjust the automatic exposure parameter value, to reduce the exposure to image.When adjusting module 603 does not belong to brightness section in the brightness of image, adjust step-length according to first and adjust the automatic exposure parameter value, increase or reduce exposure; When the overexposure zone is arranged, adjust step-length according to second and adjust the automatic exposure parameter value, reduce exposure to image; Wherein second adjust step-length less than the first adjustment step-length.
And second control module 602 has the overexposure zone according to the value of information of overexposure point greater than the first default overexposure point threshold decision: and/or
Brightness value according to area-of-interest judges that greater than the first default area-of-interest luminance threshold overexposure zone is arranged; And/or
Be not more than default overexposure point difference threshold according to the difference of the value of information of the value of information of image overexposure point and area-of-interest overexposure point and judge that the overexposure zone is arranged.
Second control module 602 is when having the overexposure zone, and whether the ratio of the value of information of judgement time overexposure point and the value of information of overexposure point is greater than default inferior overexposure proportion threshold value; Whether the difference of the value of information of perhaps judging overexposure point and the value of information of time overexposure point is greater than the inferior overexposure difference threshold of presetting.Adjusting module 603 is being not more than default inferior overexposure proportion threshold value or during greater than default inferior overexposure difference threshold, by adjusting the exposure of automatic exposure parameter value minimizing to image.
Second control module 602 is satisfying mode for the moment; further; when the brightness value CenterYmean of area-of-interest protects threshold value greater than default area-of-interest brightness; determine to need to adjust exposure parameter values; can be too not low with the brightness that guarantees area-of-interest; otherwise influence image effect, area-of-interest brightness protection this moment threshold value is preferably a value between 90~120.And/or, when satisfying one of above-mentioned three kinds of modes at least, further, at the brightness value Ymean of image greater than the first default luminance threshold Y
MeanTH
LowThe time, determine to need to adjust exposure parameter values, come the brightness of control chart picture too not low with this, to avoid concussion adjustment.Preferable, Y
MeanTH
LowBe lower than Y
Target1Referring to Fig. 7, the device that is used for image is carried out automatic exposure in the present embodiment during no overexposure zone comprises: first control module 701, second control module 702 and adjusting module 703.Wherein, Fig. 6 and device shown in Figure 7 can be same physical entities, just realize different functions under different scenes.
First control module 701 is used to judge whether the brightness value of image belongs to default brightness section.
Second control module 702 is used for when the brightness value of image belongs to brightness section, judges whether the overexposure zone is arranged in the image.
Adjusting module 703 is used for adjusting the automatic exposure parameter value, to increase the exposure to image when no overexposure zone.When adjusting module 703 does not belong to brightness section in the brightness of image, adjust step-length according to first and adjust the automatic exposure parameter value, increase or reduce exposure; When no overexposure zone, adjust step-length according to second and adjust the automatic exposure parameter value, to increase exposure to image; Wherein second adjust step-length less than the first adjustment step-length.
And second control module 702 is not more than the first default overexposure point threshold decision according to the value of information of overexposure point does not have the overexposure zone: and/or
Brightness value according to area-of-interest is not more than the default no overexposure of first area-of-interest luminance threshold judgement zone; And/or
According to the difference of the value of information of the value of information of image overexposure point and area-of-interest overexposure point greater than the default no overexposure of overexposure point difference threshold judgement zone.
Second control module 702 is when no overexposure zone, and whether the brightness information value of judging image is less than default shading value threshold value.Adjusting module 703 is adjusted the automatic exposure parameter value, to increase the exposure to image less than default shading value threshold value the time.Wherein, the brightness information value comprises in the brightness value of the value of information of overexposure point and area-of-interest at least one; Accordingly, the shading value threshold value comprises at least one item in the second overexposure point threshold value and the second area-of-interest luminance threshold; Wherein the second overexposure point threshold value is less than the first overexposure point threshold value, and the second area-of-interest luminance threshold is less than the first area-of-interest luminance threshold.
Second control module 702 is when satisfying mode one and/or mode two, brightly can also judge that whether the brightness value of image is less than second luminance threshold in order to prevent that image from crossing, less than the time, be Ymean<YmeanTHHigh, determine to need to adjust exposure parameter values, to increase exposure, wherein second luminance threshold is greater than first luminance threshold.
Be used to realize that the software of the embodiment of the invention can be stored in storage mediums such as floppy disk, hard disk, CD and flash memory.
When the embodiment of the invention belongs to brightness section at the brightness value of image, judge further whether the overexposure zone is arranged in the image, and when the overexposure zone is arranged, adjust the automatic exposure parameter value, with the exposure of minimizing, thereby reduced the image overexposure, improved the display effect of image image.And when no overexposure zone, adjust the automatic exposure parameter value, to increase exposure, improved the display effect of image to image.The embodiment of the invention provides the multiple mode that judges whether the overexposure zone and whether do not have the overexposure zone, judges from multiple angles, judges whether the overexposure zone and whether does not have the accuracy in overexposure zone with raising, and reduce the generation of concussion.The embodiment of the invention is also controlled every threshold value and adjustment step-length, adjusts number of times to reduce, and improves and adjusts efficient.
Obviously, those skilled in the art can carry out various changes and modification to the present invention and not break away from the spirit and scope of the present invention.Like this, if of the present invention these are revised and modification belongs within the scope of claim of the present invention and equivalent technologies thereof, then the present invention also is intended to comprise these changes and modification interior.