Abstract
This work discusses an innovative approach to imaging which can improve the robustness of existing active-range measurement methods and potentially enhance their use in a variety of outdoor applications. By merging a proven modulation technique from the domain of spread-spectrum communications with the bleeding-edge CMOS sensor technology, the prototype of the modulated range sensor is designed and evaluated. A suitable set of application-specific spreading codes is proposed, evaluated and tested on the prototype. Experimental results show that the introduced modulation technique significantly reduces the impacts of environmental factors such as sunlight and external light sources, as well as mutual interference of identical devices. The proposed approach can be considered as a promising basis for a new generation of robust and cost-efficient range-sensing solutions for automotive applications, autonomous vehicles or robots.
Introduction
Over recent years a lot of effort has been devoted to research and development of range sensors. These are widely used in numerous applications in medicine, industry, defence, automotives, robotics, and home entertainment. The majority are based on active optical-range measurement techniques [1, 2], which involve the projecting of structured light patterns onto a scene with further reconstruction of the range map by measuring the temporal or spatial distribution of the reflected light. These methods are efficient in controlled disturbance-free environments. The lack of cost-efficient and robust solutions suitable for work in real-world environments motivated our prior work [3, 4], where we introduced the concept of modulated acquisition of spatial distortion maps-snapshots of multi-line patterns projected onto the object. These patterns can be converted to 3D mesh according to the laser triangulation [5] principle as depicted in Figure 1: the distance to the point O(x,y,z) belonging to the pattern's projection at the object's surface is calculated from fixed parameters of the detector (focal length f, base line b between the optical centre of the lens and the laser source, angle α between the base line and the plane of the projected light) and the position of point P(v,u) belonging to the pattern's reflection on the sensor plane:

