Method and device for automatically adjusting the parameters of a digital image capture device

The automatic adjustment of gain and exposure duration in digital image capture devices uses a centered average value and convergence criterion to optimize calculations, addressing the complexity issue in on-board applications and ensuring efficient parameter adjustment.

FR3147417B1Active Publication Date: 2025-04-18LACROIX GRP
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
FR2023003097
Authority / Receiving Office
FR · FR
Patent Type
Patents
Current Assignee / Owner
Filing Date
2023-03-30
Publication Date
2025-04-18
Estimated Expiration
2043-03-30

AI Technical Summary

Technical Problem

Existing methods for adjusting gain and exposure duration in digital image capture devices require complex calculations, which are not compatible with limited calculatory resources found in on-board applications.

Method used

An automatic adjustment process that uses a centered average value calculation, simple statistical operations, and a convergence criterion to iteratively adjust gain and exposure duration, optimized for on-board applications.

Benefits of technology

The process achieves efficient parameter adjustment with minimal computational resources, ensuring rapid convergence and reduced flicker, making it suitable for on-board vision applications.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure 00000020_0000
    Figure 00000020_0000
  • Figure 00000021_0000
    Figure 00000021_0000
Patent Text Reader

Abstract

Method and device for automatically adjusting the parameters of a digital image capture device. This method comprises, for capturing a succession of digital images, the steps of: a) for a current digital image, captured with a current gain and exposure time, obtaining (42) a current centered average value of the grayscale sample values ​​of a region of interest in the current digital image, b) determining (44-60) an adjusted gain and an adjusted exposure time, based on said current centered average value, c) applying (62) the adjusted gain and adjusted exposure time in said digital image capture device for capturing a subsequent digital image, and d) iterating steps a) to c) for the subsequent digital image until a convergence criterion is met for the current digital image, the convergence criterion being met when said current centered average value,In absolute value, is less than a predetermined convergence threshold. Figure for the abbreviation: Figure 2,
Need to check novelty before this filing date? Find Prior Art

Description

Title of the invention: Method and device for automatically adjusting parameters of a digital image capture device

[0001] The present invention relates to a method and a device for automatically adjusting parameters of a digital image capture apparatus, said parameters being respectively a gain and an exposure time of the image capture apparatus.

[0002] The invention lies in the field of calibration of shooting parameters, making it possible to ensure satisfactory quality of the captured digital images depending on the illumination conditions.

[0003] The invention finds applications in various fields, for example computer vision.

[0004] Digital image capture devices, e.g., cameras, comprise photosensitive electronic sensors, which convert electromagnetic radiation, in the visible light range, or ultraviolet or infrared as the case may be, into an electrical signal, which is processed and digitized by an analog-digital converter to obtain a digital image. In a known manner, the shooting is parameterized by a gain and an exposure time, which must be adjusted according to the lighting conditions of the shooting. The gain defines the sensitivity of the sensors, and the exposure time the “open” time of the sensors. More specifically, increasing the gain makes the captured images brighter but with more noise, and increasing the exposure time makes the captured images brighter but with a blurring effect around the moving parts in the captured scene.

[0005] For various applications, it is necessary to adjust (or calibrate) the gain and exposure time parameters automatically.

[0006] Various methods for adjusting these parameters have been proposed, generally based on statistics calculated from the values ​​of the samples (or pixels) of the digital images captured successively, and by iterative adjustments. For example, methods are known using a gradient calculation in digital images or an entropy calculation. Such methods involve complex calculations, and therefore require significant computing and storage resources, which are not compatible with microcontroller-type processors used in certain applications, for example in embedded applications.

[0007] There is therefore a need to remedy these drawbacks, particularly with a view to embedded applications, with limited computing resources.

[0008] To this end, the invention proposes, according to one aspect, a method for automatically adjusting parameters of a digital image capture apparatus, said parameters being respectively a gain and an exposure duration of the digital image capture apparatus, the method being implemented by a calculation processor and comprising, for capturing a succession of digital images, steps of:

[0009] a) for a current digital image, captured with a current gain and a current exposure time, obtaining a centered mean value, called the current centered mean value, of the values ​​of the grayscale samples of a region of interest of said current digital image, said current centered mean value being equal to the difference between an average of said sample values ​​and a target mean value,

