Patent Description:
Optical sensors in general and image sensors (2D or 3D) in particular convert the amount of light into output values. The output values may for example be voltages or digital codes. When using these in safety-critical systems, diagnostic coverage is an important characteristic.

For the electrical part of such a sensor system the diagnostics can be added without significant impact. However, for the conversion part wherein incoming light is converted into an electrical value, adding diagnostics is not straightforward and often expensive.

This may for example be done by using an additional light source which is specifically used for diagnosing the optical sensor. This will, however, result in a complicated and expensive optical design. The operation of such a sensor is not continuous. For the diagnosis the additional light source needs to be switched on and monitored by the optical sensor to determine whether the optical sensor is still working. Hence, the frame rate of the optical sensor is sacrificed for the diagnostics. In image sensors typically not all pixels are covered by such a diagnostics system.

In some prior art systems diagnostics is implemented by providing a redundant optical system. In that case an additional optical sensor is used to verify the operation of the other one. Implementing redundancy, however, does significantly increase the cost and complexity.

<CIT> discloses a method for checking the functionality of a camera. In particular, the functionality of the exposure time of the receiver chip is checked, by monitoring the power supply current for different exposure times.

<CIT>relates to a method for determining characteristic-curve correction factors in a matrix detector that images in the infrared spectral range.

Alternatively, in some systems software algorithms are used to detect failures. Such systems are typically non-deterministic in the sense of predictability or coverage.

There is therefore a need for good methods and systems for diagnosing optical sensors which are less complex than a redundant system.

It is an object of embodiments of the present invention to provide good methods and systems for diagnosing optical sensors.

In a first aspect embodiments of the present invention relate to a method for diagnosing an optical sensor which comprises a photodetector and an integrator. The method comprises:.

It is an advantage of embodiments of the present invention that faults in the optical sensor can be detected by changing a control parameter of the optical sensor and by comparing the expected change of the integrated signal with the measured change of the integrated signal. One or more control parameters may be changed.

In non-claimed embodiments of the present invention the predefined characteristic may comprise threshold values within which the obtained characteristics should fall. If this is not the case the method may be adapted for flagging a fault indicating an error in the optical sensor.

In non-claimed embodiments of the present invention a period of resetting, accumulating and reading is referred to as a frame or sub-frame. Several sub-frames may be present in a macro-frame. The control parameter may be changed at macro-frame level or at sub-frame level. It may be randomly changed or it may be repetitively modulated.

It is an advantage of embodiments of the present invention that changes in the intensity of the incoming light, which may be falsely interpreted as a failure of the optical sensor, can be filtered out by using a plurality of integrated signals for obtaining the characteristics of the optical sensor.

It is an advantage of embodiments of the present invention that a diagnostics method can be run without affecting the frame rate of the optical sensor. This is for example not possible in prior art systems where an additional light source is used for diagnosing the optical sensor.

In embodiments of the present invention at least one control parameter is the integration time.

It is an advantage of embodiments of the present invention that the optical sensor can be diagnosed by changing the integration time. If, for a same intensity of incoming light, the accumulated signal does not change in correspondence with the change of the integration time this implies a malfunction of the optical sensor.

In embodiments of the present invention the integration times have a ratio ranging from <NUM>% to <NUM>%.

Changing the integration time as described above can be done within a certain range which is typically limited to <NUM>%-<NUM>% of the original integration time. The integration time is on the low end limited by the minimal amount of sensitivity needed. When reducing the integration time to a too low value, the resulting pixel response might be too low for the application and the signal to noise ratio gets reduced to a level which is below acceptable. On the upper side the integration time is limited by the saturation. When the integration time is increased too much, pixels start saturating. This means a pixel output is limited for such a case by the output range and is no longer responsive to additional light. At this point in time the signal-to-noise ratio has a steep degradation.

In non-claimed embodiments of the present invention the duration of the integration time may be limited such that during the integration period changes in the intensity of the incoming light are unlikely.