Laser triangulation principle and modulated imaging system scheme
Thus, distance detection in this method relies on determining the coordinates of the illuminated pixels and the index of line (i.e., angle α) they belong to.
The classical approach is to try to detect the illuminated pixels in plain snapshots taken from the sensor. This approach is sensitive to external light sources which can overpower the laser and cause erroneous results. Our improvement (pixel intensity modulation controlled by pseudo-random binary sequences) makes pattern detection more robust. Pattern parsing, i.e., robust segmentation and indexing of the detected lines, is a subject for further study. Promising approaches to 3D reconstruction based on multi-line patterns are considered in [6, 7]. In this paper we focus only on the performance of modulated imaging systems, which should produce sharp and accurate images of the projected patterns used as input data for further 3D transformation that is beyond the scope of this paper.
In prior work we showed the efficiency of using cyclically orthogonal Walsh-Hadamard codes (COWHC) [8, 9] while addressing the impacts of the external light sources as well as some limited impacts of mutual interference. The main disadvantage of this code set is the limited number of coexisting units in a system. We showed that for a Walsh matrix of size N×N where N=2K there were only K codes suitable for our system. This limitation is unacceptable for systems with a flexible number of units, as is desirable in automotive applications or robotics.
In this work we propose suitable system-specific spreading codes in order to extend the system capacity. Furthermore, we demonstrate the application of the selected codes in the real environment.
The paper is organized as follows: in Section 2 the model of modulated imaging system is introduced. In Section 3 the system-specific requirements for modulation codes are identified, while the proposed codes' design and performance evaluation methodology are presented in Section 4. In Section 5 the experimental set-up and conditions are given. In Section 6 the experimental results are demonstrated. Finally, the concluding remarks and further work are given in Section 7.
Essentially, active optical range sensors are advanced devices which emit electromagnetic energy in the visible or IR spectrum and utilize the reflected energy for 3D reconstruction of the scene surface. Range data (or 3D mesh) is recovered from the distorted reflection of the patterns according to the physical principle of the sensor (triangulation, time-of-flight [10], interferometry [11], etc.).
Let us define active imaging system as a subsystem of an active range sensor (or a device with a similar purpose) which performs the dedicated task of capturing images of the patterns projected on the scene.
Such a system can be built upon a CCD or CMOS sensor supplemented with an electronically triggered laser as depicted in Figure 1. Both laser and sensor may operate in either the visible or the IR spectrum. A diffractive optical element is installed at the laser's emitter in order to form a desired pattern. The laser is triggered synchronously with the electronic shutter of the sensor when the snapshot is being taken.
The robustness of such an imaging system (i.e., its ability to produce sharp images of the projected pattern) is directly related to the laser's power. Unfortunately, increasing the laser's power is problematic because of high energy consumption and eye safety issues. In addition, the high laser power does not solve the problem of mutual interference from nearby systems. Better results can be achieved with an identical or even a weaker laser by applying a sequential frame acquisition approach: the frame is assembled from the per-pixel sum of N sub-frames taken consequently with the laser turned on or off according to the binary sequence c∊{0;1}as follows:
where I is the resulting intensity of the distinct pixel of the image, b is mean background intensity, ι is laser's contribution, and v is modulation sequence c transformed to bipolar form {−1; 1} as follows:
Thus, pixels of inactive sub-frames (ci = 0, vi = −1) are taken with negative sign while pixels of active sub-frames (ci = 1, vi = 1) are taken with positive sign. For ease of further analysis, consider b and ι constant through the frame integration cycle. With the balanced sequence c (even length N, number of ones equal to number of zeros), we can expect that only a pattern itself will be present at the resulting image, while the background and the objects will be suppressed completely as follows:
The greater the parameter N, the better the contrast between the illuminated (signal) and the background (noise) pixels.
A similar effect of raising the signal-to-noise ratio (SNR) is known in direct sequence spread spectrum communications as processing gain. Recent studies [12–14] show that the performance of such systems, i.e., their robustness to external factors and mutual interference, is mainly determined by the correlation properties of modulation codes.
Our imaging system can be considered as an asynchronous CDMA system. When multiple active range detectors scan the same scene simultaneously, each one should be able to filter out the pattern it projects from those projected by the other devices. This case resembles telecommunications systems where multiple transmitter-receiver pairs communicate simultaneously over the shared communication media (wire, radio frequency band or optical frequencies). In order to separate the desired signal from the interference, each transmitter “spreads” the data signal over the wider frequency band by time multiplexing with the unique binary sequence of higher rate. The receiver recovers the original signal by multiplying the observed noise-like signal with the same sequence. If the system is synchronous, i.e., all the transmitter-receiver pairs are coordinated, the best choice is orthogonal codes, since they provide zero in-phase cross-correlation and thus eliminate the multiple access interference (MAI) completely. But if the units of the system are autonomous (as in our case), the interfering signals may intrude at arbitrary random times and will not always be suppressed. Therefore, another approach is required.
Consider K identical-range detectors scanning the same scene. All of them are equally distanced from the surface, have equal laser power and the same predefined modulation sequence c of period N. For simplicity assume all the pixels' intensities induced by any single laser are equal to the same level ι. Before proceeding with the analysis, let us introduce a function RBU, which represents the periodic correlation of bipolar sequence v with its unipolar form c:
The interference as the resulting pixel intensity at the hypothetical intersection of all interfering projections (as seen by the distinct detector) is evaluated by introducing the contribution of K−1 laser intensities ι triggered by c cyclically shifted by τ to eq. (1):
It is self-evident that in order to minimize iMAI we should find sequences with optimal bipolar-unipolar correlation, i.e., with constantly low or zero magnitudes of RBU at any non-zero shift. It is also important that these sequences must be balanced to suppress the background.
Ideally, modulation sequence should exhibit a specific type of perfect auto-correlation property, i.e., have zero out-of-phase bipolar-unipolar correlation at any non-zero shift. In this case, according to Equation 6 the interference is eliminated completely. The performance of such a system could be evaluated in terms of the probability of in-phase operation with one or more interfering devices, or in other words, frames collision probability (PFC):
where Np is the number of peaks of correlation function RBU (Equation 5), which equals 1 for perfect sequences.
Frame collisions can be detected in several ways during image processing. For example, a drastic rise of “white level” in a histogram or unexpected number of lines in multi-line pattern could be detected. Efficient error-recovery strategy in this case involves dropping the erroneous frame and introducing a random (several sub-frames long) delay before restarting the frame integration cycle.
If the sequence is not perfect but provides at least a constantly low level of out-of-phase correlation, it can be considered optimal. In addition to frame collision probability these sequences could also be characterized by peak-to-average ratio (PAR):
where RLCZ is the average of absolute values of RBU for the low correlation zone. According to the definitions of signal (2) and interference (5), and provided that all interfering devices contribute equal laser intensity ι, we can estimate signal-to-interference ratio (SIR) as follows:
Error probability PE for the discussed system modulated by the optimal sequence can be extended when spatially superposed interference overwhelms the signal:
The recommended approach for minimizing this error involves introducing a proper threshold for pixel values below the accepted noise level before detecting the frame collisions. A recovery strategy is to extend N, thus improving SIR, which should be combined with frame collision recovery.
Hunting for perfect sequences, i.e., sequences with zero out-of-phase periodic auto-correlation function (ACF), has been a subject for many studies related to CDMA applications. Some general approaches to construction of complex-valued sequences with the desired properties have been proposed recently [15, 16]. Unfortunately, there are no {−1;+1} sequences with perfect ACF of length 4 > N ≥ 12100 [17].
We examined some known modulation codes with almost-perfect ACF, including Barker codes [18] and Wolfmann codes [19], and concluded that none of them satisfy our specific criteria for both optimal periodic bipolar-unipolar correlation and balancing.
However, m-sequences were found to be promising candidates because of their perfect RBU function (see Figure 2).

