Axisymmetric Drop Shape Analysis using a low-cost home-made setup

Surface science and engineering gained an increasing importance in recent years, due to the potential benefit they can offer in many applications. An important parameter in this field is the surface wettability, that is in general evaluated by the contact angle. One of the most accurate techniques to measure this quantity is the axisymmetric drop shape analysis, based on the fitting of the theoretical Laplace-Young profile to the contour of experimental drops. In this paper the performance of a simple, low-cost setup – that can be built “at home” – to apply this technique is assessed, also including a detailed analysis about the influence of the most important parameters to set in the procedure. The latter aspect was evaluated by using computer-generated drop profiles and pictures, to have “realistic” images, but for drops of known properties. The experimental setup was built using a desk, a table lamp, a medical syringe, a support for the samples and a “bridge” camera. Measurements were performed on smooth and rough textile surfaces and the results were compared with previous measurements taken with a professional setup. From the comparison it can be affirmed that the performance of the home-made setup is very satisfactory.


Introduction
In the last few years surface science gained more and more importance for the characterization of new, innovative, and engineered materials that may grant significant technological improvements. Surface chemistry and surface physics study the physical and chemical phenomena that occur at the interfaces between two and three different phases. Focusing the attention on cases in which three states of aggregation of matter are present, a fundamental property in this field is wettability. From the point of view of surface analysis, it can be evaluated with relative ease while giving information about the surface composition and type of chemical bonds, and also about the interaction that the surface will have with different fluids. Moreover, from the point of view of application, the process of wetting is of great technological importance, as a large number of processes (both natural and industrial/manufacturing) essentially involve wetting phenomena [1,2]. An example that became very well-known in the last years is that of the superhydrophobic/superhydrophilic surfaces (also trying to mimic Nature) [3]. The most used quantities to evaluate the wettability of a surface are the contact angles. Among them, the theoretical one is the so-called Young contact angle, typically definedwith reference to a drop placed on a surfaceas the angle formed by the tangent to the drop profile with the tangent to the solid surface profile in a plane where the normal vectors to both the liquid-gas and the solid-gas interfaces are contained [4]. The Young equation (valid for a homogeneous, flat, and smooth surface, in absence of external forces) relates the Young contact angle to the three interfacial energies: (1) where ƟY is the Young static contact angle and ij are the interfacial energies, summarizing the interatomic and intermolecular forces acting across a surface [5]. These forces can be primary like ionic, covalent, and metallic coordination bonds or secondary forces like van der Waals and hydrogen bonds and electrostatic forces. On real surfaces, many other aspects influence the wettability and the contact angle, firstly the surface morphology (from common roughness to engineered micro-and nanostructures) and the presence of external fields (e.g., gravity) or other stresses (e.g., for drops interacting with a moving fluid stream). In this cases, the apparent contact angles (static, advancing and receding) are usually the quantities of major interest, and at the same time the only experimentally accessible ones [4]. The measurement of the contact angles can be conducted by many techniques, ranging from the oldest and simplest ones to the most recent and accurate. Flat surfaces are most commonly used for the measurement (even if the latter can be performed also on curved surfaces [6,7]), and among the techniques based on the use of drops, the Axisymmetric Drop Shape Analysis (ADSA) is considered one of the most accurate. ADSA is based on the numerical fitting of the theoretical drop profile to the contour of experimental drops. The first is obtained by numerical integration of the classic Laplace-Young equation of capillarity [8]: where PLY is the pressure difference between the convex and the concave parts of the domain at the two sides of the interface, and RI and RII are the principal curvature radii of the interface (i.e., the term within the parenthesis is the surface curvature). The second is nowadays obtained by image processing of pictures of the drop-surface system. Different versions of ADSA were developed along the years. In this work the tests were conducted using ADSA-P (perimeter) [9,10]. Concerning the measurement setup needed for ADSA, commercial devices are available, granting very high accuracy in contact angle measurement, provided that the base surface is smooth. However, these are in general relatively expensive, and in addition they become less reliable in presence of rough or textile surfaces: in fact, relying on back illumination to acquire drop silhouettes, the identification of the triple line (the line of contact of all the three phases, delimiting the drop base) may become very problematic in these cases. So, in this work the possibility to create a low-cost, home-made setup for the ADSA technique, suitable also for complex surfaces, is investigated. Such setup should be built by means of easy-to-find, not specialized and cheap devices, such as a common camera and lenses, without qualified supports and lights. The idea was born during the first lockdown imposed in Italy by the COVID-19 pandemic, during which access to the laboratories became difficult; but it is more general, for all cases in which the primary setup may be not available (also e.g., due to failure or maintenance) or parallelization of tests may be useful.
A new low-cost setup was therefore created, trying to conserve the same fundamental characteristic of the one available at the Multiphase Lab in the Department of Energy of Politecnico di Milano [7]. Obviously, the new setup does not have the presumption to match the performance of a high-end commercial goniometer, equipped with telecentric lens, parallel light, high accuracy support and dosing system. Nonetheless, as already said, it should have points of strength, particularly aimed at improving the possibility to investigate complex surface, including full flexibility: in fact, both hardware and software can be customized and optimized for each specific type of sample. Verification and validation of the setup to assess its performance were performed for all the involved aspects, from an in-depth analysis of the software implementing the ADSA procedure to a validation of the whole setup, done by re-testing surfaces previously analyzed in other campaigns at the Multiphase Lab.

