# Python contact angle image processing analysis
Project description
Python contact angle image processing analysis
A python script that follows a simple logical progression to reliably measure contact angles from image or video files. While the traditional methods for contact angle analysis typically rely on the user drawing tangent lines to droplets, which is both time consuming and can lead to bias in the analysis results, we attempt to automate this analysis to make the process both more robust and more amenable to high throughput data generation. The logic we use for this process is highlighted below:
Installation
The analysis script can be installed by cloning the repository into your desired working directory or via the following:
$ pip install contactangles
With the pip
installation, the main script can be run from the command line by calling analysis
; otherwise it must be run from within a Python instance (see Use section below).
Dependencies
The following packages must already be installed in your Python environment to contribute to the development of this project:
- numpy
- scipy
- scikit-image
- imageio
- matplotlib
- setuptools
- wheel
- twine
- pytest
- pip:
- imageio-ffmpeg
- pytest-subtests
- pytest-cov
Use
Depending on the installation choice, the script can either be run from the command line:
$ analysis path/to/files/of/interest
If you have installed as a developer, you can use the script by calling the main()
function from the file analysis.py
Parameter Definitions
The relevant threshold parameters that define where the tangent lines, baseline, and circle will be identified are most easily explained through the image below:
These parameters can be accessed through the flags --baselineThreshold
, --circleThreshold
, and --linThreshold
respectively. Additional flags can be set and can be shown from the help accessed by
$ analysis --help
Credits
Contact angle measurement automation has also been performed by mvgorcum, which uses a different approach to fitting the tangents, but inspired our work here.
Contribute
Please don't hesitate to submit any issues that you may identify with the approach or the coding. We will try to respond quickly to any questions that may arise. If you would like to contribute to the project, feel free to make any pull requests that will make the solution more robust/efficient/better for your application, and we will do our best to incorporate it in the next release.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file contactangles-0.2.0.dev1.tar.gz
.
File metadata
- Download URL: contactangles-0.2.0.dev1.tar.gz
- Upload date:
- Size: 36.0 MB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.22.0 setuptools/44.0.0 requests-toolbelt/0.9.1 tqdm/4.41.1 CPython/3.7.6
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 747fe9a4ba3f358c2825e2eb2dcbafbcbec19f7ad3d46727ffc3fcc938c85294 |
|
MD5 | 876a2037a6a1a9ef3d2119774812b158 |
|
BLAKE2b-256 | 939ff35ad943fded7c6a77cc089926c8c6ebd472d3a1154befa138a080cf04a3 |
File details
Details for the file contactangles-0.2.0.dev1-py3-none-any.whl
.
File metadata
- Download URL: contactangles-0.2.0.dev1-py3-none-any.whl
- Upload date:
- Size: 25.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.22.0 setuptools/44.0.0 requests-toolbelt/0.9.1 tqdm/4.41.1 CPython/3.7.6
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 23087f5ec5aa27c8deafd025fa36640f1c51fa8d969e8e99c974a0915af422d3 |
|
MD5 | 415c7cabef609e69d90a8a7e3ea1b331 |
|
BLAKE2b-256 | 9695330f40d718813e7d744887e694625f06e4c32983728fc0235369674567b4 |