Bipolar-unipolar correlation (RBU) of 31-bit-long m-sequence
The only challenge is balancing, since the binary m-sequences are of odd-length N=2 p −1, where p is a prime number.
Our approach to code balancing uses Manchester encoding: each “1” symbol of the original sequence is replaced with the combination of “−1;+1” while “−1” (or “0”) is replaced with “+1;−1”. By applying this transform to an m-sequence of length m one can obtain an optimal balanced sequence of length N=2m with parameters RLCZ=1, PAR=N/2. Periodic auto- and bipolar-unipolar correlation function of a 62-bit-long Manchester-encoded m-sequence (MEMS) derived from an original 31-bit m-sequence is plotted in Figure 3.

Bipolar-unipolar correlation (RBU) of obtained 62-bit-long MEMS sequence
Obtained MEMS sequences can be compared to COWHC codes of similar widths evaluated in prior work. According to conducted numerical simulations the newly proposed design based on MEMS sequences can accommodate more units than the previous design until saturation limit is reached – in other words, while the acceptable level of error probability PE is provided. This limit designates the system capacity characteristic by showing how many sensors may operate simultaneously without “frame collisions” with one or more nearby sensors. For the MEMS-modulated system we define this limit as PFC ≥ 0.5, which means that the system can tolerate up to 50% frame drops in the worst case while trying to apply error recovery.
Low SIR as another error case (according to Equation 10) in normal (out-of-phase) operation of MEMS codes may be caused only by spatial superposition of several projections. We assume that this condition is hardly possible in real applications (for example in robotics) because the units' placement in real terrain cannot lead to the ideal superposition of multiple projections.
We performed computer simulations to compare PE values for a 16-bit-long COWHC sequence vs. a 14-bit-long MEMS, a 32-bit-long COWHC sequence vs. a 30-bit-long MEMS, and a 64-bit-long COWHC sequence vs. a 62-bit-long MEMS. We found that saturation limit (PFC ≥ 0.5) for MEMS codes was reached at number of users K=N/2, while the error condition for COWHC was reached at K=log2N.
The simulation results are depicted in Figure 4, showing that the capacity of the system using MEMS codes outperforms the system with COWHC codes. The difference in system capacities is increased by increasing the number of bits in the sequences.