In non-claimed embodiments of the present invention the time period for changing the control parameters of the optical sensor is thereby neglectable compared to the integration times.

In embodiments of the present invention at least one control parameter is the gain of the optical sensor.

In non-claimed embodiments of the present invention the gain of the optical sensor is changed by changing the capacitance value of the integrator. The integrator may for example be a capacitor which comprises two or more parallel sub-capacitors. By connecting an additional sub-capacitor or by disconnecting a sub-capacitor, the total capacitance value can be changed.

In embodiments of the present invention the integrated signal Vout(t) is modelled as g*t+Voffset , wherein g and Voffset are characteristics of the optical sensor which are obtained from the obtained integrated signals.

In this equation the parameter g is a function of the incoming light and of the gain of the optical sensor. The gain can be changed by changing the capacitance value of the integrator. The parameter t is the integration time.

In embodiments of the present invention a characteristic of the optical sensor is obtained by dividing subsequent integrated signals.

This result may for example be compared with a pre-determined characteristic to determine whether the optical sensor is still functioning correctly.

In non-claimed embodiments of the present invention where the integration time is changed, the ratio of subsequent integrated signals may be compared with the ratio of the integration times.

In non-claimed embodiments of the present invention where the capacitance value is changed the ratio of the integrated signals may be compared with the inverse ratio of the capacitance values to determine whether the optical sensor is still functioning properly.

In a second aspect embodiments of the present invention relate to an optical sensor. The optical sensor comprises a photodetector, an integrator, and circuitry connecting the photodetector with the integrator such that a signal from the photodetector, or a processed version thereof, can be accumulated on the integrator. The optical sensor, moreover, comprises a controller configured for:.

In non-claimed embodiments of the present invention the integrator may be a capacitor.

In embodiments of the present invention the integrator may comprise a plurality of parallel capacitors wherein the controller is configured for connecting or disconnecting one or more of the capacitors of the integrator.

In embodiments of the present invention the optical sensor comprising a gain transistor configured for connecting or disconnecting a capacitor from the plurality of parallel capacitors of the integrator.

It is an advantage of embodiments of the present invention that the gain can be changed between frames and/or between sub-frames. This change in gain should be reflected in a change of the integrated signal and is used by the controller to trigger a fault diagnosis of the optical sensor.

In embodiments of the present invention the optical sensor comprises a reset transistor configured for resetting the integrator voltage.

In a third aspect embodiments of the present invention relate to a camera which comprises a plurality of pixels, according to claim <NUM>.

In embodiments of the present invention the camera is a 3D-camera and the controller is configured for obtaining a depth value for a pixel as characteristic of the pixel. Comparing the obtained characteristic with the predefined characteristic corresponds with verifying that the pixel depth does not significantly change for the different measurements.

In a fourth aspect embodiments of the present invention relate to an indirect Time-of-Flight system for measuring the time of flight of a modulated optical signal which is reflected on an object. The indirect Time-of-Flight system comprises an optical sensor according to embodiments of the present invention for receiving the reflected optical signal. The Time-of-Flight system is configured for obtaining a measure of the time-of-flight and this measure is the characteristic of the optical sensor for diagnosing the optical sensor.

In typical circumstances the time-of-flight is not significantly changing between measurements. Hence, the obtained measures of the time of flight should not significantly change between measurements, even when changing the control parameter of the optical sensor. In that case the pre-determined characteristic of the optical sensor is that the measure of the time-of-flight should remain substantially constant between measurements.

In embodiments of the present invention the circuitry connecting the photodetector with the integrator comprises a mixer configured for mixing a signal from the photodetector with a signal which is phase correlated with the modulated optical signal with such that the mixed signal can be accumulated on the integrator.

As the circuitry connecting the photodetector with the integrator comprises the mixer, the mixed signal (the signal from the photodetector mixed with the signal which is in phase with the modulated optical signal) will be accumulated on the integrator.

