Windows

To install the tof library on Windows, run chronoptics-tof-installer.exe.

If the “User Account Control” screen appears, click “Yes” to allow the installer to run.

User Account Control

In the “Install Options” window, select the “Add tof_chronoptics to the system PATH for all users” option, or you can set the PATH variable manually later.

Install Options Add tof chronoptics PATH for all users

Running the viewer from the Start menu should open the viewer application.

start menu ToF Viewer

Python

If you are going to use the ToF library in Python, you must add the install location of the tof python library to the PYTHONPATH variable.

To set these environment variables, open the Control Panel and browse to “System and Security”, then to “System”. Click on “Advanced system settings” (on the left).

system

Click on “Environment Variables”.

System Properties

For the PYTHONPATH variable, double-click on “PYTHONPATH” under “User variables”.

Add the install location of the tof python library to the PYTHONPATH environment variable. By default, this is C:/Program Files/ToF/lib/python.

If you need to add multiple locations to your PYTHONPATH, separate the paths with a semicolon.

Edit environment variable PYHTONPATH

If the PATH variable was not added before, double-click on “Path” under “User variables”.

Add the install location of the tof.dll library to the Path environment variable. By default, this is C:/Program Files/tof/bin.

Edit environment variable path

Matlab

Select the “Set Path” button on the home ribbon of Matlab.

Set path location

Select the “Add Folder” button and browse to the install location of the ToF library, the default location is C:\Program Files\ToF\matlab\tof_chrono, and click add.

Set path

Click “Save” and then “Close”.

When running an example and the following error message appears:

  >> detect_cameras

  Invalid MEX-file 'C:\Program
  Files\ToF\lib\matlab\tof_chrono\tof_gige_camera_new.mexw64': The specified module
  could not be found.
  Error in GigeCameraMex (line 20)
  obj.mPtr = tof_gige_camera_new(port);
  Error in detect_cameras (line 3)
  cams = GigeCameraMex().discover();
  >>

This means the tof.dll is not on the System Path. Add the directory C:\Program Files\ToF\bin to the ssytem PATH environment variable and restart Matlab.