Open Collections

UBC Theses and Dissertations

UBC Theses Logo

UBC Theses and Dissertations

Computer-controlled microscope for the automatic classification of white blood cells. 1973

You don't seem to have a PDF reader installed, try download the pdf

Item Metadata

Download

Media
UBC_1973_A7 G32_4.pdf [ 4.62MB ]
Metadata
JSON: 1.0101427.json
JSON-LD: 1.0101427+ld.json
RDF/XML (Pretty): 1.0101427.xml
RDF/JSON: 1.0101427+rdf.json
Turtle: 1.0101427+rdf-turtle.txt
N-Triples: 1.0101427+rdf-ntriples.txt
Citation
1.0101427.ris

Full Text

A COMPUTER-CONTROLLED MICROSCOPE FOR THE AUTOMATIC CLASSIFICATION OF WHITE BLOOD CELLS by Howard Frederick Gabert B.A.Sc, The University of British Columbia, 1970 A THESIS SUBMITTED IN PARTIAL FULFILMENT OF THE REQUIREMENTS FOR THE DEGREE OF MASTER OF APPLIED SCIENCE in the Department of E l e c t r i c a l Engineering We accept this thesis as conforming to the required standard THE UNIVERSITY OF BRITISH COLUMBIA July 1973 In presenting this thesis i n p a r t i a l f u l f i l m e n t of the requirements for an advanced degree at the University of B r i t i s h Columbia, I agree that the Library s h a l l make i t f r e e l y available for reference and study. I further agree that permission for extensive copying of t h i s thesis for scholarly purposes may be granted by the Head of my Department or by h i s representatives. It i s understood that copying or publication of t h i s thesis for f i n a n c i a l gain s h a l l not be allowed without my written permission. Department of The University of B r i t i s h Columbia Vancouver 8 , Canada ABSTRACT A microscope was interfaced to a PDP-9 computer in order to develop techniques suitable for on-line classification of white blood ce l l s . The computer visual-input system i s composed of an image dis- sector optically coupled to a microscope used in a transmitted light mode. The position of the slide under the microscope and the fine focus control are controllable from the computer. A technique of auto-focusing was developed to eff i c i e n t l y focus the microscope under computer control.- This algorithm is described in detail, followed by a discussion of the physical factors that affect the performance of this technique. A method of locating or isolating the leukocytes (white blood cells) i s described next. A constant, referred to as the "contrast ratio' is used to extract the threshold for the nuclei of the leukocytes based on the average background intensity. Finally, contour tracing and curvature function extraction are used as a means of testing the system. A specific test is conducted to obtain a comparison of the system's efficiency as compared to that of "manual" techniques used by a technician. The system described here is not only suitable for automatic leukocyte classification, but could also be used for many other routine tests requiring the examination of microscopic cells. TABLE OF CONTENTS Page ABSTRACT i TABLE OF CONTENTS i i LIST OF ILLUSTRATIONS . i v LIST OF TABLES . • v i ACKNOWLEDGEMENT v i i 1. INTRODUCTION 1 1.1 C l i n i c a l Procedure f o r the D i f f e r e n t i a l Leukocyte Count 3 1.2 C h a r a c t e r i s t i c s of Leukocytes 4 1.3 System Design Objectives . . . . 6 1.4 Other Microscopic Image Processing Systems 7 2. THE HARDWARE 8 2.1 The Computer Visual-Input System 8 2.2 The Image Dissector 8 2.3 The Microscope 13 2.4 The Computer Interface 13 2.5 The System Resolution 16 3. DEVELOPMENT OF THE AUTO-FOCUS ALGORITHM 22 3.1 Background 22 3.2 Developing the Algorithm 23 3.3 Factors A f f e c t i n g the Variance Function 28 4. THE LEUKOCYTE LOCATION PROCEDURE . . . 35 4.1 The Conditions of the Search 35 4.2 Threshold Determination 36 4.3 The Scan Pattern 38 5. THE SOFTWARE IMPLEMENTATION 41 5.1 "FOCUS" . 41 5.2 "THRESH" 43 5.3 "JOYSTK" 45 5.4 "STRPNT" 45 i i Page 6. SYSTEM EVALUATION • 49 6.1 The Test System .• • • 49 6.2 Contour T r a c i n g 50 6.3 The D i s c r e t e Area Operator 51 6.4 R e l i a b i l i t y and Execution Time Measurements 53 7. CONCLUSIONS 58 APPENDIX I 60 APPENDIX I I 6 2 APPENDIX I I I . 66 REFERENCES • 6 ? i i i LIST OF ILLUSTRATIONS Figure Page 1.1.1 Sketch of a normal blood f i l m 3 1.2.1 Sketches of t y p i c a l leukocytes 4 2.1.1 Photograph of the microscope and hardware 9 2.2.1 I n t e r p r e t a t i o n of percentage modulation. 100% modulation at GS = 5 i s shown i n (A) and 86.5% modu- l a t i o n at GS = 4 i s shown i n (B) 10 2.2.2 Signal to noise r a t i o of the image di s s e c t o r as a function of At, the dwell time 12 2.3.1 Block diagram of the o p t i c a l system 14 2.4.1 Block diagram of the computer i n t e r f a c e 15 2.5.1 Resolution as a function of magnification f o r the image di s s e c t o r (A) and the microscope (B) 19 2.5.2 System r e s o l u t i o n as a function of magnification . . . 20 3.2.1 A video scan l i n e when i n focus (A) and when out of focus (B) 24 3.2.2 C h a r a c t e r i s t i c s searched f o r i n a video scan l i n e . . . 25 3.2.3 The variance p l o t t e d against focus control p o s i t i o n u n f i l t e r e d (A) and f i l t e r e d (B) with a d i g i t a l f i l t e r window s i z e of ten 26 3.3.1 The variance function f o r two d i f f e r e n t f i e l d s of view showing peak variance s c a l i n g 28 3.3.2 Sc a l i n g of the variance function due to magnification shown at 800X (A), 1024X (B), 1280X (C), and 2000X (D). 29 3.3.3 The e f f e c t of no f i l t e r (A), a red f i l t e r (B), a blue f i l t e r (C), and a green f i l t e r (D) on the variance function extracted from an image of c e l l s . . 31 3.3.4 The variance function extracted at f u l l i n t e n s i t y and at h a l f i n t e n s i t y . The bottom curve i s the one at h a l f i n t e n s i t y 32 3.3.5 The e f f e c t of n o n - c r i t i c a l i l l u m i n a t i o n on the variance function at a magnification of 2560X. The top curve represents c r i t i c a l i l l u m i n a t i o n 33 i v Figure Page 4.1.1 S p e c t r a l d e n s i t y curve of the Z e i s s 46 78 06 wide-band pass green i n t e r f e r e n c e f i l t e r 35 4.1.2 Video scan l i n e s across a leukocyte w i t h (B) and without (A) con t r a s t enhancing f i l t e r s 36 4.3.1 Standard scan patterns used i n the d i f f e r e n t i a l leukocyte count. The st r a i g h t - e d g e p a t t e r n (A), the battlement p a t t e r n (B), the c r o s s - s e c t i o n a l p a t t e r n (C) , and the l o n g i t u d i n a l p a t t e r n (D) 39 4.3.2 Placement of adjacent scan areas 39 4.3.3 R e l a t i o n s h i p between current and adjacent scan areas, showing the placement of the "dead" zone 40 5.1.1 Flow diagram of the foc u s i n g program, "FOCUS" 42 5.1.2 The scan l i n e s used to sample the variance 43 5.2.1 Flow diagram of the t h r e s h o l d determining program, "THRESH" 44 5.4.1 Flow diagram of "STRPNT" 46 5.4.2 The s e q u e n t i a l search technique used to l o c a t e l e u k o c y t e s , demonstrating the minimum square f i t (A) of s i z e AGS, and the l o c a t i o n of the s t a r t i n g p o i n t (B) by using GS 47 6.2.1 The contour t r a c i n g a l g o r i t h m . The b l a c k dots are spaced at GS and represent the four p o i n t s that are i n t e r r o g a t e d to determine which d i r e c t i o n (the c i r c l e s ) the operator should be moved .50 6.3.1 The d i s c r e t e area operator used to e x t r a c t boundary curvature 51 6.3.2 Photographs of s e v e r a l c e l l s , t h e i r contour t r a c e s , and u n f i l t e r e d curvature f u n c t i o n s as e x t r a c t e d by the area operator 52 6.4.1 The scan p a t t e r n used to measure the time r e q u i r e d to l o c a t e and process 100 c e l l s 54 A.2.1 A bl o c k diagram demonstrating a p o s s i b l e arrangement of the system programs 63 v LIST OF TABLES Table Page 1.2.1 Morphological and s p e c t r a l c h a r a c t e r i s t i c s of leukocytes 5 2.5.1 Results of the c a l i b r a t i o n of the image dissector r e s o l u t i o n 17 6.4.1 Results of a test designed to count leukocytes across an area with a true count of 100 c e l l s 54 6.4.2 Times required to locate and process 100 leukocytes on ten randomly s e l e c t e d blood films 55 A. 1.1 The optimum values f o r the s i x magnification dependent parameters 60 A.2.1 I n t e r n a l and external references to global symbols and subroutines. "X" indicates i n t e r n a l l y defined, "A" indicates external access necessary, and "(A)" indicates external access probable 63 vi ACKNOWLEDGEMENT I wish to extend my sincere thanks to my supervisor, Dr. J.S. MacDonald, f o r h i s guidance and encouragement during my period of study, and to Dr. R. Pearce, of the Department of Pathology, U.B.C, for h i s advice concerning the medical background of this p r o j e c t . I would also l i k e to g r a t e f u l l y acknowledge the assistance of the National Research Council of Canada f o r i t s f i n a n c i a l support through scholarships and the major equipment grant used to purchase the micro- scope . Thanks are also owing Mr. A. Leugner for h i s expert t e c h n i c a l guidance during construction of the hardware, and to Miss N. Duggan fo r typing the f i n a l manuscript. And f i n a l l y , I must give c r e d i t to my wife, Nadine, who, through her continued encouragement and understanding, has made i t possible f o r me to complete t h i s work. v i i 1. INTRODUCTION The biomedical sciences c h a r a c t e r i s t i c a l l y deal with large volumes of data, which must be c o l l e c t e d , organized, reduced, analyzed, and generally processed i n many ways. In p a r t i c u l a r , the analysis of b i o l o g i c a l specimens containing c e l l s i s known to be important f o r the medical diagnosis of many diseases and chemical disorders i n the human body. Standard medical tests f o r the d i f f e r e n t i a l diagnosis of disease and therapy are required to be accurate, economical and e f f i c i e n t . In most cases, these tests require a q u a l i f i e d and experienced technician to examine the b i o l o g i c a l specimens under a high power microscope. This type of v i s u a l examination i s subjective and no longer e s s e n t i a l consider- ing the techniques developed i n the f i e l d of pattern recognition. A s i t u a t i o n such as t h i s suggests that automation of some of these routine tests should be attempted. The d i f f e r e n t i a l white blood c e l l count i s one procedure that i n v i t e s automation. I t has been estimated that this routine t e s t involves manual counts on over 240,000 s l i d e s per day i n the United States alone (1). In July 1972, Technicon International of Canada Limited announced TM TM the Hemalog D (2). The Hemalog D i s designed to perform the d i f f e r - e n t i a l white blood c e l l count by incorporating cytochemistry i n t o con- tinuous-flow equipment. Cytochemistry may be defined as the i d e n t i f i c a t i o n of s p e c i f i c components within the confines of i n d i v i d u a l c e l l s by s t a i n - TM ing. In the Hemalog D , the l i q u i d blood sample i s divided into several portions and each p o r t i o n i s treated with a d i f f e r e n t s t a i n to i d e n t i f y d i f f e r e n t constituents of the sample. Each portion then passes through a view chamber where the stained c e l l s are sensed by photo-sensors 1 2 which measure two v a r i a b l e s , l i g h t loss and l i g h t s c a t t e r i n g . By means TM of thresholding the l i g h t l o s s and l i g h t s c a t t e r i n g , the Hemalog D c l a s s i f i e s and counts the white blood c e l l s i n the sample. The Hemalog TM D i s curr e n t l y undergoing c l i n i c a l environment t e s t i n g and evaluation. Some disadvantages of th i s system seem apparent. The Hemalog TM D i s not modelled a f t e r the normal procedure used by the technicians i n the c l i n c i a l laboratory. The i n i t i a l d i f f e r e n t i a l white blood c e l l count i s usually a screening procedure, and i f abnormalities are detected, a q u a l i f i e d hematologist i s i n v i t e d to v i s u a l l y examine the specimen. TM With the Hemalog D there i s no means for v i s u a l examination and there- fore extra expense and time are required to prepare part of the f l u i d specimen f o r such examination. Cross-contamination between consecutive specimens i n the f l u i d channels w i l l need evaluation i n the c l i n i c a l environment, and w i l l probably be re l a t e d to the q u a l i t y and frequency of maintenance. At l e a s t two a d d i t i o n a l systems are curr e n t l y under development. These are the Perkin-Elmer Instrument (16) and the Corning Larc System TM (17). In contrast to the Hemalog D , both of these systems reportedly use v i s u a l c l a s s i f i c a t i o n techniques to perform the d i f f e r e n t i a l white blood count, although the methods used by these systems have not yet been published. One or both of these systems are expected to be commercially a v a i l a b l e soon. The primary context i n the design of the system to be reported here has been the d i f f e r e n t i a l leukocyte count. However, due to the analogous properties of the system to that of the current c l i n i c a l ap- proach, the hardware and software control protion of th i s system i s a p p l i - cable to many other routine tasks other than the d i f f e r e n t i a l leukocyte 3 count. 1.1 C l i n i c a l Procedure for the D i f f e r e n t i a l Leukocyte Count An understanding of the normal c l i n i c a l procedure used to per- form a d i f f e r e n t i a l count i s h e l p f u l when automating t h i s t e s t . Approxi- 3 mately 10 mm of blood taken from a patient i s smeared on a glass s l i d e and stained with Wright's blood s t a i n ( F i g . 1.1.1). This prepared s l i d e i s then mounted under a microscope to be examined by a t r a i n e d labora- tory technician. Commonly 1000X magnification and white l i g h t , o i l - immersion microscopy i s used. At t h i s magnification, the three p r i n c i p a l c e l l u l a r components of blood are v i s i b l e : the leukocytes (white blood c e l l s ) , the erythrocytes (red blood c e l l s ) , and the thrombocytes ( p l a t e - l e t s ) . With the a i d of a mechanical stage, the technician controls the p o s i t i o n of the s l i d e , i d e n t i f y i n g and c l a s s i f y i n g each leukocyte en- countered. A t o t a l count f o r each category of leukocytes i s simultan- eously recorded. Normal procedure c a l l s f o r the i d e n t i f i c a t i o n and c l a s - s i f i c a t i o n of only the f i r s t one hundred leukocytes encountered. Studies have shown that on a t e s t s l i d e with a true proportion of 50% n e u t r o p h i l s , a one hundred c e l l count produces an expected mean measure of neutrophils HEAD TAIL KLlm Too Thick I d e a l Thickness H i m Too Thin F i g . 1.1.1 Sketch of a normal blood f i l m . 4 from 40% to 60%, a two hundred c e l l count from 43% to 57%, and a f i v e hundred c e l l count from 45.6% to 54.4% (3). This suggests that a large number of c e l l s , perhaps f i v e hundred or one thousand, should be s c r u t i - n i z e d to obtain an accurate d i f f e r e n t i a l count. A normal one hundred c e l l count takes a technicain from f i v e to ten minutes. 1.2 C h a r a c t e r i s t i c s of Leukocytes The primary c l a s s i f i c a t i o n s of leukocytes may be divided into two categories, granular and nongranular. The granular category includes e o s i n o p h i l s , neutrophils, and basophils. The nongranular category F i g . 1.2.1 Sketches of t y p i c a l leukocytes, includes lymphocytes and monocytes. Size, colour, nuclear shape, and percentage population f or each of these c l a s s i f i c a t i o n s are summarized i n Table 1.2.1. Sketches of t y p i c a l leukocyte specimens are shown i n Figure 1.2.1. Many schemes have been derived to c l a s s i f y leukocytes Cell Type Lymphocyte Monocyte Neutrophil Eosinophil Basophil Population (?) Dianister (microns) Cytoplasm Nucleus Granules Color Amount Color Shape Amount Aeount 25-33 7-12 Clear Light Blue 10-30? Purple Round 70-90? Few 2-6 13-20 Grayish Blue 50? Light Purple Indented 50? Few 60-70 10-12 Pink to Lilac 50? Reddish Purple Segmented 50? Many 1-4 10-14 Rad Stippling 60-70? Dark Blue Tuo-Lobsd 30-40? Many • i i .25-.S 10-12 Blue 5C? Purple Elongated 50? Many Table 1.2.1 Morphological and spectral characteristics of leukocytes. 6 by using some combination of the following p r o p e r t i e s : cytoplasmic colour, shape and s i z e , nuclear colour, shape and s i z e , and concentration of granules. Colour i s the only property that cannot be measured by the' system developed here. Colour i d e n t i f i c a t i o n i s generally expensive to implement and slow to evaluate, e s p e c i a l l y when the colours l i e spec- t r a l l y adjacent and are not too e a s i l y defined. In the case of a blood smear, colour i s af f e c t e d by the composition and pH of the s t a i n used, the s t a i n i n g time, and the thickness of the smear. 1.3 System Design Objectives The objective has been to design and develop a computer c o n t r o l - l e d system capable of l o c a t i n g microscopic objects and measuring such properties as s i z e and shape of these objects. A l l techniques and a l - gorithms have been designed to operate "on-line", that i s , by using the image as "read-only" memory. Such a method seems desirable f o r two reasons: computer memory s i z e i s reduced since the image information need not be stored i n memory, and access time of random pict u r e - p o i n t information i s generally f a s t e r than with e i t h e r a d i s c or drum memory. The performance objective has been maximum speed, without s a c r i f i c i n g r e s o l u t i o n . Dynamic control of the microscope has been an e s s e n t i a l part of this performance o b j e c t i v e . A p p l i c a t i o n of the system to the d i f f e r e n t i a l leukocyte count has been p a r t i a l l y implemented i n order to evaluate system e f f i c i e n c y , as compared to normal "manual" techniques used by a techn i c i a n . However, the d i f f e r e n t i a l leukocyte count i s not the only s u i t a b l e a p p l i c a t i o n f o r the system. Many routine microscopy techniques could be automated, and the system developed provides a good basis for the dynamic control of a microscope. H i s t o l o g i c a l or density per area measurements could 7 e a s i l y be implemented with t h i s system. 1.4 Other Microscopic-Image Processing Systems Publications from a l l sciences have included a r t i c l e s d e s c r i - bing hardware and software techniques f o r image processing. A l l the systems cannot be enumerated here, but none of them are on-line integrated systems o f f e r i n g speed comparable to a technician performing the same task. Many systems s u b s t i t u t e a p h y s i c a l memory device to store the i n ^ formation of the image: SCAD (4) scans coloured photographs of c e l l images and stores the r e s u l t i n g d i g i t a l data on magnetic tape for sub- sequent processing, CYTOSCAN (5) scans i n d i v i d u a l c e l l s through a micro- scope and stores the data on punched paper or magnetic tape, FIDAC (6) scans p i c t u r e s of c e l l images and transfers the data d i r e c t l y to a com- puter i n block form, CYDAC (7) scans a microscopic image and transfers data to magnetic tape, and-SPECTRE II (7) provides point addressable i n - formation from a microscopic image. SPECTRE II i s the c l o s e s t i n con- cept to the system developed here, although SPECTRE II does not provide dynamic or "hands-off" c o n t r o l of the microscope. SPECTRE I I i s also exceptionally slow, re q u i r i n g 120 seconds for a f u l l r a s t e r scan of 256 by 256 points. Any further comparison to these systems can be made by checking the references. 8 2 . THE HARDWARE 2 . 1 The Computer Visual-Input System The computer v i s u a l - i n p u t system i s composed of an I.T.T. V i d i s s e c t o r camera and a Zeiss Universal microscope (Figure 2.1.1). Resolution of the system becomes a function of the r e s o l u t i o n of both the image di s s e c t o r and the microscope. A primary consideration i n the design was to ensure that the r e s o l u t i o n of the system was v a r i a b l e and would always be capable of r e s o l v i n g pertinent image d e t a i l . I t should be noted that any c e l l r e c o g n i t i o n scheme permitting a decrease i n r e s o l - ution w i l l probably o f f e r an increase i n speed during data a c q u i s i t i o n and microscope c o n t r o l . 2 . 2 The Image Dissector The image di s s e c t o r i s nothing more than a photomultiplier with a s e n s i t i v e and e l e c t r o n i c a l l y movable photocathode area. The o p t i c s are adjusted such that an image i s formed on the photocathode, which emits electrons p r o p o r t i o n a l to the i n t e n s i t y at any given p o i n t . These electrons are accelerated and focused onto the d i s s e c t i n g aperture plane forming an e l e c t r o n image which i s current density modulated ac- cording to the o p t i c a l input i n t e n s i t y pattern. This e l e c t r o n image may be d e f l e c t e d e l e c t r o n i c a l l y across the aperture, such that at any i n s t a n t the photoelectrons from a small, well-defined area of the image are incident on the aperture. These electrons enter a photomultiplier and emerge as a current i n the output anode c i r c u i t . The image dis s e c - t o r can be v i s u a l i z e d as a means of randomly accessing point i n t e n s i t y information from the image. The d i g i t a l c o n t r o l used on the dissector i s well documented Figure 2.1.1 Photograph of the microscope and hardware. 10 SP 50 . -10 -5 0 5 10 Dlotanco From Boundary (Units of GS) - 1 2 - 8 - 4 0 K 8 12 Distance From Boundary (Units of CS) F i g . 2.2.1 Interp r e t a t i o n of percentage modulation. 100% modulation at GS = 5 i s shown i n (A) and 86.5% modulation at GS = 4 i s shown i n (B). (8). With the d e f l e c t i o n control provided, i t i s possible to randomly access or address any one of 1024 by 1024 points on the image. The d i s - sector i s currently equipped with a tube having a .005 inch round de- fining-aperture. To achieve 100% modulation between adjacent points across the one inch square surface of the tube, approximately 200 by 200 points are unique, represented by an incremental step s i z e (GS) of 11 5 addressing units ( F i g . 2.2.1). However, to increase r e s o l u t i o n , a step s i z e of 4 i s assumed to be the minimum, thereby e f f e c t i v e l y reducing the depth of modulation to 86.5%, and creating a g r i d of 256 by 256 addressable points. Therefore a maximum of 65,536 points on the image w i l l be con- sidered unique. The number of grey l e v e l s of i n t e n s i t y that can be resolved i s dependent on the s i g n a l to noise r a t i o of the video s i g n a l . As the sampling frequency increases, the s i g n a l to noise r a t i o decreases (9,10) The s i g n a l to noise r a t i o i s given by the following equation: g = 1.2 X 10 9 / J a 2At (2.2.1) Nrms where J = the average photocathode current density a = the aperture area At = the element dwell time before i n t e r r o g a t i o n . 2 -4 2 For the d i s s e c t o r tube i n use, J i s 1 ua/cm and a i s 1.26 X 10 cm . The r e s u l t s of t h i s equation are p l o t t e d i n Figure 2.2.2. To obtain a desired s i g n a l to noise r a t i o , the t o t a l delay time preceding i n t e r r o g a - t i o n i s a function of three q u a n t i t i e s : the s e t t l i n g time of the d e f l e c - t i o n c i r c u i t r y , At, and the s i g n a l propagation delay of the video f i l t e r used to l i m i t the high frequency noise. This t o t a l delay time i s best determined experimentally. I t was found that a programmed delay of 50 microseconds between D/A loading and the beginning of A/D conversion was s u f f i c i e n t to achieve 5-bit g r e y - l e v e l r e s o l u t i o n . This implies that w i t h i n the 50 microseconds, the f i l t e r e d video s i g n a l s e t t l e d to wi t h i n the analog voltage equivalent to one-half of the l e a s t s i g n i f i - cant b i t of quantization. This 50 microsecond delay i s the nominal value used i n a l l discussions and system measurements to follow. 12 0 10 20 30 40 50 60 Dwell Tlma At ( m i c r o s e c o n d s ) F i g . 2.2.2 Signal to Noise r a t i o of the image di s s e c t o r as a function of At, the dwell time. 13 2.3 The Microscope The image d i s s e c t o r i s o p t i c a l l y coupled to a Zeiss Universal microscope such that an image i s formed on the photocathode of the d i s - sector. Figure 2.3.1 i s a block diagram of the o p t i c a l arrangement. For transmitted l i g h t microscopy, a 60 watt 12 v o l t i l l u m i n a t o r i s used. The power supply f o r the i l l u m i n a t o r i s required to be well regulated and f i l t e r e d to remove any 60 cycle r i p p l e , since t h i s would appear as noise on the video s i g n a l from the dis s e c t o r . The microscope i s equipped with a mechanical stage driven by two stepping motors. The stepping frequency i s 200 hz and the step s i z e i s 10 microns i n both the X and Y d i r e c t i o n s . The f i n e focus control has also been equipped with a step- ping motor, providing 2000 steps per rev o l u t i o n at a stepping frequency of 600 hz. To move the stage manually under program co n t r o l with dynamic focusing, the system includes a j o y s t i c k . The j o y s t i c k can also be used to drive the focus motor manually. V i b r a t i o n or mechanical shock i n the neighbourhood of the micro- scope can cause j i t t e r i n the image. The system could be improved by strengthening the o p t i c a l coupling between the microscope and diss e c t o r , or by mounting these components on a shock table. Most confusion from j i t t e r can be compensated f o r by c a r e f u l programming, but i t i s best to attempt to prevent the causes of the j i t t e r . 2.4 The Computer Interface The computer used i n th i s system i s a PDP-9 equipped with 16K of memory and three Dectape units. The in t e r f a c e f o r the dissector has been well documented (8), although a few changes have been made. Figure 2.4.1 i s a block diagram of the hardware configuration. Although much 14 Imago Dissector Eyepiece »» A Oil Blood Filni Scanning Stage - Eyepiece . Optical Coupling . Microscopo Head Oil Immersion Eyepiece Conden3or Light Path Light Source Figure 2.3.1 Block diagram of the optical system. (TO <- DECTAPS UNITS CRT DISPLAY TELETYPE PDP-9 COMPUTER LOAD D/A 10 DATA LINES 10 aiTA LIKES LOAD D/A X D/A CCNV. Y D/A CONV. START A/D 6 DATA LINES READ A/D A/D CONV. STEP X STEP X STEP I STEP I STEP CLOCKWISE STEP COUNTERCLOCKWISE 3 DATA LINES START. RES!) A/D CONV. 8 CH. Max. MODE LOAD MUX. CH. IMAGE DISSECTOR AKALOG VIDEO SIGNAL SCANNING STAGE JOYSTICK Figure 2.4.1 Block diagram of the computer interface. 16 time has been spent i n designing and constructing the hardware, the d e t a i l s of the construction w i l l not be explained here. I t i s f e l t that the algorithms and techniques developed for the a p p l i c a t i o n of t h i s system are more important, although much p r a c t i c a l experience has been ' obtained i n assembling the hardware. Appendix II summarizes the software i n s t r u c t i o n s used to control the hardware. These descriptions should adequately explain the possible hardware functions from the user's point of view. 2.5 The System Resolution Resolution of the system i s a bounded function of the r e s o l u t i o n of both the image di s s e c t o r and the microscope. Before the combined re- s o l u t i o n can be determined, the r e s o l u t i o n of each system component must be evaluated separately. O p t i c a l r e s o l u t i o n of a microscope i s commonly expressed as: microns (2.5.1) N.A. , + N.A. , . cond obj where X = the wavelength of i l l u m i n a t i o n N.A. , = the numerical aperture of the condenser cond N.A. Q^J = the numerical aperture of the o b j e c t i v e . This equation represents the highest re s o l v i n g power possible with the chosen lenses and type of i l l u m i n a t i o n . The equation only applies under conditions of c r i t i c a l i l l u m i n a t i o n , that i s , when the source of l i g h t i s focused on the object i n such a manner that the beam f i l l s approxi- mately two-thirds of the aperture of the objective (11). C r i t i c a l i l l u - mination usually implies that N.A. , i s equal to N.A. , .. The impor- J r cond obj tant feature about o p t i c a l r e s o l u t i o n i s that a l i m i t e x i s t s beyond which Optical- Magnifi- Magnification to CRT Display Magnification to Image Dissector Size of Field 1 of View (microns) Inage Dissector Eosoluticn Optical Resolution cation 1 micron = . . . cm. Pover 1 micron Pover GS = 1 GS = 4 200 .0145 ' H5 .0046 46 551.76 .55 2.20 1.2 I 256 .0180 ISO .0057 57 444=43 .44 1.76 1.2 320 * .0221 221 .0070 70 362.00 o36 1.44 1.2 320 * .0230 230 .0073 73 347.34 .35 1.40 .63 410 .0237 287 .0091 91 273.72 .23 1.13 .68 512 .0355 355 .0113 113 225.36 .25 1.00 .68 500 .036S 368 .0117 117 217.63 .22 .83 .42 640 .0453 453 .0144 144 176.64 .18 .72 .42 SCO * ,0561 561 .0173 .178 142.64 .14 .56 .42 800 * .0572 572 .0182 182 139.84 .14 .56 .27 1024 .0715 715 .0227 227- 111.92 .11 .44 .27 12S0 „C3S9 889 .0282 282 90.00 .090 .36 .27 2000 .1430 1430 .0454 454 55.94 .056 .224 .21 . 2560 .1783 1783 .0566 566 44.87 .045 .180 .21 3200 .2200 2200 .0699 699 36,36 .036 .144 .21 * Same magnification, but vith different objective. Note Optical Resolution. Table 2.5.1 Results of the calibration of the image dissector resolution. 18 the magnifying power cannot be p r o f i t a b l y increased. The best numerical aperture po s s i b l e i s about 1.4, and at t h i s value, oil-immersion techni- ques are necessary to increase the index of r e f r a c t i o n of the i n t e r - l e n s medium. Applying the equation for o p t i c a l r e s o l u t i o n , i t i s found that with green l i g h t (A = .54u) and a N.A. of 1.3, o p t i c a l r e s o l u t i o n i s about . 21u. This corresponds w e l l with the s i z e of granules i n the leukocyte which are about .25u i n diameter. This also represents the highest r e s o l u t i o n p o s s i b l e with this microscope and occurs when the 100X objective i s used. The image d i s s e c t o r has a .005 inch round defining-aperture and a one inch square photocathode surface. Therefore at 86.5% depth of modulation with GS = 4 ( r e f e r to section 2.2), 256 by 256 d i s t i n c t points can be resolved on the. image area. In order to t r a n s l a t e the d i s s e c t o r step s i z e i n t o a meaningful measure of length, a s l i d e s c r i b e d at 10 micron i n t e r v a l s was used to c a l i - brate the system. Image measurements were made on an eight centimeter square CRT display u n i t , and these measurements were converted i n t o t h e i r equivalents across the one inch square photocathode. Once the system has been c a l i b r a t e d , the c a l i b r a t i o n i s applicable only as long as the image d i s s e c t o r remains i n a constant p o s i t i o n r e l a t i v e to the eyepiece. Table 2.5.1 summarizes the r e s u l t s of the c a l i b r a t i o n based on magnifi- cation and d i f f e r e n t step s i z e s for the d i s s e c t o r . These r e s u l t s are also p l o t t e d i n Figure 2.5.1A f o r GS = 4. This graph shows that d i s s e c t tor r e s o l u t i o n may be expressed as: 19 1.0 B g •A 0.5 o.o 1000 I I I 1 I I • 2000 30O0 Pover of Kaenification F i g . 2.5.1 Resolution as a function of magnification f o r the image d i s s e c t o r (A) and the microscope (B). 20 F i g . 2.5.2 System r e s o l u t i o n as a function of magnification. 21 O p t i c a l r e s o l u t i o n i s p l o t t e d i n Figure 2.5.IB. O p t i c a l r e s o l u t i o n and d i s s e c t o r r e s o l u t i o n are then combined i n Figure 2.5.2 to produce the bounded system r e s o l u t i o n . 22 3. DEVELOPMENT OF THE AUTO-FOCUS ALGORITHM 3.1 Background O p t i c a l systems must be properly focused to y i e l d optimum per- formance. This i s e s p e c i a l l y true f o r a high-power microscope where the depth of f i e l d may be l e s s than .25 micron (.11). The most common method of evaluating image q u a l i t y i s subjective human evaluation. Sharp or w e l l defined edges, c l e a r l y defined shapes, f i n e d e t a i l , and o v e r a l l crispness or contrast of the image are some of the features an observer looks f o r . Auto-focusing algorithms that optimize image q u a l i t y must define the means used to extract measures of these properties. Auto-focusing algorithms have been previously proposed, although most of them are too complex or too i n e f f i c i e n t to e f f e c t i v e l y implement on-l i n e . Mendelsohn and Mayall (12) have suggested that focusing can be accomplished by maximizing the function i = l <(> = I (OD. - ty) for a l l OD. > ty ' (3.1.1) n where OD^ i s the grayness at a point, n i s the number of points i n the image with OD^ > ty, and ty Is a reference a r b i t r a r i l y f i x e d at an o p t i c a l density i n the mid-range of image greyness. Mendelsohn and Mayall admit that the choice of tj; may not be straightforward, but explain that the choice of ty can con t r o l which component of the image w i l l be i n focus when a l l components do not l i e i n the same h o r i z o n t a l plane. This algo- rithm may also be d i f f i c u l t to evaluate at high speed. Conceptually, each evaluation of the function ty during maximization involves a scan of the complete f i e l d of view. The auto-focusing algorithm to be presen- ted here eliminates one dimension of the scan, and therefore should o f f e r 23 s u f f i c i e n t speed f or e f f e c t i v e implementation i n an on-line image pro- cessing system. 3.2 Developing the Algorithm one-dimensional function. Figure 3.2.1A shows a scan l i n e across a f i e l d of view when the image i s i n focus. C h a r a c t e r i s t i c a l l y , as an image i s put out of focus, the i n t e n s i t y information on the scan l i n e d eterio- rates as shown i n Figure 3.2.IB. By examining the image while varying the focus, c o r r e l a t i o n between image q u a l i t y and c e r t a i n c h a r a c t e r i s t i c s i n the scan l i n e may be established. Figure 3.2.2 shows the primary features searched f o r i n a scan l i n e , namely, sharp edge d e f i n i t i o n , good contrast r a t i o , and r e n d i t i o n of f i n e d e t a i l . Based on t h i s cor- r e l a t i o n , a focusing algorithm i s proposed that u t i l i z e s a function that has a maximum when the scan l i n e contains these c h a r a c t e r i s t i c s . The func- t i o n to be used i s s t a t i s t i c a l variance of the i n t e n s i t y l e v e l s along the scan l i n e . I t i s proposed that focusing may be accomplished by adjusting the focus control u n t i l the variance reaches a maximum. i a t i o n of the s i n g l e measurements within that set. In Figure 3.2.1, the i n t e n s i t y l e v e l s of the in-focus scan l i n e contain more v a r i a t i o n than the out-of-focus scan l i n e . I t follows that variance, a measure of v a r i a t i o n , could be used to judge the q u a l i t y of the image. The unbiased 2 estimator of the variance, s , i s t r a d i t i o n a l l y defined as follows (18). A s i n g l e video scan l i n e across an image may be viewed as a The variance of a set of measurements i s a measure of the var- 2 I (x. - x ) 2 i s N - 1 (3.2.1) I x. where i = 1 to N; x. = an i n d i v i d u a l sample; x = x .N 24 nu«*ctor I Coordinate 200 400 M j i e c t o r X Coordinate 600 Fig. 3.2.1 A video scan l i n e when in focus (A) and when out of focus (B). 2 To simplify the calculations required to extract s , i t i s more conven- 2 ient to use the biased estimator of s , which i s defined (18) as follows. 2 i (x± - x ) 2 N (3.2.2) where i • 1 to N • an individual sample 25 > o I -P m 60 AO 20 Sharp Edges . Fine / Detail _1_ JL 200 0̂0 Dissector 1 Coordinate 600 F i g . 3.2.2 C h a r a c t e r i s t i c s searched for i n a video scan l i n e . Although the magnitudes of the estimators d i f f e r , i t i s permissable to use e i t h e r estimator as both equations have a maximum with the same subset of data. Equation 3.2.2 may be reduced a l g e b r a i c a l l y . y ( x . 2 - 2x x. + x 2) . i i x s = N I x. + 9-2 -2 - 2x + x Nx 2 7 1 N N V N < ( 3 ' 2 - 3 ) Equation 3.2.3 was used i n a l l the measurements that follow. Numerically t h i s function i s evaluated by simple recursive evaluation as each i n t e n s i t y 26 200 - 0 1 ' ' i i i i i i i i— -SO - 6 0 - 4 0 - 2 0 0 20 40 ' 60 80 Nuriber of Focua Stops Number of Focus Steps F i g . 3.2.3 The variance p l o t t e d against focus co n t r o l p o s i t i o n u n f i l t e r e d (A) and f i l t e r e d (B) with a d i g i t a l f i l t e r window s i z e of ten. 27 l e v e l , x., becomes a v a i l a b l e : accumulate the two t o t a l s Tx. 2 and J x . , 2 and when the scan is. complete, square the second t o t a l and d i v i d e by N , s u b t r a c t i n g the r e s u l t from the f i r s t t o t a l d i v i d e d by N . Figure 3.2.3A shows the var i a n c e of i n t e n s i t y p l o t t e d a g a i n s t the f i n e focus adjustment f o r a t y p i c a l c l u s t e r of c e l l s . The " z e r o " p o i n t on the h o r i z o n t a l a x i s represents the focus c o n t r o l p o s i t i o n where the image was judged as being of the best q u a l i t y . Figure 3.2.3B shows the' same curve a f t e r d i g i t a l low-pass f i l t e r i n g . F i l t e r i n g s i m p l i f i e s peak d e t e c t i o n by smoothing the curve. The d i g i t a l f i l t e r used simply averages the va r i a n c e from s e v e r a l adjacent p o i n t s and assigns the average to the c e n t r a l p o i n t . To s t a t e t h i s i n the form of an equation, the v a r i a n c e att.the k ^ p o i n t i s defined as f o l l o w s : l v, = I v. k N (3.2.4) where N = the d i g i t a l f i l t e r window s i z e (^1) th. v. = the v a r i a n c e at the i p o i n t x and i v a r i e s from k - — to N k + — -1 f o r N even and from i N - 1 ^ , , N - 1 . k — to k H — f o r N odd. Several s u b j e c t i v e e v a l u a t i o n s of image q u a l i t y v e r i f i e d t hat the va r i a n c e peaks when the image i s i n focus, thereby j u s t i f y i n g the use of t h i s a l g o r i t h m . At f i r s t , i t may be d i s c o n c e r t i n g to f i n d that an automatic system can focus more c r i t i c a l l y than the human operator. One of the t e s t s conducted r e q u i r e d a person to manually focus the microscope to produce the best image. The automatic focus would then 28 be a c t i v a t e d and many times an improvement of the manually adjusted image was noticeable. Focus by variance maximization i s numerically simple to imple- ment, provides good averaging over the f i e l d of view, and i n such avera- ging, compensates f o r o p t i c a l curvature. By maximizing the variance along several non-adjacent scan l i n e s , the best o v e r a l l image i s obtained. 3.3 Factors A f f e c t i n g the Variance Function Several factors a l t e r the c h a r a c t e r i s t i c shape of the variance f u n c t i o n . In order to apply variance maximization techniques e f f e c t i v e l y , these factors must be understood and c o n t r o l l e d . During the following discussions concerning these f a c t o r s , i t should be assumed that a l l v a r i - ables and conditions a f f e c t i n g the variance function are held constant, unless i t i s stated otherwise. The "zero" point on the h o r i z o n t a l axis represents the point where image q u a l i t y was judged to be "best". The contents of the f i e l d of view a f f e c t the variance function. 01 I • I | I 1 L o I I J 1 1 1- -20 -10 0 10 20 -20 -10 0 10 20 Hunbor of Focua Steps Number of Focus Stopo F i g . 3.3.1 The variance function of two d i f f e r e n t f i e l d s of view showing peak variance s c a l i n g . 29 Number of Focus Stops • Uvaber of Focus Stops F i g . 3 . 3 . 2 S c a l i n g of the variance function due to magnification .shown at 800X ( A ) , 1024X (B), 1280X (C), and 2000X ( D ) . 30 D i f f e r e n t objects contain varying amounts of information, and so, as the f i e l d of view i s changed, one can expect that the peak variance value w i l l also change (Figure 3.3.1). I t i s possible that a new f i e l d of view may have a peak variance that i s below the s e n s i t i v i t y of the variance maximization algorithm. For such cases where a maximum variance value may not be detectable, or may not even e x i s t , the maximization algorithm should maintain control by recognizing this s i t u a t i o n . Therefore, the information content of the objects i n the f i e l d of view determines the peak value of the variance function. System magnification controls the s c a l i n g on the h o r i z o n t a l axis as shown i n Figure 3.3.2. As magnification i s increased, the depth of f i e l d of the optics decreases, and therefore the range i n which image information i s received also decreases, giving the variance func- tion, a narrower, shape. Since peak detection i s the objective, the focus co n t r o l step s i z e should be made smaller as magnification i s increased, e f f e c t i v e l y spreading the variance function over the h o r i z o n t a l axis. I t i s d i f f i c u l t to generalize t h i s s c a l i n g property, as the depth of f i e l d i s dependent on the numerical aperture (N.A.) and e x i t p u p i l s i z e of the s p e c i f i c objectives used (11). However, a convenient estimate i s to say that as magnification i s doubled, the focus step s i z e should be reduced by 1/3 to 1/2 (See Appendix I concerning FOCSTP for nominal values) as determined experimentally. O p t i c a l f i l t e r s are usually chosen to enhance the contrast of the image i n a meaningful way. However, the f i l t e r s e l e c t i o n w i l l also a f f e c t the spread and peak value of the variance function. Figure 3.3.3 demonstrates how d i f f e r e n t f i l t e r s a f f e c t the variance function extracted from an image of c e l l s . As a f i l t e r narrows the variance 31 o l i - i I i 1 L. o I I 1 1 1 — - — i »• -80 -40 0 40 80 _g 0 0 40 80 Nunbov of Fotroo Steps Kunber of Focuc Steps F i g . 3 . 3 . 3 The e f f e c t of no f i l t e r (A), a red f i l t e r (B), a blue f i l t e r (C), and a green f i l t e r (D) on the variance function extracted from an image of c e l l s . 32 function, the f i l t e r i s being more s e l e c t i v e . That i s , some parts of the image are l o s i n g contrast. As a f i l t e r increases the peak value of the variance function, the contrast of s p e c i f i c parts of the image i s being enhanced. An image c l o s e l y represents the object at only one plane of thickness. I f the f i l t e r i s chosen such that image information from the planes surrounding the plane of i n t e r e s t i s symmetrical, then the variance function w i l l also be symmetrical. Generally, the best f i l t e r produces a well-defined symmetrical variance function and pro- vides s u f f i c i e n t contrast i n the i n t e r e s t i n g areas of the image. The i n t e n s i t y of i l l u m i n a t i o n produces a s c a l i n g a f f e c t on the variance f u n c t i o n . As background i l l u m i n a t i o n i s halved, the differ e n c e of i n t e n s i t y between a l i g h t and dark object i s also halved. Considering that the variance i s r e l a t e d to the squares of these d i f f e r e n c e s , 0 I i —i -—i ' 1 1 1 - 6 0 - 4 0 -20 0 2 0 4 0 60 Number of Focu3 Steps F i g . 3.3.4 The variance function extracted at f u l l i n t e n s i t y and at h a l f i n t e n s i t y . The bottom curve i s the one at h a l f i n t e n s i t y . 33 ha l v i n g the i n t e n s i t y reduces the variance to approximately one quarter of the f u l l value (Figure 3.3.4). C r i t i c a l i l l u m i n a t i o n ( r e f e r to Section 2.5 for the d e f i n i t i o n of c r i t i c a l i l l u m i n a t i o n ) a f f e c t s the variance function i n two ways. F i r s t , maximum o p t i c a l r e s o l u t i o n occurs under conditions of c r i t i c a l i l l u m i n a t i o n , and therefore the variance function should have a higher peak value under c r i t i c a l i l l u m i n a t i o n conditions. Second, the two terms i n equation 3.2.3 for the variance should peak at the same time or e l s e a s h i f t i n the peak variance w i l l occur. This peaking i s c o i n - cident only under conditions of c r i t i c a l i l l u m i n a t i o n . Figure 3.3.5 shows the e f f e c t of c r i t i c a l i l l u m i n a t i o n at a high magnification. For- tunately, at lower powers of magnification this phenonmena i s not as 0 I _J »_i i i i 1 u -60 -40 -20 0 20 40 60 Hunber of Focus Steps F i g . 3.3.5 The e f f e c t of n o n - c r i t i c a l i l l u m i n a t i o n on the variance function at a magnification of 2560X.' The top curve represents c r i t i c a l i l l u m i n a t i o n . 34 pronounced. A l l these factors can e a s i l y be considered and compensated fo r during implementation of auto-focusing by variance maximization. Through an understanding of these properties, a generalized maximization algorithm can be developed that i s both magnification and object inde- pendent. 35 4. THE LEUKOCYTE LOCATION PROCEDURE 4.1 The Conditions of the Search Erythrocytes outnumber leukocytes by approximately 600:1 on a normal blood smear, and therefore l o c a t i n g or i s o l a t i n g leukocytes can be a time-consuming task. As magnification increases, the area of the f i e l d of view decreases and therefore the p r o b a b i l i t y of a leukocyte e x i s t i n g i n any p a r t i c u l a r f i e l d of view also decreases. This implies that a longer time i s required to locate a leukocyte. Most leukocyte l o c a t i o n algorithms take advantage of the colour properties of a blood f i l m stained with Wright's s t a i n (4,13). Since the image di s s e c t o r cannot d i s t i n g u i s h between colours and i s only s e n s i t i v e to i n t e n s i t y , i t i s h e l p f u l to se l e c t o p t i c a l f i l t e r s to enhance the contrast r a t i o of the leukocvtes so thev mav be separated 300 400 ' 500 600 700 800 900 Wavelength A i n nm. F i g . 4.1.1 Spectral density curve of the Zeiss 46 78 06 wide-band pass green interference f i l t e r . from the erythrocytes. By making use of the heavy absorption of green l i g h t i n the stained leukocyte nucleus, the leukocytes may be located. The s p e c t r a l density curve of the f i l t e r that gave the best r e s u l t s at a l l magnifications i s shown i n Figure 4.1.1. When choosing a f i l t e r f o r th i s system, i t must be r e a l i z e d that the erythrocytes are required to 36 show i n the image, or else the auto-focusing algorithm (Chapter 3) w i l l not function properly. Figure 4.1.2 shows scan l i n e s across a leukocyte with and without contrast enhancing f i l t e r s . Under conditions of con- t r o l l e d i l l u m i n a t i o n and uniform s t a i n i n g , searching for the o p t i c a l l y dense nucleus i s a s a t i s f a c t o r y c r i t e r i o n for l o c a t i n g the nucleus. 4.2 Threshold Determination Some quan t i t a t i v e measure of " o p t i c a l l y dense" i s required to Dissector X Coordinate Dissector I Coordinate F i g . 4.1.2 Video scan l i n e s across a leukocyte with (B) and without (A) contrast enhancing f i l t e r s . locate the leukocytes. Detection seems best done i n two stages since the n u c l e i of a l l classes of leukocytes are not of the same density. The f i r s t stage involves the e s t a b l i s h i n g of a crude threshold that i s expected to include a l l leukocytes. The second stage r e f i n e s the f i r s t threshold f o r the p a r t i c u l a r c e l l found so that measurements can be made on th i s c e l l . The f i r s t threshold i s the most c r i t i c a l i n the sense that c e l l s designated by t h i s threshold should, with a high p r o b a b i l i t y , be leukocytes. An absolute threshold value does not work as the nuclear 37 i n t e n s i t y varies s i g n i f i c a n t l y from s l i d e to s l i d e and from f i e l d of view to f i e l d of view. This suggests that the f i r s t threshold should be a function of the mean i n t e n s i t y of the current f i e l d of view. As the search enters i n t o a new f i e l d of view, the average background i n t e n s i t y sampled over various areas of the image i s m u l t i p l i e d by a constant, defined as the contrast r a t i o , to produce the threshold value. To put this i n the form of an equation, the „ _ _. ̂ . Threshold for Leukocytes , . •_ 1 X .Contrast Ratio = — : — ; 1—: (4.2.1) Average Background Intensity The threshold defined i n th i s way works w e l l as long as the contrast r a t i o has been c a r e f u l l y chosen. However, due to the varying transmit- tance properties of each blood f i l m , i t i s necessary to redefine the contrast r a t i o f o r each s l i d e . This i s done by l o c a t i n g a leukocyte on the new s l i d e , and by adjusting the contrast r a t i o u n t i l the r e s u l t i n g threshold includes t h i s leukocyte. The whole s l i d e can then be pro- cessed using this updated contrast r a t i o . A f i x e d contrast r a t i o cannot be used f o r a l l s l i d e s since a wide v a r i a t i o n i n the s t a i n i n g density and general q u a l i t y of the blood films e x i s t s . Approximately 25% of the films cannot be properly pro- cessed with a f i x e d contrast r a t i o . The blood on the t e s t s l i d e s had been smeared by hand and then stained automatically. There are now a v a i l a b l e automatic blood spinners and s t a i n e r s , f o r example, the Perkin-Elmer Coleman Model 90 Blood Spinner (16). These units are used to prepare s l i d e s f o r instruments which are not able to make the subtle adjustments i n perception that the experienced human can make. I t i s claimed that such automatically prepared s l i d e s are u n f a i l i n g l y e x c e l - l e n t , containing randomly d i s t r i b u t e d , uniformly spread c e l l s that have an absolute minimum of mechanical d i s t o r t i o n (16,17). Slid e s produced 38 by such an automatic process should be studied, and i t i s expected that a f i x e d contrast r a t i o could be determined and used s u c c e s s f u l l y to process a l l such prepared s l i d e s . The second threshold value i s required once a suspected leukocyte has been found. A "suspected" leukocyte i s defined as an object that f a l l s below the f i r s t threshold and i s of a c e r t a i n s i z e . Various measurements of t h i s suspected leukocyte may be required, and contour t r a c i n g of the nucleus i s assumed to be one of these t e s t s . In order to accurately contour trace an object, a r e f i n e d threshold value i s required. This threshold i s usually defined to be the i n t e n s i t y l e v e l occurring at the maximum gradient of i n t e n s i t y across the c e l l boundary. Thresholds f o r both the nuclear and cytoplasmic material of a leukocyte may be determined i n t h i s manner. 4.3 The Scan Pattern Figure 4.3.1 shows four of the standard scan patterns used i n the d i f f e r e n t i a l count (14). The l o n g i t u d i n a l pattern i s the one most commonly used. Several patterns have been standardized since the d i s t r i b u t i o n of leukocyte types across the smear i s not uniform: neutrophils and monocytes predominate at the margins and the t a i l , and lymphocytes predominate i n the middle of the f i l m (3). No commitment of any preset pattern has been made, and the pattern s e l e c t i o n i s com- p l e t e l y f l e x i b l e (Refer to Appendix II concerning "PATTRN"). However, independent of the pattern used, some care must be taken to ensure that c e l l s are not counted twice since parts of them l i e i n adjacent f i e l d s of view. A "dead" zone needs to be l e f t between processed areas of the f i e l d of view as shown i n Figure 4.3.2. This 39 » > A B C D F i g . 4.3.1 Standard scan patterns used i n the d i f f e r e n t i a l leukocyte count. The s t r a i g h t edge pattern (A), the battlement pattern ( B ) , the c r o s s - s e c t i o n a l pattern (C), and the l o n g i t u d i n a l pattern (D). "> o •K "-V-i 3f Current Search Area Dead Zone Adjacent Search Aroa 1 F i g . 4.3.2 Placement of adjacent scan areas. 40 "dead" zone should i d e a l l y be equal to the s i z e of the l a r g e s t c e l l expected. In the case of white blood c e l l s , the monocyte i s the l a r - gest type, with a s i z e ranging from 13 to 19 microns. This dead zone should also be considered to frame each f i e l d of view. As the center area i s processed and a c e l l i s located which overlaps onto the frame, the whole c e l l w i l l then be v i s i b l e and processing can cross onto the frame (Figure 4.3.3). If these considerations are made, the p r o b a b i l i t y of missing any leukocytes i s very small indeed. Dead Zone y Current F i e l d of View F i g . 4.3.3 Relationship between current and adjacent scan areas, showing the placement of the dead zone. 41 5. THE SOFTWARE IMPLEMENTATION Four global routines, each having a d i s t i n c t function, have been w r i t t e n to con t r o l the microscope and locate the leukocytes. These routines have been w r i t t e n i n such a way that they are l o g i c a l l y inde- pendent of magnification. Compensation f or any change i n magnification i s achieved by a l t e r i n g the values assigned to the s i x va r i a b l e s des- cri b e d i n Appendix I. The next chapter w i l l describe how the system was tested using such techniques as contour tr a c i n g and curvature measure- ment by an area operator. 5.1 "FOCUS" As already discussed, auto-focusing i s accomplished by variance maximization. A flow diagram of the variance maximization algorithm, c a l l e d "FOCUS", i s shown i n Figure 5.1.1. Execution time of t h i s routine is' a function of d i g i t a l f i l t e r window s i z e , magnification, and the i n i t i a l p o s i t i o n of the focus c o n t r o l . D i g i t a l f i l t e r i n g i s accomplished by s t o r i n g the variance values i n matrix form, and as the d i g i t a l f i l t e r s i z e increases, the length of t h i s matrix also increases. The average value of th i s matrix i s considered to represent the f i l t e r e d variance at the point represented by the ce n t r a l entry i n the matrix. As the magnification i s increased the depth of f i e l d decreases, and therefore the number of d i s c r e t e steps d e f i n i n g a l o g i c a l clockwise or counter- clockwise incremental focus adjustment decreases. This decrease i n the incremental distance that the focus motor must be driven helps to speed up execution. This i s the only routine that executes more quickly at higher magnifications. I f future a p p l i c a t i o n permits the use of a sing l e magnification, the focus motor should be equipped with d i f f e r e n t gearing to provide the proper incremental step s i z e . 42 Initialize VARIANCE matrix for digital f i l t e r i n g . ( Step fccus motor CW "| by FCCSTP. [ Got nev variance. X Update and evaluate VARIANCE matrix. Step CCW by TCCSTP and get new variance, _ y Update and evaluate VARIAUCE matrix. Stop 2 X POCGT? CH _to_Varianco peak. Fig. 5.1.1 Flow Diagram of the focusing program, "FOCUS" 43 Field of View Scan y Lines F i g . 5.1.2 The scan l i n e s used to sample the variance. The variance i s normally sampled across the search area as shown i n Figure 5.1.2. The c r i t i c a l global factors are VARNUM, the d i g i t a l f i l t e r window s i z e , and FOCSTP, the number of ph y s i c a l focus steps equivalent to one l o g i c a l focus increment i n this algorithm c(Refer to Appendix I f o r nominal values) . 5.2 "THRESH" "THRESH" i s the routine that calculates the threshold l e v e l of i n t e n s i t y used to segregate leukocytes from the background. A sim- p l i f i e d flow diagram of THRESH i s shown i n Figure 5.2.1. A single scan l i n e across the search area i s sampled to obtain the i n t e n s i t y l e v e l of the two br i g h t e s t points. The average of these two points i s then tested to see i f i t f a l l s between predefined l i m i t s . I f the i n t e n s i t y i s outside these l i m i t s , a message i s displayed asking the operator to e i t h e r increase or decrease the i l l u m i n a t i o n . During system design, the deviation of i n t e n s i t y due to changes i n specimen thickness and concentration of s t a i n was underestimated, and therefore the system Zero Bl and D2. Sot C=1000. PCot tho intensity of . a point on tho lino Y - C. Tont tho intensity of this point. Test i f the l i n e T = C h&s been completely scanned. Average Bl and B2 and tost size of average. Store negative of average i n TLSTEL. Display message intensity too d u l l for timed in t e r v a l . Display noasage intensity too bright f o r a timed interval. Sot C = 700. Zero Bl and B2. F i g . 5.2.1 Flow diagram of the threshold determining program "THRESH" 45 could be improved i f THRESH had some means of remotely c o n t r o l l i n g the i l l u m i n a t i o n when the i n t e n s i t y exceeds c e r t a i n l i m i t s . However, i f the average i n t e n s i t y i s acceptable, the threshold i s ca l c u l a t e d by m u l t i - p l y i n g the average background i n t e n s i t y by the contrast r a t i o , . CR. The negative of t h i s value i s stored i n TLEVEL f or g l o b a l access. 5.3 "JOYSTK" "JOYSTK" i s the handler f o r the j o y s t i c k attached to the. sys- tem. Two modes of j o y s t i c k control are a v a i l a b l e , focus c o n t r o l only, or s l i d e p o s i t i o n c o n t r o l with dynamic auto-focusing. The mode i s s e l e c - ted by means of a l a b e l l e d two-position switch on the j o y s t i c k u n i t . The pro p o r t i o n a l p o s i t i o n and d i r e c t i o n that the j o y s t i c k i s moved controls the v e l o c i t y and d i r e c t i o n that e i t h e r the stage or focus motor i s driven. The j o y s t i c k handler must be i n i t i a l i z e d before each use by c a l l i n g JOYINT. A f t e r i n i t i a l i z a t i o n , JOYSTK should be c a l l e d repeatedly from a program loop as long as control i s desired. The frequency with which JOYSTK i s c a l l e d w i l l a f f e c t the response speed of the j o y s t i c k a c t i o n . 5.4 "STRPNT" "STRPNT" i s the routine that a c t u a l l y locates the leukocytes. As each leukocyte i s found, coordinates defining the l o c a t i o n of the leukocyte are passed to an external subroutine c a l l e d CNTOUR. CNTOUR in t e r p r e t s these coordinates as defining the l o c a t i o n of a c e l l , and uses the coordinates to contour trace and c l a s s i f y the c e l l . From the point of view of CNTOUR, STRPNT merely produces a data stream of c e l l coordinates. STRPNT begins searching a new f i e l d of view i n the bottom 46 rinHl«.iir.o pcati and jstn^a control p&rn- Imotors. , :T::Z... _J I n i l i n l l i o couutor to j j c a l l auto-focus, :L. :.:z. C a l l TOCU3 and THRESH 1 Get point intensity ar.d incrcrant scan coordinates by AGS. j Perform AGS -"] minimum square | teat, Tost i f current f i o l d ' of view baa been scan- ned ̂ completely, J. ~ Access* P/:TTRH andmovo Btage to noxt f i e l d of viev. T o s t - i f tho end of PATTRIJ has been roached. To a Increment focus count and tost I f timo to auto-focus• 183 Move to c e l l boundary by GS increments. C a l l CHIOUB to process the c o l l . Two returns are possible 1 Noroal\ Roturu \ E r r o r ^ Return Store c e l l coordinates Bo this c e l l can ba ide n t i f i e d as found. • Incrcmont c o l l count and test i f enough c o l l s have been found. Done? [Normal\ Exi t i g . 5.4.1 Flow diagram of "STRPNT" 47 l e f t hand corner, testing one row at a time (Figure 5.4.2A). Sequential points are spaced apart by an incremental step size called AGS. When a point is found that f a l l s below the threshold, an area test is made where a minimum square of size AGS i s used. If a l l four corners of this square f a l l below the threshold, the edge of the object i s searched for. The edge i s detected by stepping l e f t with a step size GS until the f i r s t point above the threshold i s found (Figure 5.4.2B). GS is assumed to be the incremental step size to be used by CNTOUR in the classification work. The coordinates of the edge point are stored in A B F i g . 5.4.2 The sequential search technique used to locate leukocytes, demonstrating the minimum square f i t (A) of s i z e AGS, and the l o c a t i o n of the s t a r t i n g point (B) by using GS. SXD2 and SYD2 and the subroutine CNTOUR i s c a l l e d . CNTOUR may r e j e c t these coordinates and STRPNT w i l l v e r i f y the v a l i d i t y of SXD2 and SYD2. If the coordinates are accepted, STRPNT w i l l continue searching the f i e l d of view f o r other c e l l s , noting the p o s i t i o n of the c e l l already found. A f t e r the f i e l d of view has been searched, STRPNT moves the s l i d e ac- cording to the d i r e c t i o n s stored i n PATTRN (Refer to Appendix II) which describe how the stage should be moved. 48 STRPNT also c a l l s FOCUS to maintain the image i n focus. I d e a l l y , FOCUS should be c a l l e d each time the f i e l d of view i s changed, since there i s no assurance that the image w i l l s t i l l be i n focus a f t e r the stage i s moved. However, i t was found that i t was acceptable to focus when e i t h e r one of two events occurred: when a suspected leuko- cyte was found and t h i s f i e l d of view had not been focused, or when focusing had not occurred f o r a f i x e d number of stage moves. The number of times that the stage can be moved before focusing i s needed i s depen- dent on magnification, and as magnification increases, focusing must occur more often. STRPNT has two e x i t s to the c a l l i n g program. One e x i t , the normal one, occurs when the s p e c i f i e d c e l l count i s reached. The other e x i t occurs when the scan pattern stored i n PATTRN i s exhausted before the c e l l count i s reached. 49 6. SYSTEM EVALUATION 6.1 The Test System Auto-focusing was s u b j e c t i v e l y evaluated apart from the rest of the system. Several i n d i v i d u a l opinions of image q u a l i t y were ob- tained, and c o r r e l a t i o n between peak variance and image q u a l i t y was e s t a b l i s h e d under a wide range of circumstances. Attempts to manually improve the focus only v e r i f i e d that variance maximization produced the best average image q u a l i t y . If the considerations discussed i n Chapter 3 are implemented, variance maximization provides an e f f i c e i n t and consistent means of focusing. A complete software package modelled af t e r the one i n Appendix II was written to test the e f f i c i e n c y of the system. This package o f f e r e d several d i s t i n c t modes as l i s t e d below: 1. I n i t i a l i z a t i o n - I n i t i a l i z e s the parameters Appendix I on the basis of cation used. 2. Scan Line Display - Displays the i n t e n s i t y l e v e l s encoun- tered on a s i n g l e scan l i n e i n the X d i r e c t i o n . The Y coordinate i s c o n t r o l l e d through the teletype keyboard. 3. Threshold Intensity Map - Displays a l l the points i n the f i e l d of view that l i e e i t h e r above or below the threshold. This mode i s used to pick the contrast r a t i o , CR, which i s used to define the•threshold. 4. J o y s t i c k Control - Activates continual control of focus and stage p o s i t i o n through the j o y s t i c k . 5. Contour Tracing and Curvature Measurement - Locates a s p e c i f i e d number of leukocytes, and contour traces t h e i r n u c l e i . The contour traces and curvature functions may be displayed for viewing. l i s t e d i n the magnifi- The l a s t mode i s the most important one for determining the e f f i c i e n t y 50 of the system. The remainder of this chapter w i l l describe the techni- ques used for contour t r a c i n g and curvature measurement, and w i l l d i s - cuss the r e l a t i v e speed one can expect using these techniques. 6.2 Contour Tracing Contour t r a c i n g was conducted on-line using the t r a c i n g a l - gorithm shown i n Figure 6.2.1. A boundary point i s defined as l y i n g at the centroid of any four of the array points forming a minimum square, the side of the square being defined as GS i n t h i s context. The four black dots designate the array points i n the minimum square configuration. The centroid of the minimum square i s defined as a boundary point whenever one, two, or three of the four corners of the square f a l l below the threshold i n t e n s i t y . I f none or a l l of the points f a l l below the threshold, the centroid i s not a boundary poi n t . The arrows i n Figure 6.2.1 i n d i c a t e the four possible d i r e c t i o n s i n which the next boundary 3 O . A D3 © e DA 2 O -< « > o /, D2 O OD1 O 1 F i g . 6.2.1 The contour tracing algorithm. The black dots are spaced at GS and represent the four points that are interrogated to determine which d i r e c - t i o n (the c i r c l e s ) the operator should be moved. point i s sought. For a counterclockwise trace, the four d i r e c t i o n s are interrogated i n a counterclockwise order. The f i r s t d i r e c t i o n i n t e r - rogated depends upon which of the minimum square points are below the 51 threshold. Other t r a c i n g algorithms may be found described i n (15). This t r a c i n g algorithm was implemented so that the disc r e t e area opera- t o r described i n the next s e c t i o n could be used to measure curvature. 6.3 The Discrete Area Operator The d i s c r e t e area operator shown i n Figure 6.3.1 was used to measure boundary curvature. The area operator i s centered over a boun- dary point as determined by the contour tracing algorithm. The centroid of the area operator assumes a value of +386, and each array point having an i n t e n s i t y below the threshold assumes the value as shown i n Figure 6.3.1. A l l other array points assume a zero value. The t o t a l of the values of the array points and centroid give a measure of the curvature o o o o„ o o -1 -3 -7 -7 -3 -1 o o o o o c -3 -17- -37 • -37 -17 -3 o o a o o o -7 -37 -81 • x -81 -37 -7 •»386 o o o o o. o -7 -37 -81 -81 -37 -7 o o o o o o -3 -17 -37 • -37 -17 -3 o 6 o o o o -1 -3 -7 -7 -3 -1 F i g . 6.3.1 The d i s c r e t e area operator used to extract boundary curvature. at the boundary poi n t . The values associated with the array points follow a Gaussian weighted p r o f i l e modelled a f t e r the physiology of the concentric receptive f i e l d s of a cat's eye (15). A curvature function can be generated e f f i c i e n t l y once the contour has been traced. At the f i r s t boundary point, a l l 36 points of the area operator are interrogated and stored i n matrix form. Further Fig. 6.3.2 Photographs of several cells, their contour traces, and unfiltered curvature functions as extracted by the area operator. boundary points involve the i n t e r r o g a t i o n of only s i x points, which represent a new row or column of the matrix. The row or column that these new points represent depends on which d i r e c t i o n the centroid of the matrix must be s h i f t e d i n order to l i e on the next boundary point. Figure 6.3.2 shows contour traces and curvature functions of several c e l l s . Nuclear curvature has been shown to be an e f f e c t i v e parameter i n the c l a s s i f i c a t i o n of leukocytes (1,5,8,12). C l a s s i f i c a - t i o n of leukocytes s t i l l remains to be completed with this system. The purpose of implementing on-line contour and curvature techniques has been to demonstrate that such on-line processing techniques are s u i t - able and e f f i c i e n t means of automating the d i f f e r e n t i a l leukocyte count. 6.4 R e l i a b i l i t y and Execution Time Measurements Several performance tests over a c e r t a i n number of c e l l s were conducted to extract a mean measure of the system performance. These tests involved l o c a t i n g or i s o l a t i n g a s p e c i f i e d number of c e l l s , contour t r a c i n g these c e l l s , and generating t h e i r curvature functions. The f i r s t t e s t was designed to obtain a measure of the r e l i a - b i l i t y of c o r r e c t l y i s o l a t i n g or l o c a t i n g leukocytes. A scan pattern was chosen that had a true count of 100 leukocytes on i t . A program was then arranged that would scan t h i s pattern ten times, p r i n t i n g out the number of c e l l s a c t u a l l y i s o l a t e d and traced. This test was conduc- ted s e v e r a l times and t y p i c a l r e s u l t s are shown i n Table 6.4.1. Pass 3 obviously missed a c e l l , but i t was impossible to determine which c e l l was missed and why. Pass 8 i n d i c a t e d an extra c e l l had been picked up. This may have been a large p l a t e l e t and a more str i n g e n t 54 Pass § True Cell Count As Counted Error Count 1 100 100 2 100 100 3 100 99 -1 A 100 100 5 100 100 6 100 100 7 100 100 8 100 101 +1 9 100 100 10 100 100 Table 6.4.1 Results of a t e s t designed to count leukocytes acrsos an area with a true count of 100 c e l l s . area c r i t e r i o n could probably eliminate this e r r o r . The mean c e l l count from t h i s t e s t i s 100 c e l l s , and the standard deviation i s + .11 c e l l s . The second t e s t was designed to give an absolute measure of the time required to i s o l a t e and process 100 c e l l s . A scan pattern as shown i n Figure 6.4.1 was used i n this t e s t . The scan pattern was generally long enough that 100 c e l l s would be found before the end of F i g . 6.4.1 The scan pattern used to measure the time required to locate and process 100 c e l l s . the pattern was reached. I f t h i s was not the case, the pattern would j u s t be repeated. At the end of a 100 c e l l pass, the s l i d e would always be returned to the i n i t i a l p o s i t i o n . Ten s l i d e s were selected at S l i d e Tino i n Seconds f o r 100 C o l l Scan © Magn i f i c a t i o n Below Nuiabor 40 X 16 X 1 .6 40 X 16 X 2 100 X 16 X 1 .25 A B C A+3+C D S F D+E+F G E I G-i-H-s-I 1 160 167 153 162 160 153 163 160 205 193 194 199 2 105' 103 107 105 130 123 127 123 128 135 132 132 3 183 180 185 133 194 195 193 196 250 244 247 247 4 101 100 101 101 120 117 121 119 167 162 163 164 5 120 116 116 117 124 125 130 126 194 196 195 195 6 265 269 272 269 283 290 286 239 306 311 309 309 7 99 100 100 1C0 113 115 114 115 125 132 123 127 8 120 123 126 123 130 129 129 129 171 169 167 169 9 230 226 223 228 259 261 260 260 296 299 299 293 10 140 139 143 141 148 150 147 I43 175 179 181 179 Average T i m s 153 Average T i a a 167 Average Tine 202 Table 6.4.2 Times required to locate and process 100 leukocytes on.ten randomly selected blood f i l m s . 56 random and the test performed across the same area of each slide three times at three different magnifications. The results of this test are summarized in Table 6.4.2. The contrast ratio for each slide was chosen as described at the end of Section 4.2. The results of this second test are most interesting. Notice that the mean time required to complete the test increased i^ith magni- fication as expected. However, the increase in time is not very large. As magnification is doubled, the probability of locating a leukocyte i n any one particular f i e l d of view is halved. Supposedly this should cause a doubling of the time required to run the test. This does not occur since focusing takes less time at the higher magnifications. Focusing takes longer at the lower magnifications because the variance function is stretched over the horizontal axis and peak detection re- quires that the focusing motor be driven greater distances. If the gearing of the focus motor were changed for each magnification such that the step size of the focus motor would be equivalent to the number of incremental steps required, the mean time for this test at the lower magnifications would decrease. Therefore once the required magnifica- tion i s determined, i t w i l l be advantageous to tailo r the focus control hardware to this magnification. The distribution of the times recorded for the second test i s not Gaussian, and therefore i t is d i f f i c u l t to interpret the meaning of the deviation of the results. However, at 1024X the deviation is + 5 7.95 seconds, at 1280X i t is + 61.85 seconds, and at 2000X i t is + 64.20 seconds. Therefore the deviation also increases for higher magnifications indicating that there is a two-dimensional spread as magnification is increased. 57 Some measure of success o f t h i s system design can be obtained by comparing the r e s u l t s of t h i s t e s t to the time a t e c h n i c a i n r e q u i r e s to perform a d i f f e r e n t i a l leukocyte count. A t e c h n i c i a n r e q u i r e s from f i v e to ten minutes to perform a 100 c e l l d i f f e r e n t i a l leukocyte count. The times f o r the second t e s t do not i n c l u d e complete c l a s s i f i c a t i o n of the c e l l s , although curvature f u n c t i o n s f o r the n u c l e i of the c e l l s have been e x t r a c t e d . Keeping t h i s i n mind, i t i s c o n s e r v a t i v e l y estimated that one tenth of a second per c e l l should be s u f f i c i e n t to complete the c l a s s i f i c a t i o n . Based on t h i s assumption, the system developed i s a t l e a s t twice as f a s t as the t e c h n i c i a n performing the same task. Further advantages are also obvious when i t i s considered t h a t the t e c h n i c i a n normally cannot work at the microscope f o r more than an hour at a time due to eye s t r a i n . Based on t h i s second t e s t alone, the techniques used i n t h i s system are comparatively e f f i c i e n t . 4 58 7. CONCLUSIONS The system provides general purpose c o n t r o l of a microscope and i s adaptable to various types of on-line image processing. The system was designed to develop e f f i c i e n t techniques to eventually auto- mate the d i f f e r e n t i a l count. The system can be equally w e l l configured to perform other types of b i o l o g i c a l image processing. The l o g i c a l algorithms f o r c o n t r o l l i n g the functions of the microscope have i n themselves worked s u c c e s s f u l l y . The e f f i c i e n c y of these algorithms i n t h e i r i n t e r a c t i o n with the hardware has been accep- ta b l e . By tightening the s p e c i f i c a t i o n s of the hardware and by t a i l o r i n g the hardware to a s p e c i f i c magnification, further gains can be made i n system e f f i c i e n c y . I t i s worthwhile to review some of the ways i n which t h i s could be done. The s e t t l i n g time of the D/A converters and ampli- f i e r s i n the d e f l e c t i o n c i r c u i t r y of the image dissector can be impro- ved. Currently 50 microseconds plus the A/D conversion time i s required to interrogate a point. I t should be possible to reduce this time to 25 microseconds as the d i s s e c t o r requires a dwell time of only 11 micro- seconds to maintain a s i g n a l to noise r a t i o of 64 representing f i v e - b i t grey l e v e l r e s o l u t i o n . With t h i s improvement, a 20% to 35% reduction i n the times of the second t e s t i n Chapter 6 could be expected (Table 6.4.2). Another s u b s t a n t i a l time saving can be made by gearing the focusing motor to a s p e c i f i c magnification. Focusing time could be reduced by as much as 15% to 25% at the lower magnifications. This would imply about a 10% reduction i n the re s u l t s of the second test i n Chapter 6. Currently the wide tolerances found i n the q u a l i t y of the blood films has forced updating of the contrast r a t i o for each new s l i d e 59 processed. This method would be i m p r a c t i c a l i n a system where the s l i d e s are automatically i n s e r t e d under the microscope. The q u a l i t y of blood f i l m s produced from an automatic blood spreader and s t a i n e r should be i n v e s t i g a t e d . In such an automatically c o n t r o l l e d process, the trans- mittance properties of the films should be quite uniform, and the use of a f i x e d contrast r a t i o can be expected to work w e l l . A l t e r n a t i v e l y i f t h i s i s not true, the contrast r a t i o w i l l have to be updated f o r each new s l i d e since there i s no means of guaranteeing the q u a l i t y of a s l i d e . I t would be advantageous i n a p r a c t i c a l system to provide some means of d i g i t a l l y c o n t r o l l i n g the i n t e n s i t y of i l l u m i n a t i o n w i t h i n a small range. Presently a variance i n image i n t e n s i t y of 12.5% i s t o l e r a b l e though software compensation and the f l e x i b i l i t y of the con- t r a s t r a t i o method of threshold determination. One of the major objectives of the future a p p l i c a t i o n of t h i s system to leukocyte c l a s s i f i c a t i o n should be to determine the minimum s p a t i a l r e s o l u t i o n or amount of information required to c l a s s i f y leukocytes. A decrease i n required r e s o l u t i o n implies that a decrease i n magnification i s p o s s i b l e . A decrease i n magnification o f f e r s several advantages: lower power lenses cost l e s s , microscope adjustments such as condenser placement are not as c r i t i c a l , the depth of f i e l d increases, execution speed increases, and v i b r a t i o n and shock do not disturb the image as much. From the experience acquired from contour t r a c i n g and curvature measurement, the lens arrangement of 40X2X16 producing a magnification of 1280X i s expected to be a good compromise between the tradeoffs mentioned above. 60 APPENDIX I The programs to control the microscope are w r i t t e n i n such a way that they are l o g i c a l l y independent of magnification. I t was p o s s i b l e to compensate for the a f f e c t s of magnification by defining s i x v a r i a b l e s which assume d i f f e r e n t values for d i f f e r e n t magnifications. These v a r i a b l e s are described below. GS - The incremental step s i z e f or the X and Y coordinates of the image d i s s e c t o r to be used when performing recognition work on the c e l l s . GS = 4 represents the step s i z e f o r maximum r e s o l u t i o n . AGS - The incremental step s i z e f or the X and Y coordinates of the image d i s s e c t o r to be used when searching f o r c e l l s . Generally AGS i s chosen by determining the si z e of the minimum square with side AGS that w i l l f i t on a l l leukocytes at the magnification i n use. AGS commonly becomes two to s i x times GS. Variable Fover of Magnification 102/+X 1280X 2000X (40X16X1.6) (40X16X2) (100X16X1.25) GS 4 4 4 AGS 20 20 30 CR 16 20 22 STPEQ 6 5 3 VARNUM .5- 5 5 FOCSTP - 4 -3 -1 Table A.1.1 The optimum values for the s i x magnification dependent parameters. CR - A s i x - b i t binary, number considered to be a f r a c t i o n . The average background i n t e n s i t y i s m u l t i p l i e d by this f r a c t i o n to produce the threshold used to locate or i s o l a t e the leukocytes. STPEQ - The number of 10 micron steps necessary to p o s i t i o n the stage on the next f i e l d of view. For example, STPEQ = 6 w i l l cause the stage to move 60 microns 61 each time the f i e l d of view i s changed. VARNUM - The number of di s c r e t e variance values that f a l l under the window of the d i g i t a l f i l t e r when auto-focusing. FOCSTP - The negative of the number of steps the f i n e focus motor w i l l be advanced each time the auto-focusing algorithm requires the focus c o n t r o l to be l o g i c a l l y moved. The nominal values f o r each of these variables are l i s t e d i n Table A.1.1 according to magnification. 62 APPENDIX II Four subroutines have been written to control the microscope and locate the leukocytes. These programs may be arranged i n a complete system as shown i n Figure A.2.1 although other arrangements are possible. Besides the magnification parameters defined i n Appendix I, other v a r i - ables are involved i n subroutine communication. These v a r i a b l e s are described below. TLEVEL - A negative number representing the threshold used to locate leukocytes. SXD2, SYD2 - Absolute coordinates f o r the image dissector de f i n i n g the l o a t i o n of the nucleus of a leuco- cyte. The next point to the ri g h t at an i n c r e - ment of GS l i e c w i t h i n the c e l l nucleus. WCNT - The t o t a l number of c e l l s to be found. VARI - The value of the f i l t e r e d variance function at the current f o c u s . s e t t i n g . Three subroutines must be provided by the user with the following functions. DELAY - Provides the delay time required for the dissector to s e t t l e before the i n t e n s i t y of a point i s i n t e r - rogated. CNTOUR - I t i s assumed that t h i s user w r i t t e n subroutine w i l l c l a s s i f y the c e l l a f t e r the l o c a t i o n coordinates SXD2 and SYD2 are passed to i t . CRT - A c o l l e c t i o n of subroutines responsible f o r dis p l a y i n g messages i n various forms and structure on the Type 30D display unit attached to the PDP-9. Any type of message handling can be substituted f o r t h i s device. Table A.2.1 summarizes the i n t e r n a l and external references to the g l o b a l symbols and subroutines. "X" indicates i n t e r n a l l y de- f i n e d . "A" ind i c a t e s external access necessary. "(A)" indicates external access probable. This table should a s s i s t i n using the system programs 63 USER'S PROGRAM - I n i t i a l i z a t i o n and Control Tho s i x magnification dopondont varinblo3 f o r tho SYSTEM Programs Euat bo i n i t i a l i z e d before Rny SYSTEM Program i s c o l l e d . SYSTEM PROORAMS •4* P. "1 Lce r J o Ro to  JOYIHT I n i t i a l i z e s JOYSTK. C a l l onco before JOYSTK i o usod. USER'S PROGRAMS 3 ••8-' q Hi O . JCYSTK Provided nanual c o n t r o l of microscope through the j o y s t i c k . C a l l r e c u r s i v o l y froQ Dome program loop to maintain c o n t r o l . G "0 P u o o 3 -g .q r- l p . H M -l> o5 <S 3 STRPNT Searches f o r s p e c i f i e d number of c o l l s . Moves stage, c a l l s FOCUS and THRESH, Passe3 c a l l coordinates to soisa user subroutine c a l l e d CNTOUR vhere recognition work takes place, T FOCUS Automatically f o c u s e 3 tho microscope on the c o l l s i n the current f i e l d of view. THRESH Datonnino3 the threshold f o r the nucleus of the leukocyte. Monitors i n t e n s i t y l e v e l . Displays messogo i f i n t e n s i t y exceeds c e r t a i n l i m i t s . CRT Device handler f o r the Type 30D CRT d i s p l a y u n i t . (This handler has boon written) CNTOUR Called by STRPUT. Here i s vhero user write3 recognition routines f o r the leukocytes. There are tvo returns to STRPNT: 1. C o l l coordinates okay. 2. C o l l coordinates bad. » THRESH and FOCUS may also bo c a l l e d by the User. F i g . A.2.1 A block diagram demonstrating a possible arrangement of the system programs. 64 Variable Name Hame of Pro gran Where Variables are Defined e Monitor JOISTK FCCUS THRESH STRFNT CNTOUR* GS X A A A (A) AGS X A (A) ca X A TLEVEL X A (A) STPEQ X A FOCSTP X A VAHNUM X A SXD2 X A STD2 X A WCNT X A VARI X Subroutine Namo DELAY. X A A (A). JOYSTK A X •JCYINT A X FOCUS (A) A' A VAR X THRESH (A) X A STRPNT A X CNTOUR A X CRT (A) A . (A) * User written prograns, «» CRT message display routines. This handler is available. Table A.2.1 Int e r n a l and external references to global symbols and subroutines. "X" indicates i n t e r n a l l y defined, "A" indicates external access necessary, and "(A)" indicates external access probable. 65 and i n understanding the program l i s t i n g s . The pattern that i s used to move the stage about i s stored i n "PATTRN". STRPNT accesses this table to determine how the stage should be moved. The structure of the pattern may be changed by changing the en t r i e s i n PATTRN. The following structure i s used f o r PATTRN: PATTRN IOT COUNT IOT COUNT ooo 0 "IOT" i s one of the four i n s t r u c t i o n s to move the stage i n the four p o s s i b l e d i r e c t i o n s , and "COUNT" i s the number of 10 micron steps to be taken i n the d i r e c t i o n of the IOT. For example, to completely scan a rectangular pattern of s i z e 100 microns by 2000 microns s t a r t i n g at'the top l e f t hand corner, PATTRN would appear as follows: PATTRN SSXP / +X d i r e c t i o n 2 0 0 SSYM / -Y d i r e c t i o n 1 0 SSXM / -X d i r e c t i o n 2 0 0 SSYP / +Y d i r e c t i o n 10 0 / Buffer terminator There i s no l o g i c a l r e s t r i c t i o n on the si z e of PATTRN. _ A zero must be used to in d i c a t e the end of the i n s t r u c t i o n b u f f e r . 66 APPENDIX I I I The IOT i n s t r u c t i o n s f o r the s p e c i a l hardware are l i s t e d below. Mnemonic Code Description STCL 707042 S t a r t remote scan of d i s s e c t o r . SPCL 707021 Stop remote scan of di s s e c t o r . LDX 707002 Load X coordinate of dis s e c t o r from the accumulator (10 b i t s ) . LDY 707022 Load Y coordinate of dis s e c t o r from the accumulator (10 b i t s ) . ADCV 707041 Start A/D conversion on dis s e c t o r s i g n a l . ADSF 707061 Skip i f dissector A/D conversion i s done. ADRB 707076 Read r e s u l t of the dissector A/D conversion i n t o the accumulator (6 b i t s ) . SSXP 707202 Step the stage i n the X p o s i t i v e d i r e c t i o n (10 micron step). SSXM 707241 Step the stage i n the X negative d i r e c t i o n . SSYP 707204 Step the stage i n the Y p o s i t i v e d i r e c t i o n . SSYM 707242 Step the stage i n the Y negative d i r e c t i o n . SSKP 707201 Skip i f the scanning stage step i s done. FCW 707264 Step the focus motor clockwise. FCCW 707262 Step the focus motor counterclockwise. FSKP 707261 Skip i f the focus motor step i s done. LMUX 707244 Load j o y s t i c k multiplexer channel from the accumulator (3 b i t s - 8 channels) . JSTR 707224 Sta r t A/D conversion of j o y s t i c k s i g n a l . JDNE 707221 Skip i f j o y s t i c k A/D conversion i s done. JGET 707222 Read r e s u l t of j o y s t i c k A/D conversion i n t o the accumulator (6 b i t s ) . 67 REFERENCES 1. Young, Ian T., "The C l a s s i f i c a t i o n of White Blood C e l l s " , IEEE Transactions on Biomedical Engineering, Vol. BME-19, No. 4, pp. 291-298, J u l y , 1972. 2. Saunders, Alex M., "Development of Automation of D i f f e r e n t i a l Counts by use of Cytochemistry", C l i n i c a l Chemistry, V o l . 18, No. 8, pp. 783-788, August, 1972. 3. Dacie, J . C , Lewis, S.M., P r a c t i c a l Haematology, J . & A. C h u r c h i l l Ltd., London, 1968. 4. Young, Ian T., "Automatic Leukocyte Recognition", Automated C e l l I d e n t i f i c a t i o n and C e l l Sorting, Academic Press, New York, 1970. 5. Weid, George L., Bahr, Gunther F., B a r t e l s , Peter H., "Automatic Analysis of C e l l Images by Tic a s " , Automated C e l l I d e n t i f i c a t i o n and C e l l Sorting, Academic Press, New York, 19 70. 6. Ledley, R.S., "Automatic Pattern Recognition for C l i n i c a l Medicine", Proceedings of IEEE, Vol. 57, No. 11, pp. 2007-2020, November, 1969. 7. S t e i n , P.G., L i p k i n , L.E., Shapiro, H.M., "Spectre I I : A General Purpose Microscope Input for a Computer", Science, V o l . 166, No. 3903,. pp. 328-335, October, 1969. 8. Cossalter, John G., "A Computer Visual-Input System for the Auto- matic Recognition of Blood C e l l s " , M.A.Sc. Thesis, The University of B r i t i s h Columbia, Department of E l e c t r i c a l Engineering, 1970. 9. Eberhardt, E.H., "Noise i n Image Dissector Tubes", Research Memo No. 337, I.T.T. I n d u s t r i a l Laboratories, Indiana, 1960. 10. Eberhardt, E.H., "Singal-to-Noise Ratio i n Image Dissectors", Research Memo No. 386, I.T.T. I n d u s t r i a l Laboratories, Indiana, 1960. 11. Hardy, Arthur C , Pe r r i n , Fred H., The P r i n c i p l e s of Optics, McGraw- H i l l Book Company, Inc., New York, 1932. 12. Mendelsohn, Mortimer L., Mayall, Brian H., "Computer Oriented Analysis of Human Chromosones - I I I . Focus", Computers i n Biology and Medicine, V o l . 2, pp. 137-150, October, 1972. 13. Young, Ian T., " B i o l o g i c a l Image Processing - Automated Leukocyte Recognition", M.I.T. Quarterly Progress Report, No. 89, A p r i l , 1968. 14. MacGregor, R.C., Scott, R.W., Loh, G.L., "The D i f f e r e n t i a l Leukocyte Count", Journal of Pathology and Bacteriology, V o l . 51, pp. 337-368, 1940. 68 15. Bennett, John R., "On the Measurement of the Curvature of the Boundaries of Two-Dimensional Quantized Shapes", Ph.D. Thesis, The University of B r i t i s h Columbia, Department of E l e c t r i c a l Engi- neering, January, 1972. 16c Ingram, M., "The Perkin-Elmer Instrument for Automatic Analysis of Blood C e l l Images", C l i n i c a l Chemistry Newsletter, V o l . 4, Mo. 2, pp. 33-37, Winter, 19 72. 17. The Larc System by Corning, pamphlet d i s t r i b u t e d by Corning S c i e n t i - f i c Instruments, May, 1973. 18. L i , Jerome C.R., S t a t i s t i c a l Inference, Edwards Brother, Inc., Michigan, 1969.

Cite

Citation Scheme:

    

Usage Statistics

Country Views Downloads
China 9 4
United States 2 2
France 1 0
City Views Downloads
Beijing 9 4
Unknown 1 0
Redmond 1 0
Ashburn 1 0

{[{ mDataHeader[type] }]} {[{ month[type] }]} {[{ tData[type] }]}

Share

Share to:

Comment

Related Items