Measurement of surface tension and contact angle using entropic ...

51 downloads 22284 Views 2MB Size Report
... chakir0@yahoo.com (C Atae-Allah), [email protected] (M Cabrerizo-Vılchez), ... contour of the drop and surface-tension and contact-angle calculation by the.
INSTITUTE OF PHYSICS PUBLISHING

MEASUREMENT SCIENCE AND TECHNOLOGY

Meas. Sci. Technol. 12 (2001) 288–298

www.iop.org/Journals/mt

PII: S0957-0233(01)17393-5

Measurement of surface tension and contact angle using entropic edge detection C Atae-Allah1 , M Cabrerizo-V´ılchez1 , J F G´omez-Lopera1 , J A Holgado-Terriza1 , R Rom´an-Rold´an1 and P L Luque-Escamilla2,3 1 Departamento F´ısica Aplicada, Universidad de Granada, Campus Fuente Nueva, 18071 Granada, Spain 2 Departamento Ingenier´ıas Mec´anica y Minera, EUP Linares, Universidad de Ja´en, C/Alfonso X el Sabio, 28, 23700 Linares (Ja´en), Spain

E-mail: [email protected] (C Atae-Allah), [email protected] (M Cabrerizo-V´ılchez), [email protected] (J F G´omez-Lopera), [email protected] (J A Holgado-Terriza), [email protected] (R Rom´an-Rold´an) and [email protected] (P L Luque-Escamilla)

Received 25 September 2000, in final form 21 December 2000, accepted for publication 3 January 2001 Abstract This paper presents a new method to measure the surface tension and the contact angle of a liquid. The measurement procedure comprises three steps: acquisition of the liquid drop image, image segmentation to obtain the contour of the drop and surface-tension and contact-angle calculation by the ADSA method. In the second step a new segmentation method is used based on the Jensen–Shannon divergence, an entropic measurement of coherence among distribution probabilities. The advantages of using this entropic edge-detection method are shown; it is especially suitable when the source image of the drop is affected by any kind of noise, blur or low-contrast effect. Results reveal a better performance than other methods used in this field. Keywords: surface tension, contact angle, Jensen–Shannon divergence, edge detection, edge linking

1. Introduction Surface tension is one of the most accessible experimental parameters that describes the thermodynamic state and structure of an interface. It is also of special interest in many different fields in physics and engineering, such as lubrication in machinery, diffusion and migration of liquids through porous media—very important in the search for oilfields, coatings, dispersions, adhesion, membranes etc. It is also very important in the drop-formation process, which is fundamental in industrial applications such as mixing, chemical processing, fibre spinning, silicon-chip technology and spraying (in ink-jet printers, diesel motors and irrigation). The Wilhelmy plate and the Nouy ring methods have traditionally been used for surface-tension measurement [1, 2]. These procedures are accurate but difficult to use, and much care must been taken in the measurement process. A new 3

All correspondence to be submitted to Pedro Luis Luque-Escamilla.

0957-0233/01/030288+11$30.00

© 2001 IOP Publishing Ltd

technique, called the drop-shape method, has been developed in recent years [3] taking advantage of new advances in image processing. The drop-shape method operates by adjusting a theoretical contour to the drop border obtained by image segmentation. Commonly used drops are the sessile drop (formed on a surface) and the pendant drop (hanging from a capillary tube). This technique has some advantages in comparison to traditional methods. First, only small quantities of liquid are needed. Second, it can be applied to liquid–vapour and liquid–liquid interfaces. Third, it can be used in extreme conditions of temperature and pressure. Moreover, the interface is not contaminated or interfered with by the system. In addition, the technique makes it possible to measure many parameters that cannot be obtained with traditional methods, such as the dynamic interfacial tension, dynamic contact angle [3], film balance [4] etc. The first numerical method to measure surface tension was established by Bashforth and Adams [5]. Since then,

Printed in the UK

288

Image-based surface tension measurement

great improvements in the speed and accuracy of the method have been obtained with the introduction of computer image analysis. There is a vast bibliography that covers all the different aspects of this topic: data acquisition, different edge-detection methods to detect the drop profile, different algorithms of integration and optimization schemes [6–13]. However, none of these methods is robust against noise in the source-drop image. Moreover, the drop image must be well focused and images obtained in practice are unfortunately frequently noisy and out of focus, fundamentally due to the acquisition procedure (CCD or photographic devices, for example) [14]. The advantage of using the proposed entropic edge-detector method is its robustness when managing images affected by these defects. The paper is structured as follows. Section 1 introduces the method. Section 2 reveals the technique of obtaining the surface-tension value using the novel edge-detection method proposed and an optimization algorithm to fit the detected drop shape to the theoretical one. Results are presented in section 3 and the conclusions in section 4.

