As part of the master’s program at HS Regensburg (University of Applied Sciences Regensburg) in the module “Advanced Software Engineering Projects” (HSP), a Virtual Integration Environment for Testing Vehicle Controls was developed. At a time when autonomous driving was still in early research phases, our group’s goal was to create an affordable and flexible simulation environment for generating synthetic sensor data.

The Simulator

Based on the open-source Irrlicht Engine (a 3D library for C++), we developed a modular simulator connecting physical vehicle dynamics with a virtual world.

Depth Measurement via Stereo Cameras (Depthmap)

My personal focus was on the investigation of stereo vision systems for obstacle detection. The challenge was to compute a three-dimensional depth map from two two-dimensional camera images (left/right).

Mathematical Basics

Determining the distance $X$ of an object is based on triangulation. Essential factors are the base $B$ (distance between cameras) and focal length $f$:

$$X = \frac{B \cdot f}{D}$$

Here, $D$ is the deviation (disparity), i.e., the offset of pixels between the two images. In the presentation, it was derived that for a human-friendly anaglyph display (red-cyan glasses), a maximum deviation of 1.2 mm in the final image must not be exceeded to avoid visual strain.

Implementation in Simulator

Technically, this was realized by Render-to-Texture (RTT):

  1. The simulator renders the scene from two slightly offset camera positions.
  2. Disparity was algorithmically determined from these textures.
  3. The result is a Depthmap, where brightness values represent object distance – essential information for downstream functions like emergency brake assistants.

Conclusion and Relevance

The project impressively demonstrated the possibilities of virtual test scenarios. We were able to show that simulations like ours can drastically reduce development costs for sensor algorithms, as critical scenarios (e.g., collision risk) can be played through safely and reproducibly.