Axisymmetric Drop Shape Analysis
As previously said, contact angle evaluation was performed in this work by the ADSA-P (profile) technique. According to this method an objective function, to be minimized, is defined as the sum of the squares of the distances between the theoretical and the experimental drop profile points. The experimental drop profile is extracted by a side view of the drop-surface sample system, using conventional edge detection operators. The Sobel algorithm [11] is typically used; if the experimental images are of good quality there is no need of more complex approaches. The numerical integration to obtain the theoretical drop profilegiven by the Laplace-Young equation of capillarityis usually done in the peculiar arc length-turning angle coordinate system (figure 1), that makes it very simple. From the best fit, the contact angle can be determined as the value of the turning angle at the intersection between the drop profile and the surface profile. The strategy employed in this work is to perform ADSA in the dimensionless version developed by Rotenberg et al. [9], with inclusion of some of the improvements by Cheng et al. [10], i.e., to fit the shape of the experimental drop to the theoretical drop profile using the Eötvös number Eo (defined as  g D 2 / ) as the adjustable parameters. The advantage of this version is that the only needed input is a side photograph of the drop surface system. Practically, the measurement of contact angle consists of the following steps (an example of results of steps 3 and 4 is also shown in figure 2): 1. Pre-processing of the images (e.g., cropping if needed).

Experimental setup and procedure
The home-made experimental setup that has been built consists of the following elements: • A desk as the work bench where to conduct the experiments.
• A light source provided by a table lamp, that can be oriented and moved vertically, with a multi-LED white lamp.  Figure 3 shows the three possible configurations of the setup that were investigated. The central one was finally selected, as described in the following sub-sections.

Settings for camera and light
A series of preliminary tests were carried out to understand the best choices for camera and light positions, and camera settings to obtain the best images, i.e., the most suitable for the following image processing steps (with the maximum difference between drop and background and the minimum amount of noise and disturbances).

Light settings
The first crucial factor to set was light. As already said, pictures for ADSA are in general taken in back illumination, so that the drop appears as dark, with the minimum possible reflections, on a homogeneous and bright background. This is the optimum scenario for the following drop contour extraction. Too much light makes the drop transparent, while on the contrary excessive lighting makes drop and background too similar in colour; in both cases image binarization and extraction of the drop contour become less accurate if not impossible. A common desk lamp proved inadequate to provide a uniform direct background illumination; therefore, a bright background was created by means of a paper sheet, fixed to the room wall behind the drop-surface sample, and towards which light was headed. This granted the diffuse light necessary to take a correct picture. Many tests with different light sources and different positions and intensities were carried out to find the best configuration. An issue that could not be completely solved by light positioning alone is that of light reflection on the top part of the drop, and in some pictures the latter may be too bright, with the risk that during the segmentation step it were wrongly assigned to the background. As reflection is on a curved surface, also polarizing filters cannot remove it. To mitigate this problem, the final choice was to cover the desk lamp too with a sheet of paper to reduce light intensity, to point it towards the wall behind the drop at a certain height over the drop itself, and to place it aligned with the drop and relatively fare from the same (in order to have a dominant contribution of diffuse and not direct light).

