## 1.

## Introduction

The determination of the speed of a moving object requires the knowledge of the trajectory and the time taken by the object to cover a certain distance along the trajectory. To achieve this by machine vision using classical cameras, one needs to take several images of the object at different time instances so as to obtain the trajectory, displacement, and time information. Even for relatively slow moving objects this requires that the images be taken and transferred to the computer at a relatively high rate. Let us consider, for instance, an object moving horizontally at $2\phantom{\rule{0.3em}{0ex}}\mathrm{m}\u2215\mathrm{s}$ and suppose that the width of the view field of the vision system is $10\phantom{\rule{0.3em}{0ex}}\mathrm{cm}$ . The object would take $0.05\phantom{\rule{0.3em}{0ex}}\mathrm{s}$ to cover the 10-cm distance. Since at least two images of the object are necessary for computing the average speed, this means that the images must be acquired at a minimum rate of one image every $0.05\phantom{\rule{0.3em}{0ex}}\mathrm{s}$ (note that the video rate, $25\phantom{\rule{0.3em}{0ex}}\mathrm{images}\u2215\mathrm{s}$ , is one image every $0.04\phantom{\rule{0.3em}{0ex}}\mathrm{s}$ ). For faster objects or if more than two images are required then the image rate would increase.

It is well known that in classical systems the image transfer rate is a bottleneck and one solution is to store the images on the chip at a very high rate and later transfer them to the computer at a much lower rate. The CMOS image sensor chip design that we present herein proposes an alternative solution by furnishing an image that contains all the required spatial and temporal information.^{1}

## 2.

## CMOS Image Sensor Chip

## 2.1.

### Chip Architecture

The image sensor chip is implemented in standard $0.6\phantom{\rule{0.3em}{0ex}}\mathrm{\mu}\mathrm{m}$ CMOS process from Austria Micro Systems. It is composed of the main functional blocks represented in Fig. 1 . These blocks are:

• An array of $64\times 64\phantom{\rule{0.3em}{0ex}}\mathrm{pixels}$ that we have designed to digitalize the temporal information and store it in memory devices integrated at the pixel level.

• A classical 4-bit Gray code counter used instead of a binary counter to avoid state transition hazards.

• A control block used to generate all the signals necessary for the correct functioning of the circuit. It is implemented as a finite state machine.

• A row decoder for selecting the pixels one row at a time during initialization and readout of the contents of the memory devices integrated at the pixel level.

• 64 voltage difference sensing amplifiers similar to the one described in Ref. 2 (one per column) and a demultiplexer for reading out the contents of the 4-bit memory devices.

## 2.2.

### Pixel Design

The architecture of the pixel is a digital sensor pixel^{3, 4} with an implementation of the analog-to-digital converter using a classical Gray code counter common to the array of pixels combined with a pulse generator and memory devices. Figures 2 and 2
represent the schematic circuit diagram of the pixel and its layout. The light sensing element is a photodiode. Unlike classical sensors where the voltage drop across the photodiode is measured to deduce intensity information, we define a threshold for the voltage drop and measure the time needed to achieve this voltage drop. To do so we use a monitoring inverter followed by a pulse generator at the output of the photodiode so that when the voltage across it falls below the threshold of the inverter, a pulse is generated. The pulse is next applied to the 4-bit memory device in order to memorize the current value of the Gray code counter.

The time at which the pulse is generated is equal to the sum of the time at which the pixel is illuminated by the object and the photodiode discharge time. If the object is highly luminous or if the threshold of the photodiode voltage monitoring inverter is close to the maximal potential then the photodiode discharge time can be neglected and the value stored in the 4-bit memory corresponds to the time at which the pixel is illuminated by the object. In our case the threshold is fixed by design (physical dimensions of the monitoring inverter) to about half the maximal potential so that the sensor can work as a classical imager also for testing purposes. For sensors dedicated to speed measurement only the monitoring inverter must be designed so that the threshold value is close to the maximal potential.

## 2.3.

### Working Principle

The acquisition of a spatiotemporal image is illustrated in Fig. 3 on an array of $6\times 6\phantom{\rule{0.3em}{0ex}}\mathrm{pixels}$ . The object is supposed to be of size one pixel and moving along the diagonal from the top left corner to the bottom right one of the array of pixels.

At the start of the acquisition of an image all the 4-bit memory devices as well as the 4-bit counter common to the array of pixels are first initialized to the value 0. Next, the counter is clocked at a frequency that is chosen according to the speed of the moving object under observation. The higher the speed is, the higher the frequency must be. Each time a pixel is illuminated by the bright object for the first time, the current value of the counter corresponding to the mumber of clock cycles since the start of acquisition is stored in the pixel's memory device. In the example of Fig. 3, for instance, the pixels at coordinates (2, 2), (3, 3), and (4, 4) have been illuminated after 2, 4, and 5 clock cycles, respectively.

The acquisition is over after the counter has made a complete turn, that is, after 16 clock cycles. The acquisition time is thus equal to $16T$ where $T$ is the clock period. Finally, the values stored in the pixel's memories are read-out and displayed as a 16-gray-level image.

## 3.

## Experimental Results

The circuit has been tested to be fully functional. Figure 4 represents the experimental setup used to acquire a spatiotemporal image for speed measurement. It is composed of an electric motor with a slightly inclined reflective surface mounted at the end of its shaft and a screen. A small laser beam is fired at the reflective surface that reflects it back onto the screen. As the motor turns round, the spot due to the laser beam describes a circle of $2\phantom{\rule{0.3em}{0ex}}\mathrm{cm}$ in diameter on the screen.

