Skip to main content

# 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:

Logic flow

Installation

The analysis script can be installed by cloning the repository into your desired working directory or via the following:

$ pip install droppy

With the pip installation, the main script can be run from the command line by calling droppy; 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:

$ droppy 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:

Threshold example image

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

$ droppy --help

Documentation

A GitHub pages site with the full documentation and API is provided here

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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

droppy-1.0.0a0.post1.tar.gz (40.6 kB view details)

Uploaded Source

Built Distribution

droppy-1.0.0a0.post1-py3-none-any.whl (34.1 kB view details)

Uploaded Python 3

File details

Details for the file droppy-1.0.0a0.post1.tar.gz.

File metadata

  • Download URL: droppy-1.0.0a0.post1.tar.gz
  • Upload date:
  • Size: 40.6 kB
  • 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

Hashes for droppy-1.0.0a0.post1.tar.gz
Algorithm Hash digest
SHA256 2ac8a7e1d9b36f0acd413b15a9d8ed8153bb6807cbe3e510041647767e6f20ba
MD5 df67fbec0f5b6c7e6556bd363c36af31
BLAKE2b-256 9dd457fe2ccae5124d4ed6e96c89421bcd2ed2a1f46c117c798ad971ab6445c5

See more details on using hashes here.

File details

Details for the file droppy-1.0.0a0.post1-py3-none-any.whl.

File metadata

  • Download URL: droppy-1.0.0a0.post1-py3-none-any.whl
  • Upload date:
  • Size: 34.1 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

Hashes for droppy-1.0.0a0.post1-py3-none-any.whl
Algorithm Hash digest
SHA256 d2895befe081f69b3a9c1ecf45b8be5c5ec79b066cc1850f95f241bf33515973
MD5 a1c590b06bdfaba065868356f864993e
BLAKE2b-256 ba03375b4cea1aba476880330b5297d1071836bdf346fd8b05dc163bd4feb0f9

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page