• 検索結果がありません。

The software for analyzing the bubble-surface images was built using Matlab version R2014a (8.3.0.532). There are several built-in functions in Matlab for image processing that can be used to support the development of Bsolina. The main built-in functions used in this software development are listed in Table 2-1. The simplified algorithm or computation procedure used in this software is presented in Fig. 2-1 and 2-2.

40

Table 2-1. Built-in functions of Matlab used in the development of image analysis software.

Built-in functions Descriptions

im2bw Convert image to binary image, based on threshold imfill Fill image regions and holes

bwtraceboundary Trace object in binary image

Fig. 2-1. The main program algorithm or main computation steps.

The programming started with designing the input section. In this section, the images to be analyzed can be selected from the pop-up window. The multi-image selection is enable in this software. The formats of image supported in this software are JPEG, PNG, and bitmap. Several parameters for image analysis (e.g., image threshold, pixel conversion to mm, high speed camera frame rate used to capture the bubble, starting point for tracing the bubble boundary, and the solid surface reference position) were designed as input variables.

Moreover, the image analysis software was designed to include the noise reducer during the bubble attachment onto the surface. The noise reducer was programmed by comparing bubble contact points from the previous image. This

41

comparison allows the software to track pixel movement of the previous bubble contact points and then determine whether the new contact point deviates from the trend of the previous bubble contact points within an error parameter. The error parameter is chosen from the pixel conversion value.

The input section is equipped with an input for saving the analysis results (e.g., image format for the result display and filename for saving the result data in Microsoft Office Excel format). Image adjustment feature is enable in this software, which allows the user to crop the image dimension and to adjust the image brightness, if necessary.

Fig. 2-2. The algorithm or computation procedures for image processing subprogram presented in Fig. 2-1.

Fig. 2-3. Processing applied on a bubble image. (A) Original image, (B) after applying im2bw, (C) after applying imfill, (D) after applying bwtraceboundary.

The selected images are then analyzed using a subprogram called image processing. The algorithm of this subprogram is presented in Fig. 2-2. In this

A B C D

42

subprogram, the image is processed through a series of steps such as image recognizing and converting, object boundary tracing, determination of contact point, and calculation of bubble parameters (i.e., vertical and horizontal diameter, equivalent diameter, bubble local velocity, bubble distance to the surface, and bubble trajectory).

In image recognizing and converting process, the image dimension (width and height) was calculated in pixel dimension. The color intensity value of each pixel in the image, ranging from 0 for black to 255 for white, was collected and defined in a variable. The image with this color intensity range is called as grayscale image.

A sample image of grayscale image is presented in Fig.2-3A. Afterwards, the grayscale image is converted into a binary image by applying a threshold level. The pixel with color intensity greater than the threshold level will be replaced with the color intensity value 1 (white) and the pixel with color intensity lower than the threshold level will be replaced with the color intensity value 0 (black). The im2bw from built-in function of Matlab is employed to convert a grayscale image built-into a bbuilt-inary image and the result of this converting process is presented in Fig. 2-3B. As can be seen from Fig.

2-3B, the binary image has a “white hole” inside the bubble perimeter causing a miss interpretation during the boundary tracing. Therefore, the built-in function of imfill is used to fill this “white hole” and the result is presented in Fig. 2-3C.

Fig. 2-4. Boundary tracing applied by bw2traceboundary built-in function. Each square in the image represent a pixel. The starting point of trace is color in blue.

The binary image is then processed in a boundary tracing program using a built-in function bwtraceboundary. bwtraceboundary traces the outlbuilt-ine of an object built-in bbuilt-inary image. Nonzero pixels belong to an object and 0 pixels constitute the background. The boundary tracing starts from a point which is determined from the input variable and then the built-in function will search the first pixel with nonzero value within the

43

starting position. Afterwards, the searching process continues to the neighbours’ pixel in all direction from north to northwest pixel in clockwise direction as described in Fig.

2-4 to determine the nonzero pixel. This searching process end when the similar initial starting pixel is found. The result of the boundary tracing can be seen from fig. 2-3D.

Table 2-2. Criteria of dy/dx to determine the contact points on both sides.

Criteria of dy/dx Left hand side

contact point

Right hand side contact point

Gradient sign before the contact point − +

Gradient sign after the contact point + −

Fig. 2-5. Schematic image for determination of a contact point. Each square in the image represent a pixel

The boundary tracing result was then used to determine the contact point during the bubble attachment onto the surface and to calculate the bubble parameters. The contact point was determined on left and right sections using the derivative of each pixel. Fig. 2-5 show the schematic image to determine the left hand side contact point.

The derivative of each pixel in outer boundary is calculated using Eq. (2-1)

44

1 i i

1 i i

x x

y y dx dy

  (2-1)

