This is a repo for customizing video components and external triggers for OpenBCI EEG experiments.
- Install OpenCV packages by
pip install opencv-python
- Find the folder
./Images/Image_Class/Cat
. Put the kitten images in this folder. - Find the folder
./Images/Image_Class/Dog
. Put the puppie images in this folder. - In the terminal, change directory to the current folder or type
cd /Puppies_and_Kittens/
. Then typepython ExternalTriggerCreator.py -l settings.json
. The experiment videoproject_video.mp4
and the corresponding labelslabel.txt
will be output in the folder./
- "image_base_path": "./Images/", directory that stores all the images including welcome page and classification image pages.
- "image_types": ["Cat", "Dog"],
- "video_time": 3000, default time for each image to appear (ms)
- "trigger_interval": 100, time for the trigger to flick one time (ms)
- "flick_times": 5, times for the trigger to flick at the begining and ending of the video (ms)
- "fps": 20,
- "screen_size": [500, 400],
- "time_range_per_image": [3.5, 6.5],
- "video_output": "project_video.mp4",
- "label_output": "labels.txt",
- "trigger_position": [0, 300, 100, 400], [x_start, y_start, x_end, y_end]