Scroll to navigation

OPENDROP(1) OpenDrop OPENDROP(1)

NAME

opendrop - OpenDrop

WINDOWS

Download the Windows executable here: https://github.com/jdber1/opendrop/releases/tag/v3.1.6dev0

INSTALLING AS A PYTHON PACKAGE

Ubuntu 16.04+/Debian 9+

1.
  • The unofficial opencv-python package can be installed using pip and is the easiest way to install the required OpenCV functionalities.
  • Alternatively, if on Ubuntu 17.10 (or later), the python3-opencv package is also available from the 'Universe' repository and can be installed with:

sudo apt install python3-opencv



2.
Follow the installation instructions here for installing PyGObject and GTK.
3.
Use pip to install Opendrop from the repository by running:

(You may need to use pip3 to refer to the Python 3 version.)

Run pip uninstall opendrop to uninstall.

4.
An opendrop script is installed into your PATH and the app can be launched by entering opendrop in the command line.

macOS

1.
Install the latest version of Python 3 and pip. You may like to do so using a package manager like MacPorts or Homebrew.
2.
Install the unofficial opencv-python package by running:

pip install opencv-python


(Make sure pip refers to your Python 3's pip installation.)

Alternatively, OpenCV and its python bindings can also be installed using the opencv Homebrew formula or opencv MacPorts port.

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 py35-gobject3 gtk3


(Instead of the py35- prefix, use py36- or py37- if Python 3.6/3.7 is the version installed.)


4.
Use pip to install OpenDrop from the repository by running:

Run pip uninstall opendrop to uninstall.

5.
An opendrop script is installed into your PATH and the app can be launched by entering opendrop in the command line.

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

A wizard-style window will guide you through the process of performing an interfacial tension analysis.

Image acquisition

First, choose an image input method. OpenDrop currently supports opening images from the local filesystem or capturing images with a USB camera.

Local filesystem

[image: IFT Image acquisition, local filesystem] [image]

Click on 'Choose files' to open the file chooser dialog and select an individual image or a sequence of images. When 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.

USB camera

[image: IFT Image acquisition, USB camera] [image]

Click on 'Connect camera' to open the camera chooser dialog. [image: IFT Image acquisition, USB camera chooser dialog] [image]

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.

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

Physical parameters

[image: IFT Physical parameters] [image]

'Inner density' refers to the density of the drop.

'Outer density' refers to the density of the surrounding medium.

'Needle diameter' refers to the diameter of the needle the drop is suspended from.

'Gravity' refers to the gravitational acceleration.

Image processing

[image: IFT Image processing] [image]

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] [image]

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

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.

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

Results

[image: IFT Results] [image]

The results page shows the current status of the analysis. Data shown in the window is updated as the analysis progresses.

There are two main views, the 'Individual Fit' view and the 'Graphs' view. 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] [image]

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] [image]

The 'Log' tab shows the history of any messages logged by the fitting routine. [image: IFT Results, log] [image]

Graphs

[image: IFT Results, graphs] [image]

The 'Graphs' view shows plots of interfacial tension, volume, and surface area over time.

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). 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] [image]

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] [image]

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

[image: IFT timeline.csv screenshot] [image] timeline.csv.UNINDENT

[image: IFT profile_fit.csv screenshot] [image] water_in_air1/profile_fit.csv (each row is an (x, y) coordinate pair).UNINDENT

[image: IFT profile_extracted.csv screenshot] [image] water_in_air1/profile_extracted.csv (each row is an (x, y) coordinate pair).UNINDENT

[image: IFT profile_fit_residuals.csv screenshot] [image] water_in_air1/profile_fit_residuals.csv (first column is 'drop profile parameter', second column is residual).UNINDENT

[image: IFT params.ini screenshot] [image] water_in_air1/params.ini.UNINDENT

CONTACT ANGLE

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.

Image processing

[image: Contact Angle Image processing] [image]

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] [image]

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.

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] [image]

The results page for a contact angle analysis is quite simple.

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] [image]

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] [image]

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.)

[image: Contact Angle timeline.csv screenshot] [image] timeline.csv.UNINDENT

[image: Contact Angle profile_extracted.csv screenshot] [image] drop1/profile_extracted.csv (each row is an (x, y) coordinate pair).UNINDENT

[image: Contact Angle surface.csv screenshot] [image] drop1/surface.csv (The coefficients of the surface line; first column is gradient, second column is y-intercept).UNINDENT

[image: Contact Angle tangents.csv screenshot] [image] 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).UNINDENT

NOTES

User input validation is not currently implemented, invalid user input may cause OpenDrop to crash or print errors to the console. This feature is a work in progress and will be available in a future release.

Stub. [image]


OpenDrop is a fully-featured pendant drop tensiometry software, allowing acquisition, analysis and fitting of pendant drop profiles to obtain surface and interfacial tension. OpenDrop now includes functionality for the measurement of contact angles.

It runs on Python 3.5+, and uses GTK+ 3 for the user interface, and OpenCV for image analysis.

OpenDrop is released under the GNU GPL open source license, and available for free.

For installation instructions, see "getting_started/index".


----



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

For any questions, issues, or feedback:
https://github.com/jdber1/opendrop/issues

AUTHOR

OpenDrop Contributors

COPYRIGHT

OpenDrop Contributors

October 20, 2020