Where y and x represent the pixel position in y and x directions, respectively. Subscript i show the each pixel identity as shown in Fig. 2-1. The gradient of pixels (dy/dx) have one of the following values, the horizontal pixels have gradient of zero; the vertical pixels have infinite gradient values; the pixels in slope direction have either positive or negative gradient values. From the gradient value of each pixel relative to its neighbor pixel, the contact point criteria can be determined. The left hand side contact point is defined as the pixel position where the gradient of pixel changes its value from negative value to positive value. On the right hand side, the contact point is defined as the pixel position where the gradient of pixel changes its value from positive to negative value.

These definitions are resumed in Table 2-2.

After the determination of contact point. The bubble-surface contact line and the receding contact angle on both sides can be calculated for every image. The linear distance between the contact points is defined as the length of the bubble–surface contact line (Fig. 2-6C). The dynamic receding contact angles for the left and right contact points (θ) were calculated using the θ/2 method (Eq. (2-2) and Fig. 2-6C), which is commonly used for contact angle measurements. This method assumes that the attached bubble is spherical, and so a contact angle of θ/2 can be evaluated easily from the apex and the contact point (Kyowa Interface Science Co. Ltd. 2013; Yuan and Lee 2013). This method works well for small quantities of spherical bubbles.



 

 

 r

arctanh 2

180 (2-2)

where h and r are the bubble height and the bubble–surface contact radius, respectively.

The average value of the dynamic receding contact angle between the right and left contact points is reported in this study.

A range of bubble shapes were adopted, ranging from an ellipsoidal to a spherical shape. Thus, to compare bubble diameters between the different treatments, the bubble diameter was calculated using the sphere-volume equivalent diameter method. In this calculation, the bubble was assumed to adopt a spherical shape during

45

the experiment. The volume of the ellipsoidal and spherical bubbles could therefore be calculated using Eqs. (2-3) and (2-4), respectively.

3 abc

Vellipsoidal 4 (2-3)

3 s

spherical r

3

V 4 (2-4)

where a, b, and c are the semi-major axes and semi-minor axes of the appropriate axes as shown in Fig. 2-6A, and rs is the spherical bubble radius. If these two equations are equal while assuming that the a and c semi-axes are equal for the majority of bubble shapes (oblate or prolate spheroids), then Eqs. (2-3) and (2-4) can be rewritten as:

3 2

s a b

r  (2-5)

In addition, the bubble equivalent diameter (deq) can be written as follows:

   

3 2

eq 2a 2b

d  (2-6)

Fig. 2-6 Dimensions used in image analysis: (A) ellipsoidal bubble shape, (B) bubble diameter and bubble distance to surface, and (C) bubble-surface contact line and receding contact angle.

The length of a and b axes can be determined using the distance of pixel between extreme position in the bubble boundary. The distance of maximum pixel value and the minimum pixel value in x direction can be used to calculate the length of a semi-major axes. Meanwhile the distance of maximum pixel value and the minimum pixel value in y direction can be used to calculate the length of b semi-minor axes.

Other method for determining the length of a and b axes is by fitting the pixel boundary

(A) (B) (C)

a c a

b

b c

Bubble Mineral surface

b a

Distance to surface a b

Contact Angle (θ) Bubble

h

Tangent line r θ

t θ

Bubble-surface contact line

r arctanh

t

t b2

180b

46

values with an ellipse equation (Eq. (2-7)) and use Eqs. (2-8) and (2-9) to calculate the semi axes.

0 E Dy Cx By

Ax22    (2-7)

B

a (2-8)

A

b (2-9)

Axisymmetric shapes are conveniently described by the aspect ratio (E), defined as the ratio of the length projected on the axis of symmetry to the maximum diameter normal to the axis (Clift et al. 2005). The bubble aspect ratio for a spheroid can be calculated using Eq. (2-10), with E<1 for an oblate spheroid, E>1 for a prolate spheroid, and E=1 for a sphere.

a

Eb (2-10)

The bubble distance to the surface can be calculated as the vertical distance from the front side of the bubble to the surface. The local bubble velocity (Ub) is then calculated at the front, center, and rear sides of the bubble boundary using Eq. (2-11).

   

i 1 i

2 i 1 i 2 i 1 i

b t t

y y x U x

 

(2-11)

where x and y are the horizontal and vertical pixel coordinates at the front, center, and rear sides of the bubble at time (t), and subscript terms i+1 and i denote two consecutive frames.

To validate the contact angle result obtained from the image analysis software developed in this chapter, a comparison study was conducted with the commercial software available for contact angle measurement, FAMAS version 3.7.2 software (Kyowa Interface Science Co., Ltd.). Bubble-surface contact angle measurements were conducted using bubble captive method in a goniometer (Dropmaster 300, Kyowa Interface Science Co., Ltd.). The contact angle was measured for 50 s with a frame rate of 1 fps for each experiment. The images were automatically analyzed using FAMAS software. The contact angle images used in FAMAS software were then used in Bsolina software. The average and standard deviation of each experiment are presented in this work.

47