![Logo](assets/logo.png)
A Python GUI designed to acquire webcam images synchronised with a widefield imaging system.
Explore the DocumentationTable of Contents
For many scientific applications, it is useful to have a camera feed synchronised with another acquisition system. If both systems have the same acquisition rate, a common trigger can be used: if their sampling rate is different, a different approach must be used.
This programs solves this problem by monitoring the trigger signal of the acquisition system with an Arduino Board. For each Falling Edge in the incoming signal, the Arduino increases its Frames Acquired index by one, thus tracking the number of frames acquired by the imaging system.
This variable is then read by the Webcam software, which is running a indenpendent image acquisition using a USB webcam. For each webcam frame acquired, the program will save the Frames Acquired index in a separate NPY array. For each webcam image, it is therefore possible to know the corresponding Imaging System image.
You can download the program by following the instructions below. Some indications are also given on how to adapt the program to your current setup.
- Python 3.9 must be installed
- Download the latest release in the Releases section of the repository.
- Unzip the downloaded file and move to desired location.
- Install the required modules using one of the following methods:
- Open a terminal window
- Go to the directory where the program is saved using the
cd
command. - Run the following command:
pip install -r requirements.txt
- Open a terminal window
- Run the following two commands:
conda create -n py3.9 python=3.9.12
conda activate py3.9
- In a terminal window, go to the directory where the program is saved using the
cd
command. - Run the following command:
pip install -r requirements.txt
- Launch the
webcam.pyw
module found in thegui
subfolder.
- Open the
config.json
file using any text editor. - Replace the string at te
arduino_port
key with the desired port.
- Open the
arduino.ino
file using any text editor. - On the first line, replace the
inPin
variable with the desired PIN port number. - Transfer the
arduino.ino
file to the board using the Arduino Software.
See the open issues for a full list of proposed features (and known issues).
Distributed under the MIT License. See LICENSE.txt
for more information.
Created by Maxence Pelletier-Lebrun - [email protected]
For a research internship at Michèle Desjardins' Laboratory
Research Page: https://www.crchudequebec.ulaval.ca/recherche/chercheurs/michele-desjardins/