This project measures color changes in a user-defined region of interest (ROI) with an easy-to-use graphical user interface (GUI). ColorWatch was initially developed to monitor color changes in coupling reactions, but it can be applied to anything in need of color monitoring.
- User-Friendly GUI: Built with Python and Tkinter
- Downloadable Executable: Easy and ready to use.
git clone https://github.com/IsaacTieu/color.git
Create a virtual environment using your preferred tool (e.g., venv, conda). Here are conda installation instructions.
cd color
conda env create -f environment.yml
conda activate colorenv
The scripts can either be run with the executable, in an IDE or through the command line.
- Double click main.exe
- This takes ~30 seconds - 1 min to load.
- Open
main.pyin your preferred IDE and press the run button.
python src/main.py
-
Camera Index: Specifies the camera to be accessed.
Example:1for the first camera. For an external webcam, it is typically1. -
Time Elapsed per Color Check (seconds): Specifies the rate in seconds at which pictures are saved.
Example:3for a picture saved every 3 seconds. -
Warning Sign Length (frames): Duration of a warning sign being displayed on screen in frames.
Example:30for a message to be displayed for 30 frames. For a 30 frames per second webcam, this would result in the warning sign lasting for 1 second. -
Webhook URL: Specifies the webhook to send Microsoft Teams notifications to. Webhooks can be created with this tutorial.
Example:falsefor no Microsoft Teams message to be sent. -
Select Region of Interest (ROI): Press this button to select a ROI. This can be done by holding down left click on the mouse and dragging across the screen. Once finished, press and holdqto exit.
-
(R/G/B) Value Change: This represents the R/G/B value change to be detected for each value. These values range from 0-255, so smaller values will detect smaller changes.
Example: `256' for no R/G/B value change to be detected. -
Start Live Monitoring: Press this button to start the live monitoring. Once finished, press and holdqto exit.
Save Files: Press this button to initiate file saving..csvfiles will be exported containing R/G/B values and time data. A video of the session will be exported as a.mp4file.
Contributions are welcome! Feel free to open an issue or submit a pull request.
This project is licensed under the MIT License. See the LICENSE file for details.
This README was last updated on April 29, 2025.