How to install the MindTrace toolbox

The MindTrace toolbox functions as an interface between your experiment code and the webcam. After connecting to the toolbox from within your experiment, you can easily send commands to the toolbox in order to e.g. start recording via the webcam or take snapshots. Sending the appropriate commands for calibration points can also be easily communicated to the toolbox. Additionally, the toolbox ensures that all the data is stored in an appropriate format, so that it can be uploaded seamlessly into our system and analyzed immediately.

mindtrace-toolbox-schema

What do you need on your computer to make use of the MindTrace Toolbox?

First of all, you need Python 3 (up to version 3.6.5). Normally, Python comes pre-installed with all unix systems (Mac OS and Linux). However, you need to make sure that you are indeed using Python 3 (up to version 3.6.5). You can easily check your python version by pasting this line in your terminal:

python -V

If you are already running Python 3, there is no need to install it again. If you execute the commands below in a Mac or Linux environment, the installation command for Python 3 will be ignored, if Python 3 is already installed on your system.

Mac


Mac OS in general has Python 2 pre-installed. Because our Toolbox requires Python 3 and a few additional packages for Python itself and your system, we want to make sure that everything is installed properly. In order to do so, you need to install Homebrew, which is a package manager for Mac OS. Paste the following line into your terminal to install Homebrew:

/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"

Now that we have Homebrew installed, we can continue to install Python 3, ffmpeg (package for handling multimedia data), pip (python package manager), and numpy (scientific computing package).

brew install python3 ffmpeg
sudo easy_install pip3
pip3 install numpy

After you’ve installed everything, you can check here how to set the toolbox up to use the device that you want to use – Setup the toolbox

Linux


Linux already has its own package manager. You can directly continue to install Python 3, ffmpeg (package for handling multimedia data) , pip (python package manager), and numpy (scientific computing package) by executing the following commands:

sudo apt-get install python3 ffmpeg
sudo easy_install pip3
pip3 install numpy

After you’ve installed everything, you can check here how to set the toolbox up to use the device that you want to use – Setup the toolbox

Windows


You can download Python 3 via the following URL: https://www.python.org/downloads/. Select Python 3 up to version 3.6.5! Make sure that during the installation you select to add the Python install to your path so that you can easily run commands via the terminal. If the installation process doesn’t offer you that option it is most likely doing it automatically.

You can download ffmpeg via the following URL: https://ffmpeg.zeranoe.com/builds/. Unzip ffmpeg directly to your C:\ drive so that the resulting path and folder is C:\ffmpeg. Finally, you need to add the ffmpeg.exe to your environment variables. That will make it easy to call ffmpeg from within the terminal.

In order to do that, open the Start menu and right click on “Computer” and then click on “Properties”.

add ffmpeg windows path step 1

Select “Advanced system settings”:

add ffmpeg windows path step 2

Click on “Environment variables”:

add ffmpeg windows path step 3

Edit the Path variable:

add ffmpeg windows path step 4

Add C:\ffmpeg\bin at the end. Make sure that this path is separated by a semi-colon (;) from the previous folder.

The package manager pip is generally installed with Python directly, so no need to install it separately. The last step is to now install numpy through the command line:

pip install numpy

After you’ve installed everything, you can check here how to set the toolbox up to use the device that you want to use – Setup the toolbox

0 replies

Leave a Reply

Want to join the discussion?
Feel free to contribute!

Leave a Reply