In this section, a series of experiments are conducted to show the effectiveness and limitations of the proposed contour approximation and the 3D reconstruction method. This is done in subsections; first, the polar PBCA interpolation method is compared to other standard methods of approximation with synthetic data. Then, the 3D reconstruction is tested with known geometries, real and synthetic, to show the effectiveness of our combined method. Furthermore, Monte Carlo simulations are used to assess the stability of the process and the effects of focus and repeated measurements. In the end, experimental research is conducted using electrically deformed droplets, which serve as a benchmark by being weighed. Then, our method allows for the calculation of the volume based on the material’s density, and this is compared to the weight measurement.
4.1. Evaluation of Polar-Based Contour Approximation on Synthetic Geometries
Since there are no valid approaches for the application to represent the droplet geometry of nonaxisymmetric droplets that are produced by electrical field deformation, PBCA is compared to common methods of approximating freeform shapes that are close to the real observed data. Here, a polynomial least squares approximation of the eighth degree, a Fourier least squares approximation of the eighth degree, and a b-spline least squares approximation are used for comparison. The synthetic shapes, chosen to represent the droplet deformation observed in previous experiments, contain rounded edges, exhibit high and low contact angles, feature off-axis shapes, and have near-rectangular cross sections, reflecting the range of deformation observed. To evaluate the performance of the fit, we look at the important defining features of a non-axisymmetric droplet, such as the droplet diameter
, the contact angles
and
as well as the apex position defined by
and
. These are shown in
Figure 6 on a schematic droplet.
The contact angles are calculated using a linear regression of the initial ten pixels at the edges and using the slope to calculate the contact angles trigonometrically. The apex position is calculated by finding the maximum of the droplet contour, and the diameter is the difference between the first and last contour points. The geometrical shapes consist of circle segments, hyperbolas, slanted hyperbolas, and a sigmoidal function to account for rectangular shapes observed in multiple-anode arrangements. These shapes are chosen because they all occur in the deformation of droplets. The data used to evaluate the performance of PBCA is generated using the equations for the various shapes laid out in the next few paragraphs. The shapes are sized, so that they fit into the virtual image with an image width of
and an image height
, to be of the same size as the used cameras. To discretize the data, the values of x and y are rounded. For a circle, the equations are
with
as circle coordinates,
as circle radius, and
as the angle of the circle point. Circle segments are generated by defining the angle specific to the desired segment. For the hyperbola, the formula is
with
and
as hyperbola coordinates,
as horizontal stretch factor and
as vertical stretch factor. The slanted hyperbola has the same equation with
and
, but is tilted using a rotational matrix. The rotation is defined as
. The rectangular form is generated using a function with sigmoidal properties. It is defined by two hyperbolic tangent functions combined with the formula
with
and
as rectangular coordinates,
as a distance of slope from zero an
and
as a parameter to control the slope. The used values for a, b, c,
,
, and
are shown in
Table 1. The curves are then scaled so that the droplet base is half the image width and the maximum height is one fifth of the image height using
with
and
as scaled coordinates and
and
as unscaled coordinates.
This ensures similarity to the droplet contours observed in the deformation experiment. The drop image after which the curve is modeled as well as the three curves are shown in
Figure 7a–d.
To compare the measurement with the ground truth data, three metrics are used. For evaluating the overall fit over the whole contour, the root mean square error (RMSE) between the approximated curve and the ground truth curve is calculated with equation
with
as the root mean square error,
n as the number of points, G as the ground truth data, and
as the approximated data. To evaluate the performance over the non-axisymmetric metrics such as the contact angles and the diameter, which are in different units and magnitudes, the mean absolute percentage error (MAPE) is calculated using
with
as the mean absolute percentage error. An alternative metric to compare the same is the mean normalized error (MNE).
with
being the mean normalized error and R as the value range; in this case, for the angles where
and for the lengths where
, this corresponds to the drop base diameter. The comparison results are shown in
Figure 8 as boxplots. In
Appendix A.1, all measurements are shown.
In the findings across all geometries, while PBCA may not consistently be the top performer, it demonstrates the greatest reliability. Notably, the results for MAPE and MNE indicate that PBCA exhibits less variability compared to other methods. As these two metrics directly measure errors in parameters specific to droplets, such as diameter, this underscores its suitability for addressing issues related to deforming droplets. Next, the 3D reconstruction is tested.
4.2. Accuracy of 3D Reconstruction Using Computer-Aided Design and Measured References
Initially, the approach is assessed using synthetic images that originate from 3D models generated through Computer-Aided Design (CAD) software, specifically PTC CREO PARAMETRIC 10.0.1.0. For a comparison with the reconstruction geometry, the models were converted to stereolithography (STL) files. To minimize the effect of sampling, the STLs are triangulated with the minimum possible step size of the triangulation mesh. These STL files are then imported into MATLAB, and the triangulation nodes are used as the ground truth point cloud. The images that will be used for reconstruction are generated using the CREO render feature. Subsequently, PBCA is applied with PHDR to reconstruct the 3D geometry and calculate the volume. The used geometries are like those in
Figure 7 using the geometries circle, hyperbola, slanted hyperbola, and rectangle. The configurations consist of a semisphere depicted in
Figure 9a, an on-axis deformed droplet shown in
Figure 9b, and an off-axis deformed droplet in
Figure 9c.
To calculate the volume, the scaling factor per pixel is needed for each model, to convert the pixel values into SI units. The scaling factor is determined by counting the pixels of the base and is calculated using
with
as a scaling factor,
as the base measurement in pixels, and
as a base measurement in millimeters of the CAD model. For the three geometries, the reconstruction is carried out as previously described with a sampling of 1000. To align the point clouds, the STL point cloud and the reconstructed point cloud are registered using the Iterative Closest Point (ICP) algorithm [
44]. Subsequently the RMSE between the ground truth geometry and the reconstructed geometry is calculated as well as the volume
of the reconstructed model and the absolute volume difference
between the ground truth and the reconstructed model. The volume is here used as a metric to evaluate how close the reconstructed and ground truth data are. These values as well as the scaling factors, base measurements, volumes, and
between the points of the ground truth STL and the reconstructed geometry are shown in
Appendix A.2. The volume metrics and RMSE metrics are shown in
Table 2. For the rectangular structure, our algorithm does not work. For the algorithm to work, there needs to be a single maximal point with no local minima. This is not the case for the rectangular structure, thus limiting our algorithm. For the other geometries, the local Euclidean distance between the ground truth and the reconstructed geometries are shown in
Figure 9d–f. What is evident in all three plots is the wavy distribution of the distance. This probably stems from spline interpolation in the polar coordinate system, as splines are oscillating around the knots. Overall, the best reconstruction is the one of the semisphere, with the maximum distance at around three microns. The on-axis deformation also has a small distance, the maximal distance being around 10 microns, but compared to the size of the whole object of 3 mm diameter, this is still quite small. The worst of the three is the geometry that is modeled on the off-axis deformation. There are two symmetric areas where the distance is around 50 microns. This is likely due to the way that the reconstruction algorithm combines the two contours. The deviation is still not large compared to the whole structure of 10 mm. In summary our approach works very well with axisymmetric geometries with a
less than 3 microns and a volume deviation of well under one percent. The non-axisymmetric case is still good with an
of just above 20 microns, which is a ten-fold increase compared to the axisymmetric case and a volume deviation of 3.5%.
In addition to the droplet-like shapes, a more extreme geometry is tested with the algorithm, which is normally not easy to represent with any other approximation that is not defined piecewise. It is a pyramid and a crooked pyramid. The methodology is the same as for the other CREO models. In
Figure 10a, the x and y view of the pyramid in CREO is shown, in
Figure 10b, the crooked pyramid is shown. The Euclidean distances between the ground truth and the reconstructed models are shown in
Figure 10c,d. As before, these geometries are represented rather well. A limitation that becomes obvious immediately is at the tip of the pyramids. The tip of the pyramid has no good representation, because of the continuity constraints of the spline-based polar fitting, which always leads to a smoothed corner and not a sharp corner. As with the other CREO models before, the wavy structure can be seen.
The distances are approximately 20 microns, which are relatively small when considered with the 3 mm size of the whole models. This result hints that this algorithm could also be used for other applications, such as tips, with the limitation that very sharp corners are not represented well.
In the subsequent evaluation, actual images depicting the measured geometries are utilized. Three specifically precision-machined pins with a circular section on top and a coordinate measurement machine (CMM) ball are used. The pins approximate the shape that droplets will assume on a pin with no external force, characterized by axial symmetry. Utilizing a CMM, measurements were taken for three pins. Each pin features a base with a diameter of 5 mm. The radii of their circular sections are 2.56 mm, 3.63 mm, and 6.5 mm, respectively. The probing ball of the CMM has a diameter of 3 mm. These objects were put into the shadowgraphy setup, focused, and then images were taken with the X and Y cameras. These images can be seen in
Figure 11a,b,e,f.
As with the synthetic CREO data, the PBCA is applied with PHDR to reconstruct the 3D geometries. But first, the circular section must be isolated by manually finding the points where the pin and the circular section meet. This was done for all three pins. For the CMM ball, only half of the ball was used to reconstruct the geometry. This ensures that a comparable portion of the ball is used. Then, the ICP algorithm is used to align the ground truth and the reconstruction, and subsequently, the RMSE between the ground truth geometry and the reconstructed geometry is calculated as well as the volume
and the volume difference
. Furthermore, the maximal Euclidean distance between the point clouds is calculated. The measurements of the ball and the pins are shown in
Table 3. The full data is shown in
Appendix A.3.
In
Figure 11c,d,g,h, the local Euclidian distance is shown for each object. Like the reconstruction of the synthetic CREO data, the distance also has a wavy nature as seen especially in
Figure 11c,d, stemming from the knots of the spline interpolation. For the two pins with a smaller radius and the CMM ball, the deviations are rather small with a maximum distance of 14 and 10 microns, as well as a small RMSE of around 4 microns for the two pins and 2.48 microns for the CMM ball. The volume is also accurate with a deviation of less than 0.3% for the pins and the ball. The outlier here is pin 3 with a large radius of 6.5 mm. Analogous to a droplet balancing on a pin, this theoretical droplet would show very small contact angles. As illustrated in
Figure 11g, the plot showing the distance of pin 3, a significant divergence appears exactly at the junction between the pin and the curved segment, which is marked with red arrows. This finding indicates a constraint in our algorithm’s ability to precisely handle small contact angles.
4.3. Focus Sensitivity and Uncertainty Analysis
In the calculations, the focus seems to have an impact on how accurate the shape and volume are calculated. To test the extent, we did two experiments to test the influence of volume, general RMSE deviation, and focus. First, we randomly moved the CMM ball along the optical axes of both cameras and took an image at each step. Second, we used our autofocus to first focus both axes and then take an image of the CMM ball and repeat this step multiple times. The first experiment quantifies how image sharpness impacts volume estimation and the second tests whether autofocus maintains high focus and reduces variability. Then, we use these images in both cases to calculate the Tenengrad focus measure to evaluate the focus in the image, and then, we use our algorithms to calculate the 3D shape and the volume. We did this with both cameras, because although they have the same components, they have a slight difference in image quality. The magnification and sharpness are slightly different, despite being the exactly the same components. The CMM ball in the first experiment in the setup with the movement direction is shown in
Figure 12a. In
Figure 12b,c, in blue, the calculated volumes for the moving CMM ball are shown and the red line is the Tenengrad measure. Camera X records the movement on the Y axis, and camera Y records the movement on the X axis. Additionally, the actual volume is indicated by a dashed horizontal line, and the maximum sharpness is indicated by a full vertical line. The same is depicted in
Figure 12c for movement on the Y axis. The graphs clearly demonstrate that, as the image becomes more focused, the estimated volume approaches the true volume, indicating that our method is responsive to changes in focus.
To evaluate the relationship between image sharpness and reconstruction accuracy, we computed the correlation coefficient between the Tenengrad focus measure and the RMSE of the reconstructed shape. The Pearson correlation coefficient [
45] is calculated using
with
as the correlation coefficient,
as the covariance of
and
and
and
as the variance of
and
, respectively. The correlation coefficient is computed by comparing the RMSE with the Tenengrad measure, illustrating how geometric deviation correlates with image sharpness. Specifically, for motion along the X axis, a negative correlation of −0.63 is observed, while for the Y axis, the correlation is more pronounced at −0.85. These values indicate a substantial reliance on geometric deviation relative to the image’s focus. As seen in
Figure 12b,c, the least deviation of the volume is where the image has the highest focus. This indicates not only that the volume is more correct with a more focused image, but also that the overall geometric shape is closer to the real shape with a better focus.
The thermal properties of the cameras were also examined in this experiment, as the cameras experience an increase in temperature over time despite the temperature-controlled setup. To understand the influence of the camera temperature, we tracked the camera temperature using the built-in temperature sensor of the cameras. The X camera exhibited a mean temperature of 44.49 °C, with a standard deviation of 0.16 °C and a variance of 0.02 °C2. In contrast, the Y camera recorded a mean temperature of 40.61 °C, accompanied by a standard deviation of 0.30 °C and a variance of 0.09 °C2. These findings indicate a discrepancy in the thermal characteristics of the two cameras. The root cause of this variation remains unidentified; nonetheless, it is likely due to differences in the cameras and their placement inside the temperature-controlled box, which exhibits slight temperature fluctuations. The correlation coefficient between temperature and the Tenengrad measure is 0.2 for the X camera and 0.16 for the Y camera, signifying a weak correlation across the temperature spectrum, suggesting that small absolute temperature fluctuations have a negligible effect on image sharpness and reconstruction quality.
We carried out the second experiment, which was mentioned earlier, to evaluate the effectiveness of our autofocus mechanism by focusing on the CMM ball through both cameras. The real volume of the ball is as before . In this experiment, the mean volume is with a standard deviation of which gives a 95% coverage interval of . Additionally, the RMSE of the STL data and the reconstructed volume were calculated for each reconstruction, resulting in a mean RMSE of 2.7 µm with a standard deviation of 0.8 µm, suggesting the limited sensitivity in the shape reconstruction. Lastly, the correlation coefficients between the volume and the Tenengrad measure of both cameras were calculated to see whether there is any correlation left with the autofocus. The correlation coefficients are for the X camera −0.06 and for the Y camera 0.03, indicating that the autofocus compensates for focus-related variability.
In calculating the 3D volume, we presuppose a 90° angle between the two cameras, yet our setup does not allow for the precise measurement of minor deviations. Additionally, there is an imprecision in determining the contact points, which can be selected either manually or through an algorithm, specifically at the intersection of the pin and the circular section. To assess the uncertainties arising from both the camera angle and the determination of contact points, we performed a Monte Carlo simulation integrating images captured from pin 1, which possesses a radius of 2.56 mm. The contact points and the angles were varied, and subsequently, the 3D shape was reconstructed, the volume was calculated, and the RMSE between the true STL shape and the reconstructed shape was calculated after aligning using the ICP algorithm. We assumed that the true location differed from the contact points found by a normally distributed random error with a standard deviation of 2 pixels. Angle noise is also assumed to be normally distributed, with a standard deviation of 5°. We performed 10,000 simulations. In
Figure 13a, the pixel noise is shown for the left and right contact points for both cameras, and in
Figure 13b, the camera angles over all simulations are shown. In
Figure 13c, the histogram of the simulated volumes is shown, confirming that the normal distributed input noise leads to a normal distributed volume. In
Figure 13d, the boxplot of the simulated volumes is shown.
The mean of the volume is with a standard deviation of . The 95% coverage interval is , and the real volume of the circular shape of the pin is which lies well within the coverage interval, indicating good agreement between reconstruction and ground truth data. The coverage interval is calculated here using the standard deviation, because the simulation is based on one measurement. The standard error of the mean is , which indicates that the average of the Monte Carlo simulations is stable numerically. The RMSE between STL and reconstruction was also calculated each time, resulting in a mean RMSE of 4.9 µm with a standard deviation of 0.7 µm. These small RMSE values confirm that the reconstructed geometry matches the ground-truth STL closely, even with the added noise.
4.4. Real-World Application: Electrically Deformed Droplet Volumetry
As final experiment, a real deformation experiment was conducted to test the algorithm in real-world conditions with a droplet. For that, we use the full setup that is described in 2. Measuring the true shape of a deformed liquid droplet directly is challenging, so we employed an alternative method to indirectly determine the accuracy of our method. To evaluate the accuracy without measuring the real shape of the droplets, a comparing experiment was conducted.
A droplet of known density was weighed, put into the setup, and recorded while it was deformed. The previous sections showed that the reconstruction of the shape and the volume is accurate using known axisymmetric shapes, specifically a spherical cap. The initial droplet shape is a spherical cap, which has an accurate shape and volume reconstruction. In this experiment, the idea is to show how much the volume is changing while deforming, which can give an indication how good the shape of the reconstruction is. Oleic acid is chosen as the material because of its nonevaporating and non-hygroscopic properties. The material density was first measured using a Schmidt & Haensch EDM 4000+ density meter with an accuracy of . In the experiment, the temperature was and the density was . A 6 mm pin was placed inside a GRAM FV-120 analytical balance with an accuracy of 0.1 mg. These accuracies lead to an uncertainty of in the applied volume range. Afterward, a specified volume of the material is dispensed on top. The droplet is subsequently weighed and then put into the experimental setup, where it is subjected to an electric field with nonaxisymmetric deformation. The time between dispensing the oleic acid and the start of deformation is less than 5 min.
The experiment begins with a one-second interval during which no voltage is applied, followed by a one-second interval of voltage application, and concludes with another one-second interval without applied voltage. The droplet on top of the pin in the balance is shown in
Figure 14a. The anode that was used for this experiment is an elongated anode, as seen in
Figure 14b. As cathode the pin on which the droplet is sitting was used. This process was carried out with three volumes and different anode positions. In
Figure 14c,d, the camera images of the X and Y cameras is shown.
Using this process of oleic acid droplet application, weighting, and deformation, nine experiments were conducted. The applied voltages in all Experiments was
, to attain the maximum deformation. The nine experiments had different anode positions that can be seen in
Appendix B.1. In all the experiments, the X view shows the thin side of the anode and the Y view shows the wide side of the anode, which is shown in
Figure 14b.
These experiments were performed on three individual droplets of oleic acid, each of which was subjected to three different deformations by varying the anode position relative to the droplet. The initial weights and corresponding reference volumes of the three droplets were as follows: Droplet 1: (, used for Exp. 1–3); Droplet 2: (, used for Exp. 4–6); Droplet 3: (, used for Exp. 7–9).
In
Figure 15, an exemplary experiment is shown. Experiment 5 is presented as a representative example of a non-axisymmetric deformation. The results for all nine experiments conducted, which show similar volumetric trends, are provided in
Appendix B.2. The image number in
Figure 15a is the number of images that were taken since the start of the experiment. In
Figure 15b, the X-camera can be seen and the Y-camera in
Figure 15c. The droplet here will deform in the direction of the anode in X.
The third experiment is empty of data and thus not shown, because during the experiment, the droplet was obscured by the anode, which eliminates the application of our algorithm. If our algorithm would reconstruct the shape perfectly, then the volume would be constant. However, the analysis of the synthetic data generated using a non-axially deformed CREO model indicates that a minor error within the low percentage range is anticipated. If we look at the volume progression during the experiment, a few things can be derived. Initially, the volume, when there is no electric-induced deformation, matches the calculated volume within the experimental measurement uncertainty, indicating the accurate reconstruction under these conditions. However, as the droplet undergoes deformation, the volume decreases, which hints at an increasing error in the reconstruction. The amount of decrease is dependent on the experiment setup, although no systematics could be derived. The only systematic is that the droplet volume reduces, hinting to an area that is not seen in the two shadowgraphy images. But, when looking at the percentage error of the volume, it ranges between 0 and 3%. Although the maximum observed volumetric change was 3%, this remains within a realistic error range for non-ideal imaging setups.
This still provides good accuracy for the reconstruction of two images.
4.5. Limitations
The failure to reconstruct the droplet in experiment #3 highlights a practical limitation of the proposed two-camera shadowgraphy setup. Strong deformations that require the very close proximity of the anode can lead to the partial or full coverage of the droplet contour in one or both camera views. If the PBCA algorithm cannot capture a complete boundary, a 3D reconstruction is rendered impossible. Therefore, the method is limited to scenarios where the entire droplet contour remains visible to both cameras without being blocked by experimental hardware, such as the anode.
Our experiments also revealed the limitations inherent to the reconstruction algorithm. The spline-based nature of PBCA, as observed with the pyramid models in
Figure 10, inherently smoothens sharp corners, making it less suitable for angular geometries. Furthermore, the significant deviation for Pin 3 in
Figure 11g, which represents the shape of a droplet with a low contact angle, indicates reduced accuracy for flatter, less convex droplets. Finally, the algorithms’ prerequisite of a single maximal point along the z axis contour prevents the reconstruction of multi-peak or rectangular objects.
While these constraints are noteworthy, they are acceptable within the context of the primary application, which is the fabrication of polymer microlenses for illumination optics. The desired lens’ profiles for this purpose are typically smooth and convex. In this context, the smoothing effect of the spline-fit is not a critical drawback and can be considered beneficial as it mitigates pixel-level noise. However, for applications requiring the high-fidelity reconstruction of angular or multi-peak topographies, the proposed method would require substantial modification.
A final consideration is the transferability of the methods parameters. The values for the superpixel count, active contour iterations, and spline knots were specifically tuned to achieve optimal performance with our setup and image resolution. Consequently, the application of this method to other optical systems would necessitate a re-optimization of these parameters to ensure high accuracy.