Error probability (PE) vs. number of users for COWHC and MEMS codes of similar widths
In the experiments we demonstrate the background light and the mutual interference suppression effects, described in the previous chapters.
The experimental set-up demonstrating the discussed principle of modulated imaging is depicted in Figure 5. It was built around a commercially available industrial camera (Velociraptor, Optomotive Mechatronics Ltd, Ljubljana, Slovenia) [20] based on a high-speed CMOS sensor (CMOSIS CMV2000). The camera makes a series of snapshots at a high frame rate (up to 600 fps) with a short exposure time. A specifically programmed FPGA processing core performs in-camera frame integration as discussed in Section 2. Each pixel of the frame is calculated as a sum of the corresponding pixels of N sub-frames taken with positive or negative sign according to the highest bit of the modulation sequence cyclically shifted in the modulation register. The laser is switched ON or OFF according to this bit. With optimal modulation sequences the resulting pixel intensities are expected to be as evaluated by Equations 4 and 6, i.e., near-zero values (black levels) for the suppressed background, ambient light and interference, while the illuminated pixels are expected to be high-level values (grey and white levels).

Experimental setup
The scene is illuminated using a modulable 650 nm LED laser combined with a DOE (diffractive optical element) projecting a pattern of parallel horizontal lines. The resulting frame rate for the 30-bit-long modulation code is ca. 22–24 fps.
During the experiments we took a series of snapshots from the live view of the camera in different illumination conditions and with the presence of a nearby detector.
The background light suppression experiment was conducted indoors in normal daylight conditions first. Next, the experiment was conducted outdoors in sunlight.
A mutual interference suppression experiment was conducted indoors with the presence of a second detector. In the first part of this experiment the detectors were modulated by a non-optimal pair of orthogonal codes. In the second part of the experiment both detectors were modulated by the same MEMS code proposed in this work.
In the first series of the results we demonstrate the background light suppression effect of the proposed active imaging system. Snapshots from the indoor live footage are shown in Figure 6, while the snapshots taken outdoors are shown in Figure 7.

Backgroung light suppression effect indoors. Plain-view snapshot (up) and demodulated-view snapshot (down).
As expected, a remarkable effect of real-time background suppression is achieved – only the pattern itself is present in the live footage, while the objects and the background are suppressed completely.
In the latter case it is clearly seen that even if laser illumination seems completely overpowered by the sunlight and is not clearly visible to the naked eye, the introduced approach allows us to amplify the tiny differences induced by the laser such that the resulting image captured outdoors (Figure 7) is of satisfactory quality for further pattern recognition.

Background light suppression effect outdoors. Plain-view snapshot (up) and demodulated-view snapshot (down).
The second series of results demonstrates mutual interference of the two detectors currently available to us. Figure 8 demonstrates the influence of a nearby detector when the detectors are modulated by a non-optimal pair of orthogonal codes. In the demodulated-view snapshot the interference is clearly observed. Visually, a similar effect is produced by any other non-optimal pair of modulation codes, or when optimal MEMS codes operate in-phase (synchronously activated).

Interference of nearby detector with non-optimal modulation code. Plain-view snapshot (up) and demodulated-view snapshot (down).
Finally, we tested the proposed MEMS modulation codes and achieved satisfactory results with out-of-phase operation. There is no noticeable interference present in the live footage (Figure 9) when the MEMS code operates normally (out-of-phase) with the applied threshold.

Interference of nearby detector with optimal modulation code. Plain-view snapshot (up) and demodulated-view snapshot (down).
This work has discussed the principle of modulated active imaging and its non-orthogonal design. The proposed approach can be considered optimal for development of fail-tolerant self-adapting active sensing systems with non-fixed number of units when it is not technically possible to coordinate the system centrally or provide each unit with a unique predefined modulation code. With the proposed approach, a greater number of users (i.e., greater system capacity) can be achieved than with the prior (orthogonal) design. A possible disadvantage of the proposed solution is the requirement for thresholding the low-intensity pixels, which may be induced by partial (in-chip) coincidence with the main peak or secondary peaks of correlation with the interfering signal, and thus may lead to loss of density of distant objects in the resulting range map. However, it can still solve the application-critical task of robust detection of the nearest obstacles in the presence of interfering devices. Improvement of the proposed system may be achieved by increasing the length of the modulation sequence or searching for sequences with better bipolar-unipolar correlation properties.
Footnotes
8.
This research was supported by the European Union, European Social Fund, within the scope of the framework of the Operational Programme for Development of Human Resources in the Period 2007–2013 contract No. 3211-11-000492.
