Skip to content

Software

libaditof

By Analog Devices, Inc., United States (checked on github.com/analogdevicesinc (opens in a new tab)), from github.com/analogdevicesinc/libaditof (opens in a new tab)

  • Perception
  • Driver or SDK
  • MIT

A C/C++ SDK from Analog Devices for controlling its time-of-flight (ToF) cameras, exposing the camera, AB, and depth frame streams through an API.

Facts

GitHub stars
5read on 28 Nov 2026
Last update
27 Nov 2026Newest commit on main
Maintenance
Activea commit in the last 90 days
Difficulty
Advanced

Checked on GitHub on 28 Nov 2026.

Licenses

Code
MIT (opens in a new tab)

Read by Robotheca from LICENSE (opens in a new tab) (MIT) at commit ada6b06 (opens in a new tab), on 28 Nov 2026.

Commercial use
Yes

At a glance

What it is
  • Provides an API to control ADI ToF cameras and read their AB and depth frame streams.
  • Works with the ADSD3500 processor paired with the ADSD3100 or ADSD3030 ToF imager, connected over MIPI for frame data and I2C or SPI for control.
  • Builds as a shared library, libaditof.so, using CMake and a C++ compiler.
  • Loads camera parameters from an adcam_config.json file, found next to the executable, via an environment variable, or from built-in defaults.
  • Includes a tool to capture live camera parameters to a JSON configuration file.

Robotheca's summary of the project's documents, not the creator's words.

Robots on Robotheca
No robot on Robotheca uses it yet.
Licence
MIT. Commercial use: Yes. Where it was read
Install
In the creator's words: The project's README (opens in a new tab)
Maintenance
Active, last commit on 27 Nov 2026.

Use it

How to install it, in the creator's words: The project's README (opens in a new tab)

Robotheca doesn't review code. Read it before running it.

Files and versions

Facts read at commit ada6b06

Robotheca read the repository at two versions: the summary at f11dd07 and the facts and the README at ada6b06 (read on 28 Nov 2026).

Robotheca never hosts the code: each link goes to the creator's own page.

The README

The creator's own README, copied as written: README.md by Analog Devices, Inc., at commit ada6b06, under MIT (opens in a new tab). The original on GitHub (opens in a new tab).

Read the README here

Analog Devices 3D ToF SDK

Please note, the libaditof GitHub Wiki (opens in a new tab) is available with additional documentation.

Release 7.1.0 Dependencies
ADTF Time-of-Flight Imager
├─ Single or Dual ADSD3500 v8.1.0
├─ ToF-drivers v7.0.0
└─ libaditof v7.1.0
   └─ Depth Compute Library 5.1.0

For reference, the latest Eval Kit, ADCAM 1.0.0, is available here:

Note, the ADSD3500 Firmware and Depth Compute Libraries included with the evaluation kit are provided for evaluation only.

Overview

The ADI ToF SDK is designed to support ADI's ToF hardware.

ToF Imager (ADSD3100 or ADSD3030)
            ||
            ||
    ADSD3500 (Dual or Single)
            ||
            || (MIPI for Frame Data)
            || (I2C or SPI for Control)
            ||
------------------------------------------
            |                      (Linux) 
       Host Driver
            |
            |
         libaditof


|| - Hardware Connection
 | - Software Connection

The SDK provides an API to control the ToF camera, AB, and depth frame streams.

License : (opens in a new tab)

Repos using libaditof:

Note, prior to committing to the repo it is important to format the source code, see the code formatting (opens in a new tab).

Build libaditof SDK

Note: all code must be formatted by clang-format and issues via clang-tidy must be addressed.

See the documents:

Linux Build
Pre-requisites
  • CMake
  • g++
  • Python 3 - note, we are assuming Python 3.10 in this document, change as needed for your setup
  • Doxygen - for documentation generation
  • Graphviz - for documentation generation
Installing the pre-requisites

Note, python3.10-dev is specific to the NVIDIA Jetson Orin Nano Dev Kit Jetpack 6.2.

If your Linux does not use Python 3.10 you will need to change python3.10-dev to reflect the version of Linux on your system.