2. Surface-tension calculation method The procedure for measuring the surface tension and contact angle of a liquid is a three-step one, described as follows. Step 1. Image acquisition. In this step an image of the liquid drop is acquired from a CCD or photographic device and stored in digital form in a computer. Step 2. Edge detection. In this stage an edge-detection method is applied to find the drop contour in the image. It is usually recommendable to apply an edge-linking algorithm to ensure the closeness of the detected borders. Step 3. Interfacial parameter determination. Once the experimental drop profile is performed, a numerical method is used to obtain the theoretical one that best fits it. The interfacial parameters of the liquid drop can be obtained from the knowledge of the fitted theoretical profile. 2.1. Image acquisition The experimental apparatus for surface-tension measurement is shown in figure 1. As can be seen, it is comprised of two main devices: the image-acquisition and drop-control systems (which controls the drop and environmental conditions). A Leika Apozoom microscope coupled with a Sony CCD B&W video camera—SSC-M370CE with 752 × 582 resolution—was used for the image acquisition. The camera is connected to a video frame-grabber card (DT 2855) that has a resolution of 768 × 512 pixels with 256 grey levels. The frame-grabber card has a similar resolution to the video camera, which prevents loss of accuracy in the light-intensity detection of each photocell of the video camera. This feature is important for detecting the drop profile with the best possible precision. The frame-grabber board is mounted on a Pentium computer and to a separate RGB monitor to display the drops. The light source is placed behind a diffuser that produces a uniform light on the drop, which is controlled by a variac power supply. To avoid vibration, all the instrument devices

are placed on an antivibratory table from Kinetic System Inc. Vibraplane. The drop is put into a glass cuvette, inserted into a thermostatted cell, which maintains a constant temperature value by water circulation through a jacket. The cell is on a three-axis micropositioner that allows the drops to be handled in any direction. In pendant experiments, the drop is inserted into the cell with a syringe (Hamilton Microlab 500 microinjector) that pulls the liquid into a Teflon capillary 0.5 mm in diameter that prevents wetting of the liquid. This allows the formation of stable drops automatically at low injection rate to prevent drop vibration. In sessile experiments, the drop is placed on the surface with a microsyringe that controls the amount of liquid inserted. For sessile experiments a solid surface with a low surface tension was chosen (Teflon (FEP)). The microsyringe is attached to a stand adapter to minimize vibration. All glassware and Teflon ware were cleaned in chromic sulphuric acid. First of all, instrument calibration is necessary to obtain accurate and precise surface-tension values. A plumb bob is used to align the vertical axis with the vertical axis of the video camera because the drop must be axisymmetric in order to use the optimization method in section 2.3. The plumb consists of a weight hanging from a fine copper wire submerged in a beaker of water to dampen oscillations. An image of the plumb wire is captured with the CCD camera and a program determines the vertical axis. This process continues until the user corrects the vertical axis of the video camera. A grid with an array of squares of 0.25 mm per side (Graticules Ltd Tonbridge) is used to determine the picture magnification, horizontal/vertical aspect ratio and geometric distortion due to the optical system. The program uses the grid to calculate the co-ordinates of the drop profile extracted with the edge-detection method in millimetres. 2.2. Edge detection In the specialized literature, detection of drop profiles is usually performed using both global and adaptive thresholding methods [6–8]. These techniques require highly contrasted images to select the right threshold value, so they are only adequate for pendant drops in a liquid–vapour interface. Sessile and pendant drops in liquid–liquid interfaces have such poor contrast in general that it is not easy to obtain the drop profile with these traditional methods. This is why [9, 13] use more powerful edge detectors, based on gradient magnitudes, such as Sobel or five-level Robinson detectors [14]. In addition, many causes can degrade the image during the acquisition process: (a) uncertainties in the sensor, fluctuations in the light intensity, and other similar error sources; (b) photoelectronic, Gaussian noise appearing in the conversion of photons to electrons; (c) thermal noise in the signal amplification process—usually this kind of noise is modelled as Gaussian type, with zero mean; (d) impulsive type noise (salt and pepper) appearing in signal transmission processes and (e) other causes of error (blur due to drop vaporization, out of focus etc). 289

C Atae-Allah et al

Figure 1. Schematic illustration of drop-shape method.

Unfortunately, none of the edge-detection techniques commonly used in the specialized literature is robust against noise or blurring. The method presented in this paper, in contrast, is applicable in any practical situation, even when the above-mentioned defects appear. It is based on the Jensen–Shannon divergence between the normalized histograms of two samples taken from the image. 2.2.1. The Jensen–Shannon divergence. Jensen–Shannon divergence (hereafter JS), proposed by Lin [15], has proved to be a powerful tool in the segmentation of digital images [16]. It is a measurement of the inverse cohesion of a set of probability distributions having the same number of possible realizations:    r i π i Pi − πi H (Pi ) (1) JSπ (P1 , P2 , . . . , Pr ) ≡ H i=1

i=1

where P1 , P2 , . . . , Pr are discrete probability distributions Pi = {Pi,j /j = 1, . . . , n}

i = 1, . . . , r

π1 , π2 , . . . , πr are the distribution weights for Pi ;   r  π ≡ π1 , π2 , . . . , πr /πi > 0, πi = 1 H (Pi ) = −

n 

i=1

Pi,j log Pi,j is the Shannon entropy.

j =1

Divergence grows as the differences between its arguments (the probability distributions involved) increase, and vanishes when all the probability distributions are identical. As only two probability distributions are used here, the final expression of the Jensen–Shannon divergence is   P1 + P2 1 − [H (P1 ) + H (P2 )]. (2) JS(P1 , P2 ) ≡ H 2 2 The application of JS to edge detection is based on a three-step structured procedure, as follows [17]. (a) Calculation of divergence and direction matrices. In this step the divergence and direction matrices associated with the image are calculated. The divergence matrix is composed of real numbers and is similar to that obtained with the gradient operator for edge detection. The direction matrix contains the estimated edge direction for all image pixels. 290

Figure 2. A window sliding across a perfect edge.

(b) Edge-pixel selection. Edge pixels are chosen by means of a local maximum selection criterion from the divergence matrix, resulting in a binary image with the image edges. (c) Edge linking. The final stage is an edge-prolongation procedure that attempts to connect sets of unconnected edge pixels in the previously obtained binary image. 2.2.2. Calculation of divergence and direction matrices. Let us consider a window made up of two identical subwindows and sliding down over a straight edge between two different textures (see figure 2). It has been shown [16] that in such conditions the JS between the normalized histograms of the subwindows reaches its maximum value when each subwindow lies completely within one texture. In accordance with the above procedure, it is possible to assign a JS value to each pixel in the image. Hence, pixels with a high JS have a high probability of being edge pixels, and vice versa. If, unlike the example shown in figure 2, the window-to-edge angle is not 90◦ , the JS maximum will be low or even undetectable, while the JS inside a given texture will be close to zero or to the base value. This then means trying several window orientations for each pixel. Only four orientations are, however, technically possible: vertical, horizontal, and two diagonals. Thus, the values JS1 , JS2 , JS3 and JS4 are calculated for the fixed window orientations 0, π/4, π/2 and 3π/4. In this work we have used a square sliding window, with user-defined size. Now the question is how to obtain an estimate of the direction from these four values that maximizes the JS and then the value of this maximum, JSmax . For a given pixel, the JS value is a π -periodic function of window orientation over the image. It reaches its maximum value for a given orientation, β, and a minimum in β + π. A theoretical model describing this periodic function can thus be expressed as follows: JS(x) = a + b cos(β + 2πx)

x ∈ [0, 1]

(3)

Image-based surface tension measurement

where a and b are constants determining the amplitude of JS oscillation and β ∈ [0, π) is the edge direction in this pixel. The JS direction, x, is normalized in the interval [0, 1] to simplify calculations. According to the trigonometric relation, a theoretical model equivalent to (3) is JS(x) = c + msen(2πx) + n cos(2πx)

 

16x 2 − 16x + 3

−16x + 32x − 15 2

x ∈ [ 41 , 43 ]

x∈

Estimated edge direction

x ∈ [0, 1] (4)

where c, m and n are constants. Nevertheless, due to the computational effort required for trigonometric functions, they can be replaced by other functions with similar properties, such as quadratic splines:  x ∈ [0, 21 ] −16x 2 + 8x sen(2π x) ≈ f (x) ≡ 16x 2 − 24x + 8 x ∈ [ 21 , 1] cos(2π x) ≈ g(x)  2 x ∈ [0, 41 ]   −16x + 1 ≡

Pixel under study

(5)

[ 43 , 1].

Then, f (x) is obtained as a quadratic spline of class 1, with nodes at points {0, 41 , 21 , 43 , 1}, interpolating to sen(2πx) at points {f (0), f ( 41 ), f ( 21 ), f ( 43 ), f (1), f ( 41 ), f ( 43 )}. In the same way, g(x) is obtained as a quadratic spline of class 1 with the same nodes as f (x), interpolating to cos(2π x) at the points {g(0), g( 41 ), g( 21 ), g( 43 ), g(1), g (0), g ( 21 ), g (1)}. With a least-squares fit of the divergence model (4) and the modification (5) for points JS1 , JS2 , JS3 and JS4 , the solution is JS1 + JS2 + JS3 + JS4 JS2 − JS4 JS(x) = + f (x) 4 2 JS1 − JS3 g(x). (6) + 2 The direction, x, having the maximum JS values can be obtained from the equations if JS1 − JS3  0, JS2 − JS4  0 ⇒ JS2 − JS4 ∈ [0, 41 ] x= 4[(JS1 − JS3 ) − (JS2 − JS4 )] if JS1 − JS3  0, JS2 − JS4  0 ⇒ 4(JS1 − JS3 ) − 3(JS2 − JS4 ) ∈ [ 43 , 1] x= 4[(JS1 − JS3 ) − (JS2 − JS4 )] if JS1 − JS3  0, JS2 − JS4  0 ⇒ 2(JS1 − JS3 ) − (JS2 − JS4 ) ∈ [ 41 , 21 ] x= 4[(JS1 − JS3 ) − (JS2 − JS4 )] if JS1 − JS3  0, JS2 − JS4  0 ⇒ 2(JS1 − JS3 ) + 3(JS2 − JS4 ) (7) ∈ [ 21 , 43 ]. x= 4[(JS1 − JS3 ) − (JS2 − JS4 )] Finally, defining δ = πx ∈ [0, π) as the estimated edge direction, the method described above calculates x from (7) (i.e., the estimated direction that maximizes the JS) and the estimated JSmax from (6). In this way, each image pixel is labelled with a pair of values: the estimated edge direction and the estimated JSmax placing the sliding window in accordance with the estimated edge direction. Thus, two matrices are built: the divergence matrix (which indicates the probability of a pixel belonging to the image edge) and the direction matrix (which estimates the edge direction for the edge pixels).

