Invention content
The technical problems to be solved by the invention are to provide a kind of segmentation exposure image automatic exposure regulating method and system,
Overexposure is prevented, promotes image overall contrast.
To solve the above problems, the present invention proposes a kind of segmentation exposure image automatic exposure regulating method, including following step
Suddenly:
S1:For the first exposure section in exposure process and the second exposure section, the time T1 and two of setting the first exposure section
The initial value of total time T of section exposure section;
S2:It is exposed in the case, the average brightness Ya of statistical picture, non-overexposure region account for the ratio K% of image
And the average brightness Yk of non-overexposure region;
S3:The average brightness Yk of non-overexposure region with target brightness value range is compared, is adjusted according to comparison result
The total time T of the two exposure section;
S4:The ratio K% that non-overexposure region is accounted for image is compared with overexposure than beta%:
If not the ratio K% that overexposure region accounts for image is more than overexposure than beta%, then by the average brightness Ya and mesh of image
Mark range of luminance values is compared, and is continued to adjust the total time T of the two exposure section according to comparison result;
Otherwise, the average brightness Ya of image with target brightness value range is compared, first is adjusted according to comparison result
Expose the time T1 of section.
According to one embodiment of present invention, in the step S3, the two exposure section is adjusted according to comparison result
Total time, T included:If not the average brightness Yk of overexposure region is less than the minimum value of target brightness value range, then increase two exposure
The total time T of section if not the average brightness Yk of overexposure region is more than the maximum value of target brightness value range, then reduces two exposure
The total time T of section.
According to one embodiment of present invention, in the step S4, continued to adjust the two exposure according to comparison result
The total time T of section includes:If the average brightness Ya of image is less than the minimum value of target brightness value range, increase two exposure section
Total time T, if the average brightness Ya of image be more than target brightness value range maximum value, reduce two exposure section it is total when
Between T.
According to one embodiment of present invention, in the step S4, according to the time of comparison result adjustment the first exposure section
T1 includes:If maximum values of the average brightness Ya of image more than target brightness value range, the time T1 of increase the first exposure section,
The total time T for keeping two exposure section is constant, if the average brightness Ya of image is less than the minimum value of target brightness value range, subtracts
The time T1 of small first exposure section, keep the total time T of two exposure section constant.
According to one embodiment of present invention,
Return to step S2 is continued to execute after the step S4 is performed, until being adjusted in step S3 to non-overexposure region
The average brightness Ya that average brightness Yk falls in the range of target brightness value and adjusted in step S4 to image falls within target brightness value
In the range of;
Alternatively, in the step S3, by comparing repeatedly and adjusting, until adjusting to the average brightness Yk of non-overexposure region
It falls in the range of target brightness value;With, in step S4, by comparing repeatedly and adjusting, until adjust to image average brightness
Ya is fallen in the range of target brightness value.
According to one embodiment of present invention, when the exposure number of fragments of entire exposure process is two sections, then the step
For this two exposure sections, the time T1 of setting the first exposure section and the initial value of total time T of exposure process in rapid S1, perform
Subsequent step is completed exposure and is adjusted;
When the exposure number of fragments of entire exposure process is more than two sections, selection most latter two exposure section enters step S1 and holds
Row based on the exposure process after adjusting, moves forward one and exposes section and choose corresponding two exposures section and enter back into step from back to front
Rapid S1 is performed, and so on until all exposure section adjusts completion.
According to one embodiment of present invention, the target brightness value ranging from (1-alpha) * Yt~(1+alpha) *
Yt;Wherein, Yt is target brightness value;Alpha be allowable error range, value 0-0.05.
According to one embodiment of present invention, in the step S1, the initial value of the time T1 of setting the first exposure section is
0th, the initial value of total time T of two exposure section is default value.
According to one embodiment of present invention, value of the overexposure than beta% is 80%~100%.
Exposure image automatic exposure regulating system is segmented the present invention also provides a kind of, including:
Initial setup module:It performs for the first exposure section in exposure process and the second exposure section, the first exposure of setting
The time T1 of section and the initial value of total time T of two exposure section;
Exposure statistics module:Execution is exposed in the case, and the average brightness Ya of statistical picture, non-overexposure region account for
The ratio K% of the image and average brightness Yk of non-overexposure region;
First adjustment module:The average brightness Yk of non-overexposure region is compared by execution with target brightness value range, root
The total time T of the two exposure section is adjusted according to comparison result;
Second adjustment module:The ratio K% that non-overexposure region is accounted for image by execution is compared with overexposure than beta%:
If not the ratio K% that overexposure region accounts for image is more than overexposure than beta%, then by the average brightness Ya and mesh of image
Mark range of luminance values is compared, and is continued to adjust the total time T of the two exposure section according to comparison result;
Otherwise, the average brightness Ya of image with target brightness value range is compared, first is adjusted according to comparison result
Expose the time T1 of section.
After adopting the above technical scheme, the present invention has the advantages that compared with prior art:
It is for total in the first adjusting stage by the way that two adjusting stages is set to be adjusted to be exposed in the present invention
The adjusting that influences of the time T to the average brightness of image carries out so that the non-overexposure region of image avoided the occurrence of dark situation,
And in the second adjusting stage, then the two exposure time to distinguish is adjusted according to overexposure degree, on the one hand for T pairs of total time
The influence of the average brightness of non-overexposure region is adjusted, on the other hand for the time T1 of the first exposure section to non-overexposure region
The influence of average brightness be adjusted so that while overexposure region is adjusted, remain original comparison of non-overexposure region
Degree enhances the contrast and dynamic range of image entirety.
Specific embodiment
In order to make the foregoing objectives, features and advantages of the present invention clearer and more comprehensible, below in conjunction with the accompanying drawings to the present invention
Specific embodiment be described in detail.
Many details are elaborated in the following description in order to fully understand the present invention.But the present invention can be with
Much implement different from other manner described here, those skilled in the art can be in the situation without prejudice to intension of the present invention
Under do similar popularization, therefore the present invention is not limited to the specific embodiments disclosed below.
Referring to Fig. 2, in one embodiment, exposure image automatic exposure regulating method is segmented, is included the following steps:
S1:For the first exposure section in exposure process and the second exposure section, the time T1 and two of setting the first exposure section
The initial value of total time T of section exposure section;
S2:It is exposed in the case, the average brightness Ya of statistical picture, non-overexposure region account for the ratio K% of image
And the average brightness Yk of non-overexposure region;
S3:The average brightness Yk of non-overexposure region with target brightness value range is compared, is adjusted according to comparison result
The total time T of the two exposure section;
S4:The ratio K% that non-overexposure region is accounted for image is compared with overexposure than beta%:
If not the ratio K% that overexposure region accounts for image is more than overexposure than beta%, then by the average brightness Ya and mesh of image
Mark range of luminance values is compared, and is continued to adjust the total time T of the two exposure section according to comparison result;
Otherwise, the average brightness Ya of image with target brightness value range is compared, first is adjusted according to comparison result
Expose the time T1 of section.
Carry out expansion description to the segmentation exposure image automatic exposure regulating method of the embodiment of the present invention below, but should not be with
This is limited, be applicable to using segmentation Exposure mode imaging sensor, can point two exposure or be divided into multistage (three sections with
On) exposure, it is specific unlimited.
Step S1-S4 is performed for two exposure section expansion in exposure process, thus if exposure process point
Into two exposure, then the first selected exposure section and the second exposure section have collectively constituted entire exposure process;And if exposure
Process is divided into multistage exposure, then the first selected exposure section and the second exposure section are wherein two sections in entire exposure process.
In step sl, in exposure process first exposure section and second exposure section, setting first exposure section when
Between total time T of T1 and two exposure section initial value.First exposure section is prior to the second exposure section, between the two in the time
On continue.
Preferably, in the step S1, the initial value of the time T1 of setting the first exposure section is the total of 0, two exposure section
The initial value of time T is default value.Obviously, T is greater than (both representing time span, certainly, be divided into exposure process for T1
In the case of two sections, the two is also denoted as the section last moment), default value can be the default value of initial setting up, can be according to need
It is configured or newer value on the basis of previous adjusting.It is appreciated that the time T1 of the first exposure section can also be set
It is set to other initial values.
Then step S2 is performed, is exposed in the time for exposure set by step S1, is exposed accordingly
Image, the average brightness Ya of statistical picture, non-overexposure region account for the ratio K% of the image and average brightness Yk of non-overexposure region.
Non- overexposure region, that is, brightness value is less than 255 pixel point set, can judge to determine by the brightness value of each pixel.Image
Average brightness Ya be image whole pixel brightness value average value.The average brightness Yk of non-overexposure region is non-mistake
Expose the average value of the brightness value of the pixel in region.
Then step S3 is performed, the average brightness Yk of non-overexposure region is compared with target brightness value range, according to
Comparison result adjusts the total time T of the two exposure section.There may be too dark brightness for non-overexposure region, by comparing and adjust
Total time T can solution the problem of overexposure region is excessively dark by no means.
Preferably, in the step S3, the total time T that the two exposure section is adjusted according to comparison result includes:If not
The average brightness Yk of overexposure region is less than the minimum value of target brightness value range, then increases the total time T of two exposure section, if not
The average brightness Yk of overexposure region is more than the maximum value of target brightness value range, then reduces the total time T of two exposure section.Every time
Incrementss and reduction amount can set, primary just adjust can not had to and completed, whole process be a circuit mistake for adjusting feedback
Journey.
Then step S4 is performed, the ratio K% that non-overexposure region is accounted for image is compared with overexposure than beta%, according to
The different of comparison result carry out.It can distinguish ground according to overexposure degree and adjust the two exposure time.
Overexposure ratio can determine its value as needed.Preferably, value of the overexposure than beta% for 80%~
100%, overexposure degree can be better discriminated between.
If not the ratio K% that overexposure region accounts for image is more than overexposure than beta%, illustrate scene overexposure account for it is smaller namely
Non- overexposure region accounting is larger, continues to adjust time for exposure T, the average brightness Ya of image is compared with target brightness value range
Compared with being continued to adjust the total time T of the two exposure section according to comparison result.
Preferably, in the step S4, the total time T for continuing to adjust the two exposure section according to comparison result includes:
If the average brightness Ya of image is less than the minimum value of target brightness value range, increase the total time T of two exposure section, if image
Average brightness Ya be more than the maximum value of target brightness value range, then reduce the total time T of two exposure section.
Otherwise, illustrate that overexposure accounting is larger, overexposure degree is heavier, adjusts the time T1 of the first exposure section to solve the overexposure
The average brightness Ya of image is compared by problem with target brightness value range, according to comparison result adjustment the first exposure section
Time T1.Certainly, total time T of two exposure section is to maintain constant when the time T1 of the first exposure section is adjusted.
Preferably, in the step S4, included according to the time T1 of comparison result adjustment the first exposure section:If image is flat
Equal brightness Ya is more than the maximum value of target brightness value range, then increases the time T1 of the first exposure section, keeps two exposure section
Total time, T was constant, if the average brightness Ya of image be less than target brightness value range minimum value, reduce first exposure section when
Between T1, keep two exposure section total time T it is constant.
Preferably, the target brightness value ranging from (1-alpha) * Yt~(1+alpha) * Yt;Wherein, Yt is bright for target
Angle value;Alpha be allowable error range, value 0-0.05.That is, (1+alpha) * Yt for target brightness value range most
Big value, (1-alpha) * Yt are the minimum value of target brightness value range.
In one embodiment, return to step S2 is continued to execute after the step S4 is performed, until being adjusted in step S3
It saves to the average brightness Yk of non-overexposure region and falls in the range of target brightness value and adjusted in step S4 to the average brightness of image
Ya is fallen in the range of target brightness value.Step S2~S4 is often performed once, and total time T of two exposure section or first are exposed
What the adjusting of the time T1 of section was made both for this exposure status, the practical feelings that exposure is adjusted are reacted by exposure next time
Condition so as to suitably be adjusted again, thus is continued to execute by being back to step S2, with Step wise approximation optimum exposure situation.
Alternatively, in the step S3, by comparing repeatedly and adjusting, until adjusting to the average brightness Yk of non-overexposure region
It falls in the range of target brightness value;With, in step S4, by comparing repeatedly and adjusting, until adjust to image average brightness
Ya is fallen in the range of target brightness value.
Referring to Fig. 3, the flow example of segmentation exposure image automatic exposure regulating method is given.It is setting steps first,
Time T1 is set as 0, total time, T used as default;Subsequently entered for the first adjusting stage, more non-overexposure region is averaged
Brightness Yk and subject brightness range if Yk is less than (1-alpha) * Yt, increase time for exposure T, often adjust and once just judge one
It is secondary, until adjusting to Yk not less than (1-alpha) * Yt, if Yk is more than (1+alpha) * Yt, reduces total time T, often adjust one
It is secondary just to judge once, it is not more than (1-alpha) * Yt until adjusting to Yk, illustrates to meet subject brightness range to Yk after the adjustment,
Perform next step;Subsequently entering for the second adjusting stage, more non-overexposure region accounts for the ratio K% of image and overexposure ratio beta%,
If K% is more than beta%, it is smaller to judge that scene overexposure accounts for, continues to adjust total time T so that Ya meets object brightness Yt,
Details are not described herein, otherwise regulating time T1 so that Ya meets subject brightness range, and regulative mode is similar with adjusting Yk, even
Ya is more than (1+alpha) * Yt, then increases T1, if Ya is less than (1-alpha) * Yt, reduces T1.
In one embodiment, the exposure number of fragments of entire exposure process be two sections when, only there are two exposure section, because
And it adjusts and completes for this two exposure sections.Then for this two exposure sections, setting the first exposure section in the step S1
Time T1 and exposure process total time T initial value, perform subsequent step i.e. complete exposure adjust, without changing exposure again
Section continues to execute.
When the exposure number of fragments of entire exposure process is more than two sections, selection most latter two exposure section enters step S1 and holds
Row based on the exposure process after adjusting, moves forward one and exposes section and choose corresponding two exposures section and enter back into step from back to front
Rapid S1 is performed, and so on until all exposure section adjusts completion.That is, when performing step S1-S4 for the first time, it is selected
The two exposure sections taken are most latter two exposure sections in exposure process, and when performing step S1-S4 second, selected two
A exposure section is second-to-last exposure section and 3rd exposure section reciprocal in exposure process, it is follow-up in and so on ground toward Forward one
A exposure section until all exposure section is processed, that is, completes exposure and adjusts.
Entire segmentation exposure image automatic exposure regulating method can pass through corresponding journey built-in in image forming device
Sequence is handled and is realized, can automatically realize the adjusting of image exposuring time.
Exposure image automatic exposure regulating system is segmented the present invention also provides a kind of, including:
Initial setup module:It performs for the first exposure section in exposure process and the second exposure section, the first exposure of setting
The time T1 of section and the initial value of total time T of two exposure section;
Exposure statistics module:Execution is exposed in the case, and the average brightness Ya of statistical picture, non-overexposure region account for
The ratio K% of the image and average brightness Yk of non-overexposure region;
First adjustment module:The average brightness Yk of non-overexposure region is compared by execution with target brightness value range, root
The total time T of the two exposure section is adjusted according to comparison result;
Second adjustment module:The ratio K% that non-overexposure region is accounted for image by execution is compared with overexposure than beta%:
If not the ratio K% that overexposure region accounts for image is more than overexposure than beta%, then by the average brightness Ya and mesh of image
Mark range of luminance values is compared, and is continued to adjust the total time T of the two exposure section according to comparison result;
Otherwise, the average brightness Ya of image with target brightness value range is compared, first is adjusted according to comparison result
Expose the time T1 of section.
The particular content of segmentation exposure image automatic exposure regulating system about the embodiment of the present invention may refer to aforementioned
Description content in embodiment about segmentation exposure image automatic exposure regulating method part, details are not described herein.
Although the present invention is disclosed as above with preferred embodiment, it is not for limiting claim, any this field
Technical staff without departing from the spirit and scope of the present invention, can make possible variation and modification, therefore the present invention
Protection domain should be subject to the range that the claims in the present invention are defined.