In a fifth aspect embodiments of the present invention relate to a computer program product for, if implemented on a processing unit, performing the method for diagnosing an optical sensor according to embodiments of the present invention.

Embodiments of the invention are set out in the accompanying independent and dependent claims.

In a first aspect embodiments of the present invention relate to a method <NUM> for diagnosing an optical sensor which comprises a photodetector and an integrator. A flow chart of such a method is shown in <FIG>. While exposing <NUM> the optical sensor to incoming light an initial integrated signal is obtained <NUM> and one or more subsequent integrated signals are obtained <NUM>. Before obtaining the subsequent integrated signal one or more of the control parameters of the optical sensor are changed <NUM>.

One or more sensor characteristics of the optical sensor are obtained <NUM> from the initial integrated signal and from the one or more subsequent integrated signals. The one or more control parameters of the optical sensor have an influence on the integrated signals. This influence can be pre-determined for the one or more control parameters. By comparing <NUM> the one or more pre-determined characteristics with the one or more obtained characteristics the optical sensor can be diagnosed. The influence of a control parameter on the integrated signal is stored in a pre-defined characteristic. This pre-defined characteristic is compared with a characteristic which is obtained when modifying the same control parameter.

In a second aspect embodiments of the present invention relate to an optical sensor <NUM>. An exemplary embodiment of such an optical sensor in accordance with embodiments of the present invention is illustrated in <FIG>. The optical sensor comprises a photodetector <NUM>, an integrator <NUM>, and circuitry connecting the photodetector <NUM> with the integrator <NUM> such that a signal from the photodetector, or a processed version of the signal, can be accumulated on the integrator. The optical sensor <NUM> comprises a controller <NUM>. In embodiments of the present invention the controller may be a digital controller. It may for example be an FPGA controller, or it may be a processor on which a computer program is running configured for performing a method in accordance with embodiments of the present invention. The controller is configured for:.

In embodiments of the present invention integrated signals are obtained per frame. A frame comprises at least one sequence of resetting the optical sensor and accumulating a signal from the photodetector. This signal is accumulated on the integrator. The frame also comprises reading the integrated signal. In embodiments of the present invention the accumulated signal may be representative for the amount of incoming light. The signal is accumulated during an integration time. Reading the integrated signal may for example be done by means of an AD converter which converts the voltage over the integrator into a digital signal which can be processed by the controller.

In a third aspect embodiments of the present invention relate to a camera <NUM> which comprises a plurality of pixels <NUM>. An example thereof is illustrated in <FIG>. Each pixel comprises a photodetector <NUM>, an integrator <NUM>, and circuitry connecting the photodetector <NUM> with the integrator <NUM> such that a signal from the photodetector, or a processed version thereof, can be accumulated on the integrator. The camera <NUM> comprises a controller <NUM>. This controller <NUM> is configured for performing the following operations on each of the pixels:.

A control parameter which may be modified is the integration time. In such embodiments the initial integration time (for obtaining the initial integration signal) and the subsequent integration time (for obtaining the subsequent integration signals) are different. The difference between the different integrated signals obtained with different integration times is used to check correct operation. The relation between output and integration time is predictable and can therefore be pre-defined. This pre-defined characteristic is used to diagnose the optical sensor. The diagnosis may comprise checking the correct operation of the optical sensor and/or derive major performance characteristics of the optical sensor (e.g. a pixel).

An example is illustrated in <FIG> which shows the voltage of an optical sensor in function of time. This optical sensor may for example be the sensor of a pixel of an image sensor. The optical sensor may for example be part of an indirect Time-of-Flight sensor. The optical sensor measures the light level incident on the pixel(s) during a certain amount of time (integration time).