[0010] b) determining an adjusted gain and an adjusted exposure duration, as a function of said current centered mean value,

[0011] c) applying the adjusted gain and the adjusted exposure time in said apparatus digital image capture for capturing a subsequent digital image, and

[0012] d) iteration of steps a) to c) for the next digital image in the succession of digital images, said next digital image replacing the current digital image, until a convergence criterion is validated for the current digital image, the convergence criterion being validated when said current centered mean value, in absolute value, is less than a predetermined convergence threshold.

[0013] Advantageously, the method uses a centered mean value which is a first-order statistical moment, the calculation of which involves simple operations. In addition, the concomitant adjustment of the gain and the exposure time allows for computational optimization. Finally, the convergence criterion is based on a predetermined convergence threshold, which makes it possible to accelerate convergence and therefore further save computational resources. Thus, the method is particularly suitable for embedded vision applications.

[0014] The method for automatically adjusting parameters of a digital image capture device may also have one or more of the following characteristics, taken independently or in any technically conceivable combination.

[0015] The current gain is associated with a current gain index and the current exposure duration is associated with a current exposure duration index, the determination of an adjusted gain and an adjusted exposure duration comprises a determination of an adjusted gain index and an adjusted exposure duration index, said indices making it possible to access, in at least one storage structure, said adjusted gain and said adjusted exposure duration.

[0016] The storage structure comprises an indexed table of gain values ​​and an indexed table of exposure duration values.

[0017] When said convergence criterion is not validated, at each iteration, the method comprises the implementation of a formula for updating the adjusted gain index and / or the adjusted exposure duration index, depending on a convergence step.

[0018] If the current centered mean value exceeds a maximum centered mean value, or if the current centered mean value is less than a minimum centered mean value, said adjusted gain index and adjusted exposure time index are set to predetermined values ​​and the convergence step is set to a maximum convergence step value.

[0019] Determining an adjusted gain index and an adjusted exposure time index further comprises detecting a change in sign between a previous centered mean value calculated for a previous digital image and the current centered mean value, and in case of a change in sign, the adjusted gain index is calculated by a linear prediction as a function of the current gain index, a previous gain index, the previous centered mean value and the current centered mean value, and the adjusted exposure time index is calculated by a linear prediction as a function of the current exposure time index, a previous exposure time index, the previous centered mean value and the current centered mean value.

[0020] In case of a change of sign, the convergence step is set to a minimum convergence step value.

[0021] If the current centered mean value is negative and greater in absolute value than said predetermined convergence threshold, the method comprises an increase in the current exposure duration index by an amount dependent on the convergence step to obtain the adjusted gain index, and, if the current exposure duration index is greater than or equal to a maximum exposure duration index value, an increase in the current gain index by an amount dependent on the convergence step to obtain the adjusted exposure duration index.

[0022] If the current centered mean value is positive and greater than said predetermined convergence threshold, the method comprises a decrease in the current gain index by an amount dependent on the convergence step to obtain the adjusted gain index, and, if the current gain index is less than or equal to a minimum gain index value, a decrease in the current exposure duration index by an amount dependent on the convergence step to obtain the adjusted exposure duration index.

[0023] According to another aspect, the invention relates to a device for automatically adjusting parameters of a digital image capture apparatus, said parameters being respectively a gain and an exposure duration of the image capture apparatus. digital, comprising a calculation processor and configured to implement for capturing a succession of digital images:

[0024] -for a current digital image, captured with a current gain and a current exposure time, a module for obtaining a centered average value, called the current centered average value, of the values ​​of the grayscale samples of a region of interest of said current digital image, said current centered average value being equal to the difference between an average of said sample values ​​and a target average value,

[0025] - a module for determining an adjusted gain and an adjusted exposure duration, in function of said current centered mean value,

[0026] - a module for applying the adjusted gain and the adjusted exposure time in said digital image capture apparatus for capturing a next digital image, said modules being implemented iteratively for the next digital image in the succession of digital images, said next digital image replacing the current digital image, until a module for verifying a convergence criterion validates a convergence criterion for a current digital image, the convergence criterion being validated when said current centered mean value, in absolute value, is less than a predetermined convergence threshold.

[0027] According to another aspect, the invention relates to a computer program comprising software instructions which, when implemented by a programmable electronic device, implement a method of automatically adjusting parameters of a digital image capture apparatus as briefly described above.

