Image processing techniques for the estimation of drop size

Randy D. Hazlett, Robert S. Schechter, and Jake K. Aggarwal. Ind. Eng. Chem. Fundamen. , 1985, 24 (1), pp 101–105. DOI: 10.1021/i100017a017. Publica...
0 downloads 0 Views 1MB Size
101

Ind. Eng. Chem. Fundam. 1985, 2 4 , 101-105

Literature Cited

V = free gas volume, cm3 v", = retention volume of the species i through the adsorption column, cm3 V*& = retention volume of a tracer species i through the adsorption column, cm3 (VRi - Vg)O = net retention volume of a component i at standard conditions, cm3 STP V*R/By= retention volume of tracer species i through the bypass shunt, cm3 vHe - retention volume of helium through the column, cm3 = retention volume of helium through the bypass shunt, cm3 V , = volume of the stationary phase, cm3/g W = total amount adsorbed, kmol/kg W i= amount adsorbed of component i, kmol/kg x i = mole fraction of component i in the adsorbed phase y i = mole fraction of component i in the mobile phase z = axial distance from the column inlet

AI-Ameeri, R. S.; Danner, R. P. Chem. Eng. Commun. 1984, 26, 11. Buffham. B. A. h o c . R . Soc. London 1973, 333, 89. Conder, J. R.; Young, C. I . "Physicochemical Measurement by Gas Chromatography"; Wiley: New York, 1979. Danner, R. P.; Nicoletti, N. P.; AI-Ameeri, R. S. Chem. Eng. Sci. 1980, 35, 2 129. Deans, H. A.; Horn, F. J. M.; Klauser. G. AIChE J . 1970, 56, 426. Everett, A.; Kobayashi, R. AIChE J . 1976, 2 4 , 745. Gilmer, H. B.; Kobayashi, R. AIChE J . 1965, 1 1 , 702. Glover, C. J.; Lau, W. R. AIChE J . 1983, 2 9 , 73. Haydei, J. J.; Kobayashi, R. I d . Eng. Chem. 1967, 6 , 546. Helfferich, F.; Klein, G. "Multicomponent Chromatography"; Marcel Dekker. Inc.: New York, 1970. Hetrick, B. M., Chemical Engineerlng Department, The Pennsylvania State University, University Park, PA, personal communication, 1982. Hyun, S. H.; Danner, R. P. J . Chem. Eng. Data 1982a, 2 7 , 196. Hyun, S. H.; Danner, R. P. AIChESymp. Ser. 1982b, 78(219), 19. Peterson, D. L.; Helfferich, F.; Carr, R. J. AIChE J . 1968, 12, 903. Rolniak, P. D.; Kobayashi, R. AIChE J . 1980, 26, 616. Ruthven, D. M.; Kumar, R. Ind. Eng. Chem. Fundam. 1980, 19, 27 Van der Vlist, E.; Van der Meijden, J. J . Chromatog. 1973, 79, 1.

V$Bi

Received for reuiew October 28, 1983 Registry No. Ethylene, 74-85-1; ethane, 74-84-0.

Accepted July 24, 1984

EXPERIMENTAL TECHNIQUES Image Processing Techniques for the Estimation of Drop Size Distributions Randy D. Hazlett,+Robert S. Schechter,*t and J. K. Aggarwalt Deparfment of Chemical Engineering and Laboratory for Image and Signal Analysis, The University of Texas at Austin, Austin, Texas 78712

Digital image processing techniques have been developed for automated estimation of drop size distributions from photomicrographs of emulsions. The system and algorithms used are outlined and the computer results are compared with direct measurement. Results with test samples showed good agreement in the distributions.

Introduction Particle size analysis is a rapidly growing field of interest in environmental science, pharmacology, microbiology,and engineering. The particle size and size distribution influence dispersion properties such as viscosity, heat transfer, and stability (Becher, 1965). Furthermore, changes in particle size distribution with time are a direct indication of dispersion instability. The wide variety of methods currently in use for particle size analysis fall into two categories: direct and indirect. Light scattering and electrical conductivity measurements are examples of indirect techniques, while direct methods include optical and electron microscopy (Groves and Freshwater, 1968). We are currently using differential interference microscopy to size relatively unstable emulsions of systems containing surfactant stabilizers which may be of importance in the field of oil recovery (Bourrel et al., 1979; Wasan et al., 1979). The nature of our systems necessitates

photomicrographic analysis which can be a very tedious process if done by hand. Some commercially available automatic sizing apparatuses are described elsewhere (Allen, 1981). Most processes involve a variable aperture light pen or a digitizing tablet in which a drop is either illuminated or traced. We have significantly decreased the time necessary for analysis with the aid of digital image processing techniques (Castelman, 1979; Duda and Hart, 1973; Pratt, 1978). Although our application involves emulsions, the algorithms described are fully applicable to all dispersion of roughly spherical matter: solid particles, drops, or bubbles. In this work, differential interference photomicrographs of dispersions were digitized and processed by several computer routines: a direct measurement, a semiautomated procedure, and a fully automated process. The methods are outlined and compared for rapid estimation of drop size distributions. Background In another chemical engineering application (Schrodt and Saunders, 1981), image processing was used to compute bubble sizes, which are important to mass transfer

Department of Chemical Engineering. Image and Signal Analysis.

t Laboratory for

0196-4313/85/1024-0101$01.50/0

0

1985

American Chemical Society

102

Ind. Eng. Chem. Fundam., Vol. 24,

-

No. 1, 1985

and kinetics, in a gas/liquid reactor. Edge detection and area measurement of gas bubbles from photographs were accomplished by use of an interactive image processing system. Although our initial approach to the problem of drop size distributions is similar, our technique requires no closure of contours or area determinations. In the method presented, we take advantage of the known spherical shape of the low free energy states of isolated drops. Dietz et al. (1982) carried out a similar analysis as they investigated the effects of freezing and thawing on nearly spherical granulocytes; however, deformations in the cellular shape were the focus of the study. In their cryogenic research the initial isolation of a cell to be “tracked” was done with the aid of trackballoperated cursors. We sought a more automated approach since the cursors could also be used to make measurements directly from the monitor. In fact, it was this method of direct cursor measurement which served as our standard for comparison with more attractive routines. There is much evidence that emulsion systems may be represented by a log-normal distribution (Groves and Freshwater, 1968; Herdan, 1953). This is a two-parameter distribution with the probability density function

where x = diameter, p = geometric mean, and u = standard deviation, u > 0, and x > 0. Without imposing any distributional form, nonparametric statistics (Dixon and Massey, 1951) indicate that for one to be 95% confident that the maximum deviation between the cumulative distributions of the population and of the sample is less than 10% requires a sample size in excess of 185 counts. To restrict the maximum deviation to 5% at the same confidence level, one needs 740 samples. Application of the weak law of large numbers indicates that 500 samples are needed to be 95% confident that the experimental mean lies less than 20% of one standard deviation from the true value. If one knows the distributional form a priori, then the sample sizes required to meet these confidence limits may be reduced significantly; however, it is clear that large numbers of counts are necessary to accurately reproduce a population experimentally. We have developed interactive and automated routines for rapid processing of emulsion data. Procedure Source images were obtained as 35-mm black-and-white negatives on film suitable for the short exposure times necessary to eliminate the effects of Brownian movement of the smaller drops. The negatives were mounted on a light box and digitized from a video camera image using a Hammamatsu ClOOO Vidicon camera and a Colorado Video Model 274 video frame store, yielding a 512 X 256 picture unit, or pixel, image with an 8-bit resolution. One field of this picture was then placed on permanent disc storage in the form of a 256 X 256 image. A schematic diagram of the image system hardware is provided in Figure 1. Processing of the images was accomplished on a VAX 11/780 computer system. Computer results were viewed on a Grinnell GMR-270 color graphics display system suitable for displaying high quality raster graphics with 512 X 480 viewable pixel resolution. A VAX 111780 controls data acquisition, processing, and display devices. For each analyzed frame, the output consists of the location, size, and frequency of drop diameters. Cumulative output from several frames provides the cumulative distribution function from which one may obtain the probability distribution function.

I ]

VFlX 11/780

Gr innel 1

0 t g i t I rer/V i d e o Frame S t o r e

0 T e r n inal

Trackball Unit

$1camera m L ight

Box

Figure 1. Image system hardware.

I G I 5 / 4 j/

I Figure 2. Pixel location mappings.

Processing Processing of the image beings with an edge enhancement algorithm. Portions of the picture with highly contrasting features become regions of high edge probability. Edge detection on source images is achieved through the application of a 3 X 3 Kirsch gradient operator (Kirsch, 1971) defined a t each pixel by 8

G = max[l,max((5Si- 3Til)],i mod 8 i=l

(2)

where

Si = Ai-,

+ Ai + Ai+l

Ti = Ai+z + Ai+3 + AI+^ + Ai+5 +Ai+s A, = intensity of pixel i and pixel locations, as given in Figure 2. As noted by Pratt, “Basically,the Kirsch operator provides the maximal compass gradient magnitude about an image point ignoring the pixel value. Many other gradient operators have been suggested and compared for edge detection efficiency (Davis, 1975). A viewable gradient map is generated through the application of eq 2 at each point in the image. Semithresholding and nonmaxima suppression of the gradient map are performed to remove noise and minor intensity changes. Semithresholdingis a form of histogram mapping in which all pixel intensities below a certain threshold value are assigned a uniform intensity value corresponding to the background intensity. In nonmaxima suppression, all intensity values not corresponding to localized maxima are effectively ignored. No attempt is made in edge enhancement to associate edges. Any routine to analyze an image with numerous drops of varying magnitudes must use segmentation to isolate the individual droplets. The method used involves isolation of single contours from the gradient map. The gradient map is scanned for a particular intensity representing

Ind. Eng. Chem. Fundam., Vol. 24, No. 1, 1985

103

Table I. Weights for Contour Tracing DIRWT(K) K GRADWT[K(I)] 10 1 10 10 2 5 3 4 5 6 7 8

6 0 0

0

0 0

*

0 0 0

* *

an edge. Once an edge is found, a tracing routine involving a penalty function completes the contour by following maxima in the gradient map until reaching the background intensity, tracing to the image bounds, or forming a closed contour. The penalty function awards high intensity values and preferred search directions relative to the previous step direction. At each step in the contour tracing, the pixel locations in Figure 2 about the current pixel are assigned weights according to their relative gradient magnitudes through an ordering process. Each pixel location is also weighted for directional control to prevent inefficiencies such as retracing. The mathematical formulation of the penalty function is given as STEP(DIRECTI0N) = mix [STEP(r)] I=1

=dx(GRADWT[K(I)] + DIRWTFUNCT(1I I=1

DIRECTION+J)) where STEP(I) = the value of the penalty function for pixel location I in Figure 2 DIRECTION = the pixel location of the next tracing step K = an integer giving the relative order of gradient magnitudes GRADWT[K(r)] = the weight function value associated with the relative gradient order K for pixel location I. The pixel with the highest gradient value is mapped to GRADWT(1). GRADWT(1) L GRADWT(2) ... 1 GRADWT(8). DIRECTION4 = previous step direction value DIRWTFUNCT(L) = a directional weight function = DIRWT(l), L = 0 = DIRWT(2), L = 1 or 7 = DIRWT(3), L = 2 or 6 = DIRWT(4),L = 3 or 5

= DIRWT(5), L = 4 The weight values used in the analysis to follow are provided in Table I. Traced contours are stored and subsequently erased from the “working” gradient map. Thus, segmentation by this scheme provides a single contour, eliminating multiple drop interferences found to be significant in other algorithms such as direct application of a Hough-like transform (Ballard, 1981; Kimme et al., 1975; Sklansky, 1978). We proceed to reconstruct the circle from the isolated contour through simple geometric considerations. The perpendicular bisector of a chord of a circle passes through the center; hence, a centroid map is generated to locate the most probable center by construction of perpendicular

d

b

Figure 3. Circle reconstruction from contours: (a) construction technique; (b) centroid map.

bisectors between all possible chords along the contour. In a neighborhood about a contour, each pixel location along the line of a perpendicular bisector is incremented by one in the centroid map. The maximum in the threedimensional centroid space occurs at the site of highest centroid probability. The transform technique is shown in Figure 3. The most probable radius becomes the most frequently occurring distance between the center and all edge points making up the contour. Accepted drops are recorded and subsequently erased from all “working”maps. The contour tracing and processing is r2peated until the entire image is scanned.

Methods (1) Interactive semiautomated and automated procedures are currently in use. The semiautomated procedure asks for visual user confirmation following each step: delineation of a true contour and acceptance of the drop size. The user-supplied parameters include a maximum drop size which defines the size of neighborhoods used in various calculations, a calibration for conversion from pixels to microns, a gradient search value, and a minimum number of traced pixels. The restriction on the length of a contour eliminates much of the noise from a digitized picture. At the same time it increases the efficiency of the process by elimination of small line segments. The perpendicular bisector method requires contours which exhibit some curvature in order to effectively locate the center. Typically, we reject traced contours less than ten pixels or about 5 hm in length. (2) The automated procedure is merely an extension of the semiautomated method requiring no interaction. A minimum normalized peak height ratio in the centroid map and a minimum acceptable radius ratio remove undesirable ”drops”. The normalized peak height ratio is the fraction of the total possible number of votes received by the most probable centroid. The acceptable radius ratio is the fraction of contour pixels which lie a distance corresponding to the most probable radius from the possible center. Typical values used for the data which follow were 0.2 and 0.1, respectively. Although these are lenient values, they were high enough to successfully remove undesirable noncircular contours. Another addition was necessary since closed contours were not a requirement for successfully sizing emulsion data. Multiple counting of drops could occur by tracing separate detached contours belonging to the same drop. To avoid this, interiors of previously found drops were “tagged”in another image file representing unacceptable drop centers. Possible centroids were checked against this record and rejected if the cen-

104

Ind. Eng. Chem. Fundam., Vol. 24. No. 1. 1985

1 on

10' DIRMETER. M I C R O N S

Figure 6. Large diameter latex spheres frequency distribution.

Id1

,c

Figure 4. Resultant images from processing routines: (a) original digitized image of polystyrene latex spheres; (b) direct cursor measurement result; (e) semiautomated resulS (d) fuUy automated result.

.

"llr

"I",

OYII4UIo.IIEP

x

. U I "

1on

10' DIRMETER. M I C R O N S

Figure 5. Small diameter latex spheres frequency distribution.

troid lies within the bounds of another drop. It was also found necessary to include a minimum drop size to prevent the detection of dust particles or other roughly spherical noise. These additions successfully imitated the confirmation procedures of the semiautomated method. (3) A direct sizing method involving cursors was developed as a true measure of the size distribution for comparison purposes. In the cursor method, the digitized picture was displayed on the Grinnell unit. Two cursors, which were moveable through a trackball unit, were placed on the drop bounds. The distance between the cursors, representing the drop diameter, was recorded, and the drop was marked to prevent multiple counting. AU distributions were sized in this manner. Results a n d Conclusions To confirm the validity of the image processing routines, we carried out the drop size distribution algorithms on a series of differential interference photomicrogaphs of styrene divinylbenzene latex spheres manufactured by Dow Chemical Co. A typical analyzed frame of data in which results from all three methods are provided is shown in Figure 4. The frequency distributions for two different mean particle sizes are shown in Figures 5 and 6. Estimates of the log-normal distribution parameters for each

Table 11. Log-Normal Distribution Parameters for Small Diameter Later SDheres direct semiparameter measurement automated automated geometric mean 6.1 6.5 6.3 standard deviation 1.3 1.3 1.3 sample size 518 413 402 Table 111. Log-Normal Distribution Parameters for Large Diameter Latex Spheres direct semiparameter measurement automated automated eeometric mean 11.7 12.0 12.1 itandard deviation 1.2 1.2 1.3 sample size 169 151 152

of the methods are provided in Tables I1 and 111. Although the log-normal distribution seems to fit the observed data, we are not attempting to show that it is the true distribution. The results for all methods show remarkably good agreement in all size ranges. The automated method yielded results of comparable quality to the semiautomated method. There seemed to be a slight tendency to oversize the drops in both image processing routines as compared to the direct sizing method; yet the worst case error on the mean size was 5.6%. We are very satisified with the automated drop size distribution routine and intend to use it extensively in routine size analysis. Acknowledgment Sudhakar Yalamanchili of the Laboratory for Image and S i Analysis, Department of Electrical Engineering, The University of Texas at Austin, contributed to this research by helping to set up the hardware and software. Dr. Schechter holds the Dula and Ernest Cockrell, Sr., Chair in Chemical and Petroleum Engineering. Dr. Agganval holds the John J. McKetta Energy Professorship in Electrical Engineering. Literature Cited Allen. T. "PanicleSize Measuremen?; Chapman a d Hall: London. England. 1981: p 207. hilard. D. H. Panem ReccgMbn 1981. 13. 111-122. Becher. P. "Emuisi~n~: Theory and practi~t";Reinhoid New York. 1965; Chapter 3. sourrel. M.: Graciaa. A.: Schechler. R. S.: Wade. W. H. J . Cofbbj Inteiiaca Sci. 1979. 72(1). 161-163. Carlieman, K. R. "Digital Image Processing": Prentice-Hail: Englewood Cliffs. NJ. 1979. Davis, L. S. Comput. Graph. Image Pmcers 1975. 4(3). 248-270. Dielr. T. E.: Davis. L. S.: Diller, K. R.: Aggarwal. J. K. Clyobioicgy 1982. 19. 539-549. Dixon. W. J.: Massey. F. J.. Jr. '"Introduction Io Slatisllcsl Analysis": McGraw-HIIk New Y a k . 1951; Chapter 17.

105

Ind. Eng. Chem. Fundam. 1985, 2 4 , 105-107 Duda, R. 0.; Hart, P. E. "Pattern Classification and Scene Analysis"; Wiley: New York, 1973. Groves, M. J.; Freshwater, D. C. J. Pharm. Scl. 1BS8,57(8),1273-1291. Herdan. G. "Small Particle Statistics"; Elsevier: Amsterdam, Holland, 1953; 0 113. Kimme, C.; Ballard, D.; Skiansky, J. Comm. Assoc. Comput. Mach. 1975, 78, 120-122. Kirsch, R. Comput. Biomed. Res. 1971,4 , 315-328. Pratt, W. K. "Digital Image Processing"; Wiley: New York, 1978. Schrodt, V. N.; Saunders, A. M. Comput. Chem. Eng. 1981,5(4), 299-305.

Sklansky, J. I . € . € . € . Trans. Comput. 1978,C-27. 923-926. Wasan, D. T.; McNamara, J. J.; Shah, S. M.; Sampath, K.; Aderangi. N. J. Rheology 1979,23(2) 181-207.

Received

f o r review August 23, 1983 Accepted

April 16, 1984

This research was supported by a grant from the National Science Foundation, Grant CPE-8208952.

A Simple Digital Sensor for Dynamic Gas Holdup Measurements in Bubble Columns Young H. Lee,* Yong J. Klm, Balmohan G. Kelkar, and Charles B. Welnberger Department of Chemical Engineering, Drexel Unlversi@, Phlladeiphla, Pennsylvania 19 104

A sensor consisting of a buoy, an encoded rod, and a light emitter-detector pair is described for continuous measurements of dynamic gas holdup profiles in bubble columns. The sensor requires no calibration and gives output In logic levels (hence the name "digital") suitable for processing with a computer. The application of the sensor in dynamic gas disengagement technique shows excellent repeatability and high accuracy.

Introduction Since its introduction by Sriram and Mann (1977), the dynamic gas disengagement technique has been used increasingly to study dynamics in bubble columns (Vermeer and Krishna, 1981; Godbole et al., 1982). The dynamic gas disengagement method requires accurate measurement of the decaying surface level of a gas-liquid dispersion in a column upon cessation of gas flow. This decaying surface level is called the dynamic gas disengagement profile, L,(t). Previous methods of dynamic gas holdup measurements include photography (Sriram and Mann, 1976) and a pressure tap method (Godbole et al., 1982). These methods are tedious, time-consuming, and prone to large experimental error due to uncertainties involved in getting representative holdup values as a function of time. Experimental methods for gas holdup measurements in bubble columns have been summarized recently by Charpentier (1982). The simplest is the direct measurement of the height difference between the aerated liquid and the clear liquid without aeration. However, the measurement accuracy is relatively poor (15 to 20% accuracy), especially when waves or foams occur on top of the dispersion. Greater accuracy can be achieved by the indirect manometric method, which requires a number of pressure tappings along the column. Other indirect methods include the y ray or light transmission techniques, where the intensity of transmitted light is related to gas holdup. Compared with the indirect methods, the direct measurement method is attractive because it does not require elaborate calibration procedures and requires no modification of an existing bubble column such as pressure tappings along the column. The only drawback of the direct method is in its poor measurement accuracy. In the method described here, we modified the direct method to give greater accuracy. Also, the level measuring procedure was automated by using a novel digital sensor which can be readily interfaced to a computer so that the dynamic gas disengagement profile, LD(t)can be recorded in real time. 0196-43 13/85/1024-0IO5$07.50/0

Design of Sensor System The uncertainty in the direct measurement of liquid level originates from the waviness of the liquid surface. Therefore, the measurement accuracy can be improved if the average level can be obtained reliably. One approach is to measure continuously the liquid level with a suitable sensor such as a resistance probe and obtain a time-average value. However, since a resistance measures only the local value, multiple probes have to be employed to obtain the "surface-averaged" mean liquid level. Another approach is to damp the surface waviness by some mechanical means. We used the latter approach a light wooden buoy was floated on top of the dispersion and the gas holdup was obtained by measuring the change in level of the buoy rather than that of the ill-defined liquid surface. When the buoy weight was properly adjusted, the buoy indicated the average level of the dispersion by effectively supressing small surface fluctuations. Figure 1 shows the overall setup of the sensor system. The essential parts are a wooden buoy, a digitally encoded rod which is supported by the buoy, and a light emitterdetector assembly. The light assembly is attached to a plate fived to the top of the column and the buoy can move up and down along two guide rods made of 3-mm 0.d. stainless steel rods. The buoy with 50 X 50-mm size and 25-mm thickness has eight holes of 7-mm diameter so that the disengaging gas bubbles can freely pass through. The buoy was water-proofed by successive coats of silicone resin and an oil-based paint. The weight of the buoy was adjusted by attaching several sheets of rubber (2-mm thickness) to the bottom until the buoy maintained a stable position a t the maximum gas flow rate employed. The encoded rod supported by the buoy was a 2-mm diameter, 60-cm long glass rod with alternating clear and painted sections. Both sections were 2 mm long (Figure 1). The glass rod was suspended freely in the vertical direction by the two retaining wire rings and rests on the buoy due to its own weight. The movement of the encoded glass rod was detected by a slotted light emitter-detector pair (General Electric, Model H13A1) located on the top 0 1985 American Chemical Society