Sliding monodimensional window

Figure 3. Monodimensional window, perpendicular to estimated direction in each image pixel.

However, direct application of the above method does not provide good results for some kinds of image—corrupted by Gaussian noise, or with regions having small fluctuations in grey levels—because the JS could be too sensitive to any change in grey levels between regions. It is therefore better to construct the divergence matrix including extra information in addition to the histogram information using the following expression: (8) JS∗i,j = JSi,j (1 − α + αWi,j ) where Wi,j = |Nw1 − Nw2 |/Nw , Nw1 and Nw2 being the average grey levels of subwindows W1 and W2 , and Nw the maximum grey level inside the window (normalization factor). α ∈ [0, 1] is the attenuation factor, which determines the weights of JS and the grey levels inside the window. This modification makes the JS suitable for different kinds of image, thus transforming our algorithm into a hybrid among texturebased algorithms [18], Jensen–Shannon divergence [16] and grey-level based algorithms (gradient, Laplacian, Laplacian and gradient of the Gaussian etc) [19–21]. 2.2.3. Edge-pixel selection. In this step the procedure selects which pixels from the divergence matrix are edge pixels. Thresholding the divergence matrix [22] is not always useful, since maximum JS values depend on the composition of adjacent textures, and will thus vary according to texture. Consequently, it would seem more appropriate to use a local criterion. Accordingly, each edge-pixel candidate is the centre of an odd-length monodimensional window, placed perpendicular to the estimated edge direction in that pixel (figure 3). Thus, every edge pixel has to satisfy JScentre − JSj  Td

(9)

for any other pixel j in that particular monodimensional window, where Td is a threshold. Pixels marked as edge pixels are then outstanding local maxima of the divergence matrix. Obviously, detection results depend directly on the parameter Td , which can be modified by the user if necessary. This local edge-pixel detection method requires simple divergence matrix pre-processing. Small fluctuations, often due to noise in the original image or to texture regularity, can introduce a great number of false maxima, although they are usually fairly low. The divergence matrix is therefore smoothed out by repeatedly applying a 3 × 3 mean filter. Selection of a local maximum is, in a sense, a thinning procedure since just one pixel will usually be detected as an 291

C Atae-Allah et al

C

C C

C C C

E C

E C

E

Table 1. Typical parameter values. Parameter value

C

Figure 4. End points and neighbour candidates for edge prolongation. E, end point; C, neighbour candidates. The remaining grey pixels are edge pixels.

edge pixel within the neighbourhood, as determined by the size of the monodimensional window. In fact, rarely would more than one pixel share the same maximum JS. 2.2.4. Edge linking. The two steps described above make it possible to extract the image edge pixels. However, it is not always feasible to establish a good compromise between the quality of the binary image obtained and the desired connectivity of the edge pixels, possibly due to the presence of noise in the original image, and the texture composition of the image regions. In order to deal with these problems, a third step can be added: edge-pixel linking [23]. This step attempts to join the various sets of edge pixels using information from the divergence matrix associated with the image, together with knowledge of the direction in which maximum JS is produced. In broad terms, the linking procedure consists in extracting edge pixels unmarked since they did not satisfy the condition (9), but nearly did. Not all the pixels in the image are candidates for filling the gaps, only those classified as neighbour candidates of end pixels. The definition of end pixel in [24] includes several variants that may influence the result of the linking process. The present paper uses the definition of end pixel as a pixel having one or two marked pixels joined together. Thus, only certain neighbour end pixels are candidates for prolonging image edges. In figure 4 we present the candidate pixels for continuing a given edge. For a given neighbour candidate to be marked as an edge pixel, it must satisfy two conditions: (a) Its associated JS must be reasonably high. prolongation condition is then JSend − JSneighbour candidate  τd

The first

(10)

where τd is a threshold, which has at first no relation with parameter Td in step (2) of the procedure. (b) The estimated edge direction of the end pixel (Dir end ), the edge-direction neighbour candidate (Dir neighbour candidate ) and the direction of the physical line joining them (Dir (end, neighbour candidate)) must not differ by more than a specified amount. The second prolongation condition is then (Dir (end, neighbour candidate))-Dir end )

