This is an old revision of the document!
The AD-96TOF1-EBZ is a pulsed Time-of-Flight (ToF) system. Is consists of a CCD sensor, an illumination source (VCSEL), and an analog front-end (AFE) with a ToF processor. To calculate depth a target scene is illuminated, the returned light is captured by the CCD sensor. The AFE reads the captured data and processes it to depth. In the current setup, there are 3 modes that can be programmed into the AFE to operate the camera at different ranges. Each mode operates on different firmware located in the config/BM_Kit_RevC/ or config/BM_Kit_RevD/ directory of the calibration folder. Depending on the board version, the folder from config/BM_Kit_RevC or BM_Kit_RevD must be renamed to config/BM_Kit before running the calibration software.
Calibration is required for the AD-96TOF1-EBZ to map the depth output of the system to the real world. The accuracy of depth is dependent on the calibration environment as well as the target environment conditions. Depth calibration is performed by placing a target at the known distance in from of the TOF system. The system runs the specific mode that is being calibrated. During calibration the illumination pulse of the system is delayed relative to the capture time to simulate different distances, this is referred to as a sweep. The captured data is used to generate a gain, offset, and look-up table. Each mode requires its own calibration and parameters.
The following procedure takes place when running a calibration (“params” are configurable in JSON files specified later in this document):
To run a linear calibration a target is placed a known distance away from the ToF system. The reflectivity
of the target is dependent on the final use case of the system. For the AD-96TOF1-EBZ calibration, a
target of 98% reflectivity for 940nm wavelength light is used. It is also important to keep the target
parallel to the sensor. Please use Calibration_Assembly_Doc.pdf as a reference to any calibration setup.
Setting up the correct environment is essential for a valid calibration. One major factor that leads to
incorrect calibration is multipath. This occurs when light bounces off multiple surfaces and returns to
the sensor. This corrupts the data read from the sensor and therefore shifts the final depth value. While
completely removing this effect is difficult, steps can be taken to reduce its error contribution.
The preferred method to reduce the effect of multipath is to calibrate the sensor in an open room. The
sides of the path in between the system and the target should be empty with the closest object being
meters away. The floor or bench which the system and target sit on should be covered in low reflectivity material.
As shown in the Calibration_Assembly_Doc.pdf, another method is to cover any surfaces on the sides of
the path between the system and the target with low reflectivity material. This method is used when
there is no access to open space. If the sides and bench spaces are not covered and are highly reflective,
the calibration will likely be inaccurate.
While the methods above can be used as general guidelines, the best results are determined by the use
case. It is recommended to run calibration in the target environment to achieve better accuracy.
To run a calibration first it is necessary to enter the correct parameters to a config file provided with each set of firmware files. The config file is in JSON format. Each mode comes with a recommended calibration config file sweep_config_mode.json in the firmware directory. The following parameters are typically adjusted:
The parameters available in the config file are shown below. (Supported parameters are highlighted, the unhighlighted parameters are not to be modified)
|mode||string – (“near”, “mid”, “far”)||Specifies which mode is calibrated|
|verify_sweep||bool||Run calibration verification|
|calib_type||string – (“Sweep”)||Calibration Type|
|verification_type||string – (“Sweep”)||Verification Type|
|calculate_metrics||bool||Generate metrics (Only works with verify sweep)|
|firmware_path||string – (Path to firmware from calibrate_single_mode.py)||Firmware path|
|unique_id||string – (Numerical Values only)||Specify Unique ID|
|frame_count||int||Specify how many frames are captured per simulated distance|
|warmup_time||int||Specify the warmup time before calibration|
To store a calibrated files to EEPROM the eeprom_replace_config.json in the calibration folder must be modified. The JSON parameters are shown below:
|mode||string – (“near”, “mid”, “far”)||Specifies which mode is being stored to eeprom|
|firmware_path||string||Specifies path to firmware with calibrated parameters|
|cal_map_path||string||Specifies path to store calibration data which is currently on EEPROM|
The following steps run through a near mode calibration with the target positioned at 300mm: