Product engineering
Developing Automatic Edge and Baseline Detection for Contact Angle Measurement
Automatic edge and baseline detection finds the drop outline and the point where the drop meets the surface without an operator clicking on the image. Droplet Lab trained it on more than 30,000 labelled drop images, with extra focus on hydrophobic and superhydrophobic surfaces, so the same image gives the same angle every time.

What does automatic edge and baseline detection do?
Short answer: it finds the outline of a drop and the baseline where the drop meets the surface without an operator clicking on the image. Those two points set the contact angle, so placing them the same way every time is what makes results repeatable between operators, shifts and labs.
Droplet Lab built this detection with a convolutional neural network trained on more than 30,000 labelled drop images, with extra attention on hydrophobic and superhydrophobic surfaces where manual placement is hardest. The contact angle measurement guide explains the measurement itself.
Why automate contact point detection?
On most instruments an operator marks where the drop touches the surface. That step is slow and subjective. It depends on the operator's experience, the monitor contrast and the lighting, and it gets hardest exactly where accuracy matters most:
- Hydrophobic surfaces (above 90°). The drop edge curves back under itself near the surface.
- Superhydrophobic surfaces (above 150°). The contact region is tiny and easy to confuse with the drop's reflection.
- Poor images. Variable drop shape, lighting, camera resolution and substrate quality all move the point an operator picks.
The result is spread between operators and labs that has nothing to do with the surface. For QC, that spread shows up in a Gage R&R study as poor reproducibility.
How was the detection model built?
- Research. The team compared classic image processing with trained detection, focusing on convolutional neural networks (CNNs) and transfer learning, and built the model in Keras, an open source deep learning framework.
- Dataset. More than 30,000 labelled images covering superhydrophilic, hydrophilic, hydrophobic and superhydrophobic drops. Experts labelled the contact points, and generated variations extended the set to difficult cases.
- Model design. Transfer learning from an existing network, retrained for contact point detection.
- Training and validation. 85% of images for training and 15% held back for validation, tracking accuracy, precision and loss.
Which design choices made the model robust?
Final training loss was 4.8805e-04 and validation loss 6.9776e-04. The close values show the model was not simply memorising its training images.
| Choice | Setting | Why |
|---|---|---|
| Image size | 225 × 225 pixels, linear resize without cropping | Matches the network input; in testing, resizing without cropping beat the other options |
| Pre-processing | Edge detection and contrast enhancement | Helps the model find drops in poor images |
| Regularisation | Two dropout layers at 30% | Reduces overfitting so the model generalises to new images (Srivastava et al., 2014) |
| Batch size | 8 | Best balance of performance and memory use in testing |
| Data split | 85% training, 15% validation | Keeps a held back set to check generalisation |
How does it handle difficult images?
The model was tested and fine tuned on the images that make experts disagree:
- Out of focus drops
- Low contrast between drop and background
- Strong reflections from shiny substrates
- Noise or distracting objects in the frame
Including these cases in training made contact point placement more consistent on real lab images, including telling a drop apart from its reflection on hydrophobic and superhydrophobic surfaces.

How does this build on the published smartphone method?
Droplet Lab's earlier peer reviewed work found contact points with fixed image processing rules: slope changes in the drop outline, plateaus where there is no reflection and a special rule for drops near 90° (Chen et al., 2018). The smartphone contact angle method explains those rules.
Rule based detection works well on clean, high contrast images. A trained model can also handle low contrast, distorted and liquid in liquid images where fixed thresholds fail, which is why it is the more scalable approach for real samples.
What is being developed next?
- A DenseNet201 backbone for transfer learning (Huang et al., 2017).
- More than 20,000 augmented images, created by applying random blur and contrast changes to high quality labelled images.
- Image standardisation, regularisation and batch size tuning to keep training stable.
Development targets are a training loss of 7.7985e-04 and a validation loss of 9.1347e-04. The aim is to extend detection to liquid to liquid interfaces, dynamic wetting and live checks of surface treatment, and to send results to lab data systems and LIMS.
What does this mean for QC and research labs?
Automatic edge and baseline detection runs in the Dropometer, with setup in about 2 minutes. Zeus ran its own Gage R&R on it in production and it passed. For production lines, the goniometer guide for industrial QA covers what else to check, and goniometer calibration explains how to verify any instrument.
Where can you go deeper?
These pages cover the methods, standards and data behind this post.
- Glossary: Drop volume
- Open dataset: Data in Brief dataset 1: client-collected wetting measurements
See automatic edge and baseline detection on your samples
Watch contact angles measured on a surface like yours without manual point placement, in a short call.
Frequently Asked Questions
What is a baseline in contact angle measurement?
The baseline is the line where the drop meets the solid surface. The contact angle is measured between this line and the tangent to the drop outline at the contact point, so a small error in the baseline moves the angle.
Why are hydrophobic and superhydrophobic surfaces hard to measure manually?
Above 90° the drop edge curves back under itself, and above 150° the contact region is tiny and easy to confuse with the reflection. Operators often place the point differently, which spreads the results.
How large was the training dataset?
More than 30,000 labelled images covering superhydrophilic, hydrophilic, hydrophobic and superhydrophobic drops, with 85% used for training and 15% held back for validation.
Does automatic detection replace advancing and receding measurements?
No. It makes each angle reading consistent, but repeatable numbers still need advancing and receding angles measured slowly, rather than reading a single placed drop.
Which instrument uses this detection?
The Dropometer uses automatic edge and baseline detection for contact angle measurement.