2

+(Dir (end, neighbour candidate) −Dir neighbour candidate )2  τθ where τθ is another threshold. 292

(11)

Typical value 3×3 0.75

Step 1

1. Sliding window size 2. Attenuation coefficient

Step 2

1. Monodimensional window size 2. Mean filter iterations 3. Local maximum selection threshold

Step 3

1. Divergence threshold 2. Direction threshold

11 8 0.7 0.1 0.5

The two foregoing conditions are used in an attempt to extract as edge pixels those pixels lying next to end pixels and whose JS and direction are sufficiently close to those of the end pixel to be extended. It should be borne in mind that when a new pixel is marked as an edge, other adjacent pixels can then become end pixels. So, the algorithm must foresee this event in order to continue the search for links. 2.2.5. Final considerations about edge-detection procedure. This section briefly summarizes all the parameters used by the edge-detection procedure. Initially, the proposed segmentation procedure may seem difficult to use due to the elevated number of parameters that user can vary. But in practice the procedure is easy to use because all the images are similar. In table 1 we present the typical parameter values used in this work. 2.3. Interfacial-parameter determination Once the profile of the drop is obtained, a numerical method is used for obtaining the theoretical profile of the drop that best fits it by adjusting the interfacial parameters, which are then determined. The theoretical profile determination of a liquid drop is a complex problem. From equilibrium considerations, Young and Laplace concluded that   1 1 (12) + P = γ R1 R 2 where P is the pressure difference across the interface between the two phases (liquid–gas or liquid–liquid), γ is the surface tension and R1 and R2 are the two principal radii of the curvature of the drop surface. If the drop is axisymmetric with respect to the vertical axis, the pressure difference in the apex of the drop Pa can be calculated from equation (12) by taking R1 = R2 = R0 : Pa =

2γ . R0

(13)

Thus, P in equation (12) may be put in terms of Pa by using the hydrostatic fundamental equation P = Pa ± ρgz =

2γ ± ρgz R

(14)

where ± means that the sum is carried out when the drop is lying on a horizontal surface (sessile drop) and the difference is taken when the drop is falling from a dropper (pendant drop); ρ is the density difference between liquid and surrounding

Image-based surface tension measurement

y 0

xo s

φ

so

yo

y

s 0

xo

s φ

yo φ

Φ

x

R1

R2

x

Figure 5. Definition of co-ordinate systems in pendant and sessile drops.

gas, to take into account Archimedes’ buoyancy; g is the gravity acceleration where the measurements were performed and z is the height above (or below) the apex. In order to obtain the differential equations describing the drop profile, hydrostatic equilibrium considerations, or a variational approach—such as a minimization of the sum of the gravitational and surface potential energies [25]—can be taken. These equations are [10] dx = cos φ ds

dy = sin φ ds

dφ 2 sin φ ρgy = − ± ds R r γ

(15)

where the angles and lengths are shown in figure 5. This set of equations can be integrated simultaneously, in function of parameter s, using a numerical procedure such as a fourth-order Runge–Kutta scheme [12] or the secondorder implicit Euler method [10]. The theoretical profile of the drop for a given R0 , g, p and γ is then obtained. The initial values required to start the integration process are x(s = 0) = y(s = 0) = φ(s = 0) = 0. Several optimization methods have been developed to fit the theoretical drop profile to the experimental one [8, 12]. In this work, the ADSA (axisymmetric drop shape analysis) [10] method has been chosen, because it offers better solutions over a wide range of situations, in addition to being used by some laboratories [26–28]. This algorithm is described below. A number of points in the drop-image border are taken and then the theoretical drop shape is fitted to them by minimizing the Euclidean distance, d(·, ·), between the empirical points un and the theoretical profile points, v, obtained from equation (15). The objective function to optimize is E=

N 1 [d(un , v)]2 2 n=1

(16)

where N is the number of empirical points taken from the border image of the drop. The change in d(·, ·) is achieved by modifying the interface parameters and then the theoretical profile. Minimization is performed using the Newton–Rhapson method, which converges to the optimal value. However, initial values are required to use the method.