An example of the image of the moving laser spot obtained using our sensor mounted in a case with a lens of focal length $25\phantom{\rule{0.3em}{0ex}}\mathrm{mm}$ is given in Fig. 5 . One can notice that the circular trajectory of the spot is composed of several regions of different gray levels. Each region represents in fact the position of the spot at the time instant given by the gray level. Indeed, the gray level, unlike classical sensors, is not intensity information but time information since it corresponds to the number of clock cycles since the start of acquisition before the pixels are illuminated by the incident light from the object. So, by considering any two regions we can compute the average speed of the spot using the following distance-over-time equation:

where $d$ is the distance between the center of gravity of any two regions representing the initial and final positions of the object, ${G}_{1}$ and ${G}_{2}$ are the gray levels of these two regions, and $T$ is the period of the clock. Thus, to compute the speed of the laser spot we need to first segment the image in order to clearly delimit the different regions, then determine for each region its center of gravity, and finally choose any two regions and compute the speed according to Eq.^{1}. The distance $d$ along the trajectory between the two regions can be easily computed knowing the scale factor between the real scene and the image (a function of the focal length of the lens and the distance between the sensor and the scene) and the size of the pixels $(49.2\times 49.2\phantom{\rule{0.3em}{0ex}}\mathrm{\mu}\mathrm{m})$ .

The image of Fig. 5 after segmentation and determination of the centers of gravity is shown in Fig. 5. The segmentation algorithm that we have used is very simple in this case since we have a rather good image of the spot. It consisted of considering all the pixels of the circular trajectory as pertaining to the same region if they have the same gray level. For poor-quality images that may result from low contrast between the observed moving object and its background, a more complex algorithm may be necessary. The segmentation problem is thus application dependent. Once we have obtained the different regions, the center of gravity ( ${x}_{k}$ , ${y}_{k}$ ) of a region $k$ is computed according to:

## 2

$${x}_{k}=\frac{\sum _{i=1}^{N}\sum _{j=1}^{M}{x}_{i}{G}_{k}(i,j)}{\sum _{i=1}^{N}\sum _{j=1}^{M}{G}_{k}(i,j)},\phantom{\rule{1em}{0ex}}{y}_{k}=\frac{\sum _{i=1}^{N}\sum _{j=1}^{M}{y}_{j}{G}_{k}(i,j)}{\sum _{i=1}^{N}\sum _{j=1}^{M}{G}_{k}(i,j)},$$Using the experimental setup of Fig. 4, several experiments have been carried out and the speed of the laser spot determined by both image processing using Eq. ^{1} and calculations from the data furnished by a tachymeter. Some of the results are given in Table 1
.

## Table 1

Speed measurement.

Determined from sensor image (m/s) | Calculated from tachymeter data (m/s) |
---|---|

1.3 | 1.36 |

1.48 | 1.57 |

1.62 | 1.67 |

One can note that the speed values determined from the image acquired by the sensor are quite close to the calculated ones. The difference is less than 7%. Moreover, we would like to point out here that for the image of Fig. 5 taken at a clock frequency of $500\phantom{\rule{0.3em}{0ex}}\mathrm{Hz}$ for a laser spot moving at about $1.5\phantom{\rule{0.3em}{0ex}}\mathrm{m}\u2215\mathrm{s}$ , the acquisition time is $0.032\phantom{\rule{0.3em}{0ex}}\mathrm{s}$ . This image contains the coordinates and time information of the object for about ten different positions in the course of its displacement (ten different regions). To obtain the same information using classical cameras would require the acquisition and readout of ten images in about $0.032\phantom{\rule{0.3em}{0ex}}\mathrm{s}$ (more than ten times the video rate). The maximum frequency of the clock is by design $20\phantom{\rule{0.3em}{0ex}}\mathrm{MHz}$ but in practice we have only been able to test the chip for a maximum frequency of $1\phantom{\rule{0.3em}{0ex}}\mathrm{MHz}$ (acquisition time of $1.6\phantom{\rule{0.3em}{0ex}}\mathrm{\mu}\mathrm{s}$ corresponding to $16$ clock cycles).

## 4.

## Applications

Some possible applications of our image sensor are, for example, in areas such as automotive, medical or biomedical, and electrical devices manufacturing. The sensor can be used to study the trajectory and speed of the deformation of moving objects upon collision (car crash test), the displacement of certain moving parts of an object or human body (study of the motion of the legs of an athlete), the formation of electrical arcs in electrical devices, etc. Since our sensor requires that the moving object be very bright, it can be envisaged to use strong illumination over a dark background or bright markers placed on the objects.

For all these applications, depending on the speed of the phenomenon, charged-coupled devices (CCD), CMOS imagers, or high-speed cameras are used. Compared to these devices, our sensor has certain advantages. The speed of the moving object that can be observed using our sensor is higher than with CCD or classical CMOS imagers. This is due to the fact that unlike classical CCD or CMOS devices that require the acquisition and readout of several images, our sensor furnishes only one image containing all the required spatiotemporal information, resulting thus in a shorter readout time. Moreover, the trajectory is clearly visible on the image and need not be determined from successive images.

Compared to high-speed cameras, the performance of our sensor is much less but it has the advantage of being less expensive too. So, for certain applications for which the use of a high-speed camera is not compulsory, our image sensor is a good cost-effective solution.

## 5.

## Conclusions

We have described an image sensor fabricated in standard $0.6\text{-}\mathrm{\mu}\mathrm{m}$ CMOS process. It can furnish both spatial and temporal information on the moving object under observation in a single image for speed measurement applications. The sensor has been tested to be fully functional and the circuit design validated by the successful application of the sensor to the measurement of the speed of a moving laser spot with an error less than 7% compared to the value calculated from data furnished by a measuring instrument.