A simple microcomputer-based system for real-time analysis of cell behaviour JULIAN A. T. DOW*, JOHN M. LACKJE and KENNETH V. CROCKET Department of Cell Biology, University of Glasgow, Glasgow G12 8QQ, Scotland •Author for correspondence Summary An image analysis package based on a BBC microcomputer has been developed, which can simultaneously track many moving cells in vitro. Cells (rabbit neutrophil leucocytes, BHK C13 fibroblasts, or PC12 phaeochromocytoma cells) are viewed under phase optics with a monochrome TV camera, and the signal digitized. Successive frames are acquired by the computer as a 640x256 pixel array. Under controlled lighting conditions, cells can readily be isolated from the background by binary filtering. In real-time tracking, the positions of a given cell in successive frames are obtained by searching the area around the cell's centroid in the previous frame. A simple box-search algorithm is described, which proves highly successful at low cell densities. The resilience of different search algorithms to various exceptional conditions (such as collisions) is discussed. The success of this system in real-time tracking is largely dependent upon the leisurely speed of movement of cells, and on obtaining a clean, high quality optical image to analyse. The limitations of this technique for different cell types, and the possible configurations of more sophisticated hardware, are outlined. This system provides a versatile and automated solution to the problem of studying the movement of tissue cells. Introduction necessary to measure the cells' positions over a period of time. From this, it can be seen that there are two classes of data commonly required in studies of cell behaviour: 'static measures', for example of spread areas, number or length of processes, or cell orientation; and 'dynamic measures', for example of speed and direction of cell locomotion, rate of adhesion, or of response to chemoattractants. Static and dynamic measurements are very laborious to make, and both are highly amenable to computer techniques (Noble & Levine, 1986). In this paper, we will concentrate on the problem of dynamic cell tracking in real time. Traditionally, studies of cell locomotion were performed manually, using a 'post-analysis' strategy: rather than tracing the movement of a single cell in real-time, the movements of several cells were first recorded on cine film or video tape. The paths of several cells could then be traced by hand, and displacements, speeds and angles calculated manually (Fig. 1A). That this procedure is extremely time- Many tissue cells, in vitro, move over their substratum, be it a collagen gel or a plastic Petri dish. The phenomenon of cell locomotion has been studied intensively for many years, both as a topic of purely academic interest, and because of the role of cell motility and guidance in embryonic development, in wound healing and inflammation, and in cancer metastasis (Bellairs et al. 1982). Time-lapse recordings of moving cells contain a plethora of information, most of which must be rejected in order to focus on the topic of particular interest. For example, an experimenter would wish to quantify the extent of cell spreading on a particular surface, or the degree of alignment of cells on some oriented substratum, like a stressed collagen gel. Alternatively, it is frequently desirable to measure the speed and locomotory parameters of cells moving toward a source of chemoattractant, in which case it is Journal of Cell Science 87, 171-182 (1987) Printed in Great Britain © The Company of Biologists Limited 1987 Key words: BBC microcomputer, image analysis, cell behaviour, neutrophils, growth cones, BHK fibroblasts. 171 Fig. 1. Comparison of three strategies for the analysis of cell locomotion. A. Manual: cells are filmed under time-lapse, the film processed, the cell tracks transcribed individually to paper by hand, then their displacements and angles of turn measured by hand, and locomotion parameters worked out on a calculator. B. Computer-assisted: here, the cell tracks are traced with a stylus on a digitizing pad, and the coordinate measurements and subsequent calculations performed by a computer. C. Computer-centred: here, the cells are tracked by video; successive video frames are grabbed, digitized, and the cell positions calculated, all under computer control. intensive is witnessed by the fact that Weiss, one of the pioneers of cell behaviour studies, left 10 km of cine film unanalysed at the time of his retirement (A. S. G. Curtis, personal communication). Clearly, any reduction of labour is desirable. We have defined two possible levels of computer intervention in this manual procedure; computer-assisted and computer-centred. In a computer-assisted system (Fig. IB), the subjective judgement of cell position and manual tracking of the cell still rests with the experimenter; however, by using a digitizing pad, all subsequent measurement and calculation can be performed by a microcomputer (Lackie & Burns, 1983). This greatly simplifies the task, though a time lapse cine film of a 30 min experiment requires several hours of post-analysis, even after the film has returned from the processing laboratory. A computer system that can automatically locate objectively and track cells would free the experimenter for more rewarding tasks. If such a computer-centred system (Fig. 1C) could perform quickly enough, it would be possible to avoid even having to record pictures and post-analysing them; the record of the experiment need only be a series of x, y coordinates for each of a series of cells. Systems that could perform such a task are available now, based on commercial framestores, but at formidable cost (£5OOO-£5OOOO). This paper describes a simple microcomputer-centred system, based on an inexpensive (£100) framegrabber, 172 J. A. T. Dow et al. which can track a large number of moving cells in real time, and thus offers many experimental opportunities. Materials and methods Considerations in system design For a computer-centred system to be useful, it must perform at least as well as the system it is intended to replace. A popular subject of cell motility studies is the polymorphonuclear leucocyte (PMN), or neutrophil (Wilkinson, 1982; Lackie & Wilkinson, 1984). In our department, a standard film sequence for analysis would be of 300 frames, recorded at 6-s intervals, and thus corresponding to 30 min real-time. From each run, the tracks of up to 20 cells would be recorded at 1-min intervals. A real-time computer-centred system, therefore, needs to record the positions of not one, but at least 20 cells, at less than 1-min intervals, to afford a significant improvement. To be able to track cells whilst they are moving, it must be possible to grab the frame, analyse it, store the coordinate pairs, and grab the next frame, before the cells have moved too far to be relocated. The speed, or 'cycle time', in which these tasks can be accomplished is thus critical. Neutrophils move unusually fast (at up to 20 /zm min~ 1 , compared with their diameter of only 8^im). A sample rate of at least 2 min" 1 was found necessary in pilot experiments. For most other cells, which display a spread morphology, far longer cycle times are acceptable. BHK cells, for example, move at less than O-S/immin" 1 , and so an image capture rate of one frame in 5 min is adequate. A post-analysis strategy was considered, in which digitized images would be stored on disc, and then analysed later; however, the storage requirements for a single run (10 frame min" 1 X 15 min X 20 kbyte frame" 1 = 3 Mbyte per experiment) were impracticable. If x, y coordinates were stored, the disc storage required per experiment would fall considerably (15 readings X 50 coordinate pairs X 10 bytes per coordinate pair = 7-5 kbyte per experiment), so that a single floppy disc of 200 kbyte capacity, could hold data from perhaps 30 experiments. This was the approach adopted. System configuration Cells were viewed through a Leitz Diavert or Leitz Ortholux microscope, equipped with phase-contrast, bright-field, dark-field or Nomarski optics. A Panasonic Newvicon-tube video camera was attached to a beam-splitting eyepiece, so that the image could be simultaneously viewed directly, and on a Panasonic 12-inch monochrome monitor. Cells were maintained at 37 °C by an air curtain device (a modified domestic fan-heater) (Wilkinson et al. 1982). The TV camera was connected to a Video digitizer unit (£100: Watford Electronics), which was connected in turn to the 'User Port' of a BBC Master microcomputer, equipped with twin floppy disc drives, a plotter, a printer and a monochrome monitor. The combined system was capable of digitizing a TV image to a binary, 640x256 pixel (or image point), image within 2s. Using a 10X lens, as in most of these experiments, a digitized field of 720/urn X 460 fim was obtained, corresponding to a pixel size of around 1-5/im. The cell tracking algorithm The central problem in computer tracking, be it of cells, limbs or missiles, is to identify, and measure the position of, the same object in successive frames. For some objects, or for noisy images, this problem can demand the very highest level of computer power. However, applications in cell biology need not be so demanding; the simple 'box-search' algorithm described below can be implemented successfully on a small microcomputer, providing certain experimental conditions are met. The algorithm for the box search is simple (Fig. 2A); given that the x, y coordinates of the cell in the previous frame are known, and that the cell stands out clearly from its background (i.e. its pixels are distinctive), all the distinctive pixels within a specified radius of the last known position are counted, and the x and 3' coordinates of each such pixel summed. (Mathematically, this corresponds to taking the zero- and first-order moments of the object.) If no distinctive pixels are found, then the cell is known to be lost; otherwise the (visual) centroid of the cell is found by dividing the sums of the x and 3' coordinates by the number of pixels found in the box. Such an approach, using moments, is extremely widespread in image analysis: it is, though, rather surprising that so simple a search algorithm can perform adequately in cell tracking studies. The implementation of the box search in BASIC is described in Appendix 1; note that, strictly, a circular search area should be used, but it is far faster, and just as effective, to search a square 'box'. The cell tracks will not be biased, provided that the diameter of the box is great enough to encompass even the fastest-moving cells. There are certain obvious limitations on a box search. The first (Fig. 2B) is that fast-moving targets may move partially or completely out of the box between successive frames, and their tracks may thus end abruptly. To correct this, it is necessary either to increase the size of the box, or to decrease the sampling interval. In either case, the ideal box 'radius' (in /im) is clearly equal to the maximum expected distance moved by a cell between frames (i.e. cell speed (in izmmin" 1 ) multiplied by the sampling interval (in min)). There are drawbacks either to very large boxes (the search time rises as the number of pixels within the box, or the square of the radius of the Q Fig. 2. The box search algorithm. A. To find the new positions of a given cell in successive frames, all white pixels within a fixed radius of the previously determined position (marked with a cross) are identified, and their moments calculated. This measure thus provides the visual centroid of the cell (marked with a circle). B. Problem: fast-moving cells. A fastmoving cell may move partially, or even completely, out of the box between frames. C. Problem: close encounters. If another cell (shaded) intrudes into the box around a target cell, the resulting centroid will be displaced. Automatic cell tracking 173 box); or to very short sampling intervals (few targets could be tracked in the spare time between frames). The second limitation of the box search concerns the possibility that a second cell might intrude into another cell's box (Fig. 2C). In this case, there are four possibilities; (1) the computer's impression of the cell's centroid will be temporarily distorted; (2) the box algorithm will switch allegiance to the other cell; Fig. 3. Digitized computer images of BHK C13 cells viewed under various types of light microscopy. Phase-contrast: A, photomicrograph; B, binary digitized image. Dark field: C, photomicrograph; D, binary digitized image. Nomarski: E, photomicrograph; F, binary digitized image. Bar, 50jUm. 174 jf. A. T. Dow et al. (3) both cells move out of the search area in opposite directions, resulting in termination of the track; or (4) if both cells were initially tracked, then one cell might become tracked twice, while the other stops being tracked altogether. These problems can be overcome by keeping the cell density low, so that the chances that two cells move within one box radius of each other are slight; or by reducing the size of the box (but see the arguments above). In any case, it is possible to check, on each cycle, that no two sets of x, y coordinates are identical; if they are, one track is terminated. From the above, it is clear that a working compromise must be obtained between cell density, sampling interval and box size. In our hands, it was possible to track neutrophils at the density previously used routinely, of 0-5Xl0 6 ml~ 1 , corresponding to 50-100 cells per field of 720 fim X 460 ^m. Taking the maximum speed of neutrophils as 20 jum min~', it was possible to track 40 cells every 30 s, using a box radius of 10 (Um. Using a faster, machine-code box routine, 50 cells could be scanned every 20 s, using a box radius of 8/xm. It can be seen that there are two classes of error in tracking: premature loss of a track; and mistracking, or switching allegiance between cells. Neither of these errors will lead to a serious error in estimating population speeds or persistences (persistence, a concept derived from the random-walk theory, is roughly equivalent to the mean time between changes of direction); provided that tracking errors are not systematic (for example, unusually fast cells must not be lost preferentially), and that errors are rare. For example, if a tracking allegiance switched between two cells once during a run of 30 readings, only one data point (that at the transition) would be an inaccurate reflection of the cell population. There are other, more sophisticated algorithms, for example 'flood fill' searches, in which only contiguous Fig. 4. Digitized computer images. Rabbit neutrophils: A, photomicrograph; B, a binary digitized image. PC1Z cell: C, photomicrograph; D, image digitized to 160x256 pixels and 8 grey levels. Bars, Automatic cell tracking 175 pixels contribute to the calculation of cell centroids, which perform better at high cell densities; or those in which higher moments for cell shapes are calculated (Dunn & Brown, 1986). However, these are rather more complicated and time-intensive to implement, and are more suited to 'static', rather than 'dynamic', measures. Cells Rabbit neutrophils were prepared by peritoneal lavage (Vickere* al. 1986), and stored at 5°C for up to 3 days before use. A significant decrease in mean speed, and in the fraction of moving cells, was noted in this interval. They were observed in filming chambers of acid-cleaned glass in 50 % Hanks'-Hepes salt solution, Scale= 100 JJ Fig. 5. Typical cell tracks obtained using the techniques described in this paper, for rabbit PMN leucocytes. Cells were tracked for up to 25min. Bar, 100 ^m. Table 1. Comparison of typical locomotion parameters for different cell types Speed Augmented diffusion constant Persistence OtmV) Cell type 176 Mean S.D. n Mean S.D. n 27 3 26 0-9 0-2 26 18 206 208 18 0-06 0-01 18 6 229 27 6 0-03 001 6 Mean S.D. Rabbit PMNs (fresh) 7-8 0-5 26 BHK C13 fibroblasts 0-9 0-7 PC 12 neuroblastoma growth cones 0-5 0-07 J. A. T. Dow et al. 50 % peritoneal exudate. Cells were allowed 15 min to warm up before the start of the experiment, which ran for 25 min. BHK fibroblasts (clone C13) were harvested from routine cultures in the department (Edwards & Campbell, 1971), and plated at 20000ml" 1 onto acid-cleaned glass coverslips, in HECT medium (Hepes-buffered Glagow-modified Eagle's medium, supplemented with calf serum and tryptose phosphate broth). They were kept at 37°C at all times, and allowed to settle for at least 6 h before filming. PC12 phaeochromocytoma cells (gift from Drs A. McCruden & P.Schutz) were grown at 37°C on tissue culture plastic, in bicarbonate-buffered Eagle's Medium, supplemented with 10% foetal calf serum and 10% horse serum. Neuronal differentiation was triggered by adding nerve growth factor (mouse 7 S ; Sigma Chemicals) at lOOngml" 1 , one day before study. Multiple neurites are observed under such conditions (O'Lague et al. 1985). Tests of the computer system The static and dynamic properties of the box search algorithm were tested by computer simulation. Repeated measurements were made of stationary discs generated by computer, and the mean and standard errors of the centroids thus determined were calculated. In another set of experiments, box and disc radii were set to values simulating a neutrophil-tracking experiment, and tracks obtained for different (known) speeds. The accuracy of speed measurement by the computer could thus be assessed. The accuracy of the computer-centred cell tracking system was tested by comparison with the computerassisted technique previously in use in the department. Time-lapse films, which had previously been analysed by computer-assisted methods, were projected onto the wall, and viewed with a TV camera. The microcomputer acquired and analysed each cine frame, advancing the projector automatically. As in the computer-assisted system, data from every tenth frame were stored for later analysis. After tracking was complete, data were processed by the same program that had been used for the computer-assisted system, and the population displacements, speeds and persistences obtained by the two systems compared. Speed, persistence, and augmented diffusion coefficient are parameters based on a pseudo-random walk model for cell locomotion, proposed by Dunn (1983), and applied to neutrophils by Wilkinson et al. (1984). Repeatability of the computer-centred system was assessed by analysing the same sequence of cine film four times, and comparing the locomotion parameters obtained on each run. Similarly, the stability of the location algorithm was obtained by tracking the cells on a single frame as for a normal experiment, but without advancing the film between tracking cycles. In this way, a population of 'stationary' cells was obtained. The accuracy of hand tracking was also assessed; in these experiments, 26 individual tracks from a typical neutrophil-tracking run were plotted by computer. The experimenter then selected 20 'representative' tracks and entered them, via a digitizing tablet, into a computer file. The population locomotion parameters obtained by this method were compared, using Student's /-test, with the 'true' values obtained by the computer. This experiment thus assessed directly the reliability of a human experimenter in reproducing the intricacies of cell tracks. Results Digitized images from various cell types under various conditions Photomicrographs and digitized images of BHK cells are shown in Fig. 3. Bright-field images were of low contrast, and unsuitable for digitization. In phase contrast, cells are visible as dark grey objects, with white halos, against a mid-grey background (Fig. 3A). These images digitize rather well, and if a binary 50 Time (min) 100 Fig. 6. Locomotion parameters as a function of time during a single experiment. Tracking started immediately the cells were placed on the microscope stage. Cells were tracked every 20 s over successive 5-min periods, and their locomotion parameters calculated for each individual period. Abbreviations: 5, speed in Jim min" 1 ; P, persistence in s; R, augmented diffusion constant in Jim s~ s~ . Data are shown as mean ± S.D. for, typically, n = 20. Automatic cell tracking 177 filtering level is chosen carefully it is possible to obtain a good picture of the cell, suitable for tracking (Fig. 3B). Although cells are clearly visible in the dark-field image (Fig. 3C), this illumination also shows up particulate debris in the medium, normally invisible in the light microscope. The resulting image (Fig. 3D) is thus far too noisy, despite the large 'signal' size. Finally, Nomarski optics, while providing plenty of information for the human eye (Fig. 3E), do not provide an easy image for computer analysis (Fig. 3F). The cells are shown only by a dark strip down one side, and a light one down the other. This provides a powerful pseudo-relief effect to the human eye, but is difficult for a computer to interpret, as the centre of the cell is the same brightness as the background. Neutrophils provide extremely good phase objects (Fig. 4A), which digitize readily (Fig. 4B). Similarly, PC12 cells are clearly visible under phase conditions (Fig. 4C), and the club-like growth cones are particularly prominent in digitized images (Fig. 4D). For all three cell types, therefore, conventional phase contrast seems the best optical system for computer analysis. 75—, Available to track Cell tracks Neutrophil tracks from a typical experiment are shown in Fig. 5. As can be seen, neutrophils move in zigzags, frequently doubling back on themselves. These tracks were plotted within 5 min of the end of the experiment, a considerable saving in time compared with the conventional methodology. It proved possible to track, not only neutrophils, but also BHK fibroblasts and PC12 growth cones. The locomotion parameters of these cell types are shown in Table 1. It can be seen that neutrophils move an order of magnitude faster, and with an order of magnitude lower persistence, than either BHK or PC12 cells (which show a strong similarity in their locomotion parameters). Cell locomotion parameters are plotted as a function of time since the start of the experiment in Fig. 6. Whereas the speed of cells is relatively constant, both the persistence and diffusion coefficient rise gradually to a peak, then decline. It can be seen that the normal warm-up period allowed (15 min) ensures that the cells are performing at maximum persistence; however, it is also clear that the cells locomote usefully for longer than the 30 min for which they are normally Selection program Tracking program Analysis program 50 — 25 — 0— Experimental sequence Fig. 7. Survival curve for neutrophil tracks during a typical experiment. 'Off, denotes cells moving offscreen: 'Lost', denotes those lost through near misses or other causes. 178 J. A. T. Dow et al. 60-80 cells on the screen at the start of the experiment, the computer normally systematically scans the central screen area, selecting the first 50 cells encountered. Assuming that the distribution of the cells on-screen is initially random, this corresponds to a random cell selection. (It is also possible to select individual cells deliberately for tracking, although considerations of objectivity preclude this for routine use.) Some of the cells initially selected will be lost as they move off-screen; some by collisions with other cells (the computer automatically terminates tracks with the same coordinates); and a few for ill-defined reasons. After the experiment finishes, the experimenter is presented with each track in turn, providing the opportunity to select only moving cells with at least five coordinate pairs, for further analysis. The maximum number of cells accepted by the computerassisted analysis program was 20, so a fairly steep rate of attrition, from the 50 cells originally selected, was acceptable. Fig. 7 illustrates the drop-out rates as a typical experiment proceeded. Clearly, then, this system is capable of producing an adequate number of acceptable tracks. i elfra 1 u / a a. •a u 8. (2) (2) (2) J/ (24) / / (24) / 13 10S3 (24)/ / / / /(24) 1 30 10 20 True speed (pixel frame" 1 ) Fig. 8. Graph of measured versus true speed for a computer-simulated moving cell. Data are shown with standard errors (except where error bars would be obscured by the symbols): numbers in parenthesis denote the number of speed determinations. Cells are tracked accurately until their displacement between frames approximates the box radius; above this, speeds are underestimated, and cells rapidly lost. Testing the computer systems The determination of the centroids of stationary, computer-generated discs revealed no inaccuracy or random fluctutation in the computer search algorithm. When moving discs were tracked, the speeds determined by the computer were accurate until the distance moved by the disc between frames approached filmed. Why these changes occur is not clear; previous analyses have not revealed these trends so clearly and the observation raises interesting questions. It is important to establish the reliability of the tracking system, in not losing cells too fast. From Table 2. Repeatability of the computer-centred system Computer-analysed data Run 2 Run 3 Run Mean Parameter Number of tracked cells Speed (/immin" 1 ) Persistence (s) Augmented diffusion coefficient (/jm 2 9~') Mean S.D. 13 7-0 37 1-0 S.D. 15 Mean S.D. 0-7 6 8-0 38 0-3 1-3 Mean S.D. 16 17 7-5 34 10 0-5 9 0-3 Mean Hand-analysed data Run 4 0-7 7 0-4 0-7 8 0-3 8-0 30 11 S.D. 20 — 7-4 60 1-8 0-3 S 0-2 Population parameters derived from several analyses of the same cine sequence. Table 3. Accuracy of hand-digitizing of computer-plotted tracks True value Hand-derived value P (2-tailed) Parameter Speed (/immin" 1 ) Persistence (s) Augmented diffusion coefficient (^m 2 s - 1 ) Mean S.D. 7-8 0-5 26 9-2 0-5 20 <0-l 27 0-9 3 0-2 26 26 32 1-S 4 0-23 20 20 <0-l <0-l Mean S.D. Automatic cell tracking 179 Fig. 9. Comparison of computer-generated and hand-drawn cell tracks from the same cine film sequence, for two typical cells. Top row: computer-tracked, every second frame used, giving an effective sampling rate of one point every 12s. Middle row: computer-tracked, every tenth frame used, giving an effective sampling rate of one point every 60s. Bottom row: hand-tracked cells, at the routine sampling rate of one point every 60s. Bar, 100^m. the box radius. Under such circumstances, speeds were underestimated, and cells were lost prematurely (Fig. 8). This is unlikely to prove a serious problem in practice; the box radius used (24 pixels) would correspond to a radius of 50/im when using a 10 X objective. In a neutrophil-tracking experiment, at 3 frames min~', this corresponds to a maximum trackable cell speed of 150jUmmin~', at least five times greater than the maximum speed observed. The quality of image produced by digitizing cine films projected onto the wall was surprisingly good, and the computer had little difficulty in tracking the cells. The population locomotion parameters for a typical experiment, obtained by computer-assisted and computer-centred systems, are compared in Table 2. It is clear that the repeatability of the computer-centred system is very high; that is, when presented with the same cells, it produces effectively the same results. However, these data differ slightly from those previously produced by computer-assisted hand-tracking. In particular, hand-tracked cells have higher persistences and diffusion coefficients than computer-tracked cells, although the differences in speeds measured by the two systems are small. The differences between computer-assisted and computer-centred determinations of cell locomotion might be due to shortcomings in either system. When computer generated tracks are transcribed by hand, cell speeds, persistences and diffusion coefficients rise artefactually (Table 3). This is clearly due to a smoothing effect on the track data. Fig. 9 compares 180 Jf. A. T. Dow et al. the tracks derived for the same cells in computer analyses, with those plotted by hand. Again, the repeatability of the computer-centred system is excellent, and the tracks it generates are noticeably more jagged than those plotted by hand. Discussion The system described here is extremely simple, and yet highly effective at tracking neutrophils in real time. It also has potential in tracking spread cells. As cells in culture round up to divide, it would also be possible to estimate the number of divisions occurring, or even to adapt the tracking program to detect a division in a cell being tracked, and to continue to follow each daughter cell individually. On a finer scale, it may be possible to track neuronal growth cones, allowing the system to be applied to many problems in developmental neurobiology. Results obtained by the computer-centred system differ slightly (but significantly) from those previously obtained. Speeds, persistences and population diffusion constants are all lower when determined by the computer-centred system. It seems that this reflects the superior ability of the computer to follow higherfrequency fluctuations in cell position; human participation in the analysis process leads to a significant 'smoothing' of the data. In this sense, the computercentred system offers improvements, not just in speed of operation, but also in objectivity. A possible problem, however, is that cells that 'jiggle' in one position without moving can produce anomalously high speeds and low persistences, if samples are taken at the high rates possible in a computer centred system. Nonlocomotory noise can also be produced by rapid shape changes in otherwise slow-moving cells. Care must be taken therefore in applying such powerful computer techniques to cell locomotion; and computer data recording should be seen as an adjunct to, not a substitute for, manual experimentation on any given system. It is important to note that the 'secret' of the system is that all the potentially difficult, or slow, computer tasks are obviated by careful experimental protocol. In particular, there is no need to introduce sophisticated collision-detection software if cells are plated at reasonably low densities. Nor is there any need for image enhancement or filtering if care is taken to produce a clean, evenly illuminated light-microscopic image. The microcomputer used in these experiments (the BBC) is almost ubiquitous in British universities. However, the algorithms discussed are applicable to the wide range of microcomputers for which imagegrabbing hardware can be purchased. In particular, users of IBM PC and Apple computers should have little difficulty in emulating the system described here. As to cost, if it is assumed that all interested parties already have access to a microscope, video camera, monitor and a suitable, inexpensive microcomputer, then the only additional costs are for the digitizer (£100 at the time of writing), and for software development. It is hoped that this paper will assist in the latter. Thanks are due to Miss S. Kitson for technical assistance, and to Professor A. S. G. Curtis and Dr F. Lyall for their constructive comments. This work was supported in part by BP Venture Research Group, and by the General Funds of the University of Glasgow. Appendix 1 The box search algorithm Implementation in BASIC .v = 500 : y=500 6=20 rx=0 : ry=0 : rn=0 : REM previous cell position : REM radius of search box in pixels : REM initialize running totals of : REM x and y moments, and of : REM number of white pixels FOR;n=.v-fc TO.v+6 FOR n=y-b TOy+b IF POINT(m,n)>0 THEN rx=rc+m :ry=ry + n :rn=m + \ : REM in BBC BASIC, POINT(x,y) : REM returns the colour of the : REM pixel at x,y NEXT m NEXT n IF rn>0 THEN x=rx/ni : y=r\>/rv Appendix 2 The structure of the tracking program Rather than provide a machine-specific BASIC listing, the major tasks required of a tracking program are described in flowchart form, from which it should be easy to derive a specific application. Comments are in parenthesis. INITIALIZE VARIABLES Array AT (max. number of cells) Array v (max. number of cells) c=0 (this counts the number of cells being tracked) Open an output disc file SET UP THE MICROSCOPE IMAGE Loop: get an image: until keypress (this allows the user to adjust the picture quality) FIND THE CELLS For n = 100 to 1000 For m = 100 to 1000 (Scan the central area of the screen with two DO-loops) If POINT(n,m)>0 then PROCbox (If pixel is white, call box routine to find the centroid) Store .v and y coordinates in x(c) and y(c) Increment c Blank off the pixels (so they aren't 'found' twice) If c = max. number of cells then jump to main loop TRACK THE CELLS Loop: Get an image For n = l to c (i.e. for each track) If x(n)>0 call box (x(n)=0 implies the cell has been lost) If cell found write new coordinates to disc store new coordinates in x(n) and y(n) remove any duplicated tracks Or if no cell found set .v(n) and y(n) to 0 write 0,0 to disc Finish loop if max. number of cycles reached, or user presses key FINISH Close disc file References BELLAIRS, R., CURTIS, A. S. G. & DUNN, G. A. (1982). Cell Behaviour. Cambridge University Press. DUNN, G. A. (1983). Characterising a kinesis response: time averaged measures of cell speed and directional persistence. Agents Actions Suppl. 12, 14—33. DUNN, G. A. & BROWN, A. F. (1986). Alignment of fibroblasts on grooved surfaces described by a simple geometric transformation. J. Cell Sci. 83, 313-340. EDWARDS, J. G. & CAMPBELL, J. A. (1971). The aggregation of trypsinized BHK21 cells. J. Cell Sci. 8, 53-72. Automatic cell tracking 181 LACKIE, J. M. & BURNS, M. D. (1983). Leucocyte locomotion: comparison of random and directed paths using a modified time-lapse film analysis. X ittrmun. Meth. 62, 109-122. LACKIE, J. M. & WILKINSON, P. C. (1984). Adhesion and locomotion of neutrophil leucocytes on 2-D substrata and in 3-D matrices. In White Cell Mechanics: Basic Science and Clinical Aspects.New York: Alan Liss. NOBLE, P. B. & LEVINE, M. D. (1986). Computer-assisted Analyses of Cell Locomotion and Chemotaxis. Baton Rouge, Florida: CRC Press. O'LAGUE, P. H., HUTTNER, S. L., VANDENBERG, C. A., MORRISON-GRAHAM, K. & HORN, R. (1985). Morphological properties and membrane channels of the growth cones induced in PC12 cells by nerve growth factor. J. Neurosci. Res. 13, 301-321. 182 J. A. T. Dow et al. VICKER, M. G., LACKIE, J. M. & SCHILL, W. (1986). Neutrophil leucocyte chemotaxis is not induced by a spatial gradient of chemoattractant. J. Cell Sci. 84, 263-286. WILKINSON, P. C. (1982). Chemotaxis and Inflammation. Edinburgh: Churchill Livingstone. WILKINSON, P. C., LACKIE, J. M. & ALLAN, R. B. (1982). Methods for measuring leucocyte locomotion. In Cell Analysis (ed. N. Catsimpoolas), vol. 1, pp. 145-193. New York: Plenum Press. WILKINSON, P. C , LACKIE, J. M., FORRESTER, J. V. & DUNN, G. A. (1984). Chemotactic accumulation of human neutrophils on immune-complex-coated substrata: analysis at a boundary. J. Cell. Biol. 99, 1761-1768. {Received 29 September 1986-Accepted 27 October 1986)