In the example of <FIG> the pixel voltage is reset at the start of the frame (moment t1) to a known value. Next, during the period (t2-t3) the incoming light is changing the pixel voltage by creating a photo-induced current. After the integration time, the output level is sampled and read. Thus a first integrated signal is obtained. Typically Vreset-V<NUM> is outputted as value. This sequence is repeated for each frame whereby one frame corresponds with a period (t1-t4). The invention is related to repeating this cycle but with a different control parameter such as the gain and/or the integration time (t3-t2).

In the example, for a given pixel and sensor design, the output voltage V<NUM> at the end of an integration period depends on <NUM> variables. One is the incident light level. This will change the slope of the graph in <FIG> between t2-t3. The other one is the integration time. This is also shown in <FIG>, where Vout = (Vreset -V<NUM>) is shown on the Y-axis. The different lines correspond to different light levels, with the line with the highest slope corresponding with the highest light level, and the horizontal line corresponding with the absence of incident light. On the X-axis the length of the integration time (t2-t3) is shown.

As can be seen in the graph in <FIG>, for any given light level a linear relationship between the chosen integration time and the output voltage exists.

In one of the embodiments of this invention a pre-determined characteristic is the linear, predictable relationship between integration time and output value. This pre-determined characteristic is used to diagnose the optical sensor by comparing it with obtained characteristics. Diagnosing can for example include determining a performance characteristic of the optical sensor and/or determining correct operation of the sensor.

To achieve this, in some embodiments of the present invention, the integration time is changed between frames. In the example of <FIG> two values for the integration time are used: Tint1 and Tint2 with Tint1>Tint2.

Sensor characteristics can be derived from the resulting voltages and the known time settings. One is the offset value. This offset value can be obtained for each individual pixel or sensor. It is the voltage which would be measured without incoming light. Another one is the pixel conversion gain. This conversion gain can also be obtained for each individual pixel or sensor.

