<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE article PUBLIC "-//NLM//DTD Journal Publishing DTD v2.3 20070202//EN" "journalpublishing.dtd">
<article xmlns:mml="http://www.w3.org/1998/Math/MathML" xmlns:xlink="http://www.w3.org/1999/xlink" xml:lang="en" article-type="research-article">
<front>
<journal-meta>
<journal-id journal-id-type="nlm-ta">Sensors</journal-id>
<journal-title>Sensors</journal-title>
<issn pub-type="epub">1424-8220</issn>
<publisher>
<publisher-name>Molecular Diversity Preservation International (MDPI)</publisher-name></publisher></journal-meta>
<article-meta>
<article-id pub-id-type="doi">10.3390/s110908412</article-id>
<article-id pub-id-type="publisher-id">sensors-11-08412</article-id>
<article-categories>
<subj-group>
<subject>Article</subject></subj-group></article-categories>
<title-group>
<article-title>A Novel Method to Increase LinLog CMOS Sensors’ Performance in High Dynamic Range Scenarios</article-title></title-group>
<contrib-group>
<contrib contrib-type="author">
<name><surname>Martínez-Sánchez</surname><given-names>Antonio</given-names></name><xref ref-type="aff" rid="af1-sensors-11-08412"><sup>1</sup></xref></contrib>
<contrib contrib-type="author">
<name><surname>Fernández</surname><given-names>Carlos</given-names></name><xref ref-type="aff" rid="af2-sensors-11-08412"><sup>2</sup></xref><xref ref-type="corresp" rid="c1-sensors-11-08412"><sup>*</sup></xref></contrib>
<contrib contrib-type="author">
<name><surname>Navarro</surname><given-names>Pedro J.</given-names></name><xref ref-type="aff" rid="af2-sensors-11-08412"><sup>2</sup></xref></contrib>
<contrib contrib-type="author">
<name><surname>Iborra</surname><given-names>Andrés</given-names></name><xref ref-type="aff" rid="af2-sensors-11-08412"><sup>2</sup></xref></contrib></contrib-group>
<aff id="af1-sensors-11-08412">
<label>1</label> Supercomputing and Algorithms Group, CSIC-UAL Associated Unit, University of Almeria, 04120 Almeria, Spain; E-Mail: <email>anmartinezs@ual.es</email></aff>
<aff id="af2-sensors-11-08412">
<label>2</label> DSIE, Universidad Politécnica de Cartagena, Campus Muralla del Mar, s/n. E-30202 Cartagena, Spain; E-Mails: <email>pedroj.navarro@upct.es</email> (P.J.N.); <email>andres.iborra@upct.es</email> (A.I.)</aff>
<author-notes>
<corresp id="c1-sensors-11-08412">
<label>*</label>Author to whom correspondence should be addressed; E-Mail: <email>carlos.fernandez@upct.es</email>; Tel.: +34-968-325-957; Fax: +34-968-325-345.</corresp></author-notes>
<pub-date pub-type="collection">
<year>2011</year></pub-date>
<pub-date pub-type="epub">
<day>29</day>
<month>8</month>
<year>2011</year></pub-date>
<volume>11</volume>
<issue>9</issue>
<fpage>8412</fpage>
<lpage>8429</lpage>
<history>
<date date-type="received">
<day>28</day>
<month>7</month>
<year>2011</year></date>
<date date-type="rev-recd">
<day>25</day>
<month>8</month>
<year>2011</year></date>
<date date-type="accepted">
<day>26</day>
<month>8</month>
<year>2011</year></date></history>
<permissions>
<copyright-statement>© 2011 by the authors; licensee MDPI, Basel, Switzerland.</copyright-statement>
<copyright-year>2011</copyright-year>
<license>
<p>This article is an open access article distributed under the terms and conditions of the Creative Commons Attribution license (http://creativecommons.org/licenses/by/3.0/).</p></license></permissions>
<abstract>
<p>Images from high dynamic range (HDR) scenes must be obtained with minimum loss of information. For this purpose it is necessary to take full advantage of the quantification levels provided by the CCD/CMOS image sensor. LinLog CMOS sensors satisfy the above demand by offering an adjustable response curve that combines linear and logarithmic responses. This paper presents a novel method to quickly adjust the parameters that control the response curve of a LinLog CMOS image sensor. We propose to use an Adaptive Proportional-Integral-Derivative controller to adjust the exposure time of the sensor, together with control algorithms based on the saturation level and the entropy of the images. With this method the sensor’s maximum dynamic range (120 dB) can be used to acquire good quality images from HDR scenes with fast, automatic adaptation to scene conditions. Adaptation to a new scene is rapid, with a sensor response adjustment of less than eight frames when working in real time video mode. At least 67% of the scene entropy can be retained with this method.</p></abstract>
<kwd-group>
<kwd>adaptive control</kwd>
<kwd>HDR imaging</kwd>
<kwd>image sensors</kwd>
<kwd>LinLog CMOS sensor</kwd>
<kwd>outdoor vision</kwd></kwd-group></article-meta></front>
<body>
<sec sec-type="intro">
<label>1.</label>
<title>Introduction</title>
<p>The dynamic range (DR) of an image sensor defines the relation between the minimum and maximum light that it can detect [<xref ref-type="bibr" rid="b1-sensors-11-08412">1</xref>]. Broadly speaking, the dynamic range for a CCD/CMOS sensor represents its capacity to retain scene information from both highly lighted and shaded scenes. Common CCD/CMOS sensors present a linear response to scene irradiance. More advanced sensors try to increase the dynamic range by converting the linear response to a logarithmic-like response, as shown in <xref ref-type="fig" rid="f1-sensors-11-08412">Figure 1</xref>, providing image enhancement [<xref ref-type="bibr" rid="b2-sensors-11-08412">2</xref>] as shown in <xref ref-type="fig" rid="f2-sensors-11-08412">Figure 2</xref>.</p>
<p>A high dynamic range is of major importance for computer vision systems that work with images taken from outdoor scenes—traffic control [<xref ref-type="bibr" rid="b3-sensors-11-08412">3</xref>], security surveillance systems [<xref ref-type="bibr" rid="b4-sensors-11-08412">4</xref>], outdoor visual inspection, <italic>etc</italic>. [<xref ref-type="bibr" rid="b5-sensors-11-08412">5</xref>]. Researchers and manufacturers have recently developed a new generation of image sensors and new techniques that make it possible to increase the typical 60 dB range for a CCD sensor to 120 dB. Reference [<xref ref-type="bibr" rid="b6-sensors-11-08412">6</xref>] reports several techniques to expand the dynamic range by pre-estimation of the sensor response curve. Reference [<xref ref-type="bibr" rid="b7-sensors-11-08412">7</xref>] proposes to combine several RGB images of different exposures into one image with greater dynamic range. A US patent [<xref ref-type="bibr" rid="b8-sensors-11-08412">8</xref>] claimed a CCD which reduces smear, thus providing greater dynamic range. Reference [<xref ref-type="bibr" rid="b9-sensors-11-08412">9</xref>] reported a technique to convert a linear response of a CMOS sensor to a logarithmic response, and [<xref ref-type="bibr" rid="b10-sensors-11-08412">10</xref>] proposed attaching a filter to the sensor to attenuate the light received by the pixels following a fixed pattern; after that, the image is processed to produce a new image with a greater dynamic range.</p>
<p>Although great progress has been made in the last decade concerning CMOS imaging, logarithmic response shows a large fixed pattern noise (FPN) and slower response time for low light levels, yielding limited sensitivity [<xref ref-type="bibr" rid="b11-sensors-11-08412">11</xref>]. The main disadvantage of using a fixed logarithmic curve is that it reduces the contrast of the image as compared to a linear response, so that a part of the scene information is lost, as seen in <xref ref-type="fig" rid="f2-sensors-11-08412">Figure 2(b)</xref>.</p></sec>
<sec>
<label>2.</label>
<title>The Lin-Log CMOS Sensor</title>
<p>The work described in this paper concerns the development of a novel method which combines different algorithms to adjust the parameters which control the response curve of a Lin-Log CMOS sensor in order to increase its yield in HDR scenes.</p>
<p>LinLog™ CMOS image technology was developed at the Swiss Federal Institute of Electronics and Microtechnology (Zurich, Switerland). A LinLog CMOS sensor presents a linear response for low light levels and a logarithmic compression as light intensity increases. Linear response for low light levels assures high sensitivity, while compression for high light levels avoids saturation.</p>
<p>The transition between the two responses can be adjusted. Special attention is required to guarantee a smooth transition between them. There are various cameras (e.g., like the MV1-D1312-40-GB-12 from Photonfocus AG equipped with the Photonfocus A1312-40 active pixel LinLog CMOS image sensor which we have used for test purposes) that use LinLog technology, and sensor response can be controlled by adjusting four parameters, hereafter designated T<sub>1</sub>, T<sub>2</sub>, V<sub>1</sub> and V<sub>2</sub>.V<sub>1</sub> and V<sub>2</sub> represent the compression voltage applied to the sensor. T<sub>1</sub> and T<sub>2</sub> are normalized parameters, expressed as a fraction of the exposure time, and can be adjusted from 0 to a maximum value of 1; their values determine the percentage of exposure time during which V<sub>1</sub> and V<sub>2</sub> are applied [<xref ref-type="fig" rid="f3-sensors-11-08412">Figure 3(a)</xref>]. The values of these four parameters determine the LinLog response of the sensor [<xref ref-type="fig" rid="f3-sensors-11-08412">Figure 3(b)</xref>]. Note that the final LinLog response is a combination of: (1) the linear response, (2) the logarithmic response with strong compression (V<sub>1</sub>) and (3) the logarithmic response with weak compression (V<sub>2</sub>) [<xref ref-type="fig" rid="f3-sensors-11-08412">Figure 3(b)</xref>]. These responses are combined by adjusting T<sub>1</sub> and T<sub>2</sub> values.</p>
<p>We have taken control characteristics of the LinLog CMOS sensor to develop a real-time image improvement method for high dynamic range scenes. This is made up of three different algorithms: (1) an algorithm to control the exposure time, (2) an algorithm to avoid image saturation, and (3) an algorithm to maximize the image entropy.</p></sec>
<sec>
<label>3.</label>
<title>Exposure Time Control Module</title>
<p>We have developed a module that controls the exposure time in order to assure that the average intensity level of the image tends to a set value (usually near the mean of available intensity levels), thus offering automatic correction of the deviations caused by variable lighting conditions in the scene. For this purpose we have implemented an Adaptive Proportional-Integral-Derivative controller (APID) which compensates non-linear effects at the time of image acquisition, by adjusting the exposure time as scene lighting conditions vary. An adaptive control system [<xref ref-type="bibr" rid="b12-sensors-11-08412">12</xref>] measures the process response, compares it with the response given by a reference process and is capable of adjusting process parameters to assure the desired response as shown in <xref ref-type="fig" rid="f4-sensors-11-08412">Figure 4</xref>.</p>
<p>In our case, the process that is controlled is acquisition of an image by a LinLog CMOS sensor. The output is the intensity level of that image. To quantify this level we use <xref ref-type="disp-formula" rid="FD1">Equations (1)</xref> and <xref ref-type="disp-formula" rid="FD2">(2)</xref>:
<disp-formula id="FD1">
<label>(1)</label>
<mml:math display="block">
<mml:mrow>
<mml:msub>
<mml:mrow>
<mml:mi>N</mml:mi></mml:mrow>
<mml:mi>g</mml:mi></mml:msub>
<mml:mo>=</mml:mo>
<mml:mfrac>
<mml:mrow>
<mml:mrow>
<mml:mo>(</mml:mo>
<mml:mrow>
<mml:munderover>
<mml:mo>∑</mml:mo>
<mml:mrow>
<mml:mi>i</mml:mi>
<mml:mo>=</mml:mo>
<mml:mn>0</mml:mn></mml:mrow>
<mml:mrow>
<mml:mi>D</mml:mi>
<mml:mo>−</mml:mo>
<mml:mn>1</mml:mn></mml:mrow></mml:munderover>
<mml:mrow>
<mml:mrow>
<mml:mo>(</mml:mo>
<mml:mrow>
<mml:mi>i</mml:mi>
<mml:mo>+</mml:mo>
<mml:mn>1</mml:mn></mml:mrow>
<mml:mo>)</mml:mo></mml:mrow>
<mml:mi>H</mml:mi>
<mml:mrow>
<mml:mo>(</mml:mo>
<mml:mi>i</mml:mi>
<mml:mo>)</mml:mo></mml:mrow></mml:mrow></mml:mrow>
<mml:mo>)</mml:mo></mml:mrow>
<mml:mo>−</mml:mo>
<mml:mi>N</mml:mi></mml:mrow>
<mml:mrow>
<mml:mi>N</mml:mi>
<mml:mrow>
<mml:mo>(</mml:mo>
<mml:mrow>
<mml:mi>D</mml:mi>
<mml:mo>−</mml:mo>
<mml:mn>1</mml:mn></mml:mrow>
<mml:mo>)</mml:mo></mml:mrow></mml:mrow></mml:mfrac></mml:mrow></mml:math></disp-formula>
<disp-formula id="FD2">
<label>(2)</label>
<mml:math display="block">
<mml:mrow>
<mml:mi>D</mml:mi>
<mml:mo>=</mml:mo>
<mml:msup>
<mml:mrow>
<mml:mn>2</mml:mn></mml:mrow>
<mml:mi>d</mml:mi></mml:msup></mml:mrow></mml:math></disp-formula>where <italic>N<sub>g</sub></italic> [0,1] represents the intensity level, <italic>d</italic> is the number of bits per pixel and <italic>D</italic> is the number of gray levels. <italic>H</italic>(<italic>i</italic>) represents the i-th histogram entry and <italic>N</italic> the number of pixels in the image. <italic>N<sub>g</sub></italic> is used as an input parameter for a Proportional-Integral-Derivative (PID) controller [<xref ref-type="bibr" rid="b13-sensors-11-08412">13</xref>–<xref ref-type="bibr" rid="b15-sensors-11-08412">15</xref>] which controls some camera parameters (see <xref ref-type="fig" rid="f5-sensors-11-08412">Figure 5</xref>), as shown in <xref ref-type="disp-formula" rid="FD3">Equations (3)</xref> and <xref ref-type="disp-formula" rid="FD4">(4)</xref>.
<disp-formula id="FD3">
<label>(3)</label>
<mml:math display="block">
<mml:mrow>
<mml:mi>o</mml:mi>
<mml:mrow>
<mml:mo>(</mml:mo>
<mml:mi>t</mml:mi>
<mml:mo>)</mml:mo></mml:mrow>
<mml:mo>=</mml:mo>
<mml:msub>
<mml:mrow>
<mml:mi>K</mml:mi></mml:mrow>
<mml:mi>p</mml:mi></mml:msub>
<mml:mi>e</mml:mi>
<mml:mrow>
<mml:mo>(</mml:mo>
<mml:mi>t</mml:mi>
<mml:mo>)</mml:mo></mml:mrow>
<mml:mo>+</mml:mo>
<mml:msub>
<mml:mrow>
<mml:mi>K</mml:mi></mml:mrow>
<mml:mi>i</mml:mi></mml:msub>
<mml:mrow>
<mml:msubsup>
<mml:mo>∫</mml:mo>
<mml:mn>0</mml:mn>
<mml:mi>t</mml:mi></mml:msubsup>
<mml:mrow>
<mml:mi>e</mml:mi>
<mml:mrow>
<mml:mo>(</mml:mo>
<mml:msup>
<mml:mi>t</mml:mi>
<mml:mo>′</mml:mo></mml:msup>
<mml:mo>)</mml:mo></mml:mrow>
<mml:msup>
<mml:mi mathvariant="italic">dt</mml:mi>
<mml:mo>′</mml:mo></mml:msup>
<mml:mo>+</mml:mo>
<mml:msub>
<mml:mrow>
<mml:mi>K</mml:mi></mml:mrow>
<mml:mi>d</mml:mi></mml:msub>
<mml:mfrac>
<mml:mrow>
<mml:mi>d</mml:mi>
<mml:mi>e</mml:mi>
<mml:mrow>
<mml:mo>(</mml:mo>
<mml:mi>t</mml:mi>
<mml:mo>)</mml:mo></mml:mrow></mml:mrow>
<mml:mrow>
<mml:mi>d</mml:mi>
<mml:mi>t</mml:mi></mml:mrow></mml:mfrac></mml:mrow></mml:mrow></mml:mrow></mml:math></disp-formula>
<disp-formula id="FD4">
<label>(4)</label>
<mml:math display="block">
<mml:mrow>
<mml:mi>e</mml:mi>
<mml:mrow>
<mml:mo>(</mml:mo>
<mml:mi>t</mml:mi>
<mml:mo>)</mml:mo></mml:mrow>
<mml:mo>=</mml:mo>
<mml:msubsup>
<mml:mrow>
<mml:mi>N</mml:mi></mml:mrow>
<mml:mi>g</mml:mi>
<mml:mi>o</mml:mi></mml:msubsup>
<mml:mo>−</mml:mo>
<mml:msub>
<mml:mrow>
<mml:mi>N</mml:mi></mml:mrow>
<mml:mi>g</mml:mi></mml:msub>
<mml:mrow>
<mml:mo>(</mml:mo>
<mml:mi>t</mml:mi>
<mml:mo>)</mml:mo></mml:mrow></mml:mrow></mml:math></disp-formula>where <italic>o</italic>(<italic>t</italic>) is controller output (exposure time) and <italic>e</italic>(<italic>t</italic>) the error value (difference between real -<italic>N<sub>g</sub></italic>(<italic>t</italic>)- and set -
<inline-formula>
<mml:math>
<mml:mrow>
<mml:msubsup>
<mml:mrow>
<mml:mi>N</mml:mi></mml:mrow>
<mml:mi>g</mml:mi>
<mml:mi>o</mml:mi></mml:msubsup></mml:mrow></mml:math></inline-formula>- intensity levels). <italic>K<sub>p</sub></italic>, <italic>K<sub>i</sub></italic> and <italic>K<sub>d</sub></italic>, are gain values for the PID action. These gain values can be adjusted by means of either empirical or specific methods [<xref ref-type="bibr" rid="b16-sensors-11-08412">16</xref>]. For implementation of the controller, there are a number of requirements to be considered:
<list list-type="simple">
<list-item>
<p>- The integral action must be set to a reference value.</p></list-item>
<list-item>
<p>- The time taken to calculate integration error must be limited.</p></list-item>
<list-item>
<p>- The integral term must not continue to increase once the maximum or the minimum output values have been reached.</p></list-item></list></p>
<p>The next step is to model the process. Usually, if we obviate the LinLog effect, the total number of electrons for every pixel in the image can be defined as <xref ref-type="disp-formula" rid="FD5">Equation (5)</xref>:
<disp-formula id="FD5">
<label>(5)</label>
<mml:math display="block">
<mml:mrow>
<mml:msub>
<mml:mrow>
<mml:mi>n</mml:mi></mml:mrow>
<mml:mi>e</mml:mi></mml:msub>
<mml:mo>=</mml:mo>
<mml:mfrac>
<mml:mrow>
<mml:msub>
<mml:mrow>
<mml:mi>P</mml:mi></mml:mrow>
<mml:mi>s</mml:mi></mml:msub>
<mml:msub>
<mml:mrow>
<mml:mi>A</mml:mi></mml:mrow>
<mml:mi>p</mml:mi></mml:msub>
<mml:msub>
<mml:mrow>
<mml:mi>T</mml:mi></mml:mrow>
<mml:mi>e</mml:mi></mml:msub></mml:mrow>
<mml:mrow>
<mml:mi>h</mml:mi>
<mml:mi>c</mml:mi></mml:mrow></mml:mfrac>
<mml:mi>λ</mml:mi>
<mml:mi>η</mml:mi>
<mml:mrow>
<mml:mo>(</mml:mo>
<mml:mi>λ</mml:mi>
<mml:mo>)</mml:mo></mml:mrow></mml:mrow></mml:math></disp-formula>where <italic>n<sub>e</sub></italic> is the number of electrons per pixel, <italic>A<sub>p</sub></italic> is the pixel area, <italic>T<sub>e</sub></italic> is the exposure time, <italic>P<sub>s</sub></italic> is the power radiated onto the pixel area, <italic>h</italic> is the Plank constant, <italic>c</italic> is the light speed and <italic>η</italic>(<italic>λ</italic>) is the quantum efficiency. The conversion of electrons to an output voltage and then to a quantification level in the A/D converter depends on sensor amplification, but it can be modelled by a constant, <italic>k</italic>, resulting in <italic>N<sub>c</sub></italic> <italic>= n<sub>e</sub>/k</italic>. As we can see, then, the only time-dependant variables are <italic>P<sub>s</sub></italic> and <italic>T<sub>e</sub></italic>, <italic>T<sub>e</sub></italic> being the output to be controlled <xref ref-type="disp-formula" rid="FD6">Equation (6)</xref>:
<disp-formula id="FD6">
<label>(6)</label>
<mml:math display="block">
<mml:mrow>
<mml:msub>
<mml:mrow>
<mml:mi>N</mml:mi></mml:mrow>
<mml:mi>c</mml:mi></mml:msub>
<mml:mrow>
<mml:mo>(</mml:mo>
<mml:mi>t</mml:mi>
<mml:mo>)</mml:mo></mml:mrow>
<mml:mo>=</mml:mo>
<mml:mi>C</mml:mi>
<mml:msub>
<mml:mrow>
<mml:mi>P</mml:mi></mml:mrow>
<mml:mi>s</mml:mi></mml:msub>
<mml:mrow>
<mml:mo>(</mml:mo>
<mml:mi>t</mml:mi>
<mml:mo>)</mml:mo></mml:mrow>
<mml:msub>
<mml:mrow>
<mml:mi>T</mml:mi></mml:mrow>
<mml:mi>e</mml:mi></mml:msub>
<mml:mrow>
<mml:mo>(</mml:mo>
<mml:mi>t</mml:mi>
<mml:mo>)</mml:mo></mml:mrow></mml:mrow></mml:math></disp-formula></p>
<p>The gain of the process can thus be defined as <italic>CP<sub>s</sub></italic>(<italic>t</italic>) (where <italic>C</italic> represents the constants of <xref ref-type="disp-formula" rid="FD5">Equation (5)</xref>. PID parameters <italic>K<sub>p</sub></italic>, <italic>K<sub>i</sub></italic>, and <italic>K<sub>d</sub></italic> are functions of this gain [<xref ref-type="bibr" rid="b10-sensors-11-08412">10</xref>], so temporal variation of them is related to gain variation. We can use <xref ref-type="disp-formula" rid="FD7">Equation (7)</xref> to estimate the gain variation every time the system feeds back, <italic>τ</italic> being the feedback period. From now on, to simplify following <xref ref-type="disp-formula" rid="FD7">Equations (7)</xref>, <xref ref-type="disp-formula" rid="FD8">(8)</xref> and <xref ref-type="disp-formula" rid="FD9">(9)</xref> we will use <italic>G</italic>(<italic>t</italic>) for <italic>CPs</italic>(<italic>t</italic>):
<disp-formula id="FD7">
<label>(7)</label>
<mml:math display="block">
<mml:mrow>
<mml:msub>
<mml:mrow>
<mml:mo>Δ</mml:mo></mml:mrow>
<mml:mi>t</mml:mi></mml:msub>
<mml:mi>G</mml:mi>
<mml:mrow>
<mml:mo>(</mml:mo>
<mml:mi>t</mml:mi>
<mml:mo>)</mml:mo></mml:mrow>
<mml:mo>=</mml:mo>
<mml:mi>G</mml:mi>
<mml:mrow>
<mml:mo>(</mml:mo>
<mml:mi>t</mml:mi>
<mml:mo>)</mml:mo></mml:mrow>
<mml:mo>−</mml:mo>
<mml:mi>G</mml:mi>
<mml:mrow>
<mml:mo>(</mml:mo>
<mml:mrow>
<mml:mi>t</mml:mi>
<mml:mo>−</mml:mo>
<mml:mi>τ</mml:mi></mml:mrow>
<mml:mo>)</mml:mo></mml:mrow>
<mml:mo>=</mml:mo>
<mml:mfrac>
<mml:mrow>
<mml:msub>
<mml:mrow>
<mml:mi>N</mml:mi></mml:mrow>
<mml:mi>c</mml:mi></mml:msub>
<mml:mrow>
<mml:mo>(</mml:mo>
<mml:mi>t</mml:mi>
<mml:mo>)</mml:mo></mml:mrow></mml:mrow>
<mml:mrow>
<mml:msub>
<mml:mrow>
<mml:mi>T</mml:mi></mml:mrow>
<mml:mi>e</mml:mi></mml:msub>
<mml:mrow>
<mml:mo>(</mml:mo>
<mml:mi>t</mml:mi>
<mml:mo>)</mml:mo></mml:mrow></mml:mrow></mml:mfrac>
<mml:mo>−</mml:mo>
<mml:mfrac>
<mml:mrow>
<mml:msub>
<mml:mrow>
<mml:mi>N</mml:mi></mml:mrow>
<mml:mi>c</mml:mi></mml:msub>
<mml:mrow>
<mml:mo>(</mml:mo>
<mml:mrow>
<mml:mi>t</mml:mi>
<mml:mo>−</mml:mo>
<mml:mi>τ</mml:mi></mml:mrow>
<mml:mo>)</mml:mo></mml:mrow></mml:mrow>
<mml:mrow>
<mml:msub>
<mml:mrow>
<mml:mi>T</mml:mi></mml:mrow>
<mml:mi>e</mml:mi></mml:msub>
<mml:mrow>
<mml:mo>(</mml:mo>
<mml:mrow>
<mml:mi>t</mml:mi>
<mml:mo>−</mml:mo>
<mml:mi>τ</mml:mi></mml:mrow>
<mml:mo>)</mml:mo></mml:mrow></mml:mrow></mml:mfrac></mml:mrow></mml:math></disp-formula></p>
<p>In time <italic>t</italic> we use <italic>G</italic>(<italic>t-τ</italic>) to calculate PID parameters, since <italic>G</italic>(<italic>t</italic>) cannot be calculated until <italic>T<sub>e</sub></italic>(<italic>t</italic>) is known. To calculate <italic>G</italic>(<italic>t</italic>) we use <italic>N<sub>c</sub></italic>(<italic>t-τ</italic>), <italic>N<sub>c</sub></italic>(<italic>t-2τ</italic>), <italic>T<sub>e</sub></italic>(<italic>t-τ</italic>) and <italic>T<sub>e</sub></italic>(<italic>t-2τ</italic>), justified by <xref ref-type="disp-formula" rid="FD8">Equation (8)</xref>:
<disp-formula id="FD8">
<label>(8)</label>
<mml:math display="block">
<mml:mrow>
<mml:mi>τ</mml:mi>
<mml:mo>→</mml:mo>
<mml:mn>0</mml:mn>
<mml:mo>⇒</mml:mo>
<mml:msub>
<mml:mrow>
<mml:mo>Δ</mml:mo></mml:mrow>
<mml:mi>t</mml:mi></mml:msub>
<mml:mi>G</mml:mi>
<mml:mrow>
<mml:mo>(</mml:mo>
<mml:mrow>
<mml:mi>t</mml:mi>
<mml:mo>−</mml:mo>
<mml:mi>τ</mml:mi></mml:mrow>
<mml:mo>)</mml:mo></mml:mrow>
<mml:mo>≈</mml:mo>
<mml:msub>
<mml:mrow>
<mml:mo>Δ</mml:mo></mml:mrow>
<mml:mi>t</mml:mi></mml:msub>
<mml:mi>G</mml:mi>
<mml:mrow>
<mml:mo>(</mml:mo>
<mml:mi>t</mml:mi>
<mml:mo>)</mml:mo></mml:mrow></mml:mrow></mml:math></disp-formula></p>
<p>Only parameters <italic>K<sub>p</sub></italic> and <italic>K<sub>i</sub></italic> are updated, as shown in <xref ref-type="disp-formula" rid="FD9">Equation (9)</xref>, where <italic>α</italic>, <italic>β</italic>, <italic>M</italic> and <italic>l</italic> are parameters to be fixed by the designer:
<disp-formula>
<mml:math display="block">
<mml:mrow>
<mml:msub>
<mml:mrow>
<mml:mo>Δ</mml:mo></mml:mrow>
<mml:mi>t</mml:mi></mml:msub>
<mml:msub>
<mml:mrow>
<mml:mi>K</mml:mi></mml:mrow>
<mml:mi>p</mml:mi></mml:msub>
<mml:mo>=</mml:mo>
<mml:mrow>
<mml:mo>{</mml:mo>
<mml:mrow>
<mml:mtable>
<mml:mtr>
<mml:mtd>
<mml:mrow>
<mml:mi>α</mml:mi>
<mml:msub>
<mml:mrow>
<mml:mo>Δ</mml:mo></mml:mrow>
<mml:mi>t</mml:mi></mml:msub>
<mml:mi>G</mml:mi></mml:mrow></mml:mtd>
<mml:mtd>
<mml:mrow>
<mml:mtext>if</mml:mtext>
<mml:msub>
<mml:mrow>
<mml:mo>Δ</mml:mo></mml:mrow>
<mml:mi>t</mml:mi></mml:msub>
<mml:mi>G</mml:mi>
<mml:mo>∈</mml:mo>
<mml:mrow>
<mml:mo>[</mml:mo>
<mml:mrow>
<mml:mo>−</mml:mo>
<mml:mi>l</mml:mi>
<mml:mo>,</mml:mo>
<mml:mi>l</mml:mi></mml:mrow>
<mml:mo>]</mml:mo></mml:mrow></mml:mrow></mml:mtd></mml:mtr>
<mml:mtr>
<mml:mtd>
<mml:mn>0</mml:mn></mml:mtd>
<mml:mtd>
<mml:mrow>
<mml:mtext>otherwise</mml:mtext></mml:mrow></mml:mtd></mml:mtr></mml:mtable></mml:mrow></mml:mrow></mml:mrow></mml:math></disp-formula>
<disp-formula id="FD9">
<label>(9)</label>
<mml:math display="block">
<mml:mrow>
<mml:msub>
<mml:mrow>
<mml:mo>Δ</mml:mo></mml:mrow>
<mml:mi>t</mml:mi></mml:msub>
<mml:msub>
<mml:mrow>
<mml:mi>K</mml:mi></mml:mrow>
<mml:mi>i</mml:mi></mml:msub>
<mml:mo>=</mml:mo>
<mml:mrow>
<mml:mo>{</mml:mo>
<mml:mrow>
<mml:mtable>
<mml:mtr>
<mml:mtd>
<mml:mrow>
<mml:mi>β</mml:mi>
<mml:msub>
<mml:mrow>
<mml:mo>Δ</mml:mo></mml:mrow>
<mml:mi>t</mml:mi></mml:msub>
<mml:mi>G</mml:mi></mml:mrow></mml:mtd>
<mml:mtd>
<mml:mrow>
<mml:mtext>if</mml:mtext>
<mml:msub>
<mml:mrow>
<mml:mo>Δ</mml:mo></mml:mrow>
<mml:mi>t</mml:mi></mml:msub>
<mml:mi>G</mml:mi>
<mml:mo>∈</mml:mo>
<mml:mo stretchy="false">(</mml:mo>
<mml:mo stretchy="false">[</mml:mo>
<mml:mo>−</mml:mo>
<mml:mi>M</mml:mi>
<mml:mo>,</mml:mo>
<mml:mo>−</mml:mo>
<mml:mi>l</mml:mi>
<mml:mo stretchy="false">)</mml:mo>
<mml:mo>∪</mml:mo>
<mml:mo stretchy="false">(</mml:mo>
<mml:mi>l</mml:mi>
<mml:mo>,</mml:mo>
<mml:mi>M</mml:mi>
<mml:mo stretchy="false">]</mml:mo>
<mml:mo stretchy="false">)</mml:mo></mml:mrow></mml:mtd></mml:mtr>
<mml:mtr>
<mml:mtd>
<mml:mrow>
<mml:mtext>sgn</mml:mtext>
<mml:mrow>
<mml:mo>(</mml:mo>
<mml:mrow>
<mml:msub>
<mml:mrow>
<mml:mo>Δ</mml:mo></mml:mrow>
<mml:mi>t</mml:mi></mml:msub>
<mml:mi>G</mml:mi>
<mml:mo>)</mml:mo>
<mml:mo>⋅</mml:mo>
<mml:mi>β</mml:mi>
<mml:mi mathvariant="normal">M</mml:mi></mml:mrow></mml:mrow></mml:mrow></mml:mtd>
<mml:mtd>
<mml:mrow>
<mml:mtext>if</mml:mtext>
<mml:msub>
<mml:mrow>
<mml:mo>Δ</mml:mo></mml:mrow>
<mml:mi>t</mml:mi></mml:msub>
<mml:mi>G</mml:mi>
<mml:mo>∈</mml:mo>
<mml:mo stretchy="false">(</mml:mo>
<mml:mo stretchy="false">(</mml:mo>
<mml:mo>−</mml:mo>
<mml:mo>∞</mml:mo>
<mml:mo>,</mml:mo>
<mml:mo>−</mml:mo>
<mml:mi>M</mml:mi>
<mml:mo stretchy="false">)</mml:mo>
<mml:mo>∪</mml:mo>
<mml:mo stretchy="false">(</mml:mo>
<mml:mi>M</mml:mi>
<mml:mo>,</mml:mo>
<mml:mo>∞</mml:mo>
<mml:mo stretchy="false">)</mml:mo>
<mml:mo stretchy="false">)</mml:mo></mml:mrow></mml:mtd></mml:mtr>
<mml:mtr>
<mml:mtd>
<mml:mn>0</mml:mn></mml:mtd>
<mml:mtd>
<mml:mrow>
<mml:mtext>otherwise</mml:mtext></mml:mrow></mml:mtd></mml:mtr></mml:mtable></mml:mrow></mml:mrow></mml:mrow></mml:math></disp-formula></p>
<p><xref ref-type="fig" rid="f6-sensors-11-08412">Figure 6(a)</xref> shows the response of the proposed APID controller—“*”, blue- <italic>versus</italic> other controllers mentioned in the references: Proportional-Integral (PI) [<xref ref-type="bibr" rid="b17-sensors-11-08412">17</xref>,<xref ref-type="bibr" rid="b18-sensors-11-08412">18</xref>]—“o” red- and a controller designated <italic>Incremental</italic>, based on increments that are proportional to the error (“-” green) [<xref ref-type="bibr" rid="b19-sensors-11-08412">19</xref>]. In order to compare the responses, the PI and APID controllers were configured with the same constants (<italic>K<sub>p</sub></italic> <italic>= 0.01</italic>, <italic>k<sub>i</sub></italic> <italic>= 0.4</italic> and <italic>K<sub>d</sub></italic> <italic>= 0</italic>) and the parameters of the <italic>Incremental</italic> controller were adjusted to achieve the best combination of speed and stability. Even so, unwanted oscillations may appear and this has proven to be the slowest of the three controllers. During the first frames the PI and APID controllers showed the same response because they had the same initial configuration.</p>
<p><xref ref-type="fig" rid="f6-sensors-11-08412">Figure 6(b)</xref> shows the performance details of the controllers <italic>versus</italic> a decrease of the process gain <italic>ΔG =</italic> −<italic>1</italic>. The APID controller increases its internal gain, producing faster performance (<italic>l = 0.1</italic>, <italic>M = 0.6</italic>, <italic>α = 0.01</italic>, <italic>β = 0.1</italic>).</p>
<p><xref ref-type="fig" rid="f6-sensors-11-08412">Figure 6(c)</xref> shows the performance details of the controllers <italic>versus</italic> an increase of the process gain <italic>ΔG = 3</italic>. The APID controller reduces its internal gain to prevent overshoot and oscillations and keeps speed. To the contrary, the PI controller is unable to prevent overshoot. <xref ref-type="table" rid="t1-sensors-11-08412">Table 1</xref> shows measurements for time response, overshoot and oscillation of controller responses shown in <xref ref-type="fig" rid="f6-sensors-11-08412">Figure 6</xref>.</p></sec>
<sec>
<label>4.</label>
<title>Saturation Control</title>
<p>We can detect image saturation when saturation 
<inline-formula>
<mml:math>
<mml:mrow>
<mml:msubsup>
<mml:mrow>
<mml:mi>N</mml:mi></mml:mrow>
<mml:mi>S</mml:mi>
<mml:mi>B</mml:mi></mml:msubsup></mml:mrow></mml:math></inline-formula> width (see <xref ref-type="disp-formula" rid="FD10">Equation (10)</xref>) reaches a given value. To reduce saturation we increase the voltage values that control the LinLog compression effect:
<disp-formula id="FD10">
<label>(10)</label>
<mml:math display="block">
<mml:mrow>
<mml:msubsup>
<mml:mrow>
<mml:mi>N</mml:mi></mml:mrow>
<mml:mi>S</mml:mi>
<mml:mi>B</mml:mi></mml:msubsup>
<mml:mo>=</mml:mo>
<mml:mfrac>
<mml:mrow>
<mml:mi>H</mml:mi>
<mml:mrow>
<mml:mo>(</mml:mo>
<mml:mrow>
<mml:mi>D</mml:mi>
<mml:mo>−</mml:mo>
<mml:mn>1</mml:mn></mml:mrow>
<mml:mo>)</mml:mo></mml:mrow></mml:mrow>
<mml:mi>N</mml:mi></mml:mfrac></mml:mrow></mml:math></disp-formula>where <italic>H</italic>(<italic>D</italic>−1) is the (<italic>D</italic>−1)-th entry for the image histogram, <italic>H</italic>.</p>
<p><xref ref-type="fig" rid="f7-sensors-11-08412">Figure 7</xref> shows the algorithm for saturation control. This measures the saturation width given by <xref ref-type="disp-formula" rid="FD10">Equation (10)</xref>. V<sub>1</sub> and V<sub>2</sub> are increased or reduced depending on whether the measured value is greater or smaller than the set value.</p>
<p><xref ref-type="fig" rid="f8-sensors-11-08412">Figure 8</xref> shows the effect of varying V<sub>1</sub> and V<sub>2</sub> values.</p></sec>
<sec>
<label>5.</label>
<title>Entropy Maximization</title>
<p>The concept of information entropy describes how much randomness (or uncertainty) there is in a signal or an image; in other words, how much information is provided by the signal or image. In terms of physics, the greater the information entropy of the image, the higher its quality will be [<xref ref-type="bibr" rid="b20-sensors-11-08412">20</xref>].</p>
<p>Shannon’s entropy (information entropy) [<xref ref-type="bibr" rid="b21-sensors-11-08412">21</xref>] is used to evaluate the quality of acquired images. Assuming that images have a negligible noise content, the more detail (or uncertainty) there is, the better the image will be (the entropy value for a completely homogenous image is 0). That is, without analyzing the image content, we assume (for two images obtained from an invariant scene) that the richer the information, the greater will be the entropy of the image.</p>
<p>The response curves, as shown in <xref ref-type="fig" rid="f9-sensors-11-08412">Figure 9</xref>, cause a loss of resolution in the bright areas of the image. Moreover, although the algorithm presented in Section 4 prevents saturation it can reduce the contrast in dark areas of the image. To deal with this problem, we have developed an algorithm (see <xref ref-type="fig" rid="f10-sensors-11-08412">Figure 10</xref>) that maximizes the entropy (<xref ref-type="disp-formula" rid="FD11">Equation (11)</xref>) of the image.</p>
<p>For this purpose we adjust T<sub>1</sub> (<xref ref-type="fig" rid="f11-sensors-11-08412">Figure 11</xref>) to produce light linearization for the high irradiance response curve. To reduce the complexity of the algorithm, T<sub>2</sub> is set to a maximum and remains constant:
<disp-formula id="FD11">
<label>(11)</label>
<mml:math display="block">
<mml:mrow>
<mml:mi>E</mml:mi>
<mml:mrow>
<mml:mo>(</mml:mo>
<mml:mi>X</mml:mi>
<mml:mo>)</mml:mo></mml:mrow>
<mml:mo>=</mml:mo>
<mml:mrow>
<mml:mo>{</mml:mo>
<mml:mrow>
<mml:mtable>
<mml:mtr>
<mml:mtd>
<mml:mrow>
<mml:mo>−</mml:mo>
<mml:munderover>
<mml:mo>∑</mml:mo>
<mml:mrow>
<mml:mi>i</mml:mi>
<mml:mo>=</mml:mo>
<mml:mn>1</mml:mn></mml:mrow>
<mml:mi>D</mml:mi></mml:munderover>
<mml:mrow>
<mml:mi>p</mml:mi>
<mml:mrow>
<mml:mo>(</mml:mo>
<mml:mrow>
<mml:msub>
<mml:mrow>
<mml:mi>x</mml:mi></mml:mrow>
<mml:mi>i</mml:mi></mml:msub></mml:mrow>
<mml:mo>)</mml:mo></mml:mrow></mml:mrow>
<mml:msub>
<mml:mrow>
<mml:mrow>
<mml:mtext>log</mml:mtext></mml:mrow></mml:mrow>
<mml:mn>2</mml:mn></mml:msub>
<mml:mo> </mml:mo>
<mml:mi>p</mml:mi>
<mml:mrow>
<mml:mo>(</mml:mo>
<mml:mrow>
<mml:msub>
<mml:mrow>
<mml:mi>x</mml:mi></mml:mrow>
<mml:mi>i</mml:mi></mml:msub></mml:mrow>
<mml:mo>)</mml:mo></mml:mrow></mml:mrow></mml:mtd>
<mml:mtd>
<mml:mrow>
<mml:mi>p</mml:mi>
<mml:mrow>
<mml:mo>(</mml:mo>
<mml:mi>x</mml:mi>
<mml:mo>)</mml:mo></mml:mrow>
<mml:mo>≠</mml:mo>
<mml:mn>0</mml:mn></mml:mrow></mml:mtd></mml:mtr>
<mml:mtr>
<mml:mtd>
<mml:mn>0</mml:mn></mml:mtd>
<mml:mtd>
<mml:mrow>
<mml:mi>p</mml:mi>
<mml:mrow>
<mml:mo>(</mml:mo>
<mml:mi>x</mml:mi>
<mml:mo>)</mml:mo></mml:mrow>
<mml:mo>=</mml:mo>
<mml:mn>0</mml:mn></mml:mrow></mml:mtd></mml:mtr></mml:mtable></mml:mrow></mml:mrow></mml:mrow></mml:math></disp-formula>where <italic>E</italic>(<italic>X</italic>) is the entropy of the image <italic>X</italic> and <italic>p</italic>(<italic>x<sub>i</sub></italic>) is the probability mass function of the grey level <italic>x<sub>i</sub></italic>. The entropy is a measure of the information contained in the image. In this paper, we assume that an image of a scene has been taken with optimum sensor configuration when its maximum entropy has been reached.</p>
<p>The main difficulty in developing an algorithm for entropy maximization [<xref ref-type="bibr" rid="b22-sensors-11-08412">22</xref>] lies in the fact that it is not possible to fix a target entropy <italic>a priori</italic>, since this value depends on the scene. As shown in <xref ref-type="fig" rid="f10-sensors-11-08412">Figure 10</xref>, the algorithm is local maximizer-like [<xref ref-type="bibr" rid="b23-sensors-11-08412">23</xref>] and has desirable properties for our purpose. The most desirable property in this case is robustness; the control method based on the conjugated gradient ensures an asymptotic tendency toward the nearest local maximum with δ accuracy, and furthermore is an easy method to implement. For this reason it has already been used to control parameters of a camera sensor [<xref ref-type="bibr" rid="b24-sensors-11-08412">24</xref>]. In other cases, non-adaptive PI controllers have been used [<xref ref-type="bibr" rid="b17-sensors-11-08412">17</xref>,<xref ref-type="bibr" rid="b18-sensors-11-08412">18</xref>], but they are not robust in non-linear systems. The second-order Taylor polynomial expansions of the gradient method (Newton, Levenberg-Marquard, <italic>etc.</italic>) [<xref ref-type="bibr" rid="b25-sensors-11-08412">25</xref>] present a higher convergence speed but are more prone to instabilities [<xref ref-type="bibr" rid="b26-sensors-11-08412">26</xref>]. When the scene changes, the gradient direction may also change and, in a first step, the algorithm will get the maximization direction wrong, but this will be corrected in the next step. Therefore, the algorithm’s performance is robust if we assume that scene variation is slower than the period between algorithm steps.</p>
<p>The execution of the algorithm will be stopped when a minimum variation in entropy, δ, is reached. To avoid undesired oscillations of image contrast γ needs to be small. Even so, the algorithm developed here shows a quick response when working in continuous grabbing mode. We can see how V<sub>1</sub>, V<sub>2</sub> and T<sub>1</sub> are adjusted (<xref ref-type="fig" rid="f12-sensors-11-08412">Figure 12</xref>) and the improvement provided by the algorithm developed (<xref ref-type="fig" rid="f13-sensors-11-08412">Figure 13</xref>).</p></sec>
<sec sec-type="results|discussion">
<label>6.</label>
<title>Results and Discussion</title>
<p>The proposed method comprises three algorithms to control the sensor response: the algorithm that controls exposure time is executed simultaneously with the other two—the algorithm that controls image saturation (adjusts V<sub>1</sub> and V<sub>2</sub>) and the algorithm that maximizes the image entropy (adjusts T<sub>1</sub>); these last two algorithms are executed consecutively. Hence, the total time for the adjustment process will be the maximum of: (1) exposure adjustment time and (2) the sum of the times of the two algorithms for controlling the LinLog parameters. The time exposure controller takes less than 10 frames to respond to the step inputs (<xref ref-type="fig" rid="f6-sensors-11-08412">Figure 6</xref>) with the sensor running at 27 fps, which makes it suitable for use in real-time outdoor vision (<xref ref-type="fig" rid="f15-sensors-11-08412">Figure 15</xref>).</p>
<p>To gauge the performance of the image saturation control and the entropy maximization algorithms, an experiment has been designed to determine both the response speed and the resulting image quality. For this purpose:</p>
<p>(a) The sensor response has been modelled <italic>versus</italic> the irradiance, by approximating it to the curves provided by the manufacturer (<xref ref-type="fig" rid="f9-sensors-11-08412">Figures 9</xref> and <xref ref-type="fig" rid="f11-sensors-11-08412">11</xref>), as seen in <xref ref-type="disp-formula" rid="FD12">Equations (12)</xref> and <xref ref-type="disp-formula" rid="FD13">(13)</xref>:
<disp-formula id="FD12">
<label>(12)</label>
<mml:math display="block">
<mml:mrow>
<mml:mi>N</mml:mi>
<mml:mi>c</mml:mi>
<mml:mo>=</mml:mo>
<mml:mrow>
<mml:mo>{</mml:mo>
<mml:mrow>
<mml:mtable>
<mml:mtr>
<mml:mtd>
<mml:mrow>
<mml:msup>
<mml:mrow>
<mml:mi>C</mml:mi></mml:mrow>
<mml:mi>l</mml:mi></mml:msup>
<mml:mi>I</mml:mi></mml:mrow></mml:mtd>
<mml:mtd>
<mml:mrow>
<mml:mi>I</mml:mi>
<mml:mo>&lt;</mml:mo>
<mml:msub>
<mml:mrow>
<mml:mi>I</mml:mi></mml:mrow>
<mml:mi>V</mml:mi></mml:msub></mml:mrow></mml:mtd></mml:mtr>
<mml:mtr>
<mml:mtd>
<mml:mrow>
<mml:mtext>min</mml:mtext>
<mml:mrow>
<mml:mo>{</mml:mo>
<mml:mrow>
<mml:msup>
<mml:mrow>
<mml:mi>C</mml:mi></mml:mrow>
<mml:mi>l</mml:mi></mml:msup>
<mml:mi>I</mml:mi>
<mml:mo>,</mml:mo>
<mml:msubsup>
<mml:mrow>
<mml:mi>C</mml:mi></mml:mrow>
<mml:mn>1</mml:mn>
<mml:mi>g</mml:mi></mml:msubsup>
<mml:mo>+</mml:mo>
<mml:msubsup>
<mml:mrow>
<mml:mi>C</mml:mi></mml:mrow>
<mml:mn>2</mml:mn>
<mml:mi>g</mml:mi></mml:msubsup>
<mml:mo> </mml:mo>
<mml:msub>
<mml:mrow>
<mml:mrow>
<mml:mtext>log</mml:mtext></mml:mrow></mml:mrow>
<mml:mrow>
<mml:mn>10</mml:mn></mml:mrow></mml:msub>
<mml:mrow>
<mml:mo>(</mml:mo>
<mml:mi>I</mml:mi>
<mml:mo>)</mml:mo></mml:mrow>
<mml:mo>,</mml:mo>
<mml:mi mathvariant="normal">D</mml:mi></mml:mrow>
<mml:mo>}</mml:mo></mml:mrow></mml:mrow></mml:mtd>
<mml:mtd>
<mml:mrow>
<mml:mtext>otherwise</mml:mtext></mml:mrow></mml:mtd></mml:mtr></mml:mtable></mml:mrow></mml:mrow></mml:mrow></mml:math></disp-formula>where <italic>N<sub>c</sub></italic> is the grey (unitless) output level for each pixel and <italic>I</italic> is the effective irradiance on the pixel (we assume <italic>I = I<sub>0</sub></italic> <italic>− I<sub>r</sub></italic>; <italic>I<sub>r</sub></italic> is the real irradiance and <italic>I<sub>0</sub></italic> the minimum irradiance detectable by the sensor. <italic>I<sub>0</sub></italic> will depend on the configuration of the sensor exposure time parameter; in our experiment we assume a fixed exposure time and <italic>I<sub>0</sub></italic> <italic>= 0</italic>). The other values of the above mentioned expression depend on the configuration of the Lin-Log parameters of the sensor and were obtained by approximating the curves and data provided by Photonfocus in the <italic>User Manual</italic> of the camera used in the tests (MV1-D1312):
<disp-formula id="FD13">
<label>(13)</label>
<mml:math display="block">
<mml:mtable columnalign="left">
<mml:mtr>
<mml:mtd>
<mml:msubsup>
<mml:mrow>
<mml:mi>C</mml:mi></mml:mrow>
<mml:mn>2</mml:mn>
<mml:mi>g</mml:mi></mml:msubsup>
<mml:mo>=</mml:mo>
<mml:mfrac>
<mml:mrow>
<mml:mi>D</mml:mi>
<mml:mo>−</mml:mo>
<mml:msup>
<mml:mrow>
<mml:mi>C</mml:mi></mml:mrow>
<mml:mi>l</mml:mi></mml:msup>
<mml:msub>
<mml:mrow>
<mml:mi>I</mml:mi></mml:mrow>
<mml:mi>v</mml:mi></mml:msub></mml:mrow>
<mml:mrow>
<mml:msub>
<mml:mtext>log</mml:mtext>
<mml:mrow>
<mml:mn>10</mml:mn></mml:mrow></mml:msub>
<mml:mrow>
<mml:mo>(</mml:mo>
<mml:mrow>
<mml:msub>
<mml:mrow>
<mml:mi>I</mml:mi></mml:mrow>
<mml:mi>T</mml:mi></mml:msub></mml:mrow>
<mml:mo>)</mml:mo></mml:mrow>
<mml:mo>−</mml:mo>
<mml:msub>
<mml:mtext>log</mml:mtext>
<mml:mrow>
<mml:mn>10</mml:mn></mml:mrow></mml:msub>
<mml:mrow>
<mml:mo>(</mml:mo>
<mml:mrow>
<mml:msub>
<mml:mrow>
<mml:mi>I</mml:mi></mml:mrow>
<mml:mi>v</mml:mi></mml:msub></mml:mrow>
<mml:mo>)</mml:mo></mml:mrow></mml:mrow></mml:mfrac>
<mml:mo>,</mml:mo>
<mml:mo> </mml:mo>
<mml:mo> </mml:mo>
<mml:msubsup>
<mml:mrow>
<mml:mi>C</mml:mi></mml:mrow>
<mml:mn>1</mml:mn>
<mml:mi>g</mml:mi></mml:msubsup>
<mml:mo>=</mml:mo>
<mml:mi>D</mml:mi>
<mml:mo>−</mml:mo>
<mml:msubsup>
<mml:mrow>
<mml:mi>C</mml:mi></mml:mrow>
<mml:mn>2</mml:mn>
<mml:mi>g</mml:mi></mml:msubsup>
<mml:mo> </mml:mo>
<mml:msub>
<mml:mrow>
<mml:mtext>log</mml:mtext></mml:mrow>
<mml:mrow>
<mml:mn>10</mml:mn></mml:mrow></mml:msub>
<mml:msub>
<mml:mrow>
<mml:mrow>
<mml:mo>(</mml:mo>
<mml:mrow>
<mml:msub>
<mml:mrow>
<mml:mi>I</mml:mi></mml:mrow>
<mml:mi>T</mml:mi></mml:msub></mml:mrow>
<mml:mo>)</mml:mo></mml:mrow></mml:mrow>
<mml:mrow>
<mml:mo>,</mml:mo>
<mml:mo> </mml:mo>
<mml:mo> </mml:mo></mml:mrow></mml:msub>
<mml:msub>
<mml:mrow>
<mml:mi>I</mml:mi></mml:mrow>
<mml:mi>T</mml:mi></mml:msub>
<mml:mo>=</mml:mo>
<mml:mrow>
<mml:mo>(</mml:mo>
<mml:mrow>
<mml:msubsup>
<mml:mrow>
<mml:mi>I</mml:mi></mml:mrow>
<mml:mi>h</mml:mi>
<mml:mn>1</mml:mn></mml:msubsup>
<mml:mo>−</mml:mo>
<mml:msubsup>
<mml:mrow>
<mml:mi>I</mml:mi></mml:mrow>
<mml:mi>h</mml:mi>
<mml:mn>2</mml:mn></mml:msubsup></mml:mrow>
<mml:mo>)</mml:mo></mml:mrow>
<mml:mi>T</mml:mi>
<mml:mo>+</mml:mo>
<mml:msubsup>
<mml:mrow>
<mml:mi>I</mml:mi></mml:mrow>
<mml:mi>h</mml:mi>
<mml:mn>2</mml:mn></mml:msubsup></mml:mtd></mml:mtr>
<mml:mtr>
<mml:mtd>
<mml:mi> </mml:mi>
<mml:mi> </mml:mi>
<mml:mi> </mml:mi>
<mml:mi> </mml:mi>
<mml:mi> </mml:mi>
<mml:mi> </mml:mi>
<mml:mi> </mml:mi>
<mml:mi> </mml:mi>
<mml:mi> </mml:mi>
<mml:mi> </mml:mi>
<mml:mi> </mml:mi>
<mml:mi> </mml:mi>
<mml:mi> </mml:mi>
<mml:mi> </mml:mi>
<mml:mi> </mml:mi>
<mml:mi> </mml:mi>
<mml:mi> </mml:mi>
<mml:mi> </mml:mi>
<mml:mi> </mml:mi>
<mml:mi> </mml:mi>
<mml:mi> </mml:mi>
<mml:mi> </mml:mi>
<mml:mi> </mml:mi>
<mml:mi> </mml:mi>
<mml:mi> </mml:mi>
<mml:mi> </mml:mi>
<mml:mi> </mml:mi>
<mml:mi> </mml:mi>
<mml:mi> </mml:mi>
<mml:mi> </mml:mi>
<mml:mi> </mml:mi>
<mml:mi> </mml:mi>
<mml:mi> </mml:mi>
<mml:msub>
<mml:mrow>
<mml:mi>I</mml:mi></mml:mrow>
<mml:mi>v</mml:mi></mml:msub>
<mml:mo>=</mml:mo>
<mml:mfrac>
<mml:mrow>
<mml:mi>D</mml:mi>
<mml:mo>−</mml:mo>
<mml:msub>
<mml:mrow>
<mml:mi>C</mml:mi></mml:mrow>
<mml:mn>1</mml:mn></mml:msub>
<mml:msubsup>
<mml:mrow>
<mml:mi>I</mml:mi></mml:mrow>
<mml:mi>h</mml:mi>
<mml:mn>1</mml:mn></mml:msubsup></mml:mrow>
<mml:mrow>
<mml:msup>
<mml:mrow>
<mml:mi>C</mml:mi></mml:mrow>
<mml:mi>l</mml:mi></mml:msup>
<mml:mo>−</mml:mo>
<mml:msub>
<mml:mrow>
<mml:mi>C</mml:mi></mml:mrow>
<mml:mn>1</mml:mn></mml:msub></mml:mrow></mml:mfrac>
<mml:mo>,</mml:mo>
<mml:mo> </mml:mo>
<mml:mo> </mml:mo>
<mml:msubsup>
<mml:mrow>
<mml:mi>I</mml:mi></mml:mrow>
<mml:mi>h</mml:mi>
<mml:mn>1</mml:mn></mml:msubsup>
<mml:mo>=</mml:mo>
<mml:msup>
<mml:mrow>
<mml:mn>10</mml:mn></mml:mrow>
<mml:mrow>
<mml:mfrac>
<mml:mn>1</mml:mn>
<mml:mn>2</mml:mn></mml:mfrac>
<mml:mrow>
<mml:mo>(</mml:mo>
<mml:mrow>
<mml:mi>V</mml:mi>
<mml:mo>−</mml:mo>
<mml:mn>7</mml:mn></mml:mrow>
<mml:mo>)</mml:mo></mml:mrow></mml:mrow></mml:msup>
<mml:mo>,</mml:mo>
<mml:msubsup>
<mml:mrow>
<mml:mi>I</mml:mi></mml:mrow>
<mml:mi>h</mml:mi>
<mml:mn>2</mml:mn></mml:msubsup>
<mml:mo>=</mml:mo>
<mml:msup>
<mml:mrow>
<mml:mn>10</mml:mn></mml:mrow>
<mml:mrow>
<mml:mfrac>
<mml:mn>1</mml:mn>
<mml:mn>2</mml:mn></mml:mfrac>
<mml:mrow>
<mml:mo>(</mml:mo>
<mml:mrow>
<mml:mi>V</mml:mi>
<mml:mo>−</mml:mo>
<mml:mn>8</mml:mn></mml:mrow>
<mml:mo>)</mml:mo></mml:mrow></mml:mrow></mml:msup></mml:mtd></mml:mtr></mml:mtable></mml:math></disp-formula>where <italic>C<sup>l</sup></italic> = 2.55 m<sup>2</sup>/<italic>W</italic> and <italic>C</italic><sub>l</sub> = 10,911 m<sup>2</sup>/<italic>W</italic>. V is the parameter V<sub>1</sub>; it is assumed that V<sub>2</sub> = V<sub>1</sub> − 5, and T corresponds to the parameter T<sub>1</sub> (it is assumed that T<sub>2</sub> = 1). According to this model, the sensor has a dynamic range of 120 dB when configured in maximum compression mode (V = 19 and T = 1) and its response is linear when there is no compression (V = 14 and T = 0).</p>
<p>(b) Three synthetic scenes have been generated with patterns 
<inline-formula>
<mml:math>
<mml:mrow>
<mml:msubsup>
<mml:mrow>
<mml:mi>I</mml:mi></mml:mrow>
<mml:mi>p</mml:mi>
<mml:mi>i</mml:mi></mml:msubsup>
<mml:mrow>
<mml:mo>(</mml:mo>
<mml:mrow>
<mml:mi>x</mml:mi>
<mml:mo>,</mml:mo>
<mml:mi>y</mml:mi></mml:mrow>
<mml:mo>)</mml:mo></mml:mrow></mml:mrow></mml:math></inline-formula> with <italic>i</italic> ∈ [1,2,3] as illustrated in <xref ref-type="fig" rid="f14-sensors-11-08412">Figure 14</xref>. Each value of the pattern 
<inline-formula>
<mml:math>
<mml:mrow>
<mml:msubsup>
<mml:mrow>
<mml:mi>I</mml:mi></mml:mrow>
<mml:mi>p</mml:mi>
<mml:mi>i</mml:mi></mml:msubsup>
<mml:mrow>
<mml:mo>(</mml:mo>
<mml:mrow>
<mml:mi>x</mml:mi>
<mml:mo>,</mml:mo>
<mml:mi>y</mml:mi></mml:mrow>
<mml:mo>)</mml:mo></mml:mrow></mml:mrow></mml:math></inline-formula> represents the irradiance at the point (x, y) (<xref ref-type="table" rid="t2-sensors-11-08412">Table 2</xref>). The dynamic range of each scene is shown in <xref ref-type="table" rid="t2-sensors-11-08412">Table 2</xref>.</p>
<p>The characteristic entropy value has been calculated for each one of the scenes (<xref ref-type="table" rid="t3-sensors-11-08412">Table 3</xref>). The entropy value (defined as pattern entropy) has been calculated using <xref ref-type="disp-formula" rid="FD11">Equation (11)</xref>. Pattern data are expressed in double precision floating point format.</p>
<p>(c) The synthetic scenes have been consecutively processed with the camera model to evaluate the temporal performance of the system both in the start-up and when responding to the scene changes. <xref ref-type="fig" rid="f15-sensors-11-08412">Figure 15</xref> shows the time evolution of the LinLog parameters produced by the saturation control and entropy maximization algorithms.</p>
<p>To use a sensor’s model together with synthetic scenes allowed defining a metric to quantify the retained entropy, which resulted on reliable yield evaluation, useful for further comparisons.</p>
<p><xref ref-type="fig" rid="f14-sensors-11-08412">Figure 14</xref> shows the synthetic scenes used to test the proposed method, together with images obtained when the scenes have been processed by the LinLog CMOS sensor’s model [<xref ref-type="disp-formula" rid="FD12">Equations (12</xref>,<xref ref-type="disp-formula" rid="FD13">13)</xref>]. <xref ref-type="fig" rid="f15-sensors-11-08412">Figure 15</xref> shows how the control method adjusts LinLog parameters as different scenes are presented to the sensor.</p>
<p><xref ref-type="table" rid="t3-sensors-11-08412">Table 3</xref> shows the numeric results of the experiment. Besides the response time, it shows the recovered entropy once the synthetic scenes are processed by: (1) a model of a typical linear CMOS sensor (DR of 60 dB)—adjusted so that <italic>I<sub>0</sub></italic> corresponds to grey level 0—and (b) the proposed LinLog model with its parameters adjusted using the proposed control method.</p>
<p>The pattern entropy values will be reduced during the digital image generation process. Hence, the pattern entropy percentage retained in the acquired image of the scene provides an objective measurement of the goodness of the sensor’s parameters control process. The higher the entropy of the acquired image, the better the control process is, as there is more scene information. As we can see in <xref ref-type="table" rid="t3-sensors-11-08412">Table 3</xref>, with the proposed method at least 67% of pattern entropy can be retained in the images.</p>
<p>Images (a) to (f) in <xref ref-type="fig" rid="f16-sensors-11-08412">Figure 16</xref> show how the proposed method performs over a very high dynamic range scene (the ceiling of our lab, with a powerful lighting source).</p>
<p><xref ref-type="fig" rid="f17-sensors-11-08412">Figure 17</xref> shows how exposure time was controlled by the APID controller for a period of almost two hours between 4:30 and 6:10 pm on a windy day with clouds crossing the camera field of view (producing illumination changes), to acquire images from the scene shown in <xref ref-type="fig" rid="f13-sensors-11-08412">Figure 13</xref>. Sunset lasts from 5:40 until 6:10 pm.</p></sec>
<sec sec-type="conclusions">
<label>7.</label>
<title>Conclusions</title>
<p>This paper presents a reliable method for optimizing LinLog CMOS sensor response and hence improving images acquired from high dynamic range scenes. Adaptation to environment conditions is automatic and very fast.</p>
<p>The implementation has been divided into three algorithms. The first makes it possible to control the exposure time by using an Adaptive PID (APID) controller; the second controls image saturation through appropriate compression of the response curve for brilliant scenes and the third provides entropy maximization by slightly linearizing the response curve for high scene irradiance.</p>
<p>The simplicity of the control algorithms used in this method makes the computational cost of the processing needed to calculate the image parameters (histogram-based descriptors) negligible; therefore the computational cost of implementing the presented method practically coincides with the cost of calculating the histogram. As <xref ref-type="table" rid="t3-sensors-11-08412">Table 3</xref> shows, the control takes up less than eight frames with high quality images.</p>
<p>The method proposed in this paper has been implemented using NI LabVIEW [<xref ref-type="bibr" rid="b27-sensors-11-08412">27</xref>], resulting in: (1) high-level hardware-independent development; (2) rapid prototyping due to the use of libraries (Real-Time, PID and FPGA libraries); and (3) rapid testing of the control application.</p>
<p>The hardware used to implement the system consisted of a Real-Time PowerPC Embedded Controller (cRIO-9022) and a reconfigurable chassis based on a Virtex-5 FPGA (cRIO-9114) from National Instruments. The chosen system permits deterministic control and real time execution of applications. The control system and the camera to be easily connected thanks to an Embedded PowerPC with GBit Ethernet and RS232 ports.</p></sec></body>
<back>
<ack>
<p>The work submitted here was carried out as part of the projects EXPLORE (TIN2009-08572) and SiLASVer (TRACE PET 2008-0131) funded by the Spanish National R&amp;D&amp;I Plan. It has also received funding from the Government of the Region of Murcia (Séneca Foundation).</p></ack>
<ref-list>
<title>References and Notes</title>
<ref id="b1-sensors-11-08412"><label>1.</label><citation citation-type="book"><person-group person-group-type="author"><name><surname>Reinhard</surname><given-names>E</given-names></name><name><surname>Ward</surname><given-names>G</given-names></name><name><surname>Pattanaik</surname><given-names>S</given-names></name><name><surname>Debevec</surname><given-names>P</given-names></name></person-group><source>High Dynamic Range Imaging: Acquisition, Display, and Image-Based Lighting</source><publisher-name>Elsevier/Morgan Kaufmann</publisher-name><publisher-loc>Amsterdam, The Netherlands</publisher-loc><year>2006</year><fpage>7</fpage><lpage>18</lpage></citation></ref>
<ref id="b2-sensors-11-08412"><label>2.</label><citation citation-type="confproc"><person-group person-group-type="author"><name><surname>Bandoh</surname><given-names>Y</given-names></name><name><surname>Qiu</surname><given-names>G</given-names></name><name><surname>Okuda</surname><given-names>M</given-names></name><name><surname>Daly</surname><given-names>S</given-names></name><name><surname>Aach</surname><given-names>T</given-names></name><name><surname>Au</surname><given-names>OC</given-names></name></person-group><article-title>Recent Advances in High Dynamic Range Imaging Technology</article-title><conf-name>Proceedings of the 17th IEEE International Conference on Image Processing, ICIP’10</conf-name><conf-loc>Hong Kong, China</conf-loc><conf-date>26–29 September 2010</conf-date><fpage>3125</fpage><lpage>3128</lpage></citation></ref>
<ref id="b3-sensors-11-08412"><label>3.</label><citation citation-type="journal"><person-group person-group-type="author"><name><surname>Llorca</surname><given-names>DF</given-names></name><name><surname>Sánchez</surname><given-names>S</given-names></name><name><surname>Ocaña</surname><given-names>M</given-names></name><name><surname>Sotelo</surname><given-names>MA</given-names></name></person-group><article-title>Vision-based traffic data collection sensor for automotive applications</article-title><source>Sensors</source><year>2010</year><volume>10</volume><fpage>860</fpage><lpage>875</lpage><pub-id pub-id-type="doi">10.3390/s100100860</pub-id><pub-id pub-id-type="pmid">22315572</pub-id></citation></ref>
<ref id="b4-sensors-11-08412"><label>4.</label><citation citation-type="journal"><person-group person-group-type="author"><name><surname>Foresti</surname><given-names>GL</given-names></name><name><surname>Micheloni</surname><given-names>C</given-names></name><name><surname>Piciarelli</surname><given-names>C</given-names></name><name><surname>Snidaro</surname><given-names>L</given-names></name></person-group><article-title>Review: Visual sensor technology for advanced surveillance systems: Historical view, technological aspects and research activities in Italy</article-title><source>Sensors</source><year>2009</year><volume>9</volume><fpage>2252</fpage><lpage>2270</lpage><pub-id pub-id-type="doi">10.3390/s90402252</pub-id><pub-id pub-id-type="pmid">22574011</pub-id></citation></ref>
<ref id="b5-sensors-11-08412"><label>5.</label><citation citation-type="journal"><person-group person-group-type="author"><name><surname>Navarro</surname><given-names>PJ</given-names></name><name><surname>Iborra</surname><given-names>A</given-names></name><name><surname>Fernández</surname><given-names>C</given-names></name><name><surname>Sánchez</surname><given-names>P</given-names></name><name><surname>Suardíaz</surname><given-names>J</given-names></name></person-group><article-title>A sensor system for detection of hull surface defects</article-title><source>Sensors</source><year>2010</year><volume>10</volume><fpage>7067</fpage><lpage>7081</lpage><pub-id pub-id-type="doi">10.3390/s100807067</pub-id><pub-id pub-id-type="pmid">22163590</pub-id></citation></ref>
<ref id="b6-sensors-11-08412"><label>6.</label><citation citation-type="journal"><person-group person-group-type="author"><name><surname>Battiato</surname><given-names>S</given-names></name><name><surname>Castorina</surname><given-names>A</given-names></name><name><surname>Mancuso</surname><given-names>M</given-names></name></person-group><article-title>High dynamic range imaging for digital still camera: An overview</article-title><source>J. Electron. Imag</source><year>2003</year><volume>12</volume><fpage>459</fpage><lpage>469</lpage><pub-id pub-id-type="doi">10.1117/1.1580829</pub-id></citation></ref>
<ref id="b7-sensors-11-08412"><label>7.</label><citation citation-type="book"><person-group person-group-type="author"><name><surname>Brauers</surname><given-names>J</given-names></name><name><surname>Schulte</surname><given-names>N</given-names></name><name><surname>Bell</surname><given-names>A</given-names></name><name><surname>Aach</surname><given-names>T</given-names></name></person-group><source>Multispectral High Dynamic Range Imaging</source><publisher-name>IS/&amp;T/SPIE Electronic Imaging</publisher-name><publisher-loc>San Jose, CA, USA</publisher-loc><year>2008</year><fpage>680704:1</fpage><lpage>680704:12</lpage></citation></ref>
<ref id="b8-sensors-11-08412"><label>8.</label><citation citation-type="other"><person-group person-group-type="author"><name><surname>Hazelwood</surname><given-names>M</given-names></name><name><surname>Hutton</surname><given-names>S</given-names></name><name><surname>Weatherup</surname><given-names>C</given-names></name></person-group><article-title>Smear Reduction in CCD Images</article-title><comment>US Patent 7,808,534, 2010</comment></citation></ref>
<ref id="b9-sensors-11-08412"><label>9.</label><citation citation-type="confproc"><person-group person-group-type="author"><name><surname>Burghartz</surname><given-names>JN</given-names></name><name><surname>Graf</surname><given-names>H</given-names></name><name><surname>Harendt</surname><given-names>G</given-names></name><name><surname>Klinger</surname><given-names>W</given-names></name><name><surname>Richter</surname><given-names>H</given-names></name><name><surname>Strobel</surname><given-names>M</given-names></name></person-group><article-title>HDR CMOS Imagers and Their Applications</article-title><conf-name>Proceedings of the 8th International Conference on Solid-State and Integrated Circuit Technology, ICSICT’06</conf-name><conf-loc>Shanghai, China</conf-loc><conf-date>22–26 October 2006</conf-date><fpage>528</fpage><lpage>531</lpage></citation></ref>
<ref id="b10-sensors-11-08412"><label>10.</label><citation citation-type="confproc"><person-group person-group-type="author"><name><surname>Nayar</surname><given-names>SK</given-names></name><name><surname>Mitsunaga</surname><given-names>T</given-names></name></person-group><article-title>High Dynamic Range Imaging: Spatially Varying Pixel Exposures</article-title><conf-name>Proceedings of the IEEE conference on Computer Vision and Pattern Recognition</conf-name><conf-loc>Hilton Head Island, SC, USA</conf-loc><conf-date>13–15 June 2000</conf-date><volume>1</volume><fpage>472</fpage><lpage>479</lpage></citation></ref>
<ref id="b11-sensors-11-08412"><label>11.</label><citation citation-type="journal"><person-group person-group-type="author"><name><surname>Bigas</surname><given-names>M</given-names></name><name><surname>Cabruja</surname><given-names>E</given-names></name><name><surname>Forest</surname><given-names>J</given-names></name><name><surname>Salvi</surname><given-names>J</given-names></name></person-group><article-title>Review of CMOS image sensors</article-title><source>Microelectron. J</source><year>2006</year><volume>37</volume><fpage>433</fpage><lpage>451</lpage><pub-id pub-id-type="doi">10.1016/j.mejo.2005.07.002</pub-id></citation></ref>
<ref id="b12-sensors-11-08412"><label>12.</label><citation citation-type="confproc"><person-group person-group-type="author"><name><surname>Dumont</surname><given-names>GA</given-names></name><name><surname>Huzmezan</surname><given-names>M</given-names></name></person-group><article-title>Concepts, methods and techniques in adaptive control</article-title><conf-name>Proceedings of the 2002 American Control Conference</conf-name><year>2002</year><fpage>1137</fpage><lpage>1150</lpage></citation></ref>
<ref id="b13-sensors-11-08412"><label>13.</label><citation citation-type="confproc"><person-group person-group-type="author"><name><surname>Bela</surname><given-names>L</given-names></name></person-group><source>Instrument Engineers’ Handbook: Process Control</source><publisher-name>Chilton Book Company</publisher-name><publisher-loc>Radnor, PA, USA</publisher-loc><year>1995</year><fpage>20</fpage><lpage>29</lpage></citation></ref>
<ref id="b14-sensors-11-08412"><label>14.</label><citation citation-type="confproc"><person-group person-group-type="author"><name><surname>Mohan</surname><given-names>M</given-names></name><name><surname>Sinha</surname><given-names>A</given-names></name></person-group><article-title>Mathematical Model of the Simplest Fuzzy PID Controller with Asymmetric Fuzzy Sets</article-title><conf-name>Proceedings of the 17th World Congress the International Federation of Automatic Control</conf-name><conf-loc>Seoul, Korea</conf-loc><conf-date>6–11 July 2008</conf-date><volume>7</volume><fpage>15399</fpage><lpage>15404</lpage></citation></ref>
<ref id="b15-sensors-11-08412"><label>15.</label><citation citation-type="confproc"><person-group person-group-type="author"><name><surname>Chaínho</surname><given-names>J</given-names></name><name><surname>Pereira</surname><given-names>P</given-names></name><name><surname>Rafael</surname><given-names>S</given-names></name><name><surname>Pires</surname><given-names>AJ</given-names></name></person-group><article-title>A Simple PID Controller with Adaptive Parameter in a dsPIC: A Case of Study</article-title><conf-name>Proceedings of the 9th Spanish-Portuguese Congress on Electrical Engineering</conf-name><conf-loc>Marbella, Spain</conf-loc><conf-date>30 June–2 July 2005</conf-date></citation></ref>
<ref id="b16-sensors-11-08412"><label>16.</label><citation citation-type="journal"><person-group person-group-type="author"><name><surname>Hang</surname><given-names>CC</given-names></name><name><surname>Astrom</surname><given-names>JK</given-names></name><name><surname>Wo</surname><given-names>WK</given-names></name></person-group><article-title>Refinements of the Ziegler-Nichols tuning formula</article-title><source>IEEE Proc. Control Theory Appl</source><year>1991</year><volume>138</volume><fpage>111</fpage><lpage>118</lpage><pub-id pub-id-type="doi">10.1049/ip-d.1991.0015</pub-id></citation></ref>
<ref id="b17-sensors-11-08412"><label>17.</label><citation citation-type="confproc"><person-group person-group-type="author"><name><surname>Navid</surname><given-names>N</given-names></name><name><surname>Roberts</surname><given-names>J</given-names></name></person-group><article-title>Automatic Camera Exposure Control</article-title><conf-name>Proceedings of the 2007 Australasian Conference on Robotics &amp; Automation</conf-name><conf-loc>Brisbane, Australia</conf-loc><conf-date>10–12 December 2007</conf-date></citation></ref>
<ref id="b18-sensors-11-08412"><label>18.</label><citation citation-type="confproc"><person-group person-group-type="author"><name><surname>Neves</surname><given-names>JA</given-names></name><name><surname>Cunha</surname><given-names>B</given-names></name><name><surname>Pinho</surname><given-names>A</given-names></name><name><surname>Pinheiro</surname><given-names>I</given-names></name></person-group><article-title>Autonomous Configuration of Parameters in Robotic Digital Cameras</article-title><conf-name>Proceedings of the 4th Iberian Conference on Pattern Recognition and Image Analysis, IbPRIA’09</conf-name><conf-loc>Póvoa de Varzim, Portugal</conf-loc><conf-date>10–12 June 2009</conf-date></citation></ref>
<ref id="b19-sensors-11-08412"><label>19.</label><citation citation-type="confproc"><person-group person-group-type="author"><name><surname>Nilsson</surname><given-names>M</given-names></name><name><surname>Weerasinghe</surname><given-names>C</given-names></name><name><surname>Lichman</surname><given-names>S</given-names></name><name><surname>Shi</surname><given-names>Y</given-names></name><name><surname>Kharitonenko</surname><given-names>I</given-names></name></person-group><article-title>Design and Implementation of a CMOS Sensor Based Video Camera Incorporating a Combined AWB/AEC Module</article-title><conf-name>Proceedings of 2003 IEEE International Conference on Acoustics, Speech, and Signal Processing, (ICASSP '03)</conf-name><conf-loc>Hong Kong, China</conf-loc><conf-date>6−10 April 2003</conf-date><volume>2</volume><fpage>477</fpage><lpage>480</lpage></citation></ref>
<ref id="b20-sensors-11-08412"><label>20.</label><citation citation-type="journal"><person-group person-group-type="author"><name><surname>Tsai</surname><given-names>DY</given-names></name><name><surname>Lee</surname><given-names>Y</given-names></name><name><surname>Matsuyama</surname><given-names>E</given-names></name></person-group><article-title>Information entropy measure for evaluation of image quality</article-title><source>J Digital Imaging</source><year>2008</year><volume>21</volume><fpage>338</fpage><lpage>347</lpage><pub-id pub-id-type="doi">10.1007/s10278-007-9044-5</pub-id></citation></ref>
<ref id="b21-sensors-11-08412"><label>21.</label><citation citation-type="book"><person-group person-group-type="author"><name><surname>Shannon</surname><given-names>CE</given-names></name><name><surname>Weaver</surname><given-names>W</given-names></name></person-group><source>The Mathematical Theory of Communication</source><publisher-name>University of Illinois Press</publisher-name><publisher-loc>Urbana, IL, USA</publisher-loc><year>1949</year></citation></ref>
<ref id="b22-sensors-11-08412"><label>22.</label><citation citation-type="book"><person-group person-group-type="author"><name><surname>Gray</surname><given-names>RM</given-names></name></person-group><source>Entropy and Information Theory</source><edition>2nd ed</edition><publisher-name>Springer-Verlag Inc</publisher-name><publisher-loc>New York, NY, USA</publisher-loc><year>2010</year><fpage>17</fpage><lpage>44</lpage></citation></ref>
<ref id="b23-sensors-11-08412"><label>23.</label><citation citation-type="book"><person-group person-group-type="author"><name><surname>Hendrix</surname><given-names>EMT</given-names></name><name><surname>Toth</surname><given-names>BG</given-names></name></person-group><source>Introduction to Nonlinear and Global Optimization</source><publisher-name>Springer</publisher-name><publisher-loc>Cambridge, UK</publisher-loc><year>2010</year></citation></ref>
<ref id="b24-sensors-11-08412"><label>24.</label><citation citation-type="confproc"><person-group person-group-type="author"><name><surname>Moneta</surname><given-names>CA</given-names></name><name><surname>de Natale</surname><given-names>FGB</given-names></name><name><surname>Vernazza</surname><given-names>G</given-names></name></person-group><article-title>Adaptive Control in Visual Sensing</article-title><conf-name>Proceedings of the IMACS International Symposium on Signal Processing, Robotics, and Neural Networks</conf-name><conf-loc>Lille, France</conf-loc><conf-date>25–27 April 1994</conf-date></citation></ref>
<ref id="b25-sensors-11-08412"><label>25.</label><citation citation-type="confproc"><person-group person-group-type="author"><name><surname>Malis</surname><given-names>E</given-names></name></person-group><article-title>Improving Vision-Based Control Using Efficient Second-Order Minimization Techniques</article-title><conf-name>Proceedings of the IEEE Internacional Conference on Robotics and Automation (ICRA’04)</conf-name><conf-loc>New Orleans, LA, USA</conf-loc><conf-date>26 April–1 May 2004</conf-date></citation></ref>
<ref id="b26-sensors-11-08412"><label>26.</label><citation citation-type="journal"><person-group person-group-type="author"><name><surname>Kabus</surname><given-names>S</given-names></name><name><surname>Netsch</surname><given-names>T</given-names></name><name><surname>Fischer</surname><given-names>B</given-names></name><name><surname>Modersitzki</surname><given-names>J</given-names></name></person-group><article-title>B-spline registration of 3D images with levenberg-marquardt optimization</article-title><source>Proc. SPIE</source><year>2004</year><volume>5370</volume><fpage>304</fpage><lpage>313</lpage></citation></ref>
<ref id="b27-sensors-11-08412"><label>27.</label><citation citation-type="web"><person-group person-group-type="author"><collab>LabVIEW (Laboratory Virtual Instrumentation Engineering Workbench)</collab></person-group><comment>National Instruments Corporation: Austin, TX, USA. Available online: <ext-link xlink:href="http://www.ni.com/labview/" ext-link-type="uri">http://www.ni.com/labview/</ext-link> (accessed on 10 August 2011).</comment></citation></ref></ref-list>
<sec sec-type="display-objects">
<title>Figures and Tables</title>
<fig id="f1-sensors-11-08412" position="float">
<label>Figure 1.</label>
<caption>
<p>Two typical sensor responses: linear response (red) and logarithmic response (blue). Adjusting the sensor response to a logarithmic curve is a good strategy for increasing the dynamic range.</p></caption>
<graphic xlink:href="sensors-11-08412f1.gif"/></fig>
<fig id="f2-sensors-11-08412" position="float">
<label>Figure 2.</label>
<caption>
<p>A logarithmic response improves the brighter areas of a scene, but reduces the contrast. Source: OMROM.</p></caption>
<graphic xlink:href="sensors-11-08412f2.gif"/></fig>
<fig id="f3-sensors-11-08412" position="float">
<label>Figure 3.</label>
<caption>
<p>Response control for a LinLog CMOS sensor. Source: Photonfocus AG.</p></caption>
<graphic xlink:href="sensors-11-08412f3.gif"/></fig>
<fig id="f4-sensors-11-08412" position="float">
<label>Figure 4.</label>
<caption>
<p>Model for an adaptive controller.</p></caption>
<graphic xlink:href="sensors-11-08412f4.gif"/></fig>
<fig id="f5-sensors-11-08412" position="float">
<label>Figure 5.</label>
<caption>
<p>PID <bold>controller</bold> scheme.</p></caption>
<graphic xlink:href="sensors-11-08412f5.gif"/></fig>
<fig id="f6-sensors-11-08412" position="float">
<label>Figure 6.</label>
<caption>
<p>Performance of <bold>PI</bold>, APID and <italic>Incremental</italic> controllers.</p></caption>
<graphic xlink:href="sensors-11-08412f6a.gif"/>
<graphic xlink:href="sensors-11-08412f6b.gif"/></fig>
<fig id="f7-sensors-11-08412" position="float">
<label>Figure 7.</label>
<caption>
<p>Algorithm for saturation control in a LinLog CMOS sensor.</p></caption>
<graphic xlink:href="sensors-11-08412f7.gif"/></fig>
<fig id="f8-sensors-11-08412" position="float">
<label>Figure 8.</label>
<caption>
<p>Different images taken from a scene with increasing values of V<sub>1</sub> and V<sub>2</sub> from left to right. The last image on the right shows the local entropy map of the image on its left (maximum values in red, minimum values in blue).</p></caption>
<graphic xlink:href="sensors-11-08412f8.gif"/></fig>
<fig id="f9-sensors-11-08412" position="float">
<label>Figure 9.</label>
<caption>
<p>By increasing V<sub>1</sub> and V<sub>2</sub> values we can increase the compression for high intensity levels (values for MV1-D1312 camera). Source: Photonfocus AG.</p></caption>
<graphic xlink:href="sensors-11-08412f9.gif"/></fig>
<fig id="f10-sensors-11-08412" position="float">
<label>Figure 10.</label>
<caption>
<p>Algorithm to adjust T<sub>1</sub> value for a LinLog sensor (where “c” is current iteration, “c − 1” is the result of previous iteration (E<sub>c − 1</sub> = 0 when algorithm starts), “δ” is the condition for entropy to stop the algorithm) and “γ” is the step size.</p></caption>
<graphic xlink:href="sensors-11-08412f10.gif"/></fig>
<fig id="f11-sensors-11-08412" position="float">
<label>Figure 11.</label>
<caption>
<p>Reduction of T<sub>1</sub> value permits a more linear response for high level illumination, although the slope of the response is smaller (MV1-D1312 camera). Source: Photonfocus AG.</p></caption>
<graphic xlink:href="sensors-11-08412f11.gif"/></fig>
<fig id="f12-sensors-11-08412" position="float">
<label>Figure 12.</label>
<caption>
<p>Algorithm adjusts V<sub>1</sub>, V<sub>2</sub> and T<sub>1</sub>.</p></caption>
<graphic xlink:href="sensors-11-08412f12.gif"/></fig>
<fig id="f13-sensors-11-08412" position="float">
<label>Figure 13.</label>
<caption>
<p>Image captured with the same values for V<sub>1</sub> and V<sub>2</sub>, but with APID adjustment of T<sub>1</sub> (centre). The local entropy map of the central image is shown on the right. Note that in the middle image the details in the scene are well defined with no loss of contrast, as compared with the image on the left.</p></caption>
<graphic xlink:href="sensors-11-08412f13.gif"/></fig>
<fig id="f14-sensors-11-08412" position="float">
<label>Figure 14.</label>
<caption>
<p>Synthetic scenes <bold>(a, b, c)</bold>—corresponding to patterns 1, 2, and 3 of <xref ref-type="table" rid="t2-sensors-11-08412">Table 2</xref> and details of images obtained by the CMOS sensor working in linear mode <bold>(d, e, f)</bold> and in LinLog mode <bold>(g, h, i)</bold>, with LinLog parameters adjusted by the proposed method.</p></caption>
<graphic xlink:href="sensors-11-08412f14.gif"/></fig>
<fig id="f15-sensors-11-08412" position="float">
<label>Figure 15.</label>
<caption>
<p>Adjustment of LinLog parameters as scene changes. For scene 1 the saturation control algorithm increases V<sub>1</sub>—from start-up settings—until saturation disappears; for scenes 2 and 3 saturation is kept under control, while T<sub>1</sub> is adjusted to maximize the entropy.</p></caption>
<graphic xlink:href="sensors-11-08412f15.gif"/></fig>
<fig id="f16-sensors-11-08412" position="float">
<label>Figure 16.</label>
<caption>
<p>Image <bold>(a)</bold> was acquired with the image sensor working in linear mode; exposure time was adjusted to capture details of the lighting source; Image <bold>(b)</bold> was also acquired with the image sensor working in linear mode, but here the exposure time was adjusted to capture details out of the lighting source; in this case, the details from the lighting source disappear; Image <bold>(c)</bold> was acquired in LinLog mode automatically adjusted using the proposed method; as we can see, both details of the source and of the scene are retained in the image; Local entropy maps <bold>(d)</bold>, <bold>(e)</bold> and <bold>(f)</bold>, which correspond to images (a), (b) and (c) respectively, help give an idea of the extent of the improvement in image (c).</p></caption>
<graphic xlink:href="sensors-11-08412f16.gif"/></fig>
<fig id="f17-sensors-11-08412" position="float">
<label>Figure 17.</label>
<caption>
<p>Variations of the APID controller output error (red) and the exposure time (blue)—normalized—for the system in outdoor use. There are various causes of variations in short time periods (scene changes, clouds, <italic>etc.</italic>). The reason why the exposure time shows a rising trend is that the control is displayed in a run-up to sundown.</p></caption>
<graphic xlink:href="sensors-11-08412f17.gif"/></fig>
<table-wrap id="t1-sensors-11-08412" position="float">
<label>Table 1.</label>
<caption>
<p>Metrics for quantifying the controllers response shown in <xref ref-type="fig" rid="f6-sensors-11-08412">Figure 6</xref>. Settling time is a metric, expressed in frames, which measures the run-time until the error is lower than 2%. Overshoot measures the difference between the maximum response value and the reference level. Stationary oscillation measures the amplitude of non-attenuated oscillation. The last two metrics evaluate the robustness of the controllers and are expressed as a percentage of the reference level 
<inline-formula>
<mml:math>
<mml:mrow>
<mml:mrow>
<mml:mo>(</mml:mo>
<mml:mrow>
<mml:msubsup>
<mml:mi>N</mml:mi>
<mml:mi>g</mml:mi>
<mml:mi>o</mml:mi></mml:msubsup></mml:mrow>
<mml:mo>)</mml:mo></mml:mrow></mml:mrow></mml:math></inline-formula>.</p></caption>
<table frame="box" rules="all">
<thead>
<tr>
<th align="center" valign="middle"/>
<th colspan="3" align="center" valign="middle" content-type="background-color:#A8A8A8"><bold>Incremental</bold></th>
<th colspan="3" align="center" valign="middle" content-type="background-color:#A8A8A8"><bold>PI</bold></th>
<th colspan="3" align="center" valign="middle" content-type="background-color:#A8A8A8"><bold>APID</bold></th></tr></thead>
<tbody>
<tr>
<td align="center" valign="middle" content-type="background-color:#A8A8A8">Δ <bold><italic>G</italic> (t)</bold></td>
<td align="center" valign="top">0⇨2</td>
<td align="center" valign="top">2⇨1</td>
<td align="center" valign="top">1⇨4</td>
<td align="center" valign="top">0⇨2</td>
<td align="center" valign="top">2⇨1</td>
<td align="center" valign="top">1⇨4</td>
<td align="center" valign="top">0⇨2</td>
<td align="center" valign="top">2⇨1</td>
<td align="center" valign="top">1⇨4</td></tr>
<tr>
<td align="center" valign="middle" content-type="background-color:#A8A8A8"><bold>Settling time</bold></td>
<td align="center" valign="top">--</td>
<td align="center" valign="top">13</td>
<td align="center" valign="top">--</td>
<td align="center" valign="top">5</td>
<td align="center" valign="top">8</td>
<td align="center" valign="top">12</td>
<td align="center" valign="top">5</td>
<td align="center" valign="top">6</td>
<td align="center" valign="top">4</td></tr>
<tr>
<td align="center" valign="middle" content-type="background-color:#A8A8A8"><bold>Overshoot</bold></td>
<td align="center" valign="top">4</td>
<td align="center" valign="top">0</td>
<td align="center" valign="top">4</td>
<td align="center" valign="top">0</td>
<td align="center" valign="top">0</td>
<td align="center" valign="top">24</td>
<td align="center" valign="top">0</td>
<td align="center" valign="top">0</td>
<td align="center" valign="top">0</td></tr>
<tr>
<td align="center" valign="middle" content-type="background-color:#A8A8A8"><bold>Stationary oscillation</bold></td>
<td align="center" valign="top">4</td>
<td align="center" valign="top">0</td>
<td align="center" valign="top">16</td>
<td align="center" valign="top">0</td>
<td align="center" valign="top">0</td>
<td align="center" valign="top">0</td>
<td align="center" valign="top">0</td>
<td align="center" valign="top">0</td>
<td align="center" valign="top">0</td></tr></tbody></table></table-wrap>
<table-wrap id="t2-sensors-11-08412" position="float">
<label>Table 2.</label>
<caption>
<p>Patterns for synthetic scenes generation.</p></caption>
<table frame="hsides" rules="groups">
<thead>
<tr content-type="background-color:#A8A8A8">
<th align="center" valign="middle"><bold>Scene</bold></th>
<th align="left" valign="middle"><bold>Pattern, <italic>I<sub>p</sub>(x,y)</italic></bold></th>
<th align="center" valign="middle"><bold>DR(dB)</bold></th></tr></thead>
<tbody>
<tr>
<td align="center" valign="top"><bold>1</bold></td>
<td align="left" valign="top">10<sup>5</sup> <italic>POS</italic>(cos(x<sup>2</sup>)+cos(y<sup>2</sup>))</td>
<td align="center" valign="top">104</td></tr>
<tr>
<td align="center" valign="top"><bold>2</bold></td>
<td align="left" valign="top">5·10<sup>5</sup> <italic>POS</italic>(cos(x<sup>3</sup>+y<sup>3</sup>))</td>
<td align="center" valign="top">116</td></tr>
<tr>
<td align="center" valign="top"><bold>3</bold></td>
<td align="left" valign="top">5·10<sup>5</sup> <italic>POS</italic>(sin(x<sup>2</sup>+y<sup>2</sup>))</td>
<td align="center" valign="top">116</td></tr>
<tr>
<td align="center" valign="top" colspan="3">
<hr/></td></tr>
<tr>
<td align="center" valign="top"/>
<td align="left" valign="top">
<inline-formula>
<mml:math>
<mml:mrow>
<mml:mi mathvariant="italic">POS</mml:mi>
<mml:mrow>
<mml:mo stretchy="false">(</mml:mo>
<mml:mi>f</mml:mi>
<mml:mo stretchy="false">)</mml:mo></mml:mrow>
<mml:mrow>
<mml:mo>{</mml:mo>
<mml:mrow>
<mml:mtable>
<mml:mtr>
<mml:mtd>
<mml:mi>f</mml:mi></mml:mtd>
<mml:mtd>
<mml:mrow>
<mml:mi>f</mml:mi>
<mml:mo>&gt;</mml:mo>
<mml:mn>0</mml:mn></mml:mrow></mml:mtd></mml:mtr>
<mml:mtr>
<mml:mtd>
<mml:mn>0</mml:mn></mml:mtd>
<mml:mtd>
<mml:mrow>
<mml:mtext>otherwise</mml:mtext></mml:mrow></mml:mtd></mml:mtr></mml:mtable></mml:mrow></mml:mrow></mml:mrow></mml:math></inline-formula></td>
<td align="center" valign="top"/></tr></tbody></table></table-wrap>
<table-wrap id="t3-sensors-11-08412" position="float">
<label>Table 3.</label>
<caption>
<p>Performance measurement illustrated in the graphs of <xref ref-type="fig" rid="f15-sensors-11-08412">Figure 15</xref>. F (fast) corresponds to the configuration (γ = 0.04 and δ = 0.04) and P (precise) to the configuration (γ = 0.01 and δ = 0.01).</p></caption>
<table frame="box" rules="all">
<thead>
<tr>
<th align="center" valign="middle" rowspan="2" content-type="background-color:#A8A8A8"><bold>Scene</bold></th>
<th align="center" valign="middle" rowspan="2" content-type="background-color:#A8A8A8"><bold>Pattern Entropy</bold></th>
<th colspan="6" align="center" valign="middle" content-type="background-color:#A8A8A8"><bold>Lin-Log</bold></th>
<th colspan="2" align="center" valign="middle" content-type="background-color:#A8A8A8"><bold>Lineal</bold></th></tr>
<tr>
<th colspan="2" align="center" valign="middle" content-type="background-color:#D9D9D9"><bold>Time (frames)</bold></th>
<th colspan="2" align="center" valign="middle" content-type="background-color:#D9D9D9"><bold>Retained Entropy</bold></th>
<th colspan="2" align="center" valign="middle" content-type="background-color:#D9D9D9"><bold>Retained Entropy(%)</bold></th>
<th align="center" valign="middle" rowspan="2" content-type="background-color:#D9D9D9"><bold>Retained Entropy</bold></th>
<th align="center" valign="middle" rowspan="2" content-type="background-color:#D9D9D9"><bold>Retained Entropy(%)</bold></th></tr>
<tr>
<th colspan="2" align="center" valign="middle" content-type="background-color:#F2F2F2"><italic>Control Mode (<underline>F</underline>ast/<underline>P</underline>recise)</italic></th>
<th align="center" valign="middle" content-type="background-color:#F2F2F2"><italic>F</italic></th>
<th align="center" valign="middle" content-type="background-color:#F2F2F2"><italic>P</italic></th>
<th align="center" valign="middle" content-type="background-color:#F2F2F2"><italic>F</italic></th>
<th align="center" valign="middle" content-type="background-color:#F2F2F2"><italic>P</italic></th>
<th align="center" valign="middle" content-type="background-color:#F2F2F2"><italic>F</italic></th>
<th align="center" valign="middle" content-type="background-color:#F2F2F2"><italic>P</italic></th></tr></thead>
<tbody>
<tr>
<td align="center" valign="top">1</td>
<td align="center" valign="top">7.90</td>
<td align="center" valign="top">8</td>
<td align="center" valign="top">8</td>
<td align="center" valign="top">5.32</td>
<td align="center" valign="top">5.33</td>
<td align="center" valign="top">67.35</td>
<td align="center" valign="top">67.46</td>
<td align="center" valign="top">0.08</td>
<td align="center" valign="top">1.00</td></tr>
<tr>
<td align="center" valign="top">2</td>
<td align="center" valign="top">4.86</td>
<td align="center" valign="top">6</td>
<td align="center" valign="top">27</td>
<td align="center" valign="top">3.42</td>
<td align="center" valign="top">4.38</td>
<td align="center" valign="top">70.42</td>
<td align="center" valign="top">71.57</td>
<td align="center" valign="top">1.01</td>
<td align="center" valign="top">20.79</td></tr>
<tr>
<td align="center" valign="top">3</td>
<td align="center" valign="top">4.58</td>
<td align="center" valign="top">6</td>
<td align="center" valign="top">27</td>
<td align="center" valign="top">3.42</td>
<td align="center" valign="top">3.48</td>
<td align="center" valign="top">70.50</td>
<td align="center" valign="top">71.62</td>
<td align="center" valign="top">1.01</td>
<td align="center" valign="top">20.77</td></tr></tbody></table></table-wrap></sec></back></article>
