This repo consists of code to analyse the data collected from the Motion Capture Pillow (MCP) (see other repo for how this was done).
Use requirements.txt file to install libraries required.
Numpy also needs to be installed.
- Create new virtual env using:
python -m venv yourvenvname - Activate environment:
source yourvenvname/bin/activate - Install libraies using:
pip install requirements.txt - To deactivate venv:
deactivate
- Activate virtual env.
- Run the file by
python opticalflow.py <s> <path>. - s =
ffor fibrescope orwfor webcam. - path = path to video that is to be processed.
- See results!
- Activate venv
- Run the file by
python trial_img_process_calib.py - It requires user input to enter video path, if it requires calibration (Y/N), and selection of 'webcam' or 'fibrescope'. Follow prompts.
- Note: the calibration is only required for fibrescope. If N selected, it is assumed that the calibration files already exist. The path for these may need updating in the code.
- Command format:
python ml_pickle_results.py <whichmodel> - In whichmodel, pass one of the following options:
- bd_bin
- bd_gray
- lk_bin
- lk_gray
- DO NOT RUN THIS. THIS IS NO LONGER BEING USED.
- Get data from:
opticalflow.py - Calibrating paramters tuning:
trial_img_process_calib.py