Bubble Analyser is a Python application for detecting, measuring, and analyzing bubbles in images. It provides advanced image processing capabilities using watershed segmentation algorithms to accurately identify and measure bubbles of various sizes and distributions.
- Image Processing: Preprocess images with various transformations
- Bubble Detection: Identify bubbles using advanced watershed segmentation algorithms
- Measurement: Calculate size, shape, and distribution of bubbles
- Calibration: Convert pixel measurements to real-world units (mm)
- Manual Adjustment: Fine-tune detected bubbles with interactive tools
- Results Visualization: Generate histograms and statistics of bubble distributions
- User-Friendly GUI: Intuitive interface for different functionalities
For Windows users, a standalone executable is available in the release:
v0.1.0 https://github.com/ImperialCollegeLondon/bubble_analyser/releases/tag/v0.1.0
To install from source, follow the developer setup instructions below.
- Select Input Images: Load images containing bubbles for analysis
- Calibrate: Set up pixel-to-mm conversion using a reference image
- Process Images: Apply detection algorithms to identify bubbles
- Adjust Results: Fine-tune the detected bubbles if needed
- Export Data: Save measurements and visualizations
Bubble Analyser implements multiple watershed segmentation approaches:
- Normal Watershed: Standard watershed algorithm with triple threshold
- Iterative Watershed: Advanced algorithm that iteratively applies thresholds to detect objects at different intensity levels
This is a Python application that uses poetry for packaging and dependency management. It also provides pre-commit hooks for various linters and formatters and automated tests using pytest and GitHub Actions. Pre-commit hooks are automatically kept updated with a dedicated GitHub Action.
To get started:
-
Download and install Poetry following the instructions for your OS.
-
Clone this repository and make it your working directory
-
Set up the virtual environment:
poetry install
-
Activate the virtual environment:
poetry shell
alternatively, ensure any Python-related command is preceded by `poetry run'.
-
Install the git hooks:
pre-commit install
-
Run the main app:
python -m bubble_analyser
- Python 3.12
- PySide6 (Qt for Python)
- NumPy
- SciPy
- scikit-image
- OpenCV
- Matplotlib
Contributions are welcome! Please feel free to submit a Pull Request. If you would like to add more image processing algorithms, please see the guidance under the directory Methods
This project is licensed under the GNU General Public License v3.0 - see the LICENSE file for details.
- Mr Yiyang Guan - Department of Earth Science and Engineering, Imperial College London
- Dr Diego Mesa - Department of Earth Science and Engineering, Imperial College London
- Dr Diego Alonso Álvarez - Imperial College London RSE Team, Imperial College London
- Dr Paulina Quintanilla - Department of Chemical Engineering, Brunel University
- Dr Francisco Reyes - IntelliSense.io, Queensland, Australia