[0028] According to another aspect, the invention relates to an information recording medium, on which are stored software instructions for the execution of a method for automatically adjusting parameters of a digital image capture apparatus as briefly described above, when these instructions are executed by a programmable electronic device.

[0029] Other characteristics and advantages of the invention will emerge from the description given below, for information purposes only and in no way limiting, with reference to the appended figures, among which:

[0030] [Fig-1] [Fig.l] schematically illustrates a digital image capture system comprising a device for automatically adjusting parameters of a digital image capture device;

[0031] [Fig.2] [Fig.2] is a synopsis of the main stages of an adjustment process automatic adjustment of parameters of a digital image capture device according to one embodiment.

[0032] [Fig.l] schematically illustrates a system 2 for capturing digital images.

[0033] Such a system can be used in numerous applications, for example it is an on-board system on board a moving vehicle, for example a motor vehicle, in the context of semi-autonomous or autonomous vehicles, which use digital images from outside the vehicle.

[0034] Of course, this application is given as an example, many other applications being conceivable, for example the use of computer vision in industrial applications.

[0035] The system 2 comprises a digital image capture apparatus 4, which provides as output a succession of digital images 6, with a given frequency, for example 30 images per second, forming a video of an observed scene. The digital images 6 are for example provided to an electronic unit 8, which comprises for example calculation means (e.g. electronic processor(s)) and display means (e.g. a display screen) of the digital images 6. For example, the electronic unit 8 is an ECU (for “Electronic Control Unit” in English), which is a calculation and control unit on board a land or air vehicle, for example car, bus, truck, aircraft etc.

[0036] The digital images 6 are coded on several channels, each channel comprising a plurality of samples (or pixels), arranged in the form of a matrix, according to the coding format used, for example YCbCr, RGB or Bayer pattern.

[0037] In the YCbCr format, the Y channel represents the digital image in gray levels, and comprises sample values ​​coded on a predetermined number N of bits, for example N=8 bits or N=12 bits, making it possible to represent the sample values ​​on corresponding ranges, going from 0 to 2N-1.

[0038] The digital image capture apparatus 4 comprises one or more electronic sensors 10, for example CCD or CMOS sensor, providing analog image signals 12. A unit 14 applies gain parameters G and exposure duration E. A unit 16, for example a signal processor DSP (for “Digital Signal Processor”) or a processor dedicated to images ISP (for “Image Signal Processor”) applies analog-digital conversion processing, as well as other known processing and filtering (eg color conversion), which are conventional and are not detailed here.

[0039] The system 2 further comprises a device 20 for automatically adjusting the gain and exposure duration parameters of the image capture device 4.

[0040] This device 20 is a programmable electronic computing device, adapted to communicate with the image capture apparatus 4.

[0041] Depending on the embodiments, it is carried out by a microcontroller, integrated in the image capture device 4 or integrated in the electronic unit 8, which is connected to the image capture device 4.

[0042] The device 20 comprises a calculation processor 25 and an electronic memory unit 27, adapted to communicate via an internal communication bus.

[0043] The device 20 for automatically adjusting the gain and exposure time parameters comprises a module 22 for obtaining a centered average value of a current digital image. The current digital image is obtained with gain and exposure time parameters called current gain and current exposure time.

[0044] The centered mean value of the current digital image, called the current centered mean value, is equal to the difference between the mean of the values ​​of the grayscale samples of a region of interest of said current digital image and a target mean value.

[0045] The device 20 further comprises a module 24 for determining an adjusted gain and an adjusted exposure duration, as a function of the current centered mean value, a module 26 for applying the adjusted gain and exposure duration for capturing a following image. It further comprises a module 28 for verifying a convergence criterion.

[0046] The convergence criterion is validated when the current centered mean value, in absolute value, is less than a predetermined convergence threshold.

[0047] The device 20 is configured to implement the modules 22, 24, 26, 28, for a succession of digital images, until the convergence criterion is validated.

[0048] When the convergence criterion is validated, the gain and exposure duration parameters are no longer modified / adjusted, they are stored for use.

[0049] Examples of implementation of the modules 22, 24, 26, 28 will be described below.