sudo apt update
sudo apt install cmake g++ \
     doxygen graphviz \
     python3.10-dev
Dependencies

In addition the depth compute libraries are required.

You can get the two library from the ADCAM release software, but please note in which case it is under an evaluation license.

For a non-eval license please contact us at tof@analog.com (opens in a new tab).

The two libraries files are:

  • libtofi_compute.so
  • libtofi_config.so

There are two options for pointing these libraries:

  1. Set the LIBTOFI_LIBDIR_PATH enviroment variable to the path with these files.
  2. Place the libraries must be in a folder called libs that in one level below the cloned ADCAM repo folder. For example:
(aditofpython_env) analog@analog-desktop:~/dev/ADCAM$ pwd
/home/analog/dev/ADCAM
(aditofpython_env) analog@analog-desktop:~/dev/ADCAM$ tree ../libs
../libs
├── libtofi_compute.so
└── libtofi_config.so
Building libaditof
Linux Build
git clone https://github.com/analogdevicesinc/libaditof
cd libaditof
git checkout <branch or tag>
mkdir build && cd build
cmake -DNVIDIA=1 ..
cmake --build . --config RELEASE -j 6

SDK binary and associated softlinks are hare *build/libaditof.so **

Windows Build

See windows-build.md (opens in a new tab).

Camera Configuration File
Saving the current configuration

Use data_collect with --scf to capture the live camera parameters to a JSON file:

./data_collect --m 0 --n 1 --scf /path/to/adcam_config.json

This saves all active depth parameters (JBLF, thresholds, FPS, etc.) for the given mode. Run once per mode and combine as needed.

The file has one entry per mode. Each mode holds depth-compute and configuration-parameters, plus one section per depth algorithm used with it, mode-fusion and/or lens-scatter:

{
  "0": {
    "depth-compute": { "abThreshMin": 3.0, "confThresh": 25.0, ... },
    "configuration-parameters": { "fps": 30.0, ... },
    "mode-fusion": { "ABFusionEnabled": 1.0, ... }
  },
  "7": { ... }
}

The algorithm sections are used only while that algorithm runs (Camera::setModeFusion(), Camera::setLensScatterCompensation()); otherwise the mode's standard parameters apply.

Loading the configuration

The SDK looks for adcam_config.json in the following order:

  1. Same directory as the executable — place adcam_config.json next to your binary and it is picked up automatically.
  2. ADCAM_CONFIG_PATH environment variable — set this to the full path of the config file to use it from any location:
    export ADCAM_CONFIG_PATH=/path/to/adcam_config.json
    ./your_app
    
    To make this permanent, add the export line to ~/.bashrc. If the file is missing at runtime the SDK logs a warning and falls back to factory defaults automatically.
  3. Factory defaults — if neither of the above is found, the SDK runs with built-in defaults.

The explicit path passed to camera->initialize("/path/to/config.json") always takes priority over auto-discovery.

RGB Camera

With the RGB camera enabled (rgbCameraEnable, on by default), frames carry two extra data types, filled from the RGB frame paired with each depth frame:

  • rgb: the RGB image as the depth camera sees it, B, G, R per depth pixel. Each depth pixel is mapped into the RGB image with the RGB-depth calibration (read from the chip) at a fixed 1 m; pixels outside the RGB field of view are 0.
  • xyz_color (with xyzEnable): R, G, B, A per xyz point, projected with the point's own depth. A is the XYZColorStatus: Valid, Occluded (a nearer surface hides the point from the RGB camera; R, G, B are 0), OutOfView, NoDepth or NoColor. Points outside the RGB view are also zeroed in xyz.

RGBDCoregistration (aditof/rgbd_coregistration.h) does the same for data captured elsewhere.

start() streams no sooner than 3 s after the last ADSD3500 reset (the SDK resets the chip in initialize() and stop()), because frames streamed earlier can be corrupt.

CMake Options

For the build options in CMakeLists.txt (opens in a new tab) see cmake/readme.md (opens in a new tab).

Tests

Test infrastructure using GoogleTests and PyTest has been added.

See tests/README.md (opens in a new tab).

Robotheca lists software as a reference: nothing is hosted or run here, and every fact links to where it was read.