3. Experimental results 2-propanol (grade 99.5+%) from Sigma Aldrich and formamide (grade 99+%) from Carlo Erba Reagents were used to carry out the surface-tension calculation with the proposed method. Robinson and Sobel edge-detector results, which are commonly employed in this kind of problem [9, 13], are also included for comparison. Some reference values of the calculated parameters are given to show the accuracy of the results. The reference value for surface tension of 2-propanol is 23.32 mJ m−2 at 25 ◦ C [29]. The formamide surface-tension reference value is 57.49 mJ m−2 , and the contact angle is 95.38◦ [30], both at 20 ◦ C. 3.1. Experimental data and analysis In this section the results of surface-tension and contactangle determination for real drop images are presented. The interfacial parameters were calculated by the ADSA method in all cases. The first experiments correspond to the interfacial parameter determination of drop images unaffected by blur or noise. From a set of eight 2-propanol pendant drops, we obtained surface-tension values of 24.06 ± 0.33 mJ m−2 (Sobel), 24.17 ± 0.26 mJ m−2 (Robinson) and 24.07 ± 0.27 mJ m−2 (JS), whereas from six sessile drops of formamide the results are 57.1 ± 4.5 mJ m−2 (Sobel), 58.0 ± 4.2 mJ m−2 (Robinson) and 57.3 ± 4.9 mJ m−2 (JS). The contact angle values in this later case are 96.8 ± 1.8 (Sobel), 96.8 ± 4.6 (Robinson) and 97.4±2.2 (JS). Error estimation√in all the above data is the 95% confidence interval (1.96σ/ N) assuming the errors follow a Gaussian model. From the experimental results we can observe that the ADSA method using JS can provide results as accurate as those using traditional Sobel and Robinson edge detectors when applied to clean—unaffected by noise or blur—drop images. With respect to formamide, note that the experimental mean values are slightly different to the reference values (shown in table 3), although the error intervals include the latter. A high discrepancy in the error interval of the interfacial parameters was obtained for the sessile drops compared with the pendant experiment due to several reasons [3]. First, the sessile drops are very sensitive to the roughness and heterogeneity of the Teflon, thus causing a lack of vertical 293

C Atae-Allah et al

a)

b)

c)

d)

e)

f)

g) Figure 6. Results of edge-detection in blurred images: (a) image of 2-propanol, blurred eight times; (b) the same as (a) for formamide; (c) and (d) results of segmenting images (a) and (b) with the Sobel edge-detector; (e) and (f ) the same as (c) and (d), applying the Robinson edge-detector; (g) and (h) the same as (c) and (d), applying the JS edge-detector.

symmetry, which has a negative impact on the ADSA method. Second, a minimal variation in the drop size causes a change in the curvature of the drop that produces a variation in the interfacial measurements. Third, the accurate determination of the contact point can be difficult when the image has a low 294

contrast, such as in this case. A good contrast between the drop and the surface is extremely important for precise measurement of the interfacial parameters. However, the real advantage of the proposed edge-detector method occurs in the application to noisy or blurred drop

Image-based surface tension measurement

a)

b)

c)

d)

e)

f)

g)

h)

Figure 7. Results of edge-detection with Gaussian noisy images (zero mean, standard deviation 15): (a) image of 2-propanol with Gaussian noise; (b) the same as (a) for formamide; (c) and (d) results of segmenting images (a) and (b) with the Sobel edge-detector; (e) and (f ) the same as (c) and (d), applying the Robinson edge-detector; (g) and (h) the same as (c) and (d), applying the JS edge-detector.

images. Thus, a set of real drop images, into which various degrees and types of noise have been introduced, are considered in a second group of experiments. These experiments are important for two reasons: they can simulate experimental conditions that commonly appear in practice and they allow us

to evaluate the robustness of these edge-detection methods. Table 2 shows the numerical results of surface tension using the Sobel, Robinson and JS methods. The original 2-propanol pendant drop is contaminated with three synthetic distortions (blur, and Gaussian and impulsive noise) to simulate 295

C Atae-Allah et al

(a)

(b)

(c)

(d)

(e)

(f )

(g)

(h)

Figure 8. Results of edge-detection with 15% impulsive salt-and-pepper noise: (a) image of 2-propanol with impulsive noise; (b) the same as (a) for formamide; (c) and (d) results of segmenting images (a) and (b) with the Sobel edge detector; (e) and (f ) the same as (c) and (d), applying the Robinson edge-detector; (g) and (h) the same as (c) and (d), applying the JS edge-detector.

experimental problems that can appear in practice. Blur, which suitably simulates lack of focus in image-acquisition systems, is achieved by recursively applying a 3×3 mask to the original image (mean filter). Gaussian noise has zero mean and a 296

typical deviation of 5, 10 and 15. Impulsive noise is salt-andpepper noise in amounts of 5%, 10% and 15%. Gaussian and impulsive noise are both very common in image acquisition and transmission.

Image-based surface tension measurement

Table 2. Surface-tension calculation of 2-propanol pendant drops with noise. γ = surface-tension value in mJ m−2 . RE = relative error in %. Reference surface-tension value: 23.32 mJ m−2 . Noise type Blur Original

5

Gaussian 8

5

Impulsive

10

15

5%

10%

15%

Sobel

γ RE

23.62 0

23.70 0.34

— —

23.53 0.38

23.18 1.86

— —

— —

— —

— —

Robinson

γ RE

23.66 0

23.58 0.34

— —

23.69 0.13

23.94 1.18

— —

— —

— —

— —

JS

γ RE

23.56 0

23.62 0.25

23.42 0.59

23.65 0.38

23.63 0.30

23.69 0.55

23.34 0.93

23.42 0.59

23.43 0.55