These characteristics are characterizing the full input/output processing chain including the readout electronics, and as such allow a diagnostic of this full processing chain of the optical sensor (i.e. from the interface for the incident light to the interface where the output value can be measured.

In embodiments of the present invention the predefined characteristics may comprise threshold values within which the obtained characteristics should fall. These may be used to determine the performance or the correct behavior of the optical sensor. To diagnose a pixel, pre-set thresholds may be used as pass/fail criteria on the obtained characteristics. The pass/fail status may than be provided to the controller (e.g. to an application processor) to allow making correct decisions on the proper operation of the sensor.

Additionally, the obtained characteristics themselves or processed versions thereof can be outputted to the controller to allow external tracking of the performance and status. In this case the controller makes the pass/fail decision(s).

In its most basic operation, a method according to embodiments of the present invention is toggling between two integration times. This is illustrated in <FIG>. Each frame in this figure comprises a reset step, an integrating step, and a reading step. The obtained output values (i.e. the integrated signals) of each of the individual frames can be outputted and used in the controller, thus not sacrificing the frame rate of the system. In embodiments of the present invention one frame may be taken as reference (e.g. Frame <NUM>), and the output values of the second frame may be adjusted based on the ratio of the integration times by using the pre-determined characteristic which expresses the expected relationship between the integration time and the output value. Thus, a characteristic can be obtained which is independent of the integration time.

The adjusting may for example be done as follows e.g. for a pixel of a camera. When the pixel which has a response of <NUM> Isb for an integration time in frame <NUM> which is <NUM>, it is expected to have a result of <NUM> Isb for <NUM> integration time in frame <NUM>. Correcting the results for frame <NUM> would be done by multiplying by Tint1/Tint2, resulting in a corrected pixel output for frame <NUM> of 1001sb.

For each pixel (or for a group of pixels) the ratio between Vout of frame <NUM> and Vout of frame <NUM> can be evaluated and tracked. This value corresponds with the gain for a certain intensity of the incoming light. This gain may be used as obtained characteristic and compared with a pre-determined characteristic. When a pixel (or group of pixels) no longer has results within the expected boundaries (for the gain), they can be flagged as faulty.

In embodiments of the present invention filtering may be applied on the obtained characteristics before comparing them with a pre-defined characteristic. Assuming, for example, the values used in the example above, the corrected pixel value of frame <NUM> can be compared to the pixel value of frame <NUM>. If the result deviates above a pre-set threshold, it can be flagged as out of bounds. This decision can be made based on just <NUM> frames as in this example or a longer term trend could be filtered.

In embodiments of the present invention the integrated signal Vout(t) can be modelled as g*t+Voffset, wherein g is the gain (for a fixed light intensity) and Voffset are characteristics of the optical sensor. By changing the integration time from Tint1 to Tint2 two points (Tint1,Vout1) and (Tint2,Vout2) can be obtained and the linear relationship Vout(t)=gain*t+Voffset can be derived. This allows to determine the gain and inherent offset of a pixel or sensor and compare those with predetermined values of the sensor for diagnostic reasons.

One way this can be done is by analyzing the output images for both captures and calculate the gain and offset for each pixel of the camera. By averaging this value over time, deviations can be detected. Possible deviations are pixels for which the gain drops (non-responsive pixels) or pixels which have a shift in offset value (e.g. a 'white pixel'). This is illustrated in <FIG> which shows the output voltage Vout in function of time for optical sensors with different operational characteristics. One ideal curve is shown which corresponds with the nominal operation characteristic of the optical sensor. Two additional curves with different gain are shown (Gain_1 and Gain_2). An error can be determined by the controller when the gain drops below Gain_1. In that case the pixel is a non-responsive pixel. Two additional curves with different offset are shown (Offset_1 and Offset_2). An error can be generated by the controller when the offset is higher that Offset_2 or smaller than Offset_1. By doing the averaging over time, single anomalies in the integrated signals caused by changes in the scene can be filtered out.

Another way to analyze the data is to capture a scene with integration time <NUM> thereby obtaining the first integrated signal, followed by a capture with a second integration time thereby obtaining the second integrated signal. Based on the data of the first capture and the pre-determined characteristics, the expected pixel responses for the second exposure can be predicted and an error signal can be calculated based on the difference for each pixel between the actual measurement values and the predicted values (i.e. by comparing the obtained characteristics with the pre-determined characteristics). Also here the error signals can be averaged over time to reject single outliers caused by scene changes.

By detecting changes in pixel behavior using the methods described above, suspicious pixels can be flagged. This information can be relayed to algorithms processing the data. This way such algorithms can choose to ignore the data from these pixels or perform further analysis on them to check the status.

Additionally the amount of pixels with deviations can be monitored over time and as such can be used as an indicator of the operating status of the image sensor. An increase of deviating pixels can act as a warning about degrading performance of the sensor. This can be used to trigger a diagnostic.

In case of a 3D sensor additionally the distance can be calculated for each of the two exposures. By calculating the difference in depth for each pixel between both exposures, an error signal can be generated. Within normal operating conditions the calculated depth should not depend on integration time or pixel gain. If a difference in depth is detected between both exposures this can indicate faulty circuitry.

In embodiments of the present invention integrated signals are obtained per frame. A frame thereby comprises at least one sequence of resetting the optical sensor, accumulating a signal from the photodetector, and reading the integrated signal. If this sequence is executed a plurality of times, each sequence is referred to as a subframe. In that case several sub-frames are present in a macro-frame (like in multi-phase TOF).

The change in the at least one control parameter (e.g. change in integration time) may be applied at macro-frame level of at sub-frame level. The optical sensor may be diagnosed by checking whether the primary output of the optical sensor is unchanged when changing the control parameter. The primary output is the main output for which the optical sensor is designed. It may for example be the depth of a 3D-camera. This depth should not change for a 3D-camera when changing the integration time.

The control parameter may be fixed or may be changed between sub-frames. As discussed before the control parameter may be the integration time. A fixed set of integration times may be used by the method. These integration times may be stored in a memory of the optical system or they may be retrieved externally. The integration times may be changed randomly between the frames or sub-frames. Alternatively the integration times may be changed repetitively between the frames or sub-frames.

Another control parameter which may be changed between frames or sub-frames is the gain of the optical sensor. Changing this gain results in a change of the conversion slope of the optical sensor. The obtained characteristic as a result of the gain change may be compared with the pre-determined characteristic of a gain change to diagnose the operation of the optical sensor. In this case the optical sensor (which may for example be the pixel of a camera) has a conversion gain which can be changed by the user or autonomously by an application.

An example of such a pixel is illustrated in <FIG>. It shows an optical sensor <NUM> which comprises a photodetector <NUM>, an integrator <NUM>, and circuitry connecting the photodetector <NUM> with the integrator <NUM>. The optical sensor is configured such that a signal from the photodetector can be accumulated on the integrator. The optical sensor <NUM> comprises a controller <NUM>. This controller is adapted for executing a method in accordance with embodiments of the present invention as disclosed in the previous paragraphs.

In this simplified schematic of <FIG> no readout circuitry nor transfer gate is shown for clarity. The signal called 'GAIN' is intended as digital control of the conversion gain. With 'GAIN' being low, only C1 is used as capacitor to integrate the photo-current from the photo-diode.

By setting 'GAIN' high, C2 is connected in parallel with C1 and as such the photo-current will be distributed between both capacitors. The change of the conversion gain is depending on the ratio of C1 and C2.

The Reset transistor is only used during reset phase and is not active during integration time or during readout.

In this example the gain of the optical sensor is modifiable by changing the capacitance value that needs to be charged. The invention is, however, not limited thereto. Other implementations for changing the gain are also possible. The gain may for example also be implemented with a variable read-out amplifier gain.

In a fourth aspect embodiments of the present invention relate to an indirect Time-of-Flight system <NUM>. For an indirect Time-of-Flight (iToF) system diagnostics of the pixels should be done without affecting the frame rate of the output distance information. An exemplary embodiment of such an iTOF system <NUM>, in accordance with embodiments of the present invention, is schematically illustrated in <FIG>. Such a system may comprise a transmitter for emitting an amplitude modulated light signal to the scene. The modulated signal may be a pulsed signal which has a certain modulation frequency fMOD. The iTOF system comprises an optical sensor <NUM> or a camera in accordance with embodiments of the present invention. The optical sensor comprises a pixel <NUM> or the camera comprises an array of pixels <NUM>, wherein each pixel comprises a photodetector <NUM> (e.g. a photodiode), an integrator <NUM>, and circuitry connecting the photodetector <NUM> with the integrator <NUM>. In the example the pixel <NUM> comprises a Photonic Mixer Device comprising an integrator <NUM> and circuitry (the mixer <NUM>) connecting the photodetector with the integrator <NUM>. The integrator comprises two storage elements to which the charge from the photodetector is stored depending on the control signal to the mixer <NUM>.

The optical sensor or camera further comprises a controller <NUM>. The controller <NUM> comprises reference timing control block <NUM>, phase difference calculation unit <NUM> and distance calculation unit <NUM>. <FIG> shows additionally a phase shifter <NUM> having an input <NUM> operationally connected to the output <NUM> of the timing control block. The phase shifter <NUM> is further operationally connected to the photodetector <NUM> to provide control signal to the mixer <NUM> inside each pixel.

The light emission unit is not shown in <FIG>, but for generating the required modulated illumination, the timing control block <NUM> output <NUM> may be operationally connected to the light emission unit in order to generate the modulating signal for driving a light source. The light source may for instance be a VCSEL or any other suitable light source. The emitted light may pass through an optical system. The optical system may be shared with the photodetector <NUM> or it may have a separate optical system.

In operation the light emission unit illuminates a scene with the amplitude modulated signal. The returning light, reflected from the objects in the scene, is detected using the one or more pixels <NUM>, in which in each pixel the photodetector <NUM> generates a current proportional to the detected light. This current is then read to the integrator <NUM> using a mixer <NUM>. The mixer <NUM> is configured for receiving a pulse signal which has the same modulation frequency fMOD as the light emission signal. The current generated by the photodetector <NUM> is modulated with the pulse signal. The pixel <NUM> may therefore comprise an interface for receiving a signal from the phase shifter <NUM>.

In order to detect the phase difference between the returning light and the emitted light, the mixing signal is phase shifted using a phase shifter <NUM> to obtain m phase shifted mixing signals (signals Θ<NUM>, Θ<NUM>,. , Θm-<NUM>), which results in m integration values P (P<NUM>, P<NUM>,. , Pm-<NUM>, with m a natural number greater than <NUM>, typically between <NUM> and <NUM>) This phase shifting may be controlled by the controller <NUM>. The iTOF system <NUM> moreover comprises a calculation unit <NUM> configured for obtaining the phase difference between the returning light and the emitted light. The calculation unit may for example be a Discrete Fourier Transformation (DFT) block <NUM>, which outputs the harmonic I and Q values <NUM>, where from the first harmonic values the phase difference can be calculated. For that purpose the timing information from timing control block may be required, shown as the arrow <NUM>. From the phase differences between the returning light and the emitted light the distance to the object may be solved using a block <NUM>.

In the following an exemplary implementation of an iToF system in accordance with embodiments of the present invention is further elaborated. In the example m=<NUM>, i.e. using phase shifts of <NUM>°, <NUM>°, <NUM>° and <NUM>° for the mixing signal. In the example the mixer <NUM> is controlled by a pulse signal with <NUM>% duty cycle (other duty cycles may be possible). Hence, the integration time is defined by the number of pulses for each phase.

<FIG> shows the four phases of the exemplary iToF system by means of which a distance measurement can be done. This sequence of phases is referred to as one depth frame.

In embodiments of the present invention a control parameter of the optical sensor (e.g. integration time) may be changed for the different depth frames while keeping it constant within a depth frame. Referring to <FIG> P0, P90, P180 and P270 would be of a certain length T1 for the first depth frame and would become length T2, different from T1, for a subsequent frame (other sensor parameters may be changed).

In typical circumstances where the time-of-flight is not significantly changing between depth frames, the resulting depth for both depth frames should be substantially equal, independent of the used integration times. Therefore differences between the resulting depths for different depth frames can be used as a first diagnostic value. The controller <NUM> is thereby adapted for changing at least one control parameter of the optical sensor and for obtaining the resulting depth from the integrated signals.

Claim 1:
A method (<NUM>) for diagnosing an optical sensor which comprises a photodetector and an integrator,
the method comprising:
- exposing (<NUM>) the photodetector to incoming light,
- obtaining (<NUM>) an initial integrated signal at an initial frame,
characterized in that the method, furthermore, comprises:
- at least once executing the steps of changing (<NUM>) at least one control parameter of the optical sensor, exposing (<NUM>) the photodetector to incoming light, and obtaining (<NUM>) one or more subsequent integrated signals at a subsequent frame,
wherein integrated signals are obtained per frame, and a frame comprises at least one sequence of resetting the optical sensor and accumulating, during an integration time, a signal from circuitry which connects the photodetector with the integrator, and reading the integrated signal wherein the integrated signal is representative for the amount of incoming light on the photodetector,
- obtaining (<NUM>) a characteristic of the optical sensor from the obtained integrated signals,
- comparing (<NUM>) the obtained characteristic with a pre-determined characteristic of the optical sensor, wherein the pre-determined characteristic is defined in function of the at least one control parameter, to diagnose the optical sensor to detect if a fault is present in the optical sensor.