Camera settings
Focusing on small, transparent objects is problematic for autofocus systems, so first of all the camera was set in manual focus mode. Comparison was then performed between pictures obtained placing the camera near to the drop in two different modes, normal and macro, and far from the drop using all the camera zoom extension. For each position, the ISO value (indicator of the sensor sensitivity), the time of exposition and the diaphragm aperture were also varied in order to set the best values. From such tests it was concluded that the best picture quality is obtained with normal camera mode, with low ISO (100-200), a medium diaphragm aperture (around f/8), relatively long exposure time (1/8'') and low focus distance (11 mm). Such values are consistent with the ones used on the setup in the Multiphase Fluid dynamics laboratory (where a Nikon D90 reflex camera is available), apart from the aperture, that in the laboratory, using a macro lens, must be much lower to have an acceptable depth of field. It was decided not to use the telephoto mode because it provides lower quality pictures and it requires long distance from the drop, so that the camera cannot be placed on the same desk of the drop-sample system. Regarding alignment, it is an important factor because a misplacement of the camera may cause distortion in the contact angle measurement, so the camera was arranged as near to the drop as possible, on a rigid support, aiming at the correct positioning with respect to the drop triple line. A satisfactory alignment was reached, even if the precision granted by an anti-vibrating bench with height and inclination regulations could not be obtained. Therefore, the effect of a not perfect alignment was investigated, as described in the following sections.

Software implementation
The software implementing the ADSA technique was built within the MATLAB programming environment [12] and verified during previous campaigns, and it was only slightly modified for this work. Nonetheless, an extensive verification on its most important free parameters and a new validation campaign were performed here. For the used technique, the first image processing step is to crop the pictures of the drop-sample system; in fact, both with a normal and with a macro lens the drop occupies only the center part of the image, so cropping reduces the burden of the calculation. This is particularly important if both a picture of the drop on the sample and a picture of the sample alone are acquired in order to help background subtraction; in this case the two images must be registered to grant the perfect alignment, and this is a memory-demanding activity. Either if this step is performed or not, the next one is to separate the region corresponding to the drop (original drop image or non-zero difference from the background subtraction step) from the background. Here a standard image processing technique is used, consisting in the image conversion in gray tones and its binarization, i.e., segmentation on two levels. This step is implemented using different built-in MATLAB functions: • rgb2gray to convert RGB images to grayscale by eliminating the hue and saturation information while retaining the luminance. • graythresh to calculate a global threshold for image binarization, using Otsu's method, which chooses the threshold to minimize the intraclass variance of the grouped black and white pixels [13]. • im2bw to produce a binary image using the threshold determined by graythresh. The output binary image has values of 1 ("white") for all pixels in the input image with luminance greater than the threshold and 0 ("black") for all the other pixels.
Once the binary image is obtained, the third step is to extract the boundary between the regions (which represents the drop contour). This is done by other two built-in MATLAB functions: bwtraceboundary to select the pixel belonging to the contour, and csaps to smooth the contour by means of a cubic smoothing spline. Concerning the theoretical drop profile, the axisymmetric Laplace-Young equation in its dimensionless arc-length expression is discretized by centered finite difference, and the numerical integration is performed by a specifically written MATLAB function. Finally, the fitting of the Laplace-Young profiles at varying values of Eo to the experimental contour is made by minimizing the mean squared error between the theoretical and experimental profiles. In this case the MATLAB built-in function fminsearch together with the previous in-house function are used. Apart from very simple cases of perfectly flat surfaces, a complete automatization of the image processing steps needed to apply the ADSA technique is at present not possible, so the latter remains to a certain degree depending on some choicesand therefore on the experience and skillfulnessof the operator. In the following sections the sensitivity analysis and the validation of the measurement technique that were carried out before using the newly developed setup will be described, to evidence and better address the possible causes of errors that may affect the accuracy of the contact angle measurement.

Software verification and optimisation
The first aspects that were investigated during the sensitivity analysis are: • Image resolution.
• Number of iterations in the fitting step.
• Smoothing value for contour smoothing.
• Height of the triple line.
In order to have reference images, for which everything is perfectly known, computer-generated images were used. Such images were created with the same approach used for the creation of the contours to be fitted to the experimental one, i.e., by numerical integration of the Laplace-Young equation using a centered finite difference approach. Different values of Eo and of the contact angle were used, to create a significant set of test images. They were also generated at different image dimensions to simulate the effect of space resolution; namely, square images with 250, 500, 1000, 1250 and 1500 pixel along each direction were drawn. Two complete sets of images were created: a first one in which the contour is directly traced and a second type where a white drop on a black background is drawn (referred to as B/W pictures in the following), so that the contour must be extracted and the additional error due to this step can be estimated. Each set of pictures at a given image dimension includes drops with contact angle values in the range from 10° to 170° with a step of 10° and for each contact angle value Eotvos numbers in the range from 0.2 to 5 with a step of 0.2. So, per each contact angle there are 25 value corresponding to different Eotvos number, for a total of 425 images for each image dimension. For each assigned parameter, the value the relative errornamely the mean absolute percentage error (MAPE)was calculated, to understand the importance and weight of the parameter in the process. The analysis was conducted by steps. It would have been more rigorous to perform a single-step multiparameter optimization but given the expected very low influence of some of the parameters, this simpler approach was considered already adequate. First the best number of iterations in the fitting process was determined, by testing the following values: 100, 500, 1000 and 2500 while keeping the smoothing and the triple line height at their reference values. Then, the smoothing value was varied between 0.01, 0.03, 0.05 and 0.07, using for each image dimension the optimum iteration value. Finally, the contact angle errors caused by triple line displacement were calculated, varying the value of ± 3 pixel. Given the large amount of data (more than 9000 values for each image dimension), the results were summarized by the usual statistical parameters: arithmetic mean and median as "central" values, and standard deviation as an indicator of the dispersion of the distribution. A completely negligible effect of the smoothing value was found, while concerning the number of iterations the only odd case was that at image dimension 250 px, for which a small number of iterations gave the lower errors. For all the other image dimensions, the larger the number of iterations, the lower the MAPE, as it was expected; but the improvement is extremely slight so 500 iterations can be already considered adequate. The only parameter which strongly affects the results is the triple line height, as shown in figure 5, confirming the importance of selecting its value as accurately as possible. Figure 5 reports the MAPE and standard deviations at the different image dimensions, for both the drop contour and the B/W drop image sets, calculated with the optimum values of the number of iterations and smoothing (500 and 0.05 respectively). In the figure, the triple line height identified as correct by the operator is named Y-STOP, and as already said results were evaluated from −3 to +3 pixels with respect to such value. This issue is less critical at high image dimensions, for which both the MAPE and the standard deviation of the errors become very small, as it was predictable, given that for them the relative importance of a single pixel is reduced in relative term with respect to the drop dimensions. After the analysis of the images showing the drop contour, attention was focused on the images depicting the full drop in B/W, from which the contour must be extracted. As it was expectedconsidering that one additional step is required to compute the contact anglethe errors increased (compare the top-right and bottom-right tables in figure 5), but not so significantly. So, the contour extraction part can be considered satisfactory too. In summary, this first set of tests proved that the used algorithm is very robust with respect to its "internal" parameters (number of iterations and smoothing value), while it is very important to identify the triple line height with the maximum accuracy. The latter issue is reduced when the image resolution is large, so the use of a modern, high-resolution, camera is a point of strength.

Effect of triple line position and camera inclination using rendered drops
After the successful validation of the procedure on the previous image sets, and before moving to the analysis of real drop pictures, further investigation was conducted on the triple line position and on the effect of camera inclination with respect to the horizontal plane, by means of rendered drop images. The latter are aimed at mimicking some "real world" effects, while conserving a perfect knowledge of the drop characteristics. Namely the following potential issues were checked: • Reflections and refractions.
• Low contrast between drop and sample in the contact region.
• Diffraction near the tripe line on superhydrophobic surfaces. • Very bright upper edge of the drop.
Three-dimensional, axisymmetric drops were modelled, again using MATLAB to integrate the Laplace-Young equation and then to create a surface of revolution starting from the calculated profile. Such surfaces were then exported in Wavefront OBJ format [14] and finally imported and rendered with the physically-based rendering engine Appleseed [15]. Different set of images were used, with the camera: • In perfect horizontal alignment with the triple line.
• Oriented horizontally, but at a height of +0.5 mm over the triple line, with different drop sizes.
• Pointing towards zero altitude, but vertically displaced (both of negative and positive amounts), so that different camera inclinations are tested.
A vertical motion of the fitted contour of ± 1 px with respect to the position returned by the software was also tested, to additionally assess the sensitivity of the results to an uncertainty in the contour fitting. A total of 450 measurements were performed. Figure 8 shows the results at the different camera inclinations.   This second level of analysis confirmed the importance of identifying the triple line position with the maximum possible accuracy. A practically linear trend was found with respect to the triple line misplacement (as it is reasonable given the minor amount of the latter). It also evidenced the significant effect of the inclination. When the camera is lower than the triple line, the measured contact angle decreases, since the bottom part of the drop is "cut", covered by the sample itself. On the contrary with a higher position of the camera, the measured contact angle value increases, because the projected, apparent cross section of the drop is flattened. In this case the variations are not linear, and when the camera is lower than the triple line, looking upwards, the errors are larger. So, if the setup is likely not able to grant a perfect alignment (as it may be the case with the one described in this work), it is better to place the camera upper than the triple line and looking slightly downwards.

Accuracy and uncertainty estimation during validation on real drops
The ADSA procedure involves too many aspects that cannot be included in an a priori error propagation and uncertainty analysis, from light and camera positions to camera resolution and sensor aspect ratio, to software parameters. Therefore, in addition to the previously described analyses on computer-generated images, accuracy of the measurements using real hardware and real drop-surface samples was checked. For all the cases described in this and in the following sections, distilled water was used as a fluid, and the tests were performed in an open room, at atmospheric conditions. To assess repeatability, for each surface sample 21 drop pictures were acquired as follows: • 9 pictures of a first drop, repositioning the camera twice (first 3 shotsrepositioning -3 additional shotsrepositioningfinal 3 shots). • 3 pictures of a second drop, again repositioning the camera twice (shotrepositioningshot repositioningshot), repeating this step 4 times.
Contact angle was finally evaluated as the arithmetic mean of all the single measurements. Accuracy using the home-made setup was assessed by comparing the results with others obtained in previous studies for the same samples at the Multiphase Lab. Samples for this validation were selected among those that may be both more difficult and more interesting for analysis with the home-made setup. Namely they are three gas diffusion layers (GDLs) for fuel cells, made by the Mat 4 En 2 group of the Department of Chemistry, Materials and Chemical Engineering "Giulio Natta" at Politecnico di Milano, using PTFE (polytetrafluoroethylene), FEP (fluorinated ethylene propylene), PFA (perfluoroalkoxy). They are textile surfaces, made by carbon fibers and by the cited fluoropolymers.
As it was evaluated in previous works [16], and as it can be seen in figure 9, all of them are superhydrophobic surfaces. Figure 9 show the values of the contact angles measured on such samples (the values from the previous campaigns can be found in [16]). It can be affirmed that the results obtained using the home-made setup are very good for this type of surfaces and this level of wettability.

Analysis of home-made surface samples
Everyday-use surfaces and materials were selected to make the home-made samples to be tested using the new setup: two aluminium covers, a brass sample, a wet wipe, normal and gel nail polish (the cosmetic product for coloring, protecting and fortifying nails) and ceramic polish (normally used to restore ceramic washbasins, etc.). Covers were cleaned with acetone and thoroughly rinsed with water. They were used both directly as sample surfaces and as bases for depositing layers of ceramic polish and of normal and gel nail polish. One cover was used to test aluminium itself and the ceramic polish, while the second for normal and gel nail polish. Aluminium, ceramic polish and normal nail polish was tested 3 times (for a total of 63 images) while gel nail polish only once. As shown in figure 10, all these samples present a hydrophilic behavior with contact angle values in the range 70°÷80°, except the brass surface that showed a slightly hydrophobic behaviour. The differences observed in the repeatability tests can be partially due to the different drop volumes, because with manual deposition using a common medical syringe it was not possible to calibrate the volume as with a dosing pump and a precision syringe. An interesting finding is that the gel nail polish has a higher contact angle than common nail polish, thus confirming the advertisement claims that it can better resist to water and degradation, for women happiness.  Then, a common cleaning wet wipe was used as a third base. It was let to dry out completely, then a very thin layer of normal nail polish was spread, coating the fiber while not hiding the surface morphology ( figure 11). The rationale of this preparation was to create a surface showing "superhydrophobicity", as it happens on the GDLs, thanks to the Cassie-Baxter effect [17]. In the latter, the apparent contact angle is increased with respect to the Young one, due to the surface morphology, that prevents the liquid from filling the surface crevices and the gaps between surface