Table 3. Surface-tension calculation of formamide sessile drops with noise. γ = surface-tension value in mJ m−2 . φ = contact angle in sexagesimal degrees. RE = relative error as a percentage. Reference surface-tension value: 57.49 mJ m−2 . Reference contact-angle value: 95.38◦ . Noise type Blur Original

5

Gaussian 8

5

10

Impulsive 15

5%

10%

15%

Sobel

γ RE φ RE

58.32 0 98.49 0

56.54 3.05 97.58 0.92

— — — —

54.58 6.41 100.50 2.04

42.25 27.55 89.16 9.47

— — — —

— — — —

— — — —

— — — —

Robinson

γ RE φ RE

58.97 0 100.71 0

61.62 4.49 100.16 0.54

— — — —

47.33 19.73 98.17 2.52

52.98 10.16 86.73 13.88

— — — —

— — — —

— — — —

— — — —

JS

γ RE φ RE

57.94 0 98.69 0

59.50 2.69 99.73 1.05

55.52 4.18 99.52 0.847

59.89 3.37 99.64 0.96

56.91 1.78 99.84 1.17

56.39 2.68 100.82 2.16

54.12 6.59 102.58 3.94

54.28 6.32 101.54 2.89

57.24 1.21 101.82 3.17

Table 3 presents the numerical results of the same experiment as in table 2, but using sessile formamide drops. In both tables the relative error is calculated with respect to the reference value and is expressed as a percentage. Figures 6–8 show images corresponding to experiments in tables 2 and 3. From tables 2 and 3, and figures 6–8, we can conclude that JS is a much better edge detector than Sobel and Robinson. In fact, in tables 2 and 3 the symbol ‘—’ means that the edgedetector cannot even segment this image. Furthermore, JS is more robust against noise than Sobel and Robinson, as can be seen in the relative error values given in tables 2 and 3. In fact, relative error in 2-propanol experiments is always less than 1%, and smaller than the relative errors of the Sobel and Robinson methods. The formamide results are similar to the 2-propanol ones, obtaining a relative error of less than 6.6% in surface tension and 4% in contact angle. The better performance of JS can be seen by simply noting that Sobel produces relative errors above 27% and 9%, respectively, while Robinson produces relative errors over 19% and 13% respectively. In figures 6–8 we can observe the superior JS performance. In fact, JS segmented images are the only ones that can be processed to obtain surface-tension and contact-angle values. Moreover, JS images do not need pre-processing (filtering to eliminate noise but displacing edges) or post-processing (edge thinning, necessary to apply the ADSA method).

4. Conclusions In recent years, significant advances in signal-processing techniques have enabled image-based methods to attain sufficient accuracy in surface tension measurements. These approaches (drop-shape methods, such as ADSA) are as good as traditional ones, without their disadvantages, such as the extreme care needed in the processing, the relatively high quantity of liquid used or the interference with the liquid to measure. In addition, these techniques may only be useful when studying problematic cases such as interfaces between liquids. Moreover, it provides measurements of additional parameters—i.e. contact angle—in the same processing. These approaches function as follows: the interfacial parameters are measured by fitting the theoretical contour to the real one, obtained by using an edge detector. In this context, the authors present an entropic method of edge detection, based on the Jensen–Shannon divergence, that is of advantage in the measurement of surface tension and contact angle in pendant or sessile liquid drops. When it is used, the contour is appropriately detected, even when noise or blurring is present, or contrast is very low. In laboratory work, these problems can easily arise due to the use of electronic devices (thus generating noise) and to the evaporation of the liquid when the image is being acquired (thus giving rise to an out-of-focus, blurred image). Traditional detectors failed 297

C Atae-Allah et al

when trying to provide any measurement of the interfacial parameters in such situations. The advantages of the Jensen–Shannon divergence detector are due to its intrinsic properties of noise robustness [17]. When contrast is low, it is possible to include a refinement in the algorithm, named attenuation, thus making it capable of distinguishing the edges even in such a situation [31]. The Jensen–Shannon method provides the best results when it is used with small windows since the observation level is the more accurate [17]. It must be said that the edge linking is essential in the results obtained, because only a few edge pixels are detected directly, due to the extreme conditions in which the algorithm has to work. This makes it necessary to adjust the parameters in the detector to obtain a few edge pixels, but with a very high confidence level. To sum up, the proposed Jensen–Shannon divergence edge detector is very suitable for use in drop-shape methods for determining surface tension or contact angle in liquids, especially when the quality of the drop images is relatively poor.

Acknowledgments This work has been partially supported by grants MAR-970464 and MAT-98-0937-C02-C01 of the Spanish Government. Our thanks to Christine Laurin for revising the English.

