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.
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.
Running the viewer from the Start menu should open the viewer application.
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).
Click on “Environment Variables”.
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.
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
.
Matlab
Select the “Set Path” button on the home ribbon of Matlab.
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.
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.