Embodiment one
Fig. 1 is the flow chart of the exposure adjustment method that the embodiment of the present invention one is provided, and the present embodiment is applicable to car and is taking the photographAs device be based on brightness of image change and perform exposure Adjusted Option situation, its object is to ensure vehicle mounted imaging apparatus or itsThe image information that successive image is processed is easy in his high dynamic camera head intake.The method can be by installed in vehicle mounted imaging apparatusIn picture processing chip perform, specifically include following steps:
Step S110, acquisition absorb second of the first monochrome information of default region-of-interest and non-interesting region in imageMonochrome information.
Wherein, the region-of-interest can be image-region set in advance, and its quantity can be one or more, describedRegion-of-interest processes most frequent region part when being normally based on image procossing.In some embodiments, will can be absorbedImage carry out image-region division, and will be covered with the image-region of most frequent region part and be defined as region-of-interest, instituteState image-region of the image in addition to region-of-interest and be set to non-interesting region, for example, the image that will be absorbed is divided into the area of n*nDomain, and wherein at least one region is set as region-of-interest, other regions are non-interesting region.In certain embodiments, instituteDefault region-of-interest concentrates road surface part in the picture in the image of intake.The region-of-interest can also be identification in advance, for example, identification in advance is divided into road surface characteristic in some image-regions, and by the image district comprising the road surface characteristicDomain is defined as the region-of-interest.
In order to protrude the exposure sensitivity of region-of-interest, each region for being divided to image in some embodiments is carried outThe demarcation of weight coefficient.Here, the weight coefficient can be set in advance, for example, the weight coefficient phase of each region-of-interestTogether and more than the weight coefficient in non-interesting region.And for example, the power of each region-of-interest is set according to default distribution (such as Gaussian Profile)Weight coefficient and the weight coefficient in each non-interesting region.
First monochrome information and the second monochrome information can be the average brightness of respective regions.In some embodiment partyIn formula, based on the weight coefficient of default region-of-interest, each pixel of the correspondence region-of-interest is entered in the image that will be absorbedWeighted average of the row based on brightness is processed, to obtain the first monochrome information;And, the weight system based on default non-interesting regionNumber, each pixel in non-interesting region is weighted average treatment in the image that will be absorbed, to obtain the second monochrome information.For exampleDefault region-of-interest is multiple, and the weight coefficient of each region-of-interest is different, and the weight coefficient in non-interesting region is identical, then will be everyPixel intensity carries out brightness statistics in individual concern area, and the brightness value weighted average of each region-of-interest is obtained into first brightnessInformation, equally, brightness statistics is carried out to pixel intensity in each non-interesting region, and the brightness value weighting in each non-interesting region is flatObtain second monochrome information.
Step S120, the exposure adjustment that the camera head is determined based on first monochrome information and the second monochrome informationScheme.
Specifically, for the region-of-interest and the brightness of entire image of monitoring image, it is selected to capture clearlyThe image of region-of-interest, this step can be by first monochrome information and the second monochrome information and default exposure regularization conditionMatched, and exposure, and corresponding exposure Adjusted Option are determined whether according to matching result.Wherein, the exposure adjustmentScheme includes:At least one in adjustment time for exposure, aperture and gain.
In order to stress adjustable strategies of the region-of-interest in entire image, in some embodiments, step S120 includes:Step S121, S122 and S123 (not in diagram).
Step S121, the average brightness value that entire image is calculated based on first monochrome information and the second monochrome information.
Step S122, by the average brightness value and first monochrome information respectively with it is default exposure regularization condition enterRow matching.
Step S123, the exposure Adjusted Option that the camera head is determined based on matching result.
Here, the exposure regularization condition includes object brightness interval [TARGET_L, TARGET_H], the exposure adjustmentScheme, can be corresponding with every kind of matching result for various.Wherein, when first monochrome information and average brightness value are respectively positioned on instituteState object brightness interval interior, be then not exposed adjustment.In first monochrome information and average brightness value at least oneIt is individual not fall within when in the object brightness interval, according to the first monochrome information not fallen within the object brightness interval and averagelyThe combination of brightness value, determines the exposure Adjusted Option of the camera head.
For example, when matching result is:First monochrome information (ATT_AVG) is higher than object brightness high threshold (TARGET_H) and the average brightness value (AVG) be higher than object brightness high threshold (TARGET_H), or, ATT_AVG falls into object brightnessInterval interior and AVG is higher than TARGET_H, then corresponding exposure Adjusted Option is:The first monochrome information after adjustment is ensured still existsIn the case of in object brightness is interval, time for exposure or gain are reduced, in some embodiments, can be according to gain, exposureThe priority of time and aperture is adjusted step by step.
And for example, when matching result is:First monochrome information (ATT_AVG) is less than object brightness Low threshold (TARGET_) and the average brightness value (AVG) is less than object brightness Low threshold (TARGET_L), or ATT_AVG falls into object brightness area LInterior and AVG is less than TARGET_L, then corresponding exposure Adjusted Option is:The first monochrome information after adjustment is ensured is still in meshMark brightness section in the case of, improve time for exposure or gain, in some embodiments, can according to aperture, exposure whenBetween and the priority of gain adjust step by step.
When matching result is different from above-mentioned various situations, corresponding exposure Adjusted Option is also corresponding complicated.At someIn implementation method, the exposure Adjusted Option comprises the following steps S124, S125 and S126, as shown in Figure 2.
The brightness gap value of step S124, statistics entire image compared to region-of-interest.
Step S125, fallen into inside or outside default luminance difference threshold interval based on the brightness gap value, it is determined that treatingAdjustment region reference brightness before adjustment.
Step S126, by adjusting at least one in time for exposure, aperture and gain, the reference brightness is adjusted toDefault object brightness.
Specifically, calculating the brightness value and the luminance mean value (ATT_ of each region-of-interest in each region for being divided respectivelyAVG difference (Block_Diff)i), then all differences are taken absolute value and sued for peace, obtain the sum of difference
When difference and (Sum_Diff) are less than the luminance difference threshold value low threshold (T for setting1), the average bright of general image is setInfluence coefficient (the K of degree1=1), and the influence coefficient (K that the mean flow rate of region-of-interest is set2=0);Automatic exposure is in generalLogical scene carries out brilliance control with whole image array data, only with the mean flow rate (AVG) of image array data as ginsengBrightness is examined, the adjustment of automatic exposure is carried out.
When difference and (Sum_Diff) are more than the luminance difference threshold value high threshold (T for setting2), the average bright of general image is setInfluence coefficient (the K of degree1=0), and the influence coefficient (K of the mean flow rate of region-of-interest is set2=1), automatic exposure cannot be simultaneouslyTake into account the brilliance control of whole image array data and region-of-interest image array data.Only with the pattern matrix of region-of-interestThe mean flow rate (ATT_AVG) of data carries out the adjustment of automatic exposure as reference brightness.
When difference and (Sum_Diff) are less than the luminance difference threshold value high threshold (T for setting2), more than setting luminance difference threshold valueLow threshold (T1), the influence coefficient of the mean flow rate of region-of-interest is setWherein, n isThe region quantity that image is divided, and the influence coefficient (K of the mean flow rate of general image is set1=1-K2), automatic exposure takes into account wholeThe brilliance control of individual image array data and region-of-interest image array data.By known (T1, AVG) and (T2,ATT_AVG)Two reference points do linear interpolation, can try to achieve a brightness value between (AVG) and (ATT_AVG) as reference brightness,Carry out the adjustment of automatic exposure.
Wherein, the self-adaptative adjustment mode of object brightness, main imitation human eye being capable of self adaptation under different brightness casesAdjustment brightness, receiving allow to be adjusted to different luminance states in the very big environment of bright dark difference.
Scene illumination is higher, and the time for exposure is smaller, and gain is also smaller, and the object brightness of current scene is closer to the mesh for settingMark the maximum set value of brightness.
Scene illumination is lower, and the time for exposure is more long, and gain is also bigger, and the object brightness of current scene is closer to the mesh for settingMark the minimum setting value of brightness.
In the object brightness self-adaptative adjustment mechanism, it is desirable to which under the high illumination scene such as outdoor, target brightness value is being matched somebody with somebodyIt is a value higher in the effective range put.
In the object brightness self-adaptative adjustment mechanism, it is desirable to indoors or in cloudy day etc. under isolux scene, meshMark brightness value is a value placed in the middle in the effective range of configuration.
In the object brightness self-adaptative adjustment mechanism, it is desirable under the scene of the low-light (level) such as night or darkness, targetBrightness value is a value less than normal in the effective range of configuration.
In some embodiments, determine that the mode of image illumination grade scene can be fallen into according to average brightness itsIn a certain scene illumination it is interval and determines, and then the default object brightness is based on absorbed image place light environmentAnd determine.When the error between reference brightness value and target brightness value after adjustment is in the range of default allowable error, reallyDetermine image and enter stable state.
Then, after adjustment is exposed according to identified exposure Adjusted Option, the application can reacquire described theOne monochrome information and with the second monochrome information, to monitor whether to proceed exposure adjustment.
In some embodiments, for example under night environment, vehicle mounted imaging apparatus absorb the non-interesting region in imageIt is vulnerable to street lamp, the influence of the interim irradiation of opposite vehicle, if reacquire average brightness according to the mode of step S110 enteringAnd the mode for being exposed the matching of regularization condition is exposed adjustment, the situation of frequent adjustment may be caused, so as to influenceThe definition of region-of-interest in image captured by vehicle mounted imaging apparatus.Therefore, in order to reduce the exposure adjustment frequency, the application also existsIt is determined that when being exposed without adjustment, there is provided step S130.
Step S130, judge whether to reacquire first monochrome information and the second monochrome information.
Specifically, judge whether that reacquiring first monochrome information and the mode of the second monochrome information includes:StepS131 and S132 (not in diagram).
In the first brightness changing value of default same region-of-interest in the absorbed multiple image of step S131, monitoring,And;In the second brightness changing value in default same non-interesting region in the absorbed multiple image of monitoring.
Step S132, the first brightness changing value is counted with the second brightness changing value, and based on statisticsDetermine whether to reacquire first monochrome information and the second monochrome information.
Specifically, record for the first time when stablizing, in the picture the respective average brightness value in all regions.AndThe graph data of each frame after, be respectively compared the average brightness value in all regions in present image with enter stabilization whenWait the changing value of the average brightness value of image.
In all regions, the thresholding of the brightness changing value more than setting in single region, and the region is region-of-interest,It is judged as effectively changing detection zone, and records the weight coefficient (W in the regioni)。
It is judged as effectively changing the weight coefficient value of detection zone, and accumulation calculating institute in all regions of accumulation calculatingThere is a weight coefficient value of region-of-interest, and calculate and be judged as effectively changing the weight coefficient of detection zone and account for all concern areasThe percentage (P) of the weight coefficient in domain, brightness adjustment is judged whether to according to percentage (P):
When the brightness in monolithic region or polylith region in non-interesting region changes and the changing value of brightness is more thanDuring the brightness change thresholding of setting, automatic exposure is not turned on exposure adjustment.
When the brightness in region-of-interest monolithic region or less region change and brightness changing value more than settingWhen fixed brightness changes thresholding, automatic exposure is not turned on exposure adjustment.
When the polylith regional luminance of region-of-interest change and brightness changing value more than setting brightness change doorLimit, automatic exposure judges the view data of successive frame, and the view data presence of continuous multiple frames meets polylith region in region-of-interestBrightness change there is also polylith regional luminance in being unsatisfactory for region-of-interest and change more than setting more than the brightness change thresholding of settingBrightness change thresholding when, automatic exposure be not turned on adjustment.
When the polylith regional luminance of region-of-interest change and brightness changing value more than setting brightness change doorLimit, automatic exposure judge the view data of successive frame, the view data of continuous multiple frames all meet region-of-interest in polylith region it is brightWhen degree change changes thresholding more than the brightness of setting, step S110 is re-executed.
When most of regional luminance of region-of-interest change and brightness changing value more than setting brightness changeDuring thresholding, step S110 is re-executed.Here, described Fig. 3 shows a kind of idiographic flow for judging whether to readjust exposure.
The technical scheme of the present embodiment, by dividing region-of-interest, and base in the image that is absorbed in vehicle mounted imaging apparatusIn the luminance evaluation of the second monochrome information of first monochrome information and non-interesting region of region-of-interest, carry out tending to make concernThe exposure Adjusted Option that area image can be obtained clearly, effectively solves the high dynamic camera heads such as vehicle mounted imaging apparatus and becomes in lightChange the problem of complex environment hypograph poor definition.
Embodiment two
The structural representation of Fig. 4,5 vehicle mounted imaging apparatus provided for the embodiment of the present invention two.The vehicle mounted imaging apparatusIncluding:Optical unit and exposure adjusting unit.
The light that the optical unit is used to be absorbed carries out imaging, to obtain image.It includes:Lens group 31With CMOS 32.Wherein, the intake of the lens group 31 light, and be allowed to be imaged on CMOS 32.
The vehicle mounted imaging apparatus also include camera control unit 21, and it is connected with the exposure adjusting unit, is used forBased on the control instruction that the exposure adjusting unit is exported, at least one ring of the adjustment influence imaging of optical unit 20Section.
Specifically, the camera control unit 21 includes:The control of diaphragm module and exposure time control module (not inDiagram).
The control of diaphragm module is used for based on received the control of diaphragm instruction adjustment aperture size.For example, according to instituteReception the control of diaphragm instruction gradually reduce/increase aperture scale.
The exposure time control module is used for based on the received spectrum assignment instruction adjustment lens group intake lightThe duration of line.For example, being stepped up/reducing the duration that the lens group takes in light according to the spectrum assignment instruction for being received.
The exposure adjusting unit is used to, by performing above-mentioned exposure adjustment method, control at least described exposure control modulePerform corresponding exposure Adjusted Option.
Here, the exposure adjusting unit can be the software and hardware being built in ISP chips 33, it includes:BrightnessStatistical module 10, light-metering correction module 12, adjustment trigger module 11, automatic exposure strategic control module 13.
The brightness statistic 10 is used to obtain absorbs in image the first monochrome information of default region-of-interest and non-Second monochrome information of region-of-interest.
The light-metering correction module 12 is used to count brightness gap value of the entire image compared to region-of-interest, and based on instituteState brightness gap value to fall into inside or outside default luminance difference threshold interval, determine that region to be adjusted reference before adjustment is brightDegree, and by starting at least one in the regulation time for exposure of automatic exposure strategic control module 13, aperture and gain, will be describedReference brightness is adjusted to default object brightness.
The adjustment trigger module 11 is used to judge whether to reacquire first monochrome information and the second monochrome information.
The automatic exposure strategic control module 13 is used to implement exposure Adjusted Option, wherein, the automatic exposure strategyControl module 13 will send corresponding the control of diaphragm instruction and exposure to the control of diaphragm module and/or exposure time control modulePhotocontrol is instructed.
Corresponding step in the exposure adjusting unit in each module correspondence the various embodiments described above, and perform corresponding steps instituteThe function of bringing, will not be described in detail herein.
For example, the pattern matrix collected by CMOS 32, is delivered in ISP 33 (picture signal treatment), ISP 33In include various image processing functions.Described according to the application, the brightness that obtained by brightness statistic 10 is needed first is believedBreath.Image input array is equally divided into n statistical regions by brightness statistic 10, and each statistical regions is tired out to brightness valueAdduction seeks its average value.The weight coefficient and region-of-interest of each statistical regions are set in brightness statistic 10, and calculates instituteThere are the mean flow rate of statistical regions and the mean flow rate of region-of-interest.Light-metering correction module 12 is by getting brightness statistic10 mean flow rates of all statistical regions being calculated and the mean flow rate of region-of-interest determine final automatic exposure instituteThe reference brightness value of needs.Brightness of the adjustment trigger module 11 by detecting each statistical regions in the n statistical regions becomesChange situation, decides whether to carry out the adjustment control of automatic exposure strategy, and idiographic flow is as shown in Figure 2.Automatic exposure policy control13 reference brightness values calculated by reference to default target brightness value and light-metering correction module 12, the reference brightness value is adjustedIt is whole near target brightness value.When minimum value of the reference brightness value less than target brightness value, time for exposure and gain are lifted, work as ginsengExamine brightness value more than target brightness value maximum when, reduce time for exposure and gain.The main mesh of light-metering correction module 12Be the assessed value for obtaining more suitably present intensity, the average brightness value of the n blocks by getting, the present image asked is suitableLight-metering reference brightness, and for the adjustment of automatic exposure.Firstly the need of in the n region got by brightness statisticEach zone leveling brightness value, calculates the average brightness value of all statistical regions and the average brightness value of region-of-interest.By everyThe difference of individual statistical regions and region-of-interest mean flow rate, it can be estimated that go out the complexity of current scene.Difference and it is smaller justIllustrate that the overall brightness of current scene is average, the influence value of the mean flow rate of all statistical regions is bigger, and region-of-interest is averageThe influence value of brightness is smaller, can guarantee that the brightness of general image is suitable using the average brightness value of all statistical regions.Difference andThe Luminance Distribution of bigger explanation current scene is more complicated, and the influence value of the mean flow rate of all statistical regions is smaller, region-of-interestThe influence value of mean flow rate is bigger, and the brightness of region-of-interest, light-metering correction are preferentially ensured using the average brightness value of region-of-interestWhat statistics brightness of the module 12 by obtaining n region of present frame was preserved when entering and stablize with the automatic exposure last timeBrightness of the n difference of the statistics brightness in region to judge each region changes.Become for the brightness that non-interesting region occursChange, light-metering correction module 12 is adjusted not as references object to automatic exposure.For the brightness change of region-of-interest, light-metering correctionThe intensity of variation of each statistical regions of automatic exposure is adjusted judgement by module 12.There is small part region-of-interest and brightness occursChange and more than threshold value, and most of region-of-interest brightness changes and no more than threshold value, light-metering correction module 12 may determine that forThe brightness demand of main body scene is constant, and local scene occurs motion and causes change, and automatic exposure can keep constant.In the presence of oneFixed region-of-interest occurs brightness to be changed and more than threshold value, and automatic exposure considers whether to be produced because of the instantaneous movement of objectChanging condition, with reference to the changing value of continuous multiple frames, light-metering correction module 12 determines whether automatic exposure needs adjustment.In the presence of a large amount ofRegion-of-interest occur brightness change and more than threshold value, it may be determined that for overall scenario there occurs change, light-metering correction module 12Determine that automatic exposure needs to be exposed adjustment.It is and current according to the reference average brightness value that light-metering correction module 12 getsThe object brightness of scene adaptive is compared.If the low door of the object brightness threshold value with reference to average brightness value less than settingLimit, adjustment rate is more than 1, it is necessary to pass through to increase the time for exposure or the method for gain supplements brightness, if with reference to flatMore than the high threshold of the object brightness threshold value of setting, adjustment rate is less than 1 for equal brightness, then need by reduce the time for exposure orThe method of gain refers to mean flow rate to reduce.The time for exposure of automatic exposure and gain have reached maximum, can be by dropLow frame per second improves overall exposing time of every two field picture, so as to improve brightness.The time for exposure of automatic exposure and gain reachMinimum value is arrived, the reference brightness of acquisition is still above current object brightness, and stabilization is forced in current automatic exposure.It is automatic to exposeIn the control process of light, the time for exposure is preferentially adjusted, secondly adjust gain.Idiographic flow see Fig. 2.
Here, the exposure and gain output interface 14 in Fig. 5 will consider the different types of camera of docking, exposure and increasingThe adaptable interface that the precision or mapping relations of benefit are different and add, while considering the delay that comes into force of exposure and gain.
Note, above are only presently preferred embodiments of the present invention and institute's application technology principle.It will be appreciated by those skilled in the art thatThe invention is not restricted to specific embodiment described here, can carry out for a person skilled in the art various obvious changes,Readjust and substitute without departing from protection scope of the present invention.Therefore, although the present invention is carried out by above exampleIt is described in further detail, but the present invention is not limited only to above example, without departing from the inventive concept, alsoMore other Equivalent embodiments can be included, and the scope of the present invention is determined by scope of the appended claims.