Author: Nicolò Bagnasco
Contact: nicolo.bagnasco@edu.unito.it
FocusCC is a Python-based application designed for detecting and analyzing events in a cloud chamber using computer vision techniques. It processes a live video feed, applies edge detection, and identifies particle tracks in real time. The software also supports saving detected events, managing multiple webcams, and customizing various detection parameters.
- Live Video Feed: Displays both raw and processed video feeds in real time.
- Event Detection: Detects particle tracks based on edge detection and threshold parameters.
- Webcam Selection: Choose from multiple connected webcams via a dropdown menu.
- Cooldown Feature: Avoid redundant detections by setting a cooldown time between events.
- Customizable Parameters:
- Event detection threshold
- Low and high thresholds for Canny edge detection
- Event Logging: Logs all system messages and detected events in a console-like interface.
- Save Events: Toggle between saving detected events as image files or viewing them live.
- Python 3.8 or newer
- Supported Operating Systems:
- macOS
- Linux
- Windows (partial webcam detection support)
- Required Python libraries:
opencv-pythonnumpyPillowtkinter(pre-installed with Python)
-
Clone the Repository:
git clone https://github.com/bagnasconicolo/Focuscc cd FocusCC -
Install Dependencies:
pip install -r requirements.txt
-
Run the Application:
python Focuscc.py
-
Live Feed:
- Displays the original and processed video feeds side by side.
- Detected events are highlighted in the processed feed.
-
Controls:
- Start Webcam: Activates the video feed for the selected camera.
- Stop Webcam: Deactivates the video feed.
- Save Events: Toggles saving detected events as
.jpgfiles.
-
Webcam Selector:
- Use the dropdown menu to select from available webcams.
-
Event Log:
- Displays system messages and detected events in a console-like interface.
-
Filename Prefix:
- Customize the prefix for saved event files.
-
Cooldown:
- Avoid redundant detections by enabling a cooldown period (in seconds) between events.
-
Start the Webcam:
- Select a camera from the dropdown menu.
- Click Start Webcam to begin the live feed.
-
Adjust Parameters:
- Use sliders to customize the detection threshold and Canny edge detection parameters.
-
Monitor Events:
- Detected events will be logged in the Event Log and highlighted in the processed feed.
-
Save Events:
- Enable Save Events to save images of detected events.
-
Stop or Exit:
- Use Stop Webcam to deactivate the feed or Exit to close the application.
- Event Threshold: Adjusts sensitivity for detecting events.
- Canny Edge Detection:
- Low Threshold: Lower bound for detecting edges.
- High Threshold: Upper bound for detecting edges.
- Filename Prefix: Set a custom prefix for saved event images.
- Cooldown: Set a time delay (in seconds) between consecutive detections.
- Icon: Replace
ccicon.pngwith your desired icon file in the project directory.
-
Webcam Not Detected:
- Ensure the webcam is connected and properly recognized by your operating system.
- On Linux, ensure
v4l2-ctlis installed. - On macOS, ensure camera permissions are enabled.
-
No Events Detected:
- Lower the Event Threshold slider.
- Adjust Canny Edge Detection parameters for better sensitivity.
-
Application Crash:
- Ensure all required libraries are installed.
- Verify that the correct camera index is selected.
-
Icon Not Displaying:
- Ensure the icon file
ccicon.pngis in the correct directory and properly named.
- Ensure the icon file
- Support for advanced particle track visualization.
- Automated analysis of saved event data.
- Cross-platform webcam detection enhancements for Windows.
- Extended cooldown customization (e.g., per event type).
This software is open-source and distributed under the MIT License.
For support, feedback or contributions, contact Nicolò Bagnasco:
📧 nicolo.bagnasco@edu.unito.it