References [1] Weser C 1980 Measurement of interfacial tension and surface tension—general review for practical man GIT Fachz. Laboratorium 24 642–8 Weser C 1980 Measurement of interfacial tension and surface tension—general review for practical man GIT Fachz. Laboratorium 24 734–42 [2] Adamson A W 1982 Physical Chemistry of Surfaces (New York: Wiley) [3] Neumann A W and Spelt J K 1996 Applied Surface Thermodynamics (New York: Dekker) [4] Kwok D Y, Vollhardt D, Miller R, Li D and Neumann A W 1994 Axisymmetric drop shape analysis as a film balance Colloids Sufaces 88 51–8 [5] Bashforth F and Adams J C 1893 An Attempt to Test the Theories of Capillary Action (Cambridge: Cambridge University Press) [6] Girault H, Schiffrin D J and Smith B J 1984 The measurement of interfacial tension of pendant drops using a video image profile digitizer J. Colloid Interface Sci. 101 257–66 [7] Hansen F K and Rodsrud G 1991 Surface tension by pendant drop J. Colloid Interface Sci. 141 1–9 [8] Anastasiadis S H, Chen J K, Koberstein J T, Siegel A F, Sohn J E and Emerson J A 1989 The determination of interfacial tension by video image processing of pendant fluid drops J. Colloid Interface Sci. 119 55–66 [9] Cheng P, Li D, Boruvka L, Rotenberg Y and Neumann A W 1990 Automation of Axisymmetric drop shape analysis for measurement of interfacial tensions and contact angles Colloids Surf. 43 151–67

298

[10] Rotenberg Y, Boruvka L and Neumann A W 1983 Determination of surface tension and contact angle from the shapes of axisymmetric fluid interfaces J. Colloid Interface Sci. 93 169–83 [11] Hansen F K 1993 Surface tension by image analysis: fast and automatic measurements of pendant and sessile drops and bubbles J. Colloid Interface Sci. 160 209–17 [12] Huh C and Reed R L 1983 A method for estimating interfacial tensions and contact angles from sessile and pendant drop shapes J. Colloid Interface Sci. 91 472–84 [13] Pallas N R and Harrison Y R 1990 An automated drop shape apparatus and the surface tension of pure water Colloids Surf. 43 169–94 [14] Pitas G and Venetsanopoulos A N 1990 Nonlinear Digital Filters (Dordrecht: Kluwer) [15] Lin J 1991 Divergence measures based on the Shannon entropy IEEE Trans. Information Theory 37 145–50 [16] Barranco-L´opez V, Luque-Escamilla P L and Rom´an-Rold´an R R 1995 Entropic texture-edge detection for image segmentation Electron. Lett. 31 867–69 [17] G´omez-Lopera J F, Robles-P´erez A M, Mart´ınez-Aroza J and Rom´an-Rold´an R 2000 An analysis of edge detection by using the Jensen–Shannon divergence J. Math. Imaging Vision 13 35–56 [18] Park D J, Nam K M and Park R H 1994 Edge-detection in noisy images based on the co-occurrence matrix Pattern Recognition Lett. 27 765–75 [19] Pratt W 1991 Digital Image Processing (New York: Wiley–Interscience) [20] Marr D and Hildreth E 1980 Theory of edge detection Proc. R. Soc. B 207 187–217 [21] Canny J 1986 A computational approach to edge detection IEEE Trans. Pattern Anal. Machine Intell. 8 679–98 [22] Barranco Lopez V, Luque Escamilla P L, Mart´ınez Aroza J and Rom´an Rold´an R R 1995 Texture segmentation based on information-theoretic edge detection method Proc. 6th Spanish Symp. on Pattern Recognition (C´ordoba) pp 58–64 [23] Farag A A 1995 Edge linking by sequential search Pattern Recognition 28 611–33 [24] Lam L 1992 Thinning methodologies—a comprehensive survey IEEE Trans. Pattern Anal. Machine Intell. 14 869–85 [25] Behroozi F, Macomber H K, Dostal J A and Behroozi C H 1996 The profile of a dew drop Am. J. Phys. 64 1120–5 [26] Noordmans J and Busscher H J 1991 The influence of droplet volume and contact angle on liquid surface tension measurements by axisymmetric drop shape analysis-profile (ADSA-P) Colloid Surf. 58 239–49 [27] Lin S Y, Chen L J, Xyu J W and Weng W J 1995 An examination on the accuracy of interfacial tension measurement from pendant drop profile Langmuir 11 4159–66 [28] Li D, Cheng P and Neumann A W 1992 Contact angle measurement by axisymmetric drop shape analysis Adv. Colloid Interface Sci. 39 342–82 [29] Li D and Neumann A W 1992 Contact angles of binary liquids and their interpretation J. Adhesion Sci. Technol. 6 601–10 [30] Li D and Neumann A W 1992 Contact angles of hydrophobic solid surfaces and their interpretation J. Colloid Interface Sci. 148 190–200 [31] Holgado Terriza J A, G´omez Lopera J F, Luque Escamilla P L, Atae-Allah C and Cabrerizo-V´ılchez M 1999 Measurement of ultralow interfacial tension with ADSA using an entropic edge-detector Colloids Surf. A 156 579–86