[0050] In addition, the electronic memory unit 27 is configured to store data storage structures 30, 32, for example indexed tables, the data being accessible in reading mode by providing a corresponding index, serving as an address in the storage structure. Such data storage structures are known as LUTs for "look-up tables" in English.

[0051] The storage structures 30, 32 are used by the module 24 for determining an adjusted gain and an adjusted exposure duration, as explained in more detail below.

[0052] In one embodiment, table 30, also referenced LUTG, is configured to store gain values, accessible by associated gain indices and table 32, also referenced LUTE, is configured to store exposure duration values, accessible by associated exposure duration indices.

[0053] Typically, the indices are positive integers, taking integer values. The gain and exposure duration values ​​are integer or real values, encoded according to a chosen type.

[0054] The size of the data storage structures 30, 32 is variable. For example, the storage structure 30 is a table of idxG_max values, and the storage structure 32 is a table of idxE_max values.

[0055] In alternative embodiments, there is no storage of memory structures for storing gain and exposure time values, these values ​​being calculated on the fly by appropriate functions.

[0056] In one embodiment, the modules 22, 24, 26, 28 are produced in the form of software instructions forming a computer program, which, when executed by the processor 25 of the programmable electronic device 20, implements a method for automatic parameter adjustment according to the invention.

[0057] In a variant not shown, the modules 22, 24, 26, 28 are each produced in the form of a programmable logic component, such as an FPGA (Field Programmable Gate Array), or a GPGPU (General-purpose Processing on graphics processing), or in the form of a dedicated integrated circuit, such as an ASIC (Application Specific Integrated Circuit).

[0058] The computer program comprising software instructions is further capable of being recorded on a medium, not shown, that is readable by a computer. The computer-readable medium is, for example, a medium capable of storing the electronic instructions and of being coupled to a bus of a computer system. By way of example, the readable medium is an optical disk, a magneto-optical disk, a ROM memory, a RAM memory, any type of non-volatile memory (for example EPROM, EEPROM, FLASH, NVRAM), a magnetic card or an optical card.

[0059] [Fig.2] is a synoptic of the main steps of a method for automatically adjusting the gain and exposure duration parameters, according to one embodiment.

[0060] The method applies to the successive capture of images by the image capture device, at a predetermined frequency, for example 30 images per second.

[0061] The method is applied with gain G and exposure duration E values ​​stored in storage structures, e.g. LUTG and LUTE tables.

[0062] The LUTG table is indexed by integer indices ranging from 1 to idxG_max.

[0063] The LUTE table is indexed by integer indices ranging from 1 to idxE_max.

[0064] Input data 40 are provided, the input data comprising, depending on the case, either the gray level sample values ​​(Y channel) of the current digital image, or a histogram obtained from the gray level sample values ​​(Y channel) of the current digital image.

[0065] The current digital image, which is for example the Kth image of the succession of processed digital images, was captured with gain and exposure duration parameters called respectively current gain and current exposure duration, calculated during a previous iteration of the method.

[0066] The method aims to calculate adjusted gain and exposure duration parameters, for application to the capture of the (K+1)th digital image.

[0067] The method then comprises obtaining 42 a centered mean value, called the current centered mean value, of the values ​​of the grayscale samples of a region of interest of the current digital image.

[0068] The region of interest is predetermined, for example it is a central region of the image, or a specific region determined by an image processing algorithm targeting certain characteristics.

[0069] In one embodiment, the region of interest is the entirety of the current digital image.

[0070] The centered mean is equal to the difference between the mean of the values ​​of the samples of the region of interest of the current digital image and a target mean value C.

[0071] For example, the target average value is the median value of the interval of representation of the sample values ​​in gray levels, for example C=128 for sample values ​​represented on 8 bits (i.e. between 0 and 255) or C=1024 for sample values ​​represented on 12 bits (i.e. between 0 and 2047).

[0072] When the grayscale sample values ​​Yy are provided, the region of interest being for example rectangular in shape, comprising Lig rows and Col columns, the grayscale sample values ​​being noted:] F; j, 0 < i < Lig - 1; 0 < j < Col - 1], the centered mean is calculated by the formula:

[0073] [Math.l] ” Ugx.Col ~ LigxCol ■ C

[0074] Thus, the centered mean is equal to the grayscale mean of the region of interest from which the target mean value C is subtracted.

[0075] According to a variant, to simplify the calculation, the average is calculated from a sample out of Q, for example a sample out of 3 in each dimension (eg rows, columns).

[0076] When the histogram obtained from the grayscale sample values ​​(Y channel) of the region of interest is provided as input, the centered mean value is calculated from the histogram, which allows the calculation to be optimized.

[0077] According to another scenario, if the digital image is coded according to another coding format, for example RGB, step 40 first comprises a calculation of the image samples in gray level (Y channel), then the calculation explained by the equation [MATH 1] is carried out.

[0078] The centered mean calculated for the current digital image is called the current centered mean, denoted Pc.

[0079] The method then comprises steps 44 to 58 cooperating to carry out the determination of an adjusted gain and an adjusted exposure duration, as a function of the current centered mean value taking into account the current gain Gc and the current exposure duration Ec, actually applied for the capture of the current digital image.

[0080] These steps are described in more detail below in one embodiment.

[0081] In this embodiment, the storage structures for the gain and exposure duration values, accessible by the indices, are used, and the calculations are carried out using the current gain index and the current exposure duration index corresponding respectively to the current gain and the current exposure duration, these indices being adjusted.

[0082] The method comprises a step 44 consisting of determining whether one or other of the following conditions is validated, these conditions respectively representing an image that is too light or too dark: - Condition 1: if the current centered mean value Pc exceeds a maximum centered mean value or - Condition 2: if the current centered mean value Pc is less than a minimum centered mean value

[0083] The respective values ​​Ph and P^ are predetermined. For example, these values ​​are in the range [64, 128] and [-128, -64], respectively, for images of N=8 bits where the maximum range of the centered average value is [-128, 128].

[0084] If condition 1 is verified or if condition 2 is verified, then the adjusted gain and the adjusted exposure duration, and more particularly the corresponding indices, are set to predetermined values ​​in step 46.

[0085] In addition, a convergence step (or “step” in English), noted p, initialized at a given value, for example p=0, is set to a predetermined maximum convergence step value pmax.

[0086] For example, the maximum convergence step value, pmax, is between 1 and 5.

[0087] In detail, one embodiment uses predefined ranges of gain index values ​​and exposure duration index values, defined respectively by: Gain index range: PG=[idxGL, idxGH] where 1 < idxGL < idxGH < idxG _max ; Exposure duration index range: PE=[idxEL, idxEH] where 1 < idxEL < idxEH < idxEmm.

[0088] When condition 1 is verified, i.e. the current centered mean value is greater than it is first verified whether the current exposure duration index idxE_c is in the PE range, and in particular whether it is greater than the lower bound idxEL of the PE range, in which case the adjusted gain index is set to the value of the lower bound idxEL. If the current exposure duration index idxE_c is less than or equal to the lower bound idxEL of the PE range, then the adjusted exposure duration index idxE is set to 1.

[0089] In addition, when the adjusted exposure duration index idxE is 1, it is further checked whether the current gain index idxG_c is greater than the lower bound idxGL of the PG range, and if so, the adjusted gain index idxG is set to the value of the lower bound idxGL. If the current gain index idxG_c is less than or equal to the lower bound idxGL of the PG range, then the adjusted gain index idxG is set to 1.

[0090] In another embodiment, it is provided to decrease the adjusted gain index idxG, then the adjusted exposure duration index idxE. In this case, the gain reduction is carried out as a priority, before the exposure duration reduction when condition 1 is verified.

[0091] When condition 2 is verified, i.e. the current centered mean value is less than it is first verified whether the current exposure duration index idxE_c is in the PE range, and in particular whether it is less than the upper bound idxEH of the PE range, in which case the adjusted exposure duration index is set to the value of the upper bound idxEH. If the current exposure duration index idxE_c is greater than or equal to the upper bound idxEH of the PE range, then the adjusted exposure duration index idxE is set to the maximum exposure duration index value, idxE_max.

[0092] In addition, when the adjusted exposure duration index idxE is at the maximum exposure duration index value, it is further checked whether the current gain index idxG_c is less than the upper limit idxGH of the PG range, and if so, the adjusted gain index idxG is set to the value of the upper limit idxGH. If the current gain index idxG_c is greater than or equal to the upper limit idxGH of the PG range, then the adjusted gain index idxG is set to the maximum gain index value, idxG_max.

[0093] Thus, the exposure duration index is first updated, and if this is not sufficient, the current gain duration index is also modified. In other words, updating the exposure duration index is faster than updating the gain index.

[0094] Step 46 is followed by step 60 consisting of extracting from the respective storage structures the gain and exposure duration values ​​corresponding to the respective adjusted gain idxG and exposure duration idxE indices, and a step 62 of transmitting these values ​​for application during a next image capture.

[0095] If in step 44 none of the conditions are verified, in other words, the current centered mean value f*c is included in the range PH ], this step is followed by a step 48 of determining the presence of flickering between two successive images.

[0096] In practice, step 48 implements a detection of a change of sign between the centered mean value ^puc for a previous digital image, for example the last digital image captured before the current digital image, and the current centered mean value Ec. Indeed, a change of sign is an indicator of flicker because the gray level mean value passes from one side to the other of the target mean value.

[0097] Sign change detection is for example performed by comparing the product of ^prec and to zero. Subsequently, the last current centered mean value is stored for a subsequent iteration.

[0098] It should be noted that at initialization, the centered mean value ^prec is initialized to zero.

[0099] In the event of a change of sign, therefore if Pprec X Pe < 0, then step 48 is followed by a step 50 of updating the current gain index and the current exposure duration index by linear prediction to obtain the adjusted gain index and the adjusted exposure duration index.

[0100] In addition, a convergence step (or “step” in English), noted p, is set to a predetermined minimum convergence step value pm in.

[0101] For example, the maximum convergence step value, pmin, is between 0 and 1.

[0102] For example, the following linear prediction formulas are implemented:

[0103] [Math.2] idxE = \intjidxE_c xp prec +idxE_prec x )

[0104] [Math.3] idxG -\int}\idxG_c xp prec + idxG_prec x )

[0105] The formulas use the current centered mean value, and the centered mean value ^prec of the previous digital image, as well as the gain and respective exposure times idxG_prec and idxE_prec applied for the capture of the previous digital image.

[0106] The notation (int)(A) denotes the “integer part” operator, the respective indices being integers.

[0107] The adjustment step 50 is followed by the step 60 consisting of extracting from the respective storage structures the gain and exposure duration values ​​corresponding to the respective adjusted current gain idxG and exposure duration idxE indices, and by the step 62 of transmitting these values ​​for application during a next image capture.

[0108] Advantageously, the implementation of these formulas for linear prediction of the gain index values ​​and exposure duration as a function of the current and previous gain and exposure duration values ​​makes it possible to obtain a progressive adjustment, and therefore to reduce the flicker.

[0109] In the absence of flicker detection in step 48, the method comprises verification steps, consisting of verifying whether a convergence criterion is verified, and, if the convergence criterion is not verified, adjusting the gain and exposure duration indices.

[0110] The convergence criterion expresses the proximity of the centered mean value of the current digital image to zero, and consists of checking whether the current centered mean value, in absolute value, is less than a predetermined convergence threshold dcv, which is expressed by the formula: [YES] [Math.4] - ^CV < f^c < <5cv

[0112] For example, the convergence threshold (5CV) is close to 0, for example between 0 and 5.

[0113] If the convergence criterion is not satisfied, two cases are distinguished and treated differently, using the convergence step p.

[0114] Thus, it is verified during a verification step 52 whether the centered mean value is negative and lower in absolute value than the convergence threshold:

[0115] [Math.5] ff c < ' ^cv

[0116] If the condition [MATH 5] is verified, step 52 is followed by an adjustment step 54.

[0117] During the adjustment step 54 it is first checked whether the current exposure duration index idxE_c is less than the maximum exposure duration index value idxE_max, and in this case it is increased by an amount depending on the convergence step according to the formula:

[0118] [Math.6] idxE = idxE c + tint] (1^1 )

[0119] If the current exposure duration index is equal to idxE_max, the adjusted gain index is updated, in a similar manner, i.e. it is increased by an amount depending on the convergence step according to the formula:

[0120] [Math.7] / \ / IIP \ idxG = idxG +vint br \ / \ I ^CV I /

[0121] The adjustment step 54 is then followed by step 60 consisting of extracting from the respective storage structures the gain and exposure duration values ​​corresponding to the respective adjusted current gain idxG and exposure duration idxE indices, then by step 62 of transmitting these values ​​for application during a next image capture.

[0122] If the condition of step 52 is not verified, it is verified during another verification step 56 whether the centered mean value is positive and greater than the convergence threshold:

[0123] [Math.8] E c > &cv

[0124] If the condition [MATH 8] is verified, step 56 is followed by another adjustment step 58.

[0125] During the adjustment step 58 it is first checked whether the current gain index idxG is greater than 1 (e.g. the minimum gain index value) and in this case, the adjusted gain index is reduced by an amount depending on the convergence step according to the formula:

[0126] [Math.9] idxG = idxG _c - (intj| | )

[0127] If the gain index is equal to 1, the adjusted exposure duration index is updated, in a similar manner:

[0128] [Math. 10] / । |P\ idxE = idxE -\int]\ h- )

[0129] The adjustment step 58 is then followed by the step 60 consisting of extracting from the respective storage structures the gain and exposure duration values ​​corresponding to the respective adjusted current gain idxG and exposure duration idxE indices, then by the step 62 of transmitting these values ​​for application during a next image capture. Following the step 62, the image capture apparatus then applies the adjusted gain and adjusted exposure time for capturing the next digital image in the succession of digital images.

[0130] The steps of the method are iterated to adjust the gain and exposure time parameters until the convergence criterion is verified.

[0131] According to variants, during step 60 the respective values ​​of gain and exposure duration are calculated by suitable functions.

[0132] The update formulas [MATH 6], [MATH 7] and [MATH 9], [MATH 10] implement the convergence step p, the amount of increase (resp. decrease) of the respective indices for the update increasing (resp. decreasing) with the value of the convergence step. The formulas [MATH 6], [MATH 7] and [MATH 9], [MATH 10] explained above illustrate a chosen embodiment.

[0133] Alternatively, it is possible to apply other formulas respecting the principle described above of increase (respectively decrease) of the respective indices are applicable.

[0134] In other words, when the convergence step is high, the amount of increase (resp. decrease) is greater, which induces higher changes in gain value and exposure duration between successive image captures.

[0135] Similarly, when the convergence step is low, the amount of increase (resp. decrease) is smaller, which induces smaller changes in gain value and exposure duration between successive image captures.

[0136] Thus, controlling the value of the convergence step advantageously makes it possible to better control the convergence speed.

[0137] According to a less efficient variant, the quantities of increase (resp. decrease) of the respective indices are fixed, which is equivalent to considering a fixed convergence step.

[0138] If the condition [MATH 8] is not verified, step 56 is followed by step 60 consisting of extracting from the respective storage structures the gain and exposure duration values ​​corresponding to the respective adjusted current gain idxG and exposure duration idxE indices, and by step 62 of transmitting these values ​​for application during a next image capture.

[0139] The invention has been described above in one embodiment, but other embodiments are conceivable, for example other mathematical formulas are applicable to carry out the updates of the gain and exposure duration indices.

[0140] According to variants, the gain and exposure duration values ​​are not stored in storage structures, but calculated by suitable functions.

[0141] Advantageously, the adjustment of the parameters is a function of the centered mean value, the calculation of which is rapid and requires few computing resources, and thus the method is easily implemented in embedded applications.

[0142] Advantageously, the parameter updates take into account the situation of the current digital image.

[0143] In particular, the convergence step is updated dynamically, to different values ​​depending on the situation, which makes it possible to obtain faster convergence.

[0144] Advantageously, to avoid flickering, formulas for linear prediction of the gain index values ​​and exposure duration as a function of the current and previous gain and exposure duration values ​​make it possible to obtain a progressive adjustment.

Claims

1. Claims Method for automatically adjusting parameters of a digital image capture device, said parameters being respectively a gain and an exposure duration of the digital image capture device, the method being implemented by a calculation processor and comprising, for capturing a succession of digital images, steps of: a) for a current digital image, captured with a current gain and a current exposure time, obtaining (42) a centered average value, called the current centered average value, of the values ​​of the grayscale samples of a region of interest of said current digital image, said current centered average value being equal to the difference between an average of said sample values ​​and a target average value, b) determining (44-60) an adjusted gain and an adjusted exposure time, as a function of said current centered mean value, c) applying (62) the adjusted gain and the adjusted exposure time in said digital image capture apparatus for capturing a next digital image, and d) iteration of steps a) to c) for the next digital image in the succession of digital images, said next digital image replacing the current digital image, until a convergence criterion is validated for the current digital image, the convergence criterion being validated when said current centered mean value, in absolute value, is less than a predetermined convergence threshold, the current gain is associated with a current gain index and the current exposure duration is associated with a current exposure duration index, the determination of an adjusted gain and an adjusted exposure duration comprises a determination of an adjusted gain index and an adjusted exposure duration index, said indices making it possible to access, in at least one storage structure, said adjusted gain and said adjusted exposure duration, when said convergence criterion is not validated, at each iteration,the method comprises implementing a formula for updating the adjusted gain index and / or the adjusted exposure duration index, depending on a convergence step.,

2. The method of claim 1, wherein said storage structure comprises an indexed table of gain values ​​and an indexed table of exposure duration values.

3. A method according to either of claims 1 or 2, wherein if the current centered mean value exceeds a maximum centered mean value, or if the current centered mean value is less than a minimum centered mean value, said adjusted gain index and adjusted exposure time index are set to predetermined values ​​and the convergence step is set to a maximum convergence step value.

4. The method of one of claims 1 to 3, wherein said determining an adjusted gain index and an adjusted exposure time index further comprises detecting (48) a change in sign between a previous centered mean value calculated for a previous digital image and the current centered mean value, and in the event of a change in sign, the adjusted gain index is calculated by a linear prediction as a function of the current gain index, a previous gain index, the previous centered mean value and the current centered mean value, and the adjusted exposure time index is calculated (50) by a linear prediction as a function of the current exposure time index, a previous exposure time index, the previous centered mean value and the current centered mean value.

5. A method according to claim 4, wherein, in the event of a change of sign, the convergence step is set to a minimum convergence step value.

6. Method according to one of claims 1 to 5, in which if the current centered mean value is negative and greater in absolute value than said predetermined convergence threshold, the method comprises an increase (54) of the current exposure duration index by an amount dependent on the convergence step to obtain the adjusted gain index, and, if the current exposure duration index is greater than or equal to a maximum exposure duration index value, an increase of the current gain index by an amount dependent on the convergence step to obtain the adjusted exposure duration index.

7. Method according to one of claims 1 to 6, in which if the current centered average value is positive and greater than said predetermined convergence threshold, the method comprises a decrease (58) of the current gain index by an amount dependent on the convergence step to obtain the adjusted gain index, and, if the current gain index is less than or equal to a minimum gain index value, a decrease of the current exposure duration index by an amount dependent on the convergence step to obtain the adjusted exposure duration index.

8. A computer program comprising software instructions which, when implemented by a programmable electronic device, implement a method for automatically adjusting parameters of a digital image capture apparatus according to claims 1 to 7.

9. Device for automatically adjusting parameters of a digital image capture device, said parameters being respectively a gain and an exposure time of the digital image capture device, comprising a calculation processor and configured to implement for capturing a succession of digital images: - for a current digital image, captured with a current gain and a current exposure time, a module (22) for obtaining a centered average value, called the current centered average value, of the values ​​of the grayscale samples of a region of interest of said current digital image, said current centered average value being equal to the difference between an average of said sample values ​​and a target average value, - a module (24) for determining an adjusted gain and an adjusted exposure time, as a function of said current centered average value,- a module (26) for applying the adjusted gain and the adjusted exposure time in said digital image capture device for capturing a next digital image, - said modules (22, 24, 26) being implemented iteratively for the next digital image in the succession of digital images, said next digital image replacing the current digital image, until a module (28) for verifying a criterion, of convergence validates a convergence criterion for a current digital image, the convergence criterion being validated when said current centered mean value, in absolute value, is less than a predetermined convergence threshold, the current gain is associated with a current gain index and the current exposure duration is associated with a current exposure duration index, the determination of an adjusted gain and an adjusted exposure duration comprises a determination of an adjusted gain index and an adjusted exposure duration index, said indices making it possible to access, in at least one storage structure, said adjusted gain and said adjusted exposure duration, when said convergence criterion is not validated, at each iteration, the device being configured to implement a formula for updating the adjusted gain index and / or the adjusted exposure duration index, depending on a convergence step.