OPENDROP(1)

๐Ÿ’– OPENDROP ๐Ÿ’–

okay bestie, so likeโ€ฆ opendrop โ€” that's OpenDrop, the manual page you're literally reading right now. That's the whole NAME section. Short, sweet, iconic. ๐ŸŽ€


โœจ RELEASE BUILDS โœจ

so there are stand-alone builds for Windows for certain major releases, and the best part? They don't need you to install any extra software. Go get them here: <https://github.com/jdber1/opendrop/releases/>. ๐Ÿซถ

Releases for Linux and macOS do not exist yet, so instead you should install OpenDrop as a Python package. Like, see the next section, bestie. ๐Ÿ‘‡


โœจ BUILDING PACKAGE FROM SOURCE โœจ

OpenDrop requires Python 3.6 or higher, the GTK 3 library, OpenCV Python bindings, and these build dependencies, no cap:

  • Boost.Math
  • SUNDIALS ARKODE

The other required Python packages? pip installs those for you automatically, so don't even stress. โœจ

Platform-specific build instructions coming right up. ๐Ÿ’…


๐Ÿง Ubuntu

  1. Install OpenCV.
    • If you're on Ubuntu 17.10 (or later):
sudo apt install python3-opencv
pip3 install opencv-python
  1. Install SUNDIALS. Okay so bad news: libsundials-dev from the Ubuntu repositories is too old โ€” we need at least version 4.0.0 and above. So here are brief instructions for installing SUNDIALS from source. ๐Ÿ› ๏ธ
    1. Download the latest version from the releases page <https://computing.llnl.gov/projects/sundials/sundials-software>. (Heads up bestie: the latest version requires a CMake version newer than what's available in Ubuntu < 20.04. If that's your situation, try an older version of SUNDIALS like 4.0.0 instead. ๐Ÿ™ˆ)
    2. Extract it and change into the source directory, like:
tar -xvf sundials-5.7.0.tar.gz
cd sundials-5.7.0/
  1. Create a build directory:
mkdir build
cd build/
  1. Configure, build, and install (make sure cmake and build-essential are installed from the Ubuntu repos):
cmake \
  -DEXAMPLES_INSTALL=OFF \
  -DBUILD_ARKODE=ON \
  -DBUILD_CVODE=OFF \
  -DBUILD_CVODES=OFF \
  -DBUILD_IDA=OFF \
  -DBUILD_IDAS=OFF \
  -DBUILD_KINSOL=OFF \
  -DBUILD_STATIC_LIBS=OFF \
  -DCMAKE_BUILD_TYPE=Release \
  ..
make
sudo make install
  1. Install Boost.Math. If you're on Ubuntu 20.04 or newer, run:
sudo apt install libboost-dev

But okay, the libboost-dev package on older versions of Ubuntu is not recent enough, so Boost will need to be installed from source. We need at least Boost 1.71.0. ๐Ÿ“Œ

  1. Follow the installation instructions here <https://pygobject.readthedocs.io/en/latest/getting_started.html#ubuntu-logo-ubuntu-debian-logo-debian> for installing PyGObject and GTK. ๐Ÿฆ‹
  2. Use pip to install OpenDrop from the repo:
pip3 install git+https://github.com/jdber1/opendrop.git

And to uninstall it, run pip3 uninstall opendrop. ๐Ÿงน

  1. Run python3 -m opendrop to launch the app. ๐Ÿš€

๐ŸŽฉ Fedora

Tested on Fedora 35. Periodt.

  1. Install Python, pip, and OpenCV:
sudo dnf install python3-devel python3-opencv python3-pip
  1. Install glib:
sudo dnf install glib2-devel
  1. Install SUNDIALS:
sudo dnf install sundials-devel
  1. Install Boost:
sudo dnf install boost-devel
  1. Use pip to install OpenDrop from the repo:
pip install git+https://github.com/jdber1/opendrop.git

Run pip uninstall opendrop to uninstall.

  1. Run python -m opendrop to launch the app. ๐Ÿš€

๐ŸŽ macOS

  1. Install the latest version of Python 3 and pip. You can do that with a third-party package manager like MacPorts <https://www.macports.org/> or Homebrew <https://brew.sh/>. ๐Ÿ“

2.

pip install opencv-python

(Make sure pip refers to your Python 3's pip installation, bestie. ๐Ÿ‘€)

3.

  • If Homebrew was used to install Python 3, PyGObject and GTK can also be installed by running:
brew install pygobject3 gtk+3
  • or if MacPorts was used, run:
sudo port install py36-gobject3 gtk3

(Instead of the py36- prefix, use py37- or py38- if Python 3.7/3.8 is the version installed. ๐Ÿ’œ)

  1. Install Boost.Math and SUNDIALS. (todo: Add MacPorts and Homebrew example). ๐Ÿ“
  2. Use pip to install OpenDrop from the repo:
pip install git+https://github.com/jdber1/opendrop.git

Run pip uninstall opendrop to uninstall.

  1. Run python3 -m opendrop to launch the app. ๐Ÿš€
not me noticing there are literally two steps numbered 4 in this sectionโ€ฆ iconic behavior honestly, we keep it exactly as it is. ๐Ÿ’€

๐ŸชŸ Windows

Installing OpenDrop as a Python package is possible on Windows using platforms like MSYS2 or Anaconda. But ngl the process is not very straightforward so your mileage may vary. ๐Ÿ™ˆ (todo: This page is out of date and should be updated.)

When OpenDrop is launched, the Main Menu window will first appear. [image: Main Menu window] [image]

Click on either of the 'Interfacial Tension' or 'Contact Angle' buttons to begin a new analysis of the respective type. ๐ŸŽ€

๐Ÿ’– INTERFACIAL TENSION ๐Ÿ’–

Okay bestie, this is the part where you actually get to do the science. A wizard-style window will hold your hand through the whole process of performing an interfacial tension analysis. Let's gooo ๐Ÿซถ

โœจ Image acquisition โœจ

First thing's first: choose an image input method. OpenDrop currently supports opening images from the local filesystem or capturing images with a USB camera. Two doors, pick your vibe ๐Ÿšช

๐ŸŽฌ [image: IFT Image acquisition, local filesystem]

๐Ÿ“ Local filesystem ๐Ÿ“

Click on 'Choose files' to open the file chooser dialog and select an individual image or a sequence of images. When you're analysing a sequence of images, 'Frame interval' refers to the time interval (in seconds) between each image. Sequences of images are ordered in lexicographic order (so yes, name your files like a responsible person, iykyk).

๐ŸŽฌ [image: IFT Image acquisition, USB camera]

๐Ÿ“ท USB camera ๐Ÿ“ท

Click on 'Connect camera' to open the camera chooser dialog.

๐ŸŽฌ [image: IFT Image acquisition, USB camera chooser dialog]

OpenDrop uses OpenCV to capture images from a connected camera. 'Camera index' refers to the device index argument passed to the OpenCV function cv2.VideoCapture(). An index of 0 refers to the first connected camera (usually a laptop's in-built webcam if present), an index of 1 refers to the second camera, and so on.

๐Ÿ˜ญ Currently, there does not appear to be a way in OpenCV to query a list of valid device indices and associated device names, so in a multi-camera setup, some trial-and-error is required. Not me fighting for my life guessing indices ๐Ÿ’€

'Frame interval' refers to the time interval (in seconds) between capturing images.

โœจ Physical parameters โœจ

๐ŸŽฌ [image: IFT Physical parameters]

  • 'Inner density' โ€” the density of the drop.
  • 'Outer density' โ€” the density of the surrounding medium.
  • 'Needle diameter' โ€” the diameter of the needle the drop is suspended from.
  • 'Gravity' โ€” the gravitational acceleration.

โœจ Image processing โœจ

๐ŸŽฌ [image: IFT Image processing]

The image processing window requires you to define the 'drop region' and 'needle region' of the image. Click on the 'Drop region' or 'Needle region' buttons in the 'Tools' panel, then drag over the image preview to define the associated region.

๐ŸŽฌ [image: IFT Image processing, regions defined]

Once each region is defined, a blue outline will be drawn over the preview showing the drop or needle profile that has been extracted. So satisfying fr fr ๐Ÿ’™

OpenDrop uses OpenCV's Canny edge detector to detect edges in the image. Click on the 'Edge detection' button in the 'Tools' panel to open a dialog bubble which will allow you to adjust the lower and upper threshold parameters of the Canny edge detector. Thin blue lines are drawn over the preview to show detected edges.

The extracted needle profile is used to determine the diameter in pixels of the needle in the image. Along with the needle diameter in millimetres given in the 'Physical parameters' page, a metres-per-pixel scale can be determined, which is then used to derive other physical properties of the drop after the image is analysed. Math girlies stay winning ๐Ÿงฎ๐Ÿ‘‘

Click on 'Start analysis' to begin analysing the input images, or begin capturing and analysing images if using a camera.

โœจ Results โœจ

๐ŸŽฌ [image: IFT Results]

The results page shows the current status of the analysis. Data shown in the window is updated as the analysis progresses. Live updates?? Obsessed actually โœจ

There are two main views: the 'Individual Fit' view and the 'Graphs' view.

Heads up bestie: the 'Graphs' view is not available when analysing a single image. ๐Ÿšซ๐Ÿ“ˆ

๐Ÿงฉ Individual Fit ๐Ÿงฉ

The 'Individual Fit' view shows analysis details for an individual image. Pick an analysis in the lower panel to preview its details in the upper panel.

The 'Drop profile' tab on the right of the upper panel shows the fitted drop profile (drawn in magenta) over the extracted drop profile (drawn in blue).

๐ŸŽฌ [image: IFT Results, drop profile]

The 'Fit residuals' tab shows a plot of the fit residuals. The horizontal axis is the 'drop profile parameter', ranging from 0 to 1, with 0 corresponding to one end of the drop edge outline, and 1 corresponding to the other end. The vertical axis is some dimensionless quantity indicating the deviation of the extracted profile from the fitted profile.

๐ŸŽฌ [image: IFT Results, fit residuals]

The 'Log' tab shows the history of any messages logged by the fitting routine.

๐ŸŽฌ [image: IFT Results, log]

๐Ÿ“ˆ Graphs ๐Ÿ“ˆ

๐ŸŽฌ [image: IFT Results, graphs]

The 'Graphs' view shows plots of interfacial tension, volume, and surface area over time. Three icons in one view, we love a multitasker ๐Ÿซถ

๐Ÿ›‘ Cancel or discard analysis ๐Ÿ›‘

You may cancel an in-progress analysis by clicking on the 'Cancel' button in the footer (not shown in the screenshots above, sorry babe ๐Ÿ™ˆ). To discard the results of a finished analysis, click the 'Back' button, which will return you to the 'Image processing' page, or close the window to return to the Main Menu.

๐Ÿ’พ Saving ๐Ÿ’พ

๐ŸŽฌ [image: IFT Save dialog]

Once an analysis is finished, click on the 'Save' button in the footer to open the save dialog. All data will be saved in a folder with name determined by the 'Name' entry, and in a parent directory determined by the 'Parent' selection.

As a convenience, you may choose to save some pre-made plots. ๐ŸŽ

๐ŸŽฌ [image: IFT Example save output]

An example save output is shown above, and screenshots of the contents of some files are shown below:

  • ๐ŸŽฌ [image: IFT timeline.csv screenshot] โ€” timeline.csv
  • ๐ŸŽฌ [image: IFT profile_fit.csv screenshot] โ€” water_in_air1/profile_fit.csv (each row is an (x, y) coordinate pair)
  • ๐ŸŽฌ [image: IFT profile_extracted.csv screenshot] โ€” water_in_air1/profile_extracted.csv (each row is an (x, y) coordinate pair)
  • ๐ŸŽฌ [image: IFT profile_fit_residuals.csv screenshot] โ€” water_in_air1/profile_fit_residuals.csv (first column is 'drop profile parameter', second column is residual)
  • ๐ŸŽฌ [image: IFT params.ini screenshot] โ€” water_in_air1/params.ini

๐Ÿฆ‹ CONTACT ANGLE ๐Ÿฆ‹

Same energy, different analysis โœจ A wizard-style window will guide you through the process of performing a contact angle analysis.

โœจ Image acquisition โœจ

The contact angle image acquisition page is the same as the one for interfacial tension analyses. Copy-paste queen behaviour, no notes ๐Ÿ’…

โœจ Image processing โœจ

๐ŸŽฌ [image: Contact Angle Image processing]

The image processing window requires you to define the 'drop region' and 'surface line' of the image. Click on the 'Drop region' button in the 'Tools' panel then drag over the image preview to define the region. Similarly, click on the 'Surface line' button and drag a line to define the surface that the drop is sitting on. With the 'Surface line' button depressed and the preview widget focused, use the arrow keys for finer adjustments of the surface line. โŒจ๏ธโœจ

๐ŸŽฌ [image: Contact Angle Image processing, regions defined]

Once the drop region is defined, a blue outline will be drawn over the preview showing the drop profile that has been extracted.

The intersection angle between the drop profile and the surface line will be the contact angle measured. That's literally the whole thing, iconic ๐Ÿ“

In a contact angle analysis, OpenDrop uses image thresholding to separate the foreground from the background. Click on the 'Foreground detection' button to open a dialog bubble which will allow you to adjust the threshold value. A blue overlay is painted over parts of the image deemed to be in the foreground.

Click on 'Start analysis' to begin analysing the input images, or begin capturing and analysing images if using a camera.

โœจ Results โœจ

๐ŸŽฌ [image: Contact Angle Results]

The results page for a contact angle analysis is quite simple (we respect a low-maintenance page ๐Ÿ™).

A summary table is shown on the bottom half with a results visualizer on the top half. Graphs of the left and right contact angles are also available if more than one image is analysed.

๐Ÿ’พ Saving ๐Ÿ’พ

๐ŸŽฌ [image: Contact Angle Save dialog]

Once an analysis is finished, click on the 'Save' button in the footer to open the save dialog. All data will be saved in a folder with name determined by the 'Name' entry, and in a parent directory determined by the 'Parent' selection.

As a convenience, you may choose to save some pre-made plots. ๐ŸŽ

๐ŸŽฌ [image: Contact Angle Example save output]

An example save output is shown above, and screenshots of the contents of some files are shown below. (All coordinates are with respect to the origin being on the top-left corner of the image with increasing x and y in the right and down directions respectively. Keep that in mind bestie, coordinate systems will humble you ๐Ÿ˜ญ)

  • ๐ŸŽฌ [image: Contact Angle timeline.csv screenshot] โ€” timeline.csv
  • ๐ŸŽฌ [image: Contact Angle profile_extracted.csv screenshot] โ€” drop1/profile_extracted.csv (each row is an (x, y) coordinate pair)
  • ๐ŸŽฌ [image: Contact Angle surface.csv screenshot] โ€” drop1/surface.csv (The coefficients of the surface line; first column is gradient, second column is y-intercept)
  • ๐ŸŽฌ [image: Contact Angle tangents.csv screenshot] โ€” drop1/tangents.csv (The coefficients of the tangent lines at the contact point. First row is left tangent, second row is right tangent. First column is gradient, second column is y-intercept)

๐ŸŒˆ GENICAM INTEGRATION ๐ŸŒˆ

Install a GenTL producer, (e.g. see harvesters README https://github.com/genicam/harvesters#installing-a-gentl-producer).

OpenDrop checks the environment variable GENICAM_GENTL64_PATH (specified by the GenTL standard) for GenTL producers. To verify that a GenTL producer is installed correctly, you can run:

$ echo $GENICAM_GENTL64_PATH
/opt/mvIMPACT_Acquire/lib/x86_64

(todo: Add details.) โ€” yes bestie, that's literally in the docs, they said "todo" and honestly? Relatable. Leaving a todo in prod is a whole mood ๐Ÿ’€๐Ÿ™ˆ


๐Ÿ“ NOTES ๐Ÿ“

User input validation is not yet implemented โ€” invalid user input may cause OpenDrop to crash or print errors to the console. So pls be nice to it, it's doing its best ๐Ÿฅบ

Stub.

๐ŸŽฌ [image]

๐Ÿ–ผ๏ธ [image] https://doi.org/10.21105/joss.02604


OpenDrop is a fully-featured image analysis software for performing pendant drop tensiometry and contact angle measurements. Images can be loaded from the file system or acquired directly from USB webcams or GenICam (GigE Vision, USB3 Vision) compliant industrial cameras. Science AND hardware?? She contains multitudes ๐Ÿ‘‘

The software is released under the GNU GPL open source license, and available for free. Free is my favourite price fr fr ๐Ÿ’œ

For installation instructions, see Installation <>.


Git repo: https://github.com/jdber1/opendrop/

Questions, issues, or feedback: https://github.com/jdber1/opendrop/issues


๐ŸŒธ Author ๐ŸŒธ

OpenDrop Contributors

OpenDrop Contributors


And that's the whole page bestie, you made it to the end ๐ŸŽ€ shoutout to the OpenDrop Contributors for writing all this, and to whoever stamped this build โ€” the page footer said Mar 20, 2026, version OPENDROP(1), so if you're reading a copy that says something else, you know it's a different release. Go measure some drops, you're gonna slay ๐Ÿซถโœจ๐Ÿ’–

๐Ÿ“ฆ where this page comes from