Binary images, as discussed in the preceding chapter, consist of groups of pixels selected on

Size: px
Start display at page:

Download "Binary images, as discussed in the preceding chapter, consist of groups of pixels selected on"

Transcription

1 7 Processing Binry Imges Binry imges, s discussed in the preceding chpter, consist of groups of pixels selected on the sis of some property. The selection my e performed y thresholding rightness vlues, perhps using severl grey scle imges contining different color nds, or processed to extrct texture or other informtion. The gol of inriztion is to seprte fetures from ckground, so tht counting, mesurement, or mtching opertions cn e performed. As shown y the exmples in Chpter 6, however, the result of the segmenttion opertion is rrely perfect. For imges of relistic complexity, even the most elorte segmenttion routines misclssify some pixels s foreground or ckground. These my either e pixels long the oundries of regions or ptches of noise within regions. The mjor tools for working with inry imges fit rodly into two groups: Boolen opertions, for comining imges, nd morphologicl opertions which modify individul pixels within imges. Boolen opertions In the section on thresholding color imges, in Chpter 6, Boolen opertion ws introduced to comine the dt from individul color plne imges. Setting thresholds on rightness vlues in ech of the RGB (red, green, lue) plnes llows pixels to e selected tht fll into those rnges. This technique produces three inry imges, which cn then e comined with logicl AND opertion. The procedure exmines the three imges pixel y pixel, keeping pixels for the selected regions if they re turned on in ll three imges. The color thresholding exmple is n exmple of sitution in which pixel rightness vlues t the sme loction in severl different imges (the color chnnels) must e compred nd comined. In some situtions it is useful to compre the loction nd rightness vlue of pixels in two imges. Figure 1 shows n exmple. Two x-ry mps of the sme re on minerl smple show the intensity distriutions, nd hence represent the concentrtion distriutions for luminum nd silicon. A colocliztion plot uses the pixel rightness vlues for ech loction in oth imges s coordintes nd increments the plot. Regions in the resulting plot tht hve mny counts represent comintions of elementl concentrtions in the originl smple. In the exmple plot, there re four phses present sed on Si/Al comintions, nd these cn e oserved in the originl imges. Colocliztion is lso used for iologicl smples prepred with multiple stins.

2 Figure 1. Colocliztion: (, ) x-ry mps showing the intensity distriution for Al nd Si in minerl; (c) colocliztion plot. c When colocliztion plot shows specific comintions of intensity vlues tht re shre the sme loction, ech imge cn e thresholded nd the two inry imges comined with n AND to produce n imge of the selected regions. Note: The terminology used here will e tht of ON (pixels tht re prt of the selected foreground fetures) nd OFF (the remining pixels, which re prt of the ckground). There is no universl stndrd for whether the selected pixels re displyed s white, lck, or some other color. In mny cses, systems tht portry the selected regions s white on lck ckground on the disply screen my reverse this nd print hrdcopy of the sme imge with lck fetures on white ckground. This reversl pprently rises from the fct tht in ech cse, the selection of foreground pixels is ssocited with some positive ction in the disply (turning on the electron em) or printout (depositing ink on the pper). It seems to cuse most users little difficulty, provided tht something is known out the imge. Mny of the imges used here re not common ojects nd some re mde-up exmples; therefore, it is importnt to e consistent in defining the foreground pixels (those of interest) in ech cse. The convention used here is tht ON pixels (fetures) re shown s lck while OFF pixels (ckground) re white. Returning to our desire to comine the informtion from severl imge plnes, the AND opertion requires tht pixel t loction i,j e ON in ech individul plne to show up in the result. Pixels hving the correct mount of lue ut not of red will e omitted, nd vice vers. As noted previously, this mrks out rectngle in two dimensions, or rectngulr prism in higher dimensions, for the pixel vlues to e included. More complicted comintions of color vlues cn e descried y delineting n irregulr region in n dimensions for pixel selection. The dvntge of simply ANDing discrete rnges is tht it cn e performed very efficiently nd quickly using inry imges.

3 Other Boolen logicl rules cn e employed to comine inry imges. The four possiilities re AND, OR, Ex-OR (Exclusive OR) nd NOT. Figure 2 illustrtes ech of these sic opertions. Figure 3 shows few of the possile comintions. All re performed pixel-y-pixel. The illustrtions re sed on comining two imges t time, ecuse ny logicl rule involving more thn two imges cn e roken down to series of steps using just two t time. The illustrtions in the figures re identicl to the Venn digrms used in logic. As descried previously, AND requires tht pixels e ON in oth of the originl imges in order to e ON in the result. Pixels tht re ON in only one or the other originl imge re OFF in the result. The OR opertor turns pixel ON in the result if it is ON in either of the originl imges. In the exmple shown in Figure 32 of Chpter 6, complementry directions nd thus grey-scle vlues, result from the Soel direction opertor s it encounters opposite sides of ech strition. Thresholding ech direction seprtely would require n OR to comine them to show the correct regions. Ex-OR turns pixel ON in the result if it is ON in either of the originl imges, ut not if it is ON in oth. Tht mens tht comining (with n OR) the results of ANDing together two imges with those from Ex-ORing them produces the sme result s n OR in the first plce. There re, in fct, mny wys to rrnge different comintions of the four Boolen opertors to produce identicl results. Figure 2. Simple Boolen opertions: (, ) two inry imges; (c) A OR B; (d) A AND B; (e) A exor B; (f) NOT A. c d e f

4 Figure 3. Comined Boolen opertions: () (NOT A) AND B; () A AND (NOT B); (c) (NOT A) AND (NOT B); (d) NOT (A AND B); (e) (NOT A) OR B; (f) A OR (NOT B) c d e f AND, OR, nd Ex-OR require two originl imges nd produce single imge s result. NOT requires only single imge. It simply reverses ech pixel, turning pixels tht were ON to OFF nd vice vers. Some systems implement NOT y swpping lck nd white vlues for ech pixel. As long s we re deling with pixel-level detil, this works correctly. Lter, when feture-level comintions re descried, the difference etween n eight-connected feture nd its four-connected ckground (discussed in Chpter 6) will hve to e tken into ccount. Given two inry imges A nd B, the comintion (NOT A) AND B will produce n imge contining pixels tht lie within B ut outside A. This is quite different from NOT (A AND B), which selects pixels tht re not ON in oth A nd B. It is lso different from A AND (NOT (B)), s shown in Figure 3. The order of opertors is importnt nd the lierl use of prentheses to clrify the order nd scope of opertions is crucil. Actully, the four opertions discussed previously re redundnt. Three would e enough to produce ll of the sme results. Consequently, some systems my omit one of them (usully Ex-OR). For simplicity, however, ll four will e used in the exmples tht follow.

5 Comining Boolen opertions When multiple criteri re ville for selecting the pixels to e kept s foreground, they my e comined using ny of these Boolen comintions. The most common situtions re multind imges, such s produced y stellite or scnning electron microscope (SEM). In the cse of the SEM, n x-ry detector is often used to crete n imge (clled n x-ry dot mp) showing the sptil distriution of selected element. These imges my e quite noisy (Chpter 3) nd difficult to threshold (Chpter 6); however, y suitle long-term integrtion or sptil smoothing, they cn led to useful inry imges tht indicte loctions where the concentrtion of the element is ove some user-selected level. This selection is usully performed y compring the mesured x-ry intensity to some ritrry threshold, since there is finite level of ckground signl resulting from the process of slowing down the electrons in the smple. The physicl ckground of this phenomenon is not importnt here. The very poor sttisticl chrcteristics of the dot mp (hence the nme) mke it difficult to directly specify concentrtion level s threshold. The x-ry intensity in one prt of the imge my vry from nother region for the following resons: 1. A chnge in tht element s concentrtion 2. A chnge in nother element tht selectively sors or fluoresces the first element s rdition 3. A chnge in specimen density or surfce orienttion. Comprison of one specimen to nother is further hmpered y the difficulty in exctly reproducing instrument conditions. These effects ll complicte the reltionship etween elementl concentrtion nd recorded intensity. Furthermore, the very poor sttistics of the imges (due to the extremely low efficiency for producing x-rys with n electron em nd the low em intensity required for good sptil resolution in SEM imges) men tht these imges often require processing, either s grey-scle imges (e.g., smoothing) or fter inriztion (using the morphologicl tools discussed elow). For our present purpose, we will ssume tht inry imges showing the sptil distriution of some meningful concentrtion level of severl elements cn e otined. As shown in Figure 4, the SEM lso produces more conventionl imges using secondry or ckscttered electrons. These hve superior sptil resolution nd etter feture shpe definition, ut with less elementl specificity. The inry imges from these sources cn e comined with the x-ry or elementl informtion. Figure 5 shows one exmple: The x-ry mps for iron (Fe) nd silicon (Si) were otined y smoothing nd thresholding the grey scle imge. Notice tht in the grey scle imges, there is just-discernile difference in the intensity level of the Fe x-rys in two different res. This is too smll difference for relile thresholding. Even the lrger differences in Si intensity re difficult to seprte, however, Boolen logic esily comines the imges to produce n imge of the region contining Fe ut not Si. Figure 6 shows nother exmple from the sme dt. The regions contining silver (Ag) re generlly right in the ckscttered electron imge, ut some other res re lso right. On the other hnd, the Ag x-ry mp does not hve precise region oundries ecuse of the poor sttistics. Comining the two inry imges with n AND produces the desired regions. More complicted sequences of Boolen logicl opertions cn esily e imgined (Figure 7). It is strightforwrd to imgine complex specimen contining mny elements. Pint pigment prticles with diverse rnge of compositions provide one exmple. In order to count or mesure prticulr clss of prticles (pigments, s opposed to righteners or extenders), it might e necessry to specify those contining iron or chromium or luminum, ut not titnium or sulfur. This would e written s

6 (Fe OR Cr OR Al) AND (NOT (Ti OR S)) (1) The resulting imge might then e comined with higher-resolution inry produced y thresholding secondry or ckscttered electron imge to delinete prticle oundries. Performing these opertions cn e cumersome ut is not difficult. Most of the exmples shown in erlier chpters tht used multiple imge plnes (e.g., different colors or elements) or different processing opertions (e.g., comining rightness nd texture) use Boolen AND to comine the seprtely thresholded inry imges. The AND requires tht the pixels meet ll of the criteri in order to e kept. There re some cses in which the Boolen OR is more pproprite. One is illustrted in Chpter 4, Figure 81. This is n imge of snd grins in sndstone, viewed through polrizers. Ech rottion of the nlyzer cuses different grins to e- Figure 4. SEM results from minerl: () ckscttered electrons; () secondry electrons; (c) silicon (Si) x-ry mp; (d) iron (Fe) x-ry mp; (e) copper (Cu) x-ry mp; (f) silver (Ag) x-ry mp. c d e f Figure 5. () Iron; () iron AND NOT silicon

7 c Figure 6. () Silver; () right levels from ckscttered electron imge; (c) imge AND imge. Figure 7. Further comintion to delinete structure: (Cu OR Ag) AND NOT (Fe). come right or colored. In the erlier chpter, it ws shown tht keeping the rightest pixel vlue t ech loction s the nlyzer is rotted gives n imge tht shows ll of the grins. Figure 8 shows n lterntive pproch to the sme prolem. Ech individul imge is thresholded to select those grins tht re right for tht prticulr nlyzer rottion ngle. Then, ll of the inry imges re comined using Boolen OR. The resulting comintion delinetes most of the grins, lthough the result is not s good s the grey-level opertion for the sme numer of nlyzer rottions. Msks The previous description of using Boolen logic to comine imges mkes the ssumption tht oth imges re inry (tht is, lck nd white). It is lso possile to use inry imge s msk to modify grey-scle imge. This is most often done to lnk out (i.e., set to ckground) some portion of the grey-scle imge, either to crete disply in which only the regions of interest re visile or to select regions whose rightness, density, nd so forth re to e mesured. Figure 9 shows n exmple ( protein seprtion gel) in which the drk spots re isolted y thresholding, nd then the thresholded inry imge is pplied s msk to produce seprted fetures for mesurement tht retin the originl density vlues. This opertion cn e performed in severl physicl wys. The inry msk cn e used in n overly, or lph chnnel, in the disply hrdwre to prevent pixels from eing displyed. It is lso possile to use the msk to modify the stored imge. This cn done y multiplying the grey-scle imge y the inry imge, with the convention tht the inry imge vlues re 0 (OFF) or 1 (ON) t ech pixel. In some systems this result is implemented y comining the grey-scle nd inry imges to keep whichever vlue is drker or righter. For instnce, if the msk is white for ckground nd lck for foreground pixels then the righter pixel vlues t ech loction will erse ll ckground pixels nd keep the grey vlue for the foreground pixels. This cpility hs een used in erlier chpters to disply the results of vrious processing nd thresholding opertions. It is esier to judge the performnce of thresholding y viewing selected

8 c d Figure 8. Comining multiple inry imges. (, ) inry imges otined y thresholding two of the polrized light imges of petrogrphic thin section of sndstone (Figure 81 in Chpter 4); (c) the result of ORing together six such imges from different rottions of the nlyzer; (d) comprison inry imge produced y thresholding the grey scle imge otined y comining the sme six color imges to keep the rightest pixel t ech loction. pixels with the originl grey-scle informtion, rther thn just looking t the inry imge. This formt cn e seen in the exmples of texture opertors in Chpter 4, for instnce, s well s in Chpter 6 on Thresholding. It is lso useful to use msk otined y thresholding one version of n imge to view nother version. Figure 10 shows n exmple, in which vlues represent the orienttion ngle (from the Soel derivtive) of grin oundries in the luminum lloy re msked y thresholding the mgnitude of the grdient to isolte only the oundries. c Figure 9. Preserving feture intensity vlues: () originl 2D gel; () thresholded spots; (c) msked imge in which pixels within the spots retin their originl rightness vlues.

9 c Figure 10. Msking one imge with nother. The direction of Soel grdient pplied to the light microscope imge of n luminum lloy is shown only in the regions where the mgnitude of the grdient is lrge. Another use of msking nd Boolen imge comintion is shown in Figure 11. An essentilly cosmetic ppliction, it is still useful nd widely employed. A lel superimposed on n imge using either lck or white my e difficult to red if the imge contins full rnge of rightness vlues. In this exmple, the lel is used to crete msk tht is one pixel lrger in ll directions, using diltion (discussed lter in this chpter). This msk is then used to erse the pixels in the greyscle imge to white efore writing in the lel in lck (or vice vers). The result mintins legiility for the lel while oscuring minimum mount of the imge. Finlly, inry imge msk cn e used to comine portions of two (or more) grey-scle imges. This is shown in Figure 12. The composite imge represents, in very simple wy, the kind of imge overlys nd comintions common in printing, dvertising, nd commercil grphic rts. Although it is rrely suitle for scientific pplictions, this exmple will perhps serve to remind us tht modifying imges to crete things tht re not rel hs ecome reltively esy with modern computer technology. This justifies certin skepticism in exmining imges, which were once considered iron-cld evidence of the truth. Detecting forgeries in digitl imges cn e quite difficult if constructed with enough skill (Russ, 2001). From pixels to fetures The Boolen opertions descried ove del with individul pixels in the imge. For some purposes it is necessry to identify the pixels forming prt of connected whole. As discussed in Chpter 6, it is possile to dopt convention for touching tht is either eight-connected or c Figure 11. Using msk to pply lel to n imge. The originl imge contins oth white nd lck res, so tht simple superimposition of text will not e visile. A msk is creted y dilting the lel nd Ex-ORing tht with the originl. The composite is then superimposed on the grey-scle imge.

10 Figure 12. Hudsonin Godwits serching for nesting site on n SEM imge of n lumin frcture surfce. four-connected for the pixels in single feture (sometimes referred to s lo to indicte tht no interprettion of the connected group of pixels hs een inferred s representing nything specific in the imge). Whichever convention is dopted, grouping pixels into fetures is n importnt step (Levildi, 1992; Ritter, 1996). It is possile to imgine strting with one pixel (ny ON pixel, selected t rndom) nd checking its four- or eight-neighor positions, leling ech pixel tht is ON s prt of the sme feture, nd then itertively repeting the opertion until no neighors remin. Then new unleled pixel would e chosen nd the opertion repeted, continuing until every ON pixel in the imge ws leled s prt of some feture. The usul wy of proceeding with this deeply recursive opertion is to crete stck to plce pixel loctions s they re found to e neighors of lredy leled pixels. Pixels re removed from the stck s their neighors re exmined. The process ends when the stck is empty. It is more efficient to del with pixels in groups. If the imge hs lredy een run-length or chord encoded, s discussed in Chpter 6, then ll of the pixels within the chord re known to touch, touching ny of them is equivlent to touching ll, nd the only cndidtes for touching re those on djcent lines. This fct mkes possile very strightforwrd leling lgorithm tht psses one time through the imge. Ech chord s end points re compred to those of chords in the preceding line; if they touch or overlp (sed on simple comprison of vlues), the lel from the preceding line is ttched to this chord. If not, then new lel is used. If chord touches two chords in the previous line tht hd different lels, then the two lels re identified with ech other (this hndles the ottom of letter U for exmple). All of the occurrences of one lel cn e chnged to the other, either immeditely or lter. When the pss through the imge or the list of chords is complete, ll of the chords, nd therefore ll of the pixels, re identified nd the totl numer of lels (nd therefore fetures) is known. Figure 13 shows this logic in the form of flow chrt. For oundry representtion (including the specil cse of chin code), the nlysis is prtilly complete, since the oundry lredy represents closed pth round feture. If fetures contined no holes nd no feture could ever e surrounded y nother, this would provide complete informtion. Unfortuntely, this is not lwys the cse. It is usully necessry to reconstruct the pixel rry to identify pixels with feture lels (Kim et l., 1988). In ny cse, once the individul fetures hve een leled, severl dditionl Boolen opertions re possile. One is to find nd fill holes within fetures. Any pixel tht is prt of hole is defined s OFF (i.e., prt of the ckground) nd is surrounded y ON pixels. For oundry representtion, tht mens the pixel is within oundry. For pixel representtion, it mens it is not connected to other pixels tht eventully form pth to the edge of the field of view. Reclling tht the convention for touching (eight- or four-connectedness) must e different for the ckground thn for the foreground, we cn identify holes most esily y inverting the imge

11 Next Chord Figure 13. Flow chrt for grouping touching pixels in run-length or chord-encoded rry into fetures nd ssigning ID numers. Y Do ends overlp ny chord in the previous line? N Assign Old Feture ID# Assign New Feture ID# N Do ends overlp ny more chords in the previous line? Y Y Does previous chord hve the sme ID# N Chnge Old ID# to New ID # (replcing white with lck nd vice vers) nd leling the resulting pixels s though they were fetures, s shown step-y-step in Figure 14. Fetures in this inverted imge tht do not touch ny side of the field of view re the originl holes. If the pixels re dded ck to the originl imge (using Boolen OR), the result is to fill ny internl holes in the originl fetures. One very simple exmple of the ppliction of this technique is shown in Figure 15. In this imge of sphericl prticles, the center of ech feture hs rightness very close to tht of the sustrte due to the lighting. Thresholding the rightness vlues gives good delinetion of the outer oundry of the prticles, ut the centers hve holes. Filling them s descried produces corrected representtion of the prticles, which cn e mesured. This type of processing is commonly required for SEM imges, whose rightness vries s function of locl surfce slope so tht prticles frequently pper with right edges nd drk centers. This prolem is not restricted to convex surfces nor to the SEM. Figure 16 shows light microscope imge of sphericl pores in n enmel coting. The light spots in the center of mny of the pores vry in rightness, depending on the depth of the pore. They must e corrected y filling the fetures in thresholded inry imge. Figure 17 shows more complicted sitution requiring severl opertions. The SEM imge shows the oundries of the spores clerly to humn viewer, ut they cnnot e directly reveled y thresholding ecuse the shdes of grey re lso present in the sustrte. Applying n edge-finding lgorithm (in this exmple, Frei nd Chen opertor) delinetes the oundries, nd it is then possile to threshold them to otin feture outlines, s shown. These must e filled using the method descried ove. Further opertions re then needed efore mesurement: erosion, to remove the other thresholded pixels in the imge, nd wtershed segmenttion, to seprte the touching ojects. Both re descried lter in this chpter. The use of edge-enhncement routines, discussed in Chpter 4, is often followed y thresholding the outlines of fetures nd then filling in the interior holes. In some situtions, severl different methods must e used nd the informtion comined. Figure 18 shows very difficult exmple,

12 Figure 14. Light microscope imge of red lood cells: () originl; () thresholded, which shows the thicker outer edges of the lood cells ut not the thinner centrl regions; (c) imge inverted; (d) removing the edge-touching ckground from imge c; (e) comining the fetures in imge d with those in imge using Boolen OR; (f) removing smll fetures (dirt), edge-touching fetures (which cnnot e mesured), nd seprting touching fetures in e. c d e f c Figure 15. Imge of uckshot with ner-verticl incident illumintion; () originl grey-scle imge; () rightness thresholded fter leveling illumintion; (c) internl holes filled nd smll regions (noise) in ckground removed y erosion.

13 Figure 16. Light microscope imge of polished section through n enmel coting on steel (courtesy V. Benes, Reserch Institute for Metls, Pnenské Brezny, Czechoslovki) shows right spots of reflected light within mny pores (depending on their depth). Figure 17. Segmenttion of n imge using multiple steps: () originl SEM imge of spores on glss slide; () ppliction of Frei nd Chen edge opertor to imge ; (c) thresholding of imge ; (d) filling of holes in the inry imge of the edges; (e) erosion to remove the extrneous pixels; in imge d; (f) wtershed segmenttion to seprte touching fetures in imge e. c d e f Figure 18. Section through n epoxy resin contining ules. To delinete the ules for mesurement, the right, drk, nd outlined pores must e processed in different wys nd the results comined with Boolen OR.

14 c Figure 19. Mesurement of lyer thickness: () pint lyer viewed in cross section; () thresholded lyer, with superimposed grid of verticl lines; (c) AND of lines with lyer producing line segments for mesurement. ules in epoxy resin. Some of the concve pores re drk, some light, nd some ounded y right edge. Processing nd thresholding ech type of pore nd then comining the results with Boolen OR produces n imge delineting ll of the pores. The Boolen AND opertion is lso widely used to pply mesurement templtes to imges. For instnce, consider the mesurement of coting thickness on wire or plte viewed in cross section. In the exmples of Figures 19 nd 20, the lyer cn e redily thresholded, ut it is not uniform in thickness. In order to otin series of discrete thickness vlues for sttisticl interprettion, it is esy to AND the inry imge of the coting with templte or grid consisting of lines norml to the coting. These lines cn e esily mesured. In Figure 19, for the cse of coting on flt surfce, the lines re verticl. For cylindricl structure such s similr coting on wire, or the wll thickness of tue, set of rdil lines cn e used. In the exmple of Figure 20, the vein is pproximtely circulr in cross section nd the lines do not perpendiculrly intersect the wll, introducing cosine error in the mesurement which my or my not e cceptle. Tht the cross section is not round my indicte tht the section plne is not perpendiculr to the vein xis, which would introduce nother error in the mesurement. The mesurement of three-dimensionl structures from two-dimensionl section imges is delt with y stereologicl techniques discussed in more detil in Chpter 8. Figure 21 illustrtes sitution in which the length of the lines give the lyer thickness indirectly, requiring stereologicl interprettion. The imge shows section plne through coted prticles c Figure 20. Mesurement of lyer thickness: () cross section of vein in tissue; () thresholded wll with superimposed grid of rdil lines; (c) AND of lines with lyer producing line segments for mesurement (note the cosine errors introduced y non-perpendiculr lignment of grid lines to wll).

15 c Figure 21. Mesuring coting thickness on prticles: () originl grey-scle imge of rndom section through emedded, coted prticles; () thresholded inry imge of the coting of interest with superimposed grid of rndom lines; (c) AND of the lines with the coting producing line segments for mesurement. emedded in metllogrphic mount nd polished. The section plne does not go through the center of the prticles, so the coting ppers thicker thn the ctul three-dimensionl thickness. This is hndled y plcing grid of rndom lines in the templte. The distriution of line intercept lengths is relted to tht of the coting thickness in the norml direction. The verge of the inverse intercept lengths is two-thirds the inverse of the true coting thickness, so this vlue cn e otined even if the imge does not include perpendiculr cross section through the coting. Selection of n pproprite grid is crucil to the success of mesurements. Chpter 8 discusses the principl stereologicl mesurements mde on microstructures, to determine the volumes, surfce res, lengths, nd topologicl properties of the components present. Mny of these procedures re performed y counting the intersections mde y vrious grids with the structures of interest. The grids typiclly consist of rrys of points or lines, nd the lines used include regulr nd rndom grids of stright lines, circulr rcs nd cycloids, depending on the type of mesurement desired, nd the procedure used to select nd prepre the specimens eing imged. In ll cses, if the imge cn e thresholded successfully to delinete the structure, then Boolen AND with the pproprite grid produces result tht cn e mesured. In some situtions this requires mesuring the lengths of lines, nd in others simply counting the numer of intersections produced. Even for very complex or sutle imges for which utomtic processing nd thresholding cnnot delinete the structures of interest, the superimposition of grids s msk my e importnt. Mny stereologicl procedures tht require only counting of intersections of vrious types of grids with fetures of interest re extremely efficient nd cple of providing unised estimtes of vlule structurl prmeters. Comining imge cpture nd processing to enhnce the visiility of structures with overlys of the pproprite grids rrys of points or lines, the ltter including stright lines, circles nd cycloids llows the humn user to recognize the importnt fetures nd intersections (Russ, 1995). The counting my e performed mnully or the computer my lso ssist y tllying mouse-clicks or counting mrks tht the user plces on the imge. The comintion of humn recognition with computer ssistnce provides efficient solutions to mny imge nlysis prolems. Boolen logic with fetures Hving identified or leled the pixel groupings s fetures, it is possile to crry out Boolen logic t the feture level, rther thn t the pixel level. Figure 22 shows the principle of feture-sed AND. Insted of simply keeping the pixels tht re common to the two imges, entire fetures re kept if ny prt of them touches. This preserves the entire feture, so tht it cn e correctly counted or mesured if it is selected y the second imge.

16 Figure 22. Schemtic digrm of feture-sed AND: (, ) test imges; (c) pixel-sed Boolen AND of imges nd ; (d) feture sed AND of imge with imge. c d Feture-AND requires feture leling opertion to e performed on t lest one of the imges to e comined. Touching pixels in one imge re identified s fetures s descried previously. Then ech pixel tht is ON in one of those fetures is checked ginst the second imge. If ny of the pixels in the feture mtch n ON pixel in the second imge, the entire feture in the first imge is copied to the result. This is not the only possile implementtion. It would e eqully possile to check ech pixel in the second imge ginst the first, ut tht is less efficient. The method outlined limits the comprison to those pixels which re on, nd hlts the test for ech feture whenever ny pixel within it is mtched. Notice tht unlike the more common pixel sed AND, this sttement does not commute; this mens tht (A Feture-AND B) does not produce the sme result s (B Feture-AND A), s illustrted in Figure 23. The use of NOT with Feture-AND is strightforwrdly implemented, for instnce y crrying out the sme procedure nd ersing ech feture in the first imge tht is mtched y ny pixel in the second. However, there is no need for Feture-OR sttement, since this would produce the identicl result s the conventionl pixel-sed OR. One use for the Feture-AND cpility is to use mrkers within fetures to select them. For exmple, these might e cells contining stined orgnelle or fiers in composite contining chrcteristic core. In ny cse, two inry imges re produced y thresholding. In one imge, the entire fetures re delineted, nd in the second the mrkers re present. Applying the Feture- AND logic then selects ll of the fetures which contin mrker. This use of mrkers to select fetures is prticulrly vlule cpility in n imge nlysis system. Figure 24 illustrtes one wy tht it cn e used. The originl imge hs severl red fetures, only some of which contin drker regions within. If one copy of the imge is thresholded

17 Figure 23. Feture-sed Boolen logic used to comine two test imges (, ): (c) Feture-AND ; (d) Feture-AND. c d Figure 24. Exmple of feture selection using mrkers. The red fetures nd the drk spots in the originl imge re thresholded to produce seprte inry imges nd c. The drk spots re used s mrkers to select those red fetures which contin drk mrkers d. c d

18 Figure 25. Appliction of Feture-AND: () originl imge of cells with stined nuclei; () nuclei thresholded sed on green intensity; (c) cells thresholded sed on red intensity; (d) Feture-AND result showing only those cells contining green-stined nuclei; (e) outlines of fetures from imge d superimposed on originl. c d e for drk spots nd second copy is thresholded for red fetures, then the first cn e used s set of mrkers to select the fetures of interest. A Feture-AND cn e used to perform tht opertion. In rel pplictions the mrker imge tht selects the fetures of interest my e otined y seprte thresholding, y processing, or y using nother plne in multiplne imge. Figure 25 shows n exmple. Only those cells contining green-stined nuclei re selected, ut they re selected in their entirety so tht they cn e mesured. A relted procedure tht uses the Feture- AND cpility is the use of the nucletor (Gundersen et l., 1988), stereologicl tool tht counts cells in thin sections of tissue ccording to the presence of unique mrker within the cell such s the nucleus. At very different scle, the method might e used with eril photogrphs to select nd mesure ll uilding lots tht contin ny uildings, or fields tht contin nimls. The technique cn lso e used with x-ry imges to select prticles in SEM imges, for instnce, if the x-ry signl comes only from the portion of the prticle which is visile to the x-ry detector. The entire prticle imge cn e preserved if ny prt of it genertes n identifying x-ry signl. Feture-AND is lso useful for isolting fetures tht re prtilly within some region, or djcent to it. For exmple, in Figure 26 the colonies contin cteril cells tht re to e counted nd mesured, ut some of them extend eyond the oundries of the colony. The logic of Feture-AND llows them to e ssigned to the pproprite colony nd counted, nd not to e counted more thn once if they exit nd re-enter the region. And in Figure 27 the outline of region hs een generted (using diltion s discussed elow) nd used s mrker to select fetures tht re djcent to the sustrte, so tht they cn e mesured.

19 Figure 26. Colony counting: () imge representing colonies of cteril cells, some of which extend eyond the stined re; () counted results showing the numer of cells in ech colony. Figure 27. Identifying djcent fetures: () imge showing cross-section of lue sustrte with some ornge fetures touching it; () thresholded sustrte; (c) pixels immeditely djcent to the sustrte, produced y dilting nd Ex-ORing; (d) ornge fetures; (e) Feture-AND of imge c with imge d; (f) fetures identified in imge e superimposed on the originl. c d e f

20 Selecting fetures y loction In generliztion of the method for identifiction of touching fetures shown in Figure 27, Feture-AND is lso useful when pplied in conjunction with imges tht mp regions ccording to distnce. We will see elow tht dilting line, such s grin oundry or cell wll, cn produce rod line of selected thickness. Using this line to select fetures tht touch it selects those fetures which, regrdless of size or shpe, come within tht distnce of the originl oundry. Counting these for different thickness lines provides wy to clssify or count fetures s function of distnce from irregulr oundries. Figure 28 shows n exmple nd Figure 29 shows n ctul imge of grin-oundry depletion. Figure 30 shows similr sitution in which pixel-sed AND is pproprite. The imge shows metllurgicl cross-section of plsm-spryed coting pplied to turine lde. There is lwys certin mount of oxide present in such cotings, which in generl cuses no difficulties; ut if the oxide, which is redily identifile shde of grey, is preferentilly situted t the coting-sustrte interfce, it cn produce region of wekness tht my frcture nd cuse splling of the coting. Thresholding the imge to select the oxide, then ANDing this with the line representing the interfce (itself otined y thresholding the metl sustrte phse, dilting, nd Ex-ORing to get the custer, discussed more extensively lter in this chpter) gives direct mesurement of the contminted frction of the interfce. An perture or msk imge cn e used to restrict the nlysis of second imge to only those res within the perture. Consider counting spots on lef: either the spots re due to n eril sprying opertion to ssess uniformity of coverge, or perhps they re spots of fungus or mold to ssess the extent of disese. The cquired imge is normlly rectngulr, ut the lef is not. There my well e regions outside the lef tht re similr in rightness to the spots. Creting inry imge of the lef, then Feture-ANDing it with the totl imge selects those spots lying on the Figure 28. Comprison of pixel- nd feture- AND: () digrm of n imge contining fetures nd oundry; () the oundry line, mde thicker y diltion; (c) pixel-sed AND of imge nd (incomplete fetures nd one divided into two prts); (d) feture-and of imges nd (ll fetures within specified distnce of the oundry). c d

21 Figure 29. Light microscope imge of polished section through steel used t high temperture in oiler tues. Notice the depletion of crides (lck dots) in the region ner grin oundries. This effect cn e mesured using procedures descried in the text. Figure 30. Isolting the oxide in coting/sustrte oundry: () originl grey-scle microscope imge of cross section of the plsm-spryed coting on steel; () thresholding of the metl in the coting nd the sustrte; (c) pplying erosion nd diltion (discussed lter in this chpter) to imge to fill holes nd remove smll fetures; (d) oundry line produced y dilting imge c nd Ex-ORing with the originl; (e) thresholding the oxide in the coting, including tht lying in the interfce; (f) pixel-sed AND of imge d with imge, showing just the frction of the interfce which is occupied y oxide. c d e f lef itself. If the spots re smll enough, this could e done s pixel-sed AND; however, if the spots cn touch the edge of the lef, the feture-sed opertion is sfer ecuse systems my not count or mesure edge-touching fetures (s discussed in Chpter 9). Counting cn then provide the desired informtion, normlly expressed s numer-per-unit-re where the re of the lef forms the denomintor. This procedure is similr to the colony-counting prolem in Figure 26.

22 Figure 31 shows nother sitution, in which two different thresholding opertions nd logicl comintion re used to select fetures of interest. The specimen is polished cross section of n enmel coting on steel. The two distinct lyers re different colored enmels contining different size distriutions of sphericl pores. Thresholding the drker lyer includes severl of the pores in the lighter lyer, which hve the sme rnge of rightness vlues, ut the lyer cn e selected y discrding fetures tht re smll or do not touch oth edges of the field. This imge then forms msk tht cn e used to select only the pores in the lyer of interest. Similr logic cn e employed to select the pores in the light lyer. Pores long the interfce will generlly e included in oth sets, unless dditionl feture-sed logic is employed. A similr ppliction llows identifying grins in ores tht re contined within other minerls, for instnce, to determine the frction tht re locked within hrder mtrix tht cnnot esily e recovered y mechnicl or chemicl tretment, s opposed to those tht re not so enclosed nd re esily lierted from the mtrix. Figure 31. Selecting pores in one lyer of enmel on steel: () originl light microscope imge (courtesy V. Benes, Reserch Inst. for Metls, Pnenské Brezny, Czechoslovki); () imge thresholded to select drk pixels; (c) discrding ll fetures from imge tht do not extend from one side to the other leves just the lyer of interest; (d) thresholding the originl imge to select only drk pores produces inry imge contining more pores thn those in the lyer; (e) comining imges nd d with Boolen Feture-AND leves only the pores within the drk lyer. c d e

23 A rther different use of feture-sed Boolen logic implements the disector, stereologicl tool discussed in Chpter 8 tht gives n unised nd direct mesure of the numer of fetures per unit volume (Sterio, 1984). It requires mtching fetures in two imges tht represent prllel plnes seprted y distnce T. The fetures represent the intersection of three-dimensionl ojects with those plnes. Those ojects which intersect oth plnes re ignored, ut those which intersect only one plne or the other re counted. The totl numer of ojects per unit volume is then Count N = V 2 Are T where Are is the re of ech of the imges. This method hs the dvntge of eing insensitive to the shpe nd size of the ojects, ut it requires tht the plnes e close enough together tht no informtion is lost etween the plnes. In effect, this mens tht the distnce T must e smll compred to ny importnt dimension of the ojects. When T is smll, most ojects intersect oth plnes. The fetures in those plnes will not correspond exctly, ut re expected to overlp t lest prtilly. In the cse of rnching three-dimensionl oject, oth of the intersections in one plne re expected to overlp with the intersection in the second plne. Of course, since most of the ojects do pss through oth plnes when T is smll, nd only the few tht do not re counted, it is necessry to exmine lrge imge re to otin sttisticlly useful numer of counts. Tht requirement mkes the use of n utomted method sed on the Feture-AND logic ttrctive. The fetures which overlp in the two imges re those which re not counted; therefore, cndidte procedure for determining the vlue of N to e used in the clcultion of numer of ojects per unit volume might e to first count the numer of fetures in ech of the two plne imges (N 1 nd N 2 ). Then, the Feture-AND cn e used to determine the fetures which re present in oth imges, nd count of those fetures (Ncommon) otined, giving (2) N = N1+ N2 2 N common (3) However, this is correct only for the cse in which ech oject intersects ech plne exctly once. For rnching ojects, it will result in n error. A preferred procedure is to directly count the fetures in the two plnes tht re not selected y the Feture-AND. The logicl opertion does not commute, so it is necessry to perform oth opertions: (#1 NOT F-AND #2) nd (#2 NOT F-AND #1), nd count the fetures remining. This is illustrted schemticlly in Figure 32. Figure 33 shows typicl ppliction. The two imges re seprte slices reconstructed from X- ry tomogrphy of sintered cermic smple. Ech imge is thresholded to generte inry imge of prticle intersections. Ech of the Feture-AND opertions is performed, nd the finl imge is the OR comintion showing those fetures tht pper in one (nd only one) of the two slices. It would e pproprite to descrie this imge s feture-sed version of the exclusive- OR opertion etween the two imges. Doule thresholding Another ppliction for Feture-AND logic rises in the thresholding of difficult imges such s grin oundries in mterils or cell oundries in tissue. It is not unusul to hve nonuniform etching or stining of the cell or grin oundries in specimen preprtion. In the exmple of Figure 34, this is due to therml etching of the interiors of the grins. The result is tht direct thresholding of the imge cnnot produce complete representtion of the etched oundries tht does not lso include noise within the grins.

24 Figure 32. Implementtion of the Disector: () two section imges, overlid in different colors to show mtching fetures; () 1 F-AND 2 showing fetures in plne 2 mtched with plne 1; (c) 2 F-AND 1 showing the fetures mtched in the other plne; (d) ORing together the 1 NOT F-AND 2 with 2 NOT F-AND 1 leves just the unmtched fetures in oth plnes tht re to e counted. c d Figure 33. Appliction of the disector to x-ry tomogrphy slices through cermic: () slice 1; () slice 2; (c) inry imge from slice 1; (d) inry imge from slice 2; (e) [#1 NOT Feture-AND #2] OR [#2 NOT Feture-AND #1]. c d e

25 A technique for deling with such situtions hs een descried s doule thresholding y Olsson (1993), ut cn e implemented y using Feture-AND. As illustrted in Figure 34, the procedure is first to threshold the imge to select only the drkest pixels tht re definitely within the etched oundries, even if they do not form complete representtion of the oundries. Then, second inry imge is produced to otin complete delinetion of ll the oundries, ccepting some noise within the grins. In the exmple, vrince opertor ws pplied to copy of the originl imge to increse the contrst t edges. This process llows thresholding more of the oundries, ut lso some of the intr-grin structures. Then morphologicl closing (discussed lter in this chpter) ws pplied to fill in noise within the oundries. The increse in pprent width of the oundries is not importnt, ecuse skeletoniztion (lso discussed in the following section) is used to reduce the oundry lines to minimum width (the ctul grin oundries re only few toms thick). Figure 34. Doule thresholding of grin oundries in lumin: () originl imge; () first thresholding or drk grin oundry mrkers; (c) vrince opertor pplied to originl; (d) second thresholding of imge c for ll oundries plus other mrks; (e) Feture-AND of imge with imge d; (f) closing pplied to e; (g) skeletonized nd pruned oundry overlid on originl. c d e f g

26 The two inry imges re comined with Feture-AND to keep ny feture in the second imge tht touches one in the first. This uses the few drk pixels tht definitely lie within the oundries s mrkers to select the roder oundries, while rejecting the noise within the grins. Finlly, s shown in the figure, the resulting imge is skeletonized nd pruned to produce n imge useful for stereologicl mesurements of grin oundry re, grin size, nd so forth. In the preceding exmple, the grin oundry network is continuous tesseltion of the imge. Hence, it could e selected y using other criteri thn the doule-threshold method (for instnce, touching multiple edges of the field). Figure 35 shows n exmple requiring the doule-threshold method. The coustic microscope imge shows cross section through fier-reinforced mteril. These imges re inherently noisy, ut doule-thresholding (in this exmple selecting the right pixels) llows the oundries round the fiers to e selected. The fiers touch ech other, so it is lso necessry to seprte them for mesurement using wtershed segmenttion s discussed in the next section. Figure 35. Doule thresholding of fier oundries: () originl imge; () first thresholding; (c) second thresholding; (d) Feture-AND; (e) filled oundries; (f) segmented fiers. c d e f

27 Erosion nd diltion The most extensive clss of inry imge processing opertions is often collectively descried s morphologicl opertions (Serr, 1982; Coster nd Chermnt, 1985; Dougherty nd Astol, 1994, 1999; Soille, 1999). These include erosion nd diltion, nd modifictions nd comintions of these opertions. All re fundmentlly neighor opertions, s were discussed in Chpters 3 nd 4 to process grey-scle imges in the sptil domin. Becuse the vlues of pixels in the inry imges re restricted to 0 or 1, the opertions re simpler nd usully involve counting rther thn sorting or weighted multipliction nd ddition. However, the sic ides re the sme, nd it is possile to perform these procedures using the sme specilized rry-processor hrdwre sometimes employed for grey-scle kernel opertions. Rich literture, much of it French, is ville in the field of mthemticl morphology. It hs developed specific lnguge nd nottion for the opertions nd is generlly discussed in terms of set theory. A much simpler nd more empiricl pproch is tken here. Opertions cn e descried simply in terms of dding or removing pixels from the inry imge ccording to certin rules, which depend on the pttern of neighoring pixels. Ech opertion is performed on ech pixel in the originl imge, using the originl pttern of pixels. In prctice, it my not e necessry to crete n entirely new imge; the existing imge cn e replced in memory y copying few lines t time. None of the new pixel vlues re used in evluting the neighor pttern. Erosion removes pixels from fetures in n imge or, equivlently, turns pixels OFF tht were originlly ON. The purpose is to remove pixels tht should not e there. The simplest exmple is pixels tht hve een selected y thresholding ecuse they fell into the rightness rnge of interest, ut do not lie within lrge regions with tht rightness. Insted, they my hve tht rightness vlue either ccidentlly, ecuse of finite noise in the imge, or ecuse they hppen to strddle oundry etween lighter nd drker region nd thus hve n verged rightness tht hppens to lie in the rnge selected y thresholding. Such pixels cnnot e distinguished y simple thresholding ecuse their rightness vlue is the sme s tht of the desired regions. It my e possile to ignore them y using two-prmeter thresholding, for instnce using the grey level s one xis nd the grdient s second one, nd requiring tht the pixels to e kept hve the desired grey level nd low grdient. For our purposes here, however, we will ssume tht the inry imge hs lredy een formed nd tht extrneous pixels re present. The simplest kind of erosion, sometimes referred to s clssicl erosion, is to remove (set to OFF) ny pixel touching nother pixel tht is prt of the ckground (is lredy OFF). This removes lyer of pixels from round the periphery of ll fetures nd regions, which will cuse some shrinking of dimensions nd my crete other prolems if it cuses feture to rek up into prts. We will del with these difficulties elow. Erosion cn entirely remove extrneous pixels representing point noise or line defects (e.g., scrtches) ecuse these defects re normlly only single pixel wide. Insted of removing pixels from fetures, complementry opertion known s diltion (or sometimes dilttion) cn e used to dd pixels. The clssicl diltion rule, nlogous to tht for erosion, is to dd (set to ON) ny ckground pixel which touches nother pixel tht is lredy prt of foreground region. This will dd lyer of pixels round the periphery of ll fetures nd regions, which will cuse some increse in dimensions nd my cuse fetures to merge. It lso fills in smll holes within fetures. Becuse erosion nd diltion cuse reduction or increse in the size of regions, respectively, they re sometimes known s etching nd plting or shrinking nd growing. A vriety of rules re followed in order to decide which pixels to dd or remove nd for forming comintions of erosion nd diltion.

28 c d Figure 36: Removl of lines of pixels tht strddle oundry: () originl grey-scle microscope imge of three-phse metl; () inry imge otined y thresholding on the intermedite grey phse; (c) erosion of imge using two itertions; (d) diltion of imge c using the sme two itertions, restoring the feture size ut without the lines. In the rther simple exmple descried previously nd illustrted in Figure 36, erosion to remove the extrneous lines of pixels etween light nd drk phses cuses shrinking of the fetures. Following the erosion with diltion will more or less restore the pixels round the feture periphery, so tht the dimensions re (pproximtely) restored. Isolted pixels tht hve een completely removed, however, do not cuse ny new pixels to e dded. They hve een permnently ersed from the imge. Opening nd closing The comintion of n erosion followed y diltion is clled n opening, referring to the ility of this comintion to open up gps etween just-touching fetures, s shown in Figure 37. It is one of the most commonly used sequences for removing pixel noise from inry imges. Performing the sme opertions in the opposite order (diltion followed y erosion) produces different result. This sequence is clled closing ecuse it cn close reks in fetures. Severl prmeters cn e used to djust erosion nd diltion opertions, prticulrly the neighor pttern nd the numer of itertions, s discussed elow. In most opening opertions, these re kept the sme for oth the erosion nd the diltion.

29 Figure 37. Comining erosion nd diltion to produce n opening or closing. The result is different depending on the order of ppliction of the two opertions. Openings cn e used in some cses to seprte touching fetures. In the exmple shown in Figure 38, the fetures re ll similr in size. This fct mkes it possile to continue the erosion until ll fetures hve seprted ut none hve een completely ersed. After the seprtion is complete, diltion grows the fetures ck towrd their originl size. They would merge gin unless logic is used to prevent it. A rule tht prevents turning pixel ON if its neighors elong to different fetures mintins the seprtion shown in the figure. This requires performing feture identifiction for the pixels, so the logic discussed previously is required t ech step of the diltion. An dditionl rule prevents turning on ny pixel tht ws not on in the originl imge, so tht the fetures re restricted to their originl sizes. If the fetures hd different originl sizes, the seprtion lines would not lie correctly t the junctions. The wtershed segmenttion technique discussed lter in this chpter performs etter in such cses. If the sequence is performed in the other order, tht is, diltion followed y n erosion, the result is not the sme. Insted of removing isolted pixels tht re ON, the result is to fill in plces where isolted pixels re OFF, missing pixels within fetures or nrrow gps etween portions of feture. Figure 39 shows n exmple of closing used to connect together the prts of the crcked fiers shown in cross section. The crcks re ll nrrow, so diltion cuses the pixels from either side to spred cross the gp. The increse in fier dimeter is then corrected y n erosion, ut the crcks do not repper. The clssicl erosion nd diltion opertions illustrted ove turn pixel ON or OFF if it touches ny pixel in the opposite stte. Usully, touching in this context includes ny of the djcent 8 pixels, lthough some systems del only with the 4 edge-shring neighors. These opertions would lso e much simpler nd more isotropic on hexgonl pixel rry, ecuse the pixel neighor distnces re ll the sme, ut prcticl considertions led to the generl use of grid of squre pixels. A wide vriety of other rules re possile. One pproch is to count the numer of neighor pixels in the opposite stte, compre this numer to some threshold vlue, nd only chnge the stte of the centrl pixel if tht test coefficient is exceeded. In this method, clssicl erosion corresponds to coefficient of 0. One effect of different coefficient vlues is to lter the rte t which fetures grow or shrink nd to some extent to control the isotropy of the result. This will e illustrted in the next section.

30 Figure 38. Seprtion of touching fetures y erosion/diltion: () originl test imge; () fter two cycles of erosion; (c) fter four cycles; (d) fter seven cycles (fetures re now ll fully seprted); (e) four cycles of diltion pplied to imge d (fetures will merge on next cycle); (f) seven cycles of diltion using logic to prevent merging of fetures; (g) nine cycles of non-merging diltion restricted to the originl pixel loctions, which restores the feture oundries. c d e f g It is lso possile to choose lrge coefficient, from 5 to 7, to select only the isolted noise pixels nd leve most fetures lone. For exmple, choosing coefficient of 7 will cuse only single isolted pixels to e reversed (removed or set to OFF in n erosion, nd vice vers for diltion). Coefficient vlues of 5 or 6 my e le to remove lines of pixels (such s those strddling oundry) without ffecting nything else. An exmple of this method is shown in Figure 40. Thresholding the originl imge of the pigment cell produces inry imge showing the fetures of interest nd cretes mny smller nd irregulr groups of pixels. Performing conventionl opening to remove them would lso cuse the shpes of the lrger fetures to chnge nd some of them to merge. Applying erosion with neighor coefficient of 5 removes the smll nd irregulr pixel groups without ffecting the lrger nd more rounded fetures, s shown. The erosion is repeted until no further chnges tke plce (the numer of ON pixels in the inry imge does not chnge). This procedure works ecuse corner pixel in squre hs exctly five touching ckground neighors nd is not removed, while more irregulr clusters hve pixels with six or more ckground neighors. The test imge in Figure 41 shows vriety of fine lines nd nrrow gps tht cn e removed or filled in using different neighor coefficients nd numer of itertions (numer of erosions followed y diltions, or vice vers).

31 c Figure 39. Joining prts of fetures with closing: () originl imge, cross section of crcked glss fiers; () rightness thresholding, showing divisions within the fiers; (c) fter ppliction of closing. Figure 40. Removl of deris from n imge: () originl imge of pigment cell; () rightness thresholding shows the pigment grnules plus other, smll nd irregulr fetures; (c) erosion (neighor coefficient = 5) leves the lrge nd regulr grnules. Isotropy It is not possile for smll 3 3 neighorhood to define n isotropic neighor pttern. Clssic erosion pplied to circle will not shrink the circle uniformly, ut will proceed t fster rte in the 45 digonl directions ecuse the pixel spcing is greter in those directions. As result, circle will erode towrd dimond shpe, s shown in Figure 42. Once the feture reches this shpe, it will continue to erode uniformly, preserving the shpe. In most cses, however, fetures re not relly dimond-shped, which represents potentilly serious distortion. Likewise, clssic diltion pplied to circle lso proceeds fster in the 45 digonl directions, so tht the shpe diltes towrd squre (lso shown in Figure 42). Agin, squre shpes re stle in diltion, ut the distortion of rel imges towrd lock ppernce in diltion cn present prolem for further interprettion. c

32 Figure 41. Illustrtion of the effect of different neighor coefficients nd numer of itertions: () originl test imge; () erosion, neighor coefficient = 3, 1 itertion, removes isolted lines nd points; (c) closing, neighor coefficient = 2, 2 itertions, fills in gps to connect fetures while removing isolted points; (d) closing using clssicl opertions (neighor coefficient = 0, 1 itertion) connects most fetures ut leves isolted points; (e) opening, neighor coefficient = 7, 1 itertion, removes point noise without ffecting nything else; (f) opening, neighor coefficient = 1, 4 itertions, removes ll smll fetures including the frme of the picture. c d e f

33 c Figure 42. Testing the isotropy of clssicl (neighor coefficient = 0) diltion nd erosion: () originl circle; () fter 50 itertions of diltion; (c) fter 25 itertions of erosion. Figure 43. Isotropy tests using coefficient of 1: () the circle fter 50 itertions of diltion; () the circle fter 25 itertions of erosion. A neighor coefficient of 1 insted of 0 produces mrkedly different result. For diltion, ckground pixel tht touches more thn one foreground pixel (i.e., two or more out of the possile eight neighor positions) will e turned ON nd vice vers for erosion. Eroding circle with this procedure tends towrd squre nd diltion tends towrd dimond, just the reverse of using coefficient of 0. This is shown in Figure 43. No possile intermedite vlue exists etween 0 nd 1, ecuse the pixels re counted s either ON or OFF. If the corner pixels were counted s 2 nd the edge-touching pixels s 3, it would e possile to design coefficient tht etter pproximted n isotropic circle. This would produce rtio of 3/2 = 1.5, which is resonle pproximtion to 2, the distnce rtio to the pixels. In prctice, this is rrely done ecuse of the convenience of deling with pixels in inry imges s simple 0 or 1 vlue with no need to tke into ccount their neighorhood. Another pproch tht is much more commonly used for chieving n intermedite result etween the coefficients of 0 nd 1 with their directionl is is to lternte the two tests. As shown in Figure 44, this lternting pttern produces much etter pproximtion to circulr shpe in oth erosion nd diltion. This procedure rises the point tht erosion or diltion need not e performed only once. The numer of repetitions, lso clled the depth of the opertion, corresponds roughly to the distnce tht oundries will grow or shrink rdilly. It my e expressed in pixels or converted to the corresponding scle dimension.

34 Figure 44. Improved isotropy using y lternting neighor coefficients of 0 nd 1: () the circle fter 50 itertions of diltion; () fter 25 itertions of erosion. Using lrger neighorhood cn lso moderte the nisotropy. In Figure 45 5-pixel-wide circulr neighorhood is used with ten itertions of erosion nd diltion. As for the lternting 0 nd 1 coefficients the shpes evolve towrd octgons, lthough the lrger neighorhood provides less control over the distnce used for erosion nd diltion. Ech neighor pttern or coefficient hs its own chrcteristic nisotropy. Figure 46 shows the rther interesting results using neighorhood coefficient of 3. Similr to n lternting 0,1 pttern, this opertion produces n 8-sided polygon; however, the rte of erosion is much lower. In diltion, the figure grows to the ounding octgon nd then ecomes stle, with no further pixels eing dded. This coefficient is sometimes used to construct ounding polygons round fetures. Figure 45. Clssicl erosion nd diltion using ten itertions nd lrger neighorhood size ( 5-pixel-wide pproximtion to circle). Figure 46. Octgonl shpe nd slow rte of ddition or removl using coefficient of 3: () originl circle fter 50 itertions of diltion (no further chnges occur); () circle fter 25 itertions of erosion.

35 Mesurements using erosion nd diltion Erosion performed n times (using either coefficient of 0 or 1, or lternting them) will cuse fetures to shrink rdilly y out n pixels (with locl vritions depending on the shpe of the originl feture). This will cuse fetures whose smllest dimension is less thn 2n pixels to dispper ltogether. Counting the fetures tht hve disppered (or sutrcting the numer tht remin from the originl) gives n estimte of the numer of fetures smller thn tht size. This mens tht erosion nd counting cn e used to get n estimte of size distriutions without ctully performing feture mesurements (Ehrlich et l., 1984). For irregulrly shped nd concve fetures, the erosion process my cuse feture to sudivide into prts. Simply counting the numer of fetures s function of the numer of itertions of erosion is therefore not good wy to determine the size distriution. One pproch to this prolem is to follow erosion y diltion with the sme coefficient(s) nd numer of steps. This will merge together mny (ut not necessrily ll) of the seprted prts nd give etter estimte of their numer, lthough there is still considerle sensitivity to the shpe of the originl fetures. A dumell-shped oject will seprte into two prts when the hndle etween the two min prts erodes; they will not merge. This seprtion my e desirle, if indeed the purpose is to count the two min prts. A second method is to use Feture-AND, discussed erlier. After ech itertion of erosion, the remining fetures re used to select only those originl fetures tht touch them. The count of originl fetures then gives the correct numer. This is functionlly equivlent to keeping feture lels on ech pixel in the imge nd counting the numer of different lels present in the imge fter ech cycle of erosion. This method of estimting size distriutions without ctully mesuring fetures, using either of these correction techniques, hs een prticulrly pplied to mesurements in geology, such s minerl prticle sizes or sediments. The opposite opertion, performing diltions nd counting the numer of seprte fetures s function of the numer of steps, is less common. It provides n estimte of the distriution of the nerest distnces etween fetures in the imge. When this is done y conventionl feture mesurement, the x,y loction of ech feture is determined; then sorting in the resulting dt file is used to determine the nerest neighor nd its distnce. When the fetures re significntly lrge compred to their spcing or when their shpes re importnt, it cn e more interesting to chrcterize the distnces etween their oundries. This diltion method cn provide tht informtion. Insted of counting the numer of fetures tht dispper t ech itertion of erosion, it is much esier simply to count the numer of ON pixels remining, which provides some informtion out the shpe of the oundries. Smooth Eucliden oundries erode t constnt rte. Irregulr nd especilly frctl oundries do not, since mny more pixels re exposed nd touch opposite neighors. This effect hs een used to estimte frctl dimensions, lthough severl more ccurte methods re ville s discussed elow. Frctl dimensions nd the description of oundry s frctl sed on self-similr roughness is firly new ide tht is finding mny pplictions in science nd rt (Mndelrot, 1982; Feder, 1988; Russ, 1994). No description of the rther interesting ckground nd uses of the concept is included here for wnt of spce. The sic ide ehind mesuring frctl dimension y erosion nd diltion comes from the Minkowski definition of frctl oundry dimension. By dilting region nd Ex-ORing the result with nother imge formed y eroding the region, the pixels long the oundry re otined. For miniml depth of erosion nd diltion, this will e clled the custer nd is discussed in the section titled The custer. To mesure the frctl dimension, the opertion is repeted with different depths of erosion nd diltion (Flook, 1978), nd the effective width (totl numer of pixels divided y length nd

36 numer of cycles) of the oundry is plotted vs. the depth on log-log scle. For Eucliden oundry, this plot shows no trend; the numer of pixels long the oundry selected y the Ex- OR increses linerly with the numer of erosion/diltion cycles. For rough oundry with selfsimilr fine detil, however, the grph shows liner vrition on log-log xes whose slope gives the frctl dimension of the oundry directly. Figure 47 shows n exmple. A vriety of other methods re used to determine the oundry frctl dimension, including oxcounting or mosic mlgmtion (Kye, 1986; Russ, 1990) in which numer of pixels through which the oundry psses (for oundry representtion) re counted s the pixel size is incresed y corsening the imge resolution, nd structured wlk method (Schwrz nd Exner, 1980), which requires the oundry to e represented s polygon insted of s pixels. For frctl oundry, these lso produce stright line plots on log-log scle, from whose slope the dimension is determined. Newer nd more ccurte techniques for performing the mesurement re shown in Chpter 9. Counting the numer of pixels s function of diltions lso provides rther indirect mesure of feture clustering, ecuse s nery fetures merge, the mount of oundry is reduced nd the region s rte of growth slows. Counting only the pixels nd not the fetures mkes it difficult to seprte the effects of oundry shpe nd feture spcing. If ll of the fetures re initilly very smll or if they re single points, this method cn provide frctl dimension (techniclly Sierpinski frctl) for the clustering. Figure 47. Mesurement of Minkowski frctl dimension y erosion/diltion: () test figure with upper oundry clssicl Koch frctl nd lower oundry Eucliden stright line; () grey pixels show difference etween erosion nd diltion y one itertion; (c, d, e) differences etween erosion nd diltion fter 2, 3, nd 4 itertions; (f) plot of log of effective width (re of grey pixels divided y length nd numer of itertions) vs. log of numer of itertions (pproximte width of grey nd). c d e f

37 Extension to grey-scle imges In Chpter 4, one of the imge processing opertions descried ws the use of rnking opertor, which finds the rightest or drkest pixel in neighorhood nd replces the centrl pixel with tht vlue. This opertion is sometimes descried s grey-scle erosion or diltion, depending on whether the use of the rightest or drkest pixel vlue results in growth or shrinkge of the visile fetures. Just s n estimte of the distriution of feture sizes cn e otined y eroding fetures in inry imge, the sme technique is lso possile using grey-scle erosion on grey-scle imge. Figure 48 shows n exmple. The lipid spheres in this SEM imge re prtilly piled up nd oscure one nother, which is normlly criticl prolem for conventionl imge-mesurement techniques. Applying grey-scle erosion reduces the feture sizes, nd counting the right centrl points tht dispper t ech step of repeted erosion provides size distriution. The ssumption in this pproch is tht the fetures ultimtely seprte efore disppering. This works for reltively simple imges with well-rounded convex fetures, none of which re more thn out hlf hidden y others. No purely two-dimensionl imge processing method cn count the numer of cnnon lls in pile if the inner ones re hidden. It is possile to estimte the volume of the pile nd guess t the mximum numer of lls contined, ut impossile to know whether they re ctully there or whether something else is underneth the topmost lyer. Figure 48. Use of grey-scle erosion to estimte size distriution of overlpped spheres: () originl SEM imge of lipid droplets; ( f) result of pplying repetitions of grey-scle erosion y keeping the drkest pixel vlue in 5-pixelwide octgonl neighorhood. c d e f

38 Morphology neighorhood prmeters The importnt prmeters for erosion nd diltion re the neighorhood size nd shpe, the comprison test tht is used nd the numer of times the opertion is repeted. The use of simple test coefficient sed on the numer of neighors, irrespective of their loction in the neighorhood, provides considerle flexiility in the functioning of the opertion s shown erlier. Ech coefficient produces results hving chrcteristic shpe, which distorts the originl fetures. Also, the greter the depth, or numer of itertions in the opertion, the greter this effect, in ddition to the chnges in the numer of fetures present. Specific neighor ptterns cn lso e used for erosion nd diltion opertions. The most common re ones tht compre the centrl pixel to its 4 edge-touching neighors (usully clled + pttern ecuse of the neighorhood shpe) or to the 4 corner-touching neighors (likewise clled n x pttern), chnging the centrl pixel if ny of the 4 neighors is of the opposite type (ON or OFF). They re rrely used lone, ut cn e employed in n lternting pttern to otin greter directionl uniformity thn clssicl erosion, similr to the effects produced y lternting coefficient tests of 0 nd 1. Any specific neighor pttern cn e used, of course. It is not even required to restrict the comprison to immeditely touching neighors. As for grey-scle opertions, lrger neighorhoods mke it possile to respond to more sutle textures nd chieve greter control over directionlity. Figure 49 shows simple exmple. The generl cse for this type of opertion is clled the hitor-miss opertor, which specifies ny pttern of neighoring pixels divided into three clsses: those tht must e ON, those tht must e OFF, nd those tht do not mtter (re ignored). If the pttern is found, then the pixel is set to the specified stte (Serr, 1982; Coster nd Chermnt, 1985). This opertion is lso clled templte mtching. The sme type of opertion crried out on greyscle imges is clled convolution nd is wy to serch for specific ptterns in the imge. This is lso true for inry imges; in fct, templte mtching with thresholded inry imges ws one of the erliest methods for opticl chrcter reding nd is still used for situtions in which the chrcter shpe, size, nd loction re tightly controlled (such s the chrcters t the ottom of nk checks). Much more flexile methods re needed to red more generl text, however. In prctice, most erosion nd diltion is performed using only the 8 nerest-neighor pixels for comprison. One method for implementing neighorhood comprison tht mkes it esy to use ny ritrry pttern of pixels is the fte tle. The 8 neighors ech hve vlue of 1 or 0, depending on c Figure 49. Exmple of specifying the neighorhood pixels for morphologicl opertions: () verticl neighorhood for erosion; () originl pttern; (c) eroded result.

39 Figure 50. Constructing n ddress into fte tle y ssigning ech neighor position to it vlue. whether the pixel is ON or OFF. Assemling these 8 vlues into numer produces single yte, which cn hve ny of 256 possile vlues. This vlue is used s n ddress into tle, which provides the result (i.e., turning the centrl pixel ON or OFF). Figure 50 illustrtes the reltionship etween the neighor pttern nd the generted ddress. Efficient wys to construct the ddress y itwise shifting of vlues, which tkes dvntge of the mchine-lnguge idiosyncrsies of specific computer processors, mkes this method very fst. The ility to crete severl tles of possile ftes to del with different erosion nd diltion rules, perhps sved on disk nd loded s needed, mkes the method very flexile; however, it does not generlize well to lrger neighorhoods or three-dimensionl voxel rry imges ecuse the tles ecome too lrge. Some pplictions for highly specific erosion/diltion opertions re not symmetricl or isotropic. These lwys require some independent knowledge of the imge, the desired informtion, nd the selection of opertions tht will selectively extrct it. This is not s importnt criticism or limittion s it my seem, however, ecuse ll imge processing is to some extent knowledge-directed. The humn oserver tries to find opertions to extrct informtion he or she hs some reson to know or expect to e present. Figure 51 shows n exmple. The horizontl textile fiers vry in width s they weve ove nd elow the verticl ones. Mesuring this vrition is importnt to modeling the mechnicl properties of the weve, which will e emedded into composite. The drk verticl fiers cn e thresholded sed on rightness, ut delineting the horizontl fiers is very difficult. The procedure shown in the figure uses the known directionlity of the structure. After thresholding the drk fiers, n erosion is performed to remove only those pixels whose neighor immeditely elow or ove is prt of the ckground. These pixels, shown in Figure 51c, cn then e isolted y performing n Ex-OR with the originl inry. They include the few points distinguishle etween horizontl fiers nd the ends of the verticl fiers where they re covered y horizontl ones. Next, directionl diltion is performed in the horizontl direction. Any ckground pixel whose left or right touching neighor is ON is itself set to ON, nd this opertion is repeted enough times to extend the lines cross the distnce etween verticl fiers. Finlly, the resulting horizontl lines re ORed with the originl inry imge to outline ll of the individul fiers (Figure 51d). Inverting this imge produces mesurle fetures. Exmples of use Some dditionl exmples of erosion nd diltion opertions will illustrte typicl pplictions nd methods. One of the mjor res of use is for x-ry mps from the SEM. These re usully so sprse tht even though they re recorded s grey-scle imges, they re virtully inry imges even efore thresholding ecuse most pixels hve zero photons nd few pixels hve one.

40 Regions contining the element of interest re distinguished from those tht do not y difference in the sptil density of dots, which humns re le to interpret y gestlt grouping opertion. This very noisy nd scttered imge is difficult to use to locte feture oundries. Diltion my e le to join points together to produce more useful representtion. Figure 51. Using directionl erosion nd diltion to segment n imge: () originl grey-scle imge of woven textile; () rightness thresholding of imge ; (c) end pixels isolted y performing verticl erosion nd ExORing with the originl; (d) completed opertion y repeted horizontl diltion of imge c nd then ORing with the originl. c d Figure 52. X-ry dot mps from the SEM: () ckscttered electron imge of gold grid ove n luminum stu; () secondry electron imge; (c) gold x-ry dot imge; (d) luminum x-ry imge (notice the shdows of grid). c d

41 Figure 52 shows representtive x-ry mp from n SEM. Notice tht the drk nds in the luminum dot mp represent the shdows where the gold grid locks the incident electron em or the emitted x-rys en route to the detector. Figure 53 shows the result of thresholding the gold mp nd pplying closing to merge the individul dots. Figure 54 illustrtes the results for the luminum mp. Becuse it hs more dots, it produces somewht etter definition of the region edges. Other imges from the light nd electron microscope sometimes hve the sme essentilly inry imge s well. Exmples include ultrthin iologicl tissue sections stined with hevy metls nd viewed in the TEM, nd chemiclly etched metllogrphic specimens. The drk regions re frequently smll, corresponding to rely resolved individul prticles whose distriution nd clustering revel the desired microstructure (memrnes in tissue, eutectic lmelle in metls, etc.) to the eye. As for the cse of x-ry dot mps, it is sometimes possile to utilize diltion opertions to join such dots to form well-defined imge. In Figure 55, iron cride prticles in steel specimen re etched to distinguish the regions with nd without such structures. The islnds of lmellr structure re importnt, ut not completely defined y the individul drk cride prticles. Diltion followed y erosion ( closing) merges together the individul lmelle, drk regions re lso found within the essentilly white grins ecuse of the presence of few drk points in the originl imge. Following the closing with n opening (for totl sequence of diltion, erosion, erosion, diltion) produces useful result. In the exmple, the closing used neighorhood coefficient of 1 nd 6 itertions, nd the opening used neighorhood coefficient of 0 nd 4 itertions. The numer of itertions is sed on the size of the gp to e filled or feture to e removed. The presence of 45- nd 90-degree edges in the processed inry imges revels the nisotropic effects of the erosion/diltion opertions. c Figure 53. Delineting the gold grid: () thresholded x-ry mp; () imge fter two repetitions of closing; (c) the ckscttered electron imge msked to show the oundries from imge (notice the pproximte loction of edges). Figure 54. Delineting the luminum mp: () thresholding (notice the isolted continuum x-rys recorded within the grids); () fter erosion with neighorhood coefficient of 7 to remove the isolted pixels nd diltion (two cycles) to fill the regions.

42 Figure 55. Comined closing nd opening to delinete region: () originl grey-scle imge of chemiclly etched metllogrphic specimen (drk regions re iron cride); () rightness threshold pplied to imge ; (c) closing pplied to fill in gps etween lmelle; (d) opening pplied to remove smll isolted fetures; (e) region oundries superimposed on originl imge. c d e Using different coefficients in the vrious opertions sometimes lessens the ovious geometric is. The choice of pproprite prmeters is lrgely mtter of experience with prticulr type of imge nd humn judgment of the correctness of the finl result. There is sic similrity etween using these morphologicl opertions on thresholded inry imge nd some of the texture opertors used in Chpter 4 on grey-scle imges. In most cses, similr (ut not identicl) results cn e otined with either pproch (provided the softwre offers oth sets of tools). For instnce, Figure 56 shows the sme imge of curds nd whey used erlier to compre severl grey-scle texture processing opertions. Bckground leveling nd thresholding the smooth, white res (the curds) produces the result shown. Clerly, mny regions in the textured whey protein portion of the imge re just s right s the curds. In grey-scle texture processing, these were eliminted sed on some considertion of the locl vrition in pixel rightness. In this imge, tht vrition produces nrrow nd irregulr thresholded regions. An opening, consisting of n erosion to remove edge-touching pixels nd diltion to restore pixels smoothly to oundries tht still exist, effectively removes the ckground clutter s shown in the figure. Smll fetures re shded grey nd would normlly e removed sed on size to permit nlysis of the lrger curds. The erosion/diltion pproch to defining the structure in this imge mounts to mking some ssumptions out the chrcteristic dimensions of the fetures, their oundry irregulrities, nd their spcings.

43 Figure 56. Segmenting the curds nd whey imge y erosion/diltion: () originl imge; () thresholded; (c) morphologicl opening; (d) outlines superimposed on originl imge. c d The custer Erosion/diltion procedures re often used long with Boolen comintions. In the exmples of Figures 27 through 30 the lines used to test for djcency were otined y dilting the inry imge nd then Ex-ORing the result with the originl. Also, the outlines shown in mny of the figures to compre the results of processing to the originl imge cn e produced y performing n erosion followed y n Ex-OR with the originl inry imge. This leves the outlines which were then pplied s msk to the originl grey-scle imge. Whether otined y erosion or diltion, or doing oth nd Ex-ORing the results, the outline is clled the custer of feture, pprently in reference to George Herert Armstrong Custer, who ws lso surrounded. The custer cn e used to determine neighor reltionships etween fetures or regions. As n exmple, Figure 57 shows three-phse metl lloy imged in the light microscope. Ech of the individul phses cn e redily delineted y thresholding (nd in the cse of the medium grey imge, pplying n opening to remove lines of pixels strddling the white-lck oundry). Then the custer of ech phse cn e formed s descried previously. Comining the custer of ech phse with the other phses using n AND keeps only the portion of the custer tht is common to the two phses. The result is to mrk the oundries s white-grey, grey-lck, or lck-white, so tht the extent of ech type cn e determined y simple counting. In other cses, Feture-AND cn e used to select the entire fetures tht re djcent to one region (nd thus touch its custer), s illustrted previously. Eucliden distnce mp The directionl is present in morphologicl opertions ecuse of their restriction to pixels on squre grid cn e lrgely overcome y performing equivlent opertions using different

44 c d e f g h i j k l Figure 57. Use of Boolen logic to mesure neighor reltionships: () n originl light microscope imge of three-phse metl; ( d) thresholded white, grey, nd lck phses; (e g) surrounding outlines of ech phse produced y diltion nd ExOR with originl; (h j) AND of outlines of pirs of phses; (k) OR of ll ANDed outlines using different colors to identify ech phse/phse interfce; (l) outlines filled to show idelized phse regions.

45 technique. It mkes use of grey-scle imge, produced from the originl inry, in which every pixel within feture is ssigned vlue tht is its distnce from the nerest ckground pixel. This is clled the Eucliden distnce mp, or EDM. Most of the imge processing functions discussed in this nd preceding chpters operte either on grey-scle imges (to produce other grey-scle imges) or on inry imges (to produce other inry imges). The Eucliden distnce mp is tool tht works on inry imge to produce grey-scle imge. The definition is simple enough: ech pixel in the foreground is ssigned rightness vlue equl to its stright line (thus, Eucliden ) distnce from the nerest point in the ckground. In continuous imge, s opposed to digitized one contining finite pixels, this is unmiguous. In most pixel imges, the distnce is tken from ech pixel in the feture to the nerest pixel in the ckground. Serching through ll of the ckground pixels to find the nerest one to ech pixel in feture nd clculting the distnce in Pythgoren sense would e n extremely inefficient nd timeconsuming process for constructing the EDM. Some reserchers hve implemented different type of distnce mp in which distnce mesured in only few directions. For lttice of squre pixels, this my either e restricted to the 90 directions, or it my lso include the 45 directions (Rosenfeld nd Kk, 1982). This mesuring convention is equivlent to deciding to use 4-neighor or 8-neighor convention for considering whether pixels re touching. In either cse, the distnce from ech pixel to one of its 4 or 8 neighors is tken s 1, regrdless of the direction. Consequently, s shown in Figure 58, the distnce mp from point gives rise to either squre or dimond-shped rtefcts nd is quite distorted, s compred to the Pythgoren distnce. These mesuring conventions re sometimes descried s city-lock models (connections in 4 directions) or chessord models (8 directions), ecuse of the limited moves ville in those situtions. A conceptully strightforwrd, itertive technique for constructing such distnce mp cn e progrmmed s follows: 1. Assign rightness vlue of 0 to ech pixel in the ckground. 2. Set vrile N equl to For ech pixel tht touches (in either the 4- or 8-neighor sense, s descried previously) pixel whose rightness vlue is N, ssign rightness vlue of N Increment N nd repet step 3, until ll pixels in the imge hve een ssigned. The time required for this itertion depends on the size of the fetures (the mximum distnce from the ckground). A more efficient method is ville tht gives the sme result with two psses through the imge (Dnielsson, 1980). This technique uses the sme comprisons, ut propgtes the vlues through the imge more rpidly. It cn e progrmmed s follows: Figure 58. Arrys of pixels with their distnces from the center pixel shown (from left to right) for the cses of 4- nd 8-neighor pths, nd in Pythgoren units.

46 1. Assign the rightness vlue of 0 to ech pixel in the ckground nd lrge positive vlue (greter thn the mximum feture width) to ech pixel in feture. 2. Proceeding from left to right nd top to ottom, ssign ech pixel within feture rightness vlue one greter thn the smllest vlue of ny of its neighors. 3. Repet step 2, proceeding from right to left nd ottom to top. A further modifiction provides etter pproximtion to the Pythgoren distnces etween pixels (Russ nd Russ, 1988). The digonlly djcent pixels re neither distnce 1 (8-neighor rules) or 2 = (4-neighor rules) wy. The ltter vlue is n irrtionl numer, ut closer pproximtions thn 1.00 or 2.00 re ville. For instnce, modifying the ove rules so tht pixel rightness vlue must e lrger thn its 90 neighors y 2 nd greter thn its 45 neighors y 3 is equivlent to using n pproximtion of 1.5 for the squre root of 2. The disdvntge of this method is tht ll of the pixel distnces re now multiplied y two, incresing the mximum rightness of the EDM imge y this fctor. For imges cple of storing mximum grey level of 255, this represents limittion on the lrgest fetures tht cn e processed in this wy. If the EDM imge is 16 its deep (nd cn hold vlues up to 65,535), however, this is not prcticl limittion. It lso opens the wy to selecting lrger rtios of numers to pproximte 2, getting correspondingly improved set of vlues for the distnce mp. For instnce, 7/5 = nd 58/41 = It tkes no longer to compre or dd these vlues thn it does ny others, nd the rtio 58/41 llows dimensions lrger thn 1024 pixels. Becuse this dimension is the hlf-width, fetures or ckground up to 2048 pixels wide cn e processed ( = 41,984, which is less thn = 65,535). Of course, the finl imge cn e divided down y the scling fctor (41 in this exmple) to otin result in which pixel rightness vlues re the ctul distnce to the oundry (rounded or truncted to integers) nd the totl rightness rnge is within the 0 to 255 rnge tht most displys re cple of showing. The ccurcy of n EDM constructed with these rules cn e judged y counting the pixels whose rightness vlues plce them within distnce s. This is just the sme s constructing cumultive histogrm of pixel rightness in the imge. Figure 59 plots the error in the numer of pixels vs. integer rightness for distnce mp of circle 99 pixels in dimeter; the overll errors re not lrge. Even etter ccurcy for the EDM cn e otined y performing dditionl comprisons to pixels eyond the first 8 nerest neighors. Adding comprison to the 8 neighors in the 5 5 neighorhood whose Pythgoren distnce is 5 produces vlues hving even less directionl sensitivity nd more ccurcy for lrge distnces. If the integer vlues 58 nd 41 mentioned ove re used to pproximte 2, then the pth to these pixels consisting of knight s move of one 90 nd one 45 -pixel step would produce vlue of = 99. Sustituting vlue of 92 gives close pproximtion to the Pythgoren distnce (92/41 = 2.243; 5 = 2.236) nd produces more isotropic results. Figure 59. Difference etween theoreticl re vlue (πr 2 ) nd the ctul re covered y the EDM s function of rightness (distnce from oundry) shows incresing ut still smll errors for very lrge distnces.

47 There is nother lgorithm tht produces Eucliden distnce mp with rel numer vlues. During the psses through the imge, the X nd Y distnces from the nerest ckground point re ccumulted seprtely for ech pixel within the fetures, nd then the ctul Pythgoren distnce is clculted s the squre root of the sum of squres. Of course, it is still necessry to convert to n integer representtion for disply purposes. In generl, the etter the qulity of the EDM vlues the etter the results otined using the EDM for erosion, diltion, nd wtershed segmenttion s descried in the next section. Comprison of the pixel-y-pixel erosion nd diltion descried erlier with the circulr pttern provided thresholding y the EDM of either the foreground (erosion) or ckground (diltion) to select pixels tht re frther from the edge thn ny desired extent of erosion shows tht the EDM method is much more isotropic (Figure 60). Furthermore, the distnce mp is constructed quickly nd the thresholding requires no itertion, so the execution time of the method does not increse with feture size (s do clssicl erosion methods) nd is preferred for lrge fetures or depths. When more irregulr shpes re sujected to erosion nd diltion, the difference etween the itertive methods nd thresholding the EDM is lso pprent, with EDM methods voiding the 90- nd 45-degree oundries present with the trditionl morphologicl tools. Figure 61 shows the sme exmple of closing nd opening pplied to the imge in Figure 55. The distnce used for oth closing nd opening ws 5.5 pixels (note tht with the EDM it is possile to specify distnces re rel numers rther thn eing restricted to integers), nd the finl outlines trce the edges of the structures with much greter fidelity. Wtershed segmenttion A common difficulty in mesuring imges occurs when fetures touch, nd therefore cnnot e seprtely identified, counted, or mesured. This sitution my rise when exmining n imge of Figure 60. Isotropic erosion nd diltion chieved y using the Eucliden distnce mp for diltion nd erosion (compre to Figures 42 46): () the EDM of the ckground round the circle; () the EDM of the circle; (c) diltion chieved y thresholding the ckground EDM t vlue of 50; (d) erosion chieved y thresholding the circle EDM t vlue of 25. c d

48 Figure 61. Closing nd opening using the EDM: () thresholded originl imge (sme s Figure 55); () closing, distnce of 5.5 pixels; (c) opening; distnce of 5.5 pixels; (d) outlines superimposed on originl imge. c d thick section in trnsmission, where ctul feture overlp my occur, or when prticles resting on surfce tend to gglomerte nd touch ech other. One method for seprting touching, ut mostly convex, fetures in n imge is known s wtershed segmenttion (Beucher nd Lntejoul, 1979; Lntejoul nd Beucher, 1981). It relies on the fct tht eroding the inry imge will usully cuse touching fetures to seprte efore they dispper. The clssicl method for ccomplishing this seprtion (Jernot, 1982) is n itertive one. The imge is repetitively eroded, nd t ech step those seprte fetures tht disppered from the previous step re designted ultimte eroded points (UEPs) nd sved s n imge, long with the itertion numer. Sving these is necessry ecuse the fetures will in generl e of different sizes nd would not ll dispper in the sme numer of itertions, s mentioned erlier in connection with Figure 38. The process continues until the imge is ersed. Then, eginning with the finl imge of UEPs, the imge is dilted using clssicl diltion, ut with the dded logicl constrint tht no new pixel my e turned ON if it cuses connection to form etween previously seprte fetures or if it ws not ON in the originl imge. At ech stge of the diltion, the imge of UEPs tht corresponds to the equivlent level of erosion is dded to the imge using logicl OR. This process cuses the fetures to grow ck to their originl oundries, except tht lines of seprtion pper etween the touching fetures. The method just descried hs two prcticl drwcks: the itertive process is slow, requiring ech pixel in the imge to e processed mny times, nd the mount of storge required for ll of the intermedite imges is quite lrge. The sme result cn e otined more efficiently using n EDM. Indeed, the nme wtershed comes directly from the EDM. Imgine tht the rightness vlues of ech pixel within fetures in n EDM correspond to physicl elevtion. The fetures then pper s mountin pek. Figure 62 illustrtes this for circulr feture. If two fetures touch or overlp slightly, the EDM shows two peks, s shown in Figure 63. The slope of the mountinside is constnt, so the lrger the feture the higher the pek. The ultimte eroded points re the peks of the mountins, nd where fetures touch, the flnks of the mountins intersect. The sddles etween these mountins re the lines selected s oundries y the

49 c Figure 62. Interpreting the Eucliden distnce mp s the height of pixels: () inry imge of circulr feture; () Eucliden distnce mp with pixels color coded to show distnce from oundry; (c) rendered disply showing pixel heights. c Figure 63: EDM for touching fetures: () inry imge of two touching circulr fetures; () Eucliden distnce mp with pixels color coded to show distnce from oundry; (c) rendered disply showing pixel heights. Note the oundry etween the two cones. segmenttion method. They re loctions where wter running down from the mountins rrives from two different peks, nd thus re generlly clled wtershed lines. The plcement of these lines ccording to the reltive height of the mountins (size of the fetures) gives the est estimte of the seprtion lines etween fetures, which re divided ccording the regions tht elong to ech mountin top. Implementing the segmenttion process using n EDM pproch (Russ nd Russ, 1988) is very efficient, oth in terms of speed nd storge. The distnce mp imge required is constructed without itertion. The ultimte eroded points re locted s specil cse of locl mxim (A further discussion of UEPs is included in the next section), nd the rightness vlue of ech directly corresponds to the itertion numer t which it would dispper in the itertive method. Dilting these fetures is fst, ecuse the distnce mp supplies constrint. Strting t the rightest vlue nd wlking down the mountin covers ll of the rightness levels. At ech one, only those pixels t the current rightness level in the distnce mp need to e considered. Those tht do not produce join etween feture pixels re dded to the imge. The process continues until ll of the pixels in the fetures, except for those long the seprtion lines, hve een restored.

50 Figure 64. Wtershed segmenttion on n imge of touching circles of different sizes. Figure 64 shows n exmple of this method, pplied to n imge consisting of touching circles. Since these re of different sizes, the method descried erlier in Figure 38 does not work, ut wtershed segmenttion seprtes the fetures. For imge of rel prticles, s shown in Figure 65, the method works suject to the ssumption tht the fetures re sufficiently convex tht the EDM does not produce multiple peks within ech feture. Of course, this method is not perfect. Wtershed segmenttion cnnot hndle concve nd irregulr prticles, nor does it not seprte prticles whose overlp is so gret tht there is no minimum in the EDM etween them. Depending on the qulity of the originl distnce mp, wtershed segmenttion my sudivide lines of constnt width into mny frgments ecuse of the pprent minim produced y lising long the line edges. In most cses, the effort needed to correct such defects is much less thn would hve een required to perform mnul seprtion of the originl fetures. Figure 65. Wtershed segmenttion on n imge of snd grins: () originl grey-scle imge; () thresholded; (c) wtershed segmenttion pplied; (d) outlines superimposed on the originl imge; (e) inscried circles sed on the UEP loction nd vlue, superimposed on the originl imge. c d e

51 The presence of holes within fetures confuses the wtershed lgorithm nd reks the fetures up into mny frgments. It is therefore necessry to fill holes efore pplying the wtershed, lthough there my lso e holes in the imge etween fetures s well s those within them. Norml hole filling would fill them in since ny region of ckground not connected to the edge of the imge is considered hole. This difficulty cn e overcome if some difference in hole size or shpe cn e identified to permit filling only the holes within fetures nd not those etween them (Russ, 1995f). In the exmple shown in Figure 66, the holes within fetures (orgnelles within the cells) re much rounder thn spces etween the touching cells. Isolting these holes y mesurement, nd ORing them with the originl imge, llows wtershed segmenttion to seprte the cells. Figure 66. Seprtion of touching cells: () originl grey-scle imge; () thresholded; (c) erroneous wtershed segmenttion produced y holes within cells; (d) inverting imge to show holes within nd etween cells; (e) holes within cells selected y their rounder shpes; (f) comining imge with e using Boolen OR; (g) wtershed segmenttion of imge f; (h) outlines superimposed on originl imge. c d e f g h

52 Ultimte eroded points The ultimte eroded points (UEPs) descried previously in the wtershed segmenttion technique cn e used s mesurement tool in their own right. The numer of points gives the numer of seprle fetures in the imge, while the rightness of ech point gives mesure of their sizes (the inscried rdius, shown in Figure 65e). In ddition, the loction of ech point cn e used s loction for the feture if clustering or grdients re to e investigted. The forml definition of UEP in continuous, rther thn pixel-sed, imge is simply locl mximum of rightness in the EDM imge. Since the imge is sudivided into finite pixels, the definition must tke into ccount the possiility tht more thn one pixel my hve equl rightness, forming plteu. The operting definition for finding these pixels is recursive. {U: Uj neighors of Ui, Uj Ui (5) AND Uj neighors of Ui such tht Uj = Ui, Ui U} In other words, the set of pixels which re UEPs must e s right or righter thn ll neighors; if the neighors re equl in rightness, then they must lso e prt of the set. The rightness of ech pixel in the distnce mp is the distnce to the nerest oundry. For UEP, this must e point tht is equidistnt from t lest three oundry loctions. Consequently, the rightness is the rdius of the feture s inscried circle. Figure 67 shows the UEPs for the touching circles from Figure 64. A histogrm of the rightness vlues of the UEP pixels gives n immedite mesure of the size distriution of the fetures. This is much fster thn convex segmenttion, ecuse the itertive diltion is ypssed, nd much fster thn mesurement, since no feture identifiction or pixel counting is required. Even for seprte fetures, the mximum point of the EDM provides mesurement of the rdius of n inscried circle, useful size prmeter. Other EDM-sed mesurements The Eucliden distnce mp provides vlues tht cn e effectively used for mny types of mesurements. For exmple, the method descried ove for determining frctl dimension from successive erosion nd diltion opertions hs two shortcomings: it is slow nd hs n orienttionl is ecuse of the nisotropy of the opertions. The EDM offers simple wy to otin the sme informtion (Russ, 1988) s will e discussed in detil in Chpter 9. Becuse the distnce mp encodes ech pixel with the stright line distnce to the nerest ckground point, it cn lso e used to mesure the distnce of mny points or fetures from irregulr oundries. In the exmple shown in Figure 68 the imge is thresholded to define the oundry lines (which might represent grin oundries, cell memrnes, etc.) nd points (prticles, orgnelles, etc.). The imge of the thresholded fetures is pplied s msk to the Eucliden distnce mp of the interior so tht ll pixels in the fetures hve the distnce vlues. Mesuring the rightness of the fetures gives the distnce of ech feture from the oundry. Figure 67. The ultimte points for the touching fetures from Figure 64.

53 Figure 68. Mesurement of distnce from oundry: () exmple imge; () thresholded interior region; (c) thresholded fetures; (d) Eucliden distnce mp of the interior (color coded); (e) distnce vlue ssigned to fetures; (f) histogrm of distnces for fetures. c d e f EDM vlues cn lso e comined with the skeleton of fetures or of the ckground, s discussed in the next section. Skeletoniztion Erosion cn e performed with specil rules tht remove pixels, except when doing so would cuse seprtion of one region into two. The rule for this is to exmine the touching neighors; if they do not form continuous group, then the centrl pixel cnnot e removed (Pvlidis, 1980; Nevti nd Bu, 1980; Dvidson, 1991; Ln et l., 1992; Ritter nd Wilson, 1996). The definition of this condition is dependent on whether four- or eight-connectedness is used. In either cse, the selected ptterns cn e used in fte tle to conduct the erosion (Russ, 1984). The more common convention is tht fetures, nd thus skeletons, re eight-connected while ckground is four-connected, nd tht is the convention used in the following exmples. Skeletoniztion y erosion is n itertive procedure, nd the numer of itertions required is proportionl to the lrgest dimension of ny feture in the imge. An lterntive method for constructing the skeleton uses the Eucliden distnce mp. The ridge of loclly rightest vlues in the

54 EDM contins those points tht re equidistnt from t lest two points on the oundries of the feture. This ridge constitutes the medil xis trnsform (MAT). As for the UEPs, the MAT is precisely defined for continuous imge ut only pproximtely defined for n imge composed of finite pixels (Mott-Smith, 1970). In most cses, the MAT corresponds rther closely to the skeleton otined y sequentil erosion. Since it is less directionlly sensitive thn ny erosion pttern nd ecuse of the pixel limittions in representing line, it my differ slightly in some cses. The uses of the MAT re the sme s the skeleton, nd in mny cses, the MAT procedure is used ut the result is still descried s skeleton. Figure 69 shows severl fetures with their (eight-connected) skeletons. The skeleton is powerful shpe fctor for feture recognition, contining oth topologicl nd metric informtion. The topologicl vlues include the numer of end points, the numer of nodes where rnches meet, nd the numer of internl holes in the feture. The metric vlues re the men length of rnches (oth those internl to the feture nd those hving free end) nd the ngles of the rnches. These prmeters seem to correspond closely to wht humn oservers see s the significnt chrcteristics of fetures. Figure 70 shows the nomenclture used. The numers of ech type of feture re relted y Euler s eqution: # Loops = # Brnches - # Ends - # Nodes + 1 (4) A few specific cses pper to violte this sic rule of topology, requiring creful interprettion of the digitized skeleton. Figure 71 shows two of them. The ring skeletonizes to single circulr rnch tht hs one loop, single rnch, nd no pprent node, however, the rules of topology Figure 69. A inry imge contining multiple fetures, with their skeletons superimposed. Figure 70. The skeleton of feture with five end points, five nodes, five externl rnches, five internl rnches, nd one loop (skeleton hs een dilted for visiility).

55 Figure 71. Skeletons for ring nd circle, s discussed in the text. Figure 72. Leling str-shped fetures ccording to the numer of end points in the skeleton. require tht there e virtul node someplce on the ring where the two ends of the liner rnch re joined. Likewise, the symmetricl circle figure skeletonizes to single point. which, hving fewer thn two neighors, would e clssified s n end. In relity, this point represents short rnch with two ends. Specil rules cn correctly hndle these specil cses. Locting the nodes nd end points in skeleton is simply mtter of counting neighors. Points long the skeleton rnches hve exctly two neighors. End points hve single neighor, while nodes hve more thn two. The topology of fetures is n instntly recognizle shpe descriptor tht cn e determined quickly from the feture skeleton. For exmple, in Figure 72 the numer of points in ech str is something tht humns identify esily s defining shpe prmeter. Counting the numer of skeleton pixels tht hve just one neighor llows leling them with this topologicl property. Similrly, n esy distinction etween the letters A, B, nd C is the numer of loops (1, 2, nd 0, respectively). As topologicl properties, these do not depend on size, position, or ny distortion of the letters (for exmple y the use of different fonts). Segment lengths re importnt mesures of feture size, s will e discussed in Chpter 9. These cn lso e determined y counting, keeping trck of the numer of pixel pirs tht re digonlly or orthogonlly connected, or y fitting smoothed curves through the points nd to mesure the length, which gives more ccurte results. Counting the numer of nodes, ends, loops, nd rnches defines the topology of fetures. These topologicl events simplify the originl imge nd ssist in chrcterizing structure, s illustrted in Figure 73. Skeletons re very useful for deling with imges of crossed fiers. Figure 74 shows digrmmtic exmple in which severl fiers cross ech other. In few situtions, it is necessry to ctully follow individul fiers in such tngle. This cn e done (generlly using rther specilized softwre nd some prior knowledge out the nture of the fiers) y skeletonizing the imge. The regions round ech nodes where the skeletons cross re then exmined, nd the rnches identified tht represent the continution of single fier (Tlot et l., 2000). The criteri re typiclly tht the locl direction chnge e smll, nd perhps tht the width, color or density of the fier e consistent. When fiers cross t shllow ngle, the skeleton often shows two nodes with segment tht elongs to oth fiers. Imges of stright fiers re much esier to disentngle thn curved ones.

56 Figure 73. Simplifiction of fingerprint imge () y thresholding nd skeletoniztion (). Figure 74. Exmple of crossing fiers, s discussed in the text, with superimposed skeleton lines. A much simpler result is possile if the required informtion is just the totl numer nd verge length of the fiers. Regrdless of the numer of nodes or fier crossings, the numer of fiers is just hlf the numer of end points, which cn e counted directly (with smll error introduced y the proility tht n end of one fier will lie on second fier). Mesuring the totl length of the skeleton (with correction for the end points s discussed elow) nd dividing y the numer gives the verge vlue. In Figure 74, there re 12 ends, thus 6 fiers, nd totl of inches of skeleton length, for n verge length of 6.72 inches. In other situtions, such s the exmple shown in Figure 75, it my e useful to seprte the rnches of the skeleton for individul mesurements of prmeters such s length or orienttion ngle. Removing the exct node pixels is not sufficient to ccomplish this, ecuse the remining rnches my still e connected. This rises from the nture of eight-connected logic. Figure 76 shows n enlrgement of portion of the skeleton network from Figure 75 in which the node points for topologicl counting nd ner-node points tht must lso e removed to seprte the rnches re color coded for illustrtion. This technique is prticulrly pproprite for rnched structures such s the roots of plnts, provided tht they cn e spred out to produce two-dimensionl imge. A stereologicl method is lso used for mesuring the totl length of three-dimensionl structures from projections discussed in Chpter 8. Just s the skeleton of fetures my e determined in n imge, it is lso possile to skeletonize the ckground. This is often clled the skiz of the fetures. Figure 77 shows n exmple.

57 Figure 75. Seprting the rnches of the skeleton of network for mesurement of their lengths. Figure 76. Detil of the skeleton from Figure 75 showing nodes. Removing the red node points does not disconnect ll of the rnches; the green ner-node points must lso e deleted to ssure tht no eight-connections remin etween different rnches. In the figure, end points re shown s lue. Figure 77. The skiz of the sme imge shown in Figure 69: () complete skeleton of the ckground; () pruned skeleton. Consisting of points equidistnt from feture oundries, it effectively divides the imge into regions of influence round ech feture (Serr, 1982). It my e desirle to eliminte from the skiz those lines tht re equidistnt from two portions of the oundry of the sme feture. This elimintion is esily ccomplished, since rnches hve n end; other lines in the skiz re continuous nd hve no ends except t the imge oundries. Pruning rnches from skeleton (or skiz) simply requires strting t ech end point (points with single neighor) nd eliminting touching pixels until node ( point with more thn two neighors) is reched. Boundry lines nd thickening Another use for skeletoniztion is to thin down oundries tht my pper rod or of vrile thickness in imges. This phenomenon is prticulrly common in light microscope imges of metls whose grin oundries re reveled y chemicl etching. Such etching preferentilly ttcks the oundries, ut in order to produce continuous drk lines, it lso rodens them. In order to mesure the ctul size of grins, the djcency of different phses, or the length of oundry lines, it is preferle to thin the lines y skeletoniztion.

58 Figure 78. Skeletoniztion of grin oundries: () metllogrphic imge of etched 1040 steel; () thresholded imge showing oundries nd drk ptches of iron cride (nd perlite); (c) skeletonized from imge ; (d) pruned from imge c; (e) enlrged to show eightconnected line; (f) converted to fourconnected line; (g) grins seprted y thickened lines; (h) identifiction of individul grins. c d e f g h

59 Figure 78 shows n exmple. The originl polished nd etched metl smple hs drk nd wide grin oundries, s well s drk ptches corresponding to crides nd perlite. Thresholding the imge produces rod lines, which cn e skeletonized to reduce them to single-pixel width. Since this is properly continuous tesseltion, it cn e clened up y pruning ll rnches with end points. The resulting lines delinete the grin oundries, ut ecuse they re eight-connected, they do not seprte the grins for individul mesurement. Converting the lines to four-connected, clled thickening, cn e ccomplished with diltion tht dds pixels only for few neighor ptterns corresponding to eight-connected corners (or the skeleton could hve een produced using fourconnected rules to egin with). The resulting lines seprte the grins, which cn e identified nd mesured s shown. Figure 79 shows how this pproch cn e used to simplify n imge nd isolte the sic structure for mesurement. The originl imge is light microgrph of cells. It might e used to mesure the vrition in cell size with the distnce from the two stomt (openings). This process is gretly simplified y reducing the cell wlls to single lines. Leveling the ckground rightness of the originl imge nd then thresholding leves oundry lines of vrile width. Skeletonizing them produces network of single-pixel-wide lines tht delinete the sic cell rrngement. Unfortuntely, the grin oundry tesseltion produced y simple thresholding nd skeletoniztion is incomplete in mny cses. Some of the oundries my fil to etch ecuse the crystllogrphic mismtch cross the oundry is smll or the concentrtion of defects or impurities is low. The result is tesseltion with some missing lines, which would is susequent nlysis. Figure 80 shows one of the simplest pproches to deling with this sitution. Skeletonizing the incomplete network is used to identify the end points (points with single neighor). It is resoned tht these points should occur in pirs, so ech is dilted y some ritrrily selected distnce which, it is hoped, will spn hlf of the gp in the network. The resulting dilted circles re ORed with the originl network nd the result is gin skeletonized. Wherever the diltion hs cused the circles to touch, the result is line segment tht joins the corresponding end points. This method is imperfect, however. Some of the points my e too fr prt for the circles to touch, while in other plces, the circles my oscure detils y touching severl existing lines, oversimplifying the resulting network. It is not esy to select n pproprite diltion rdius, ecuse the gps re not ll the sme size (nd not ll of the grins re either). In ddition, unmtched ends, or points due to dirt or prticultes within the grins, cn cuse difficulties. c Figure 79. Light microscope imge of cells in plnt tissue: () originl; () thresholded; (c) skeleton superimposed on originl (imge courtesy Dt Trnsltions, Inc.)

60 c Figure 80. Diltion method for completing grin oundry tesseltion: () incomplete network; () diltion of end point y ritrry rdius, shown s circles overlid on the originl; (c) re-skeletoniztion of network, showing typicl errors such s removl of smll grins (1), lrge gps still not joined (2), nd dngling single ends (3). Other methods re lso ville. A computtionlly intensive pproch loctes ll of the end points nd uses relxtion method to pir them up, so tht line direction is mintined, lines re not llowed to cross, nd closer points re mtched first. This method suffers some of the sme prolems s diltion if unmtched end points or noise re present, ut t lest it dels well with gps of different sizes. A third pproch, the use of wtershed segmenttion sed on the EDM, is perhps the most efficient nd resonly ccurte method. As shown in Figure 81, it correctly drws in most of the missing lines, ut erroneously segments grins with concve shpes (which re fortuntely rre in rel microstructures). Comining skeleton nd EDM The skeleton nd the EDM re oth importnt mesurement tools for imges, nd y comining them in vrious wys it is possile to efficiently extrct quite vriety of numeric vlues to quntify imge dt. A few exmples will illustrte the vriety of techniques ville. c Figure 81. Wtershed segmenttion pplied to the sme imge s Figure 80: () the imge is inverted to del with the grins rther thn the oundries; () wtershed lines re drwn in, connecting most of the roken oundries; (c) in the re-inverted result typicl errors pper such s lrge gps not joined (1) nd flse segmenttion of irregulr shped grins (2).

61 Figure 82. An irregulr feture shown with its skeleton superimposed on the EDM (using pseudo-color), nd the histogrm of the EDM vlues selected y the skeleton. The Eucliden distnce mp discussed previously provides vlues tht mesure the distnce of every pixel from the ckground. For fetures of irregulr shpe or width, the pixels long the center line correspond to the centers of inscried circles, nd their EDM vlues cn e used to mesure the width nd its vrition. The skeleton provides wy to smple these pixels, for exmple y using the skeleton s msk nd then exmining the histogrm s shown in Figure 82. The skeleton provides sic tool for mesuring the length of such irregulr fetures, ut in generl is too short. The EDM vlues for the pixels t the end points of the skeleton give the rdii of the inscried circles t the ends. Adding these vlues to the skeleton length corrects for the shortness of the skeleton nd provides more ccurte mesure of the length of the irregulr feture. The skeleton of the ckground (the skiz) cn e comined with the EDM of the ckground to determine the minimum seprtion distnce etween fetures. Minimum EDM vlues long the pruned skiz correspond to the centers of circles tht touch two fetures, nd twice those vlues correspond to the seprtion distnces. The exmple in Figure 83 shows digrm of neuron with neurites tht rnch. Thresholding the centrl cell ody, inverting the imge, nd creting the EDM produces mesurement of the c Figure 83. Relting distnce to length: () digrm of neurl cell; () skeleton segments of the neurites, color coded ccording to distnce from the cell ody (vlues otined from the EDM s descried in the text); (c) plot of distnce vs. length.

2 Computing all Intersections of a Set of Segments Line Segment Intersection

2 Computing all Intersections of a Set of Segments Line Segment Intersection 15-451/651: Design & Anlysis of Algorithms Novemer 14, 2016 Lecture #21 Sweep-Line nd Segment Intersection lst chnged: Novemer 8, 2017 1 Preliminries The sweep-line prdigm is very powerful lgorithmic design

More information

Before We Begin. Introduction to Spatial Domain Filtering. Introduction to Digital Image Processing. Overview (1): Administrative Details (1):

Before We Begin. Introduction to Spatial Domain Filtering. Introduction to Digital Image Processing. Overview (1): Administrative Details (1): Overview (): Before We Begin Administrtive detils Review some questions to consider Winter 2006 Imge Enhncement in the Sptil Domin: Bsics of Sptil Filtering, Smoothing Sptil Filters, Order Sttistics Filters

More information

A dual of the rectangle-segmentation problem for binary matrices

A dual of the rectangle-segmentation problem for binary matrices A dul of the rectngle-segmenttion prolem for inry mtrices Thoms Klinowski Astrct We consider the prolem to decompose inry mtrix into smll numer of inry mtrices whose -entries form rectngle. We show tht

More information

6.3 Volumes. Just as area is always positive, so is volume and our attitudes towards finding it.

6.3 Volumes. Just as area is always positive, so is volume and our attitudes towards finding it. 6.3 Volumes Just s re is lwys positive, so is volume nd our ttitudes towrds finding it. Let s review how to find the volume of regulr geometric prism, tht is, 3-dimensionl oject with two regulr fces seprted

More information

Slides for Data Mining by I. H. Witten and E. Frank

Slides for Data Mining by I. H. Witten and E. Frank Slides for Dt Mining y I. H. Witten nd E. Frnk Simplicity first Simple lgorithms often work very well! There re mny kinds of simple structure, eg: One ttriute does ll the work All ttriutes contriute eqully

More information

Fig.1. Let a source of monochromatic light be incident on a slit of finite width a, as shown in Fig. 1.

Fig.1. Let a source of monochromatic light be incident on a slit of finite width a, as shown in Fig. 1. Answer on Question #5692, Physics, Optics Stte slient fetures of single slit Frunhofer diffrction pttern. The slit is verticl nd illuminted by point source. Also, obtin n expression for intensity distribution

More information

Fig.25: the Role of LEX

Fig.25: the Role of LEX The Lnguge for Specifying Lexicl Anlyzer We shll now study how to uild lexicl nlyzer from specifiction of tokens in the form of list of regulr expressions The discussion centers round the design of n existing

More information

Lecture 10 Evolutionary Computation: Evolution strategies and genetic programming

Lecture 10 Evolutionary Computation: Evolution strategies and genetic programming Lecture 10 Evolutionry Computtion: Evolution strtegies nd genetic progrmming Evolution strtegies Genetic progrmming Summry Negnevitsky, Person Eduction, 2011 1 Evolution Strtegies Another pproch to simulting

More information

COMP 423 lecture 11 Jan. 28, 2008

COMP 423 lecture 11 Jan. 28, 2008 COMP 423 lecture 11 Jn. 28, 2008 Up to now, we hve looked t how some symols in n lphet occur more frequently thn others nd how we cn sve its y using code such tht the codewords for more frequently occuring

More information

A Tautology Checker loosely related to Stålmarck s Algorithm by Martin Richards

A Tautology Checker loosely related to Stålmarck s Algorithm by Martin Richards A Tutology Checker loosely relted to Stålmrck s Algorithm y Mrtin Richrds mr@cl.cm.c.uk http://www.cl.cm.c.uk/users/mr/ University Computer Lortory New Museum Site Pemroke Street Cmridge, CB2 3QG Mrtin

More information

In the last lecture, we discussed how valid tokens may be specified by regular expressions.

In the last lecture, we discussed how valid tokens may be specified by regular expressions. LECTURE 5 Scnning SYNTAX ANALYSIS We know from our previous lectures tht the process of verifying the syntx of the progrm is performed in two stges: Scnning: Identifying nd verifying tokens in progrm.

More information

P(r)dr = probability of generating a random number in the interval dr near r. For this probability idea to make sense we must have

P(r)dr = probability of generating a random number in the interval dr near r. For this probability idea to make sense we must have Rndom Numers nd Monte Crlo Methods Rndom Numer Methods The integrtion methods discussed so fr ll re sed upon mking polynomil pproximtions to the integrnd. Another clss of numericl methods relies upon using

More information

GENERATING ORTHOIMAGES FOR CLOSE-RANGE OBJECTS BY AUTOMATICALLY DETECTING BREAKLINES

GENERATING ORTHOIMAGES FOR CLOSE-RANGE OBJECTS BY AUTOMATICALLY DETECTING BREAKLINES GENEATING OTHOIMAGES FO CLOSE-ANGE OBJECTS BY AUTOMATICALLY DETECTING BEAKLINES Efstrtios Stylinidis 1, Lzros Sechidis 1, Petros Ptis 1, Spiros Sptls 2 Aristotle University of Thessloniki 1 Deprtment of

More information

If you are at the university, either physically or via the VPN, you can download the chapters of this book as PDFs.

If you are at the university, either physically or via the VPN, you can download the chapters of this book as PDFs. Lecture 5 Wlks, Trils, Pths nd Connectedness Reding: Some of the mteril in this lecture comes from Section 1.2 of Dieter Jungnickel (2008), Grphs, Networks nd Algorithms, 3rd edition, which is ville online

More information

Spectral Analysis of MCDF Operations in Image Processing

Spectral Analysis of MCDF Operations in Image Processing Spectrl Anlysis of MCDF Opertions in Imge Processing ZHIQIANG MA 1,2 WANWU GUO 3 1 School of Computer Science, Northest Norml University Chngchun, Jilin, Chin 2 Deprtment of Computer Science, JilinUniversity

More information

Presentation Martin Randers

Presentation Martin Randers Presenttion Mrtin Rnders Outline Introduction Algorithms Implementtion nd experiments Memory consumption Summry Introduction Introduction Evolution of species cn e modelled in trees Trees consist of nodes

More information

1. SEQUENCES INVOLVING EXPONENTIAL GROWTH (GEOMETRIC SEQUENCES)

1. SEQUENCES INVOLVING EXPONENTIAL GROWTH (GEOMETRIC SEQUENCES) Numbers nd Opertions, Algebr, nd Functions 45. SEQUENCES INVOLVING EXPONENTIAL GROWTH (GEOMETRIC SEQUENCES) In sequence of terms involving eponentil growth, which the testing service lso clls geometric

More information

CS143 Handout 07 Summer 2011 June 24 th, 2011 Written Set 1: Lexical Analysis

CS143 Handout 07 Summer 2011 June 24 th, 2011 Written Set 1: Lexical Analysis CS143 Hndout 07 Summer 2011 June 24 th, 2011 Written Set 1: Lexicl Anlysis In this first written ssignment, you'll get the chnce to ply round with the vrious constructions tht come up when doing lexicl

More information

CSCI 3130: Formal Languages and Automata Theory Lecture 12 The Chinese University of Hong Kong, Fall 2011

CSCI 3130: Formal Languages and Automata Theory Lecture 12 The Chinese University of Hong Kong, Fall 2011 CSCI 3130: Forml Lnguges nd utomt Theory Lecture 12 The Chinese University of Hong Kong, Fll 2011 ndrej Bogdnov In progrmming lnguges, uilding prse trees is significnt tsk ecuse prse trees tell us the

More information

Machine vision system for surface inspection on brushed industrial parts.

Machine vision system for surface inspection on brushed industrial parts. Mchine vision system for surfce inspection on rushed industril prts. Nicols Bonnot, Rlph Seulin, Frederic Merienne Lortoire Le2i, CNRS UMR 5158, University of Burgundy, Le Creusot, Frnce. ABSTRACT This

More information

OUTPUT DELIVERY SYSTEM

OUTPUT DELIVERY SYSTEM Differences in ODS formtting for HTML with Proc Print nd Proc Report Lur L. M. Thornton, USDA-ARS, Animl Improvement Progrms Lortory, Beltsville, MD ABSTRACT While Proc Print is terrific tool for dt checking

More information

Complete Coverage Path Planning of Mobile Robot Based on Dynamic Programming Algorithm Peng Zhou, Zhong-min Wang, Zhen-nan Li, Yang Li

Complete Coverage Path Planning of Mobile Robot Based on Dynamic Programming Algorithm Peng Zhou, Zhong-min Wang, Zhen-nan Li, Yang Li 2nd Interntionl Conference on Electronic & Mechnicl Engineering nd Informtion Technology (EMEIT-212) Complete Coverge Pth Plnning of Mobile Robot Bsed on Dynmic Progrmming Algorithm Peng Zhou, Zhong-min

More information

CS321 Languages and Compiler Design I. Winter 2012 Lecture 5

CS321 Languages and Compiler Design I. Winter 2012 Lecture 5 CS321 Lnguges nd Compiler Design I Winter 2012 Lecture 5 1 FINITE AUTOMATA A non-deterministic finite utomton (NFA) consists of: An input lphet Σ, e.g. Σ =,. A set of sttes S, e.g. S = {1, 3, 5, 7, 11,

More information

1 Quad-Edge Construction Operators

1 Quad-Edge Construction Operators CS48: Computer Grphics Hndout # Geometric Modeling Originl Hndout #5 Stnford University Tuesdy, 8 December 99 Originl Lecture #5: 9 November 99 Topics: Mnipultions with Qud-Edge Dt Structures Scribe: Mike

More information

10.5 Graphing Quadratic Functions

10.5 Graphing Quadratic Functions 0.5 Grphing Qudrtic Functions Now tht we cn solve qudrtic equtions, we wnt to lern how to grph the function ssocited with the qudrtic eqution. We cll this the qudrtic function. Grphs of Qudrtic Functions

More information

What are suffix trees?

What are suffix trees? Suffix Trees 1 Wht re suffix trees? Allow lgorithm designers to store very lrge mount of informtion out strings while still keeping within liner spce Allow users to serch for new strings in the originl

More information

Dr. D.M. Akbar Hussain

Dr. D.M. Akbar Hussain Dr. D.M. Akr Hussin Lexicl Anlysis. Bsic Ide: Red the source code nd generte tokens, it is similr wht humns will do to red in; just tking on the input nd reking it down in pieces. Ech token is sequence

More information

6.2 Volumes of Revolution: The Disk Method

6.2 Volumes of Revolution: The Disk Method mth ppliction: volumes by disks: volume prt ii 6 6 Volumes of Revolution: The Disk Method One of the simplest pplictions of integrtion (Theorem 6) nd the ccumultion process is to determine so-clled volumes

More information

Section 10.4 Hyperbolas

Section 10.4 Hyperbolas 66 Section 10.4 Hyperbols Objective : Definition of hyperbol & hyperbols centered t (0, 0). The third type of conic we will study is the hyperbol. It is defined in the sme mnner tht we defined the prbol

More information

II. THE ALGORITHM. A. Depth Map Processing

II. THE ALGORITHM. A. Depth Map Processing Lerning Plnr Geometric Scene Context Using Stereo Vision Pul G. Bumstrck, Bryn D. Brudevold, nd Pul D. Reynolds {pbumstrck,brynb,pulr2}@stnford.edu CS229 Finl Project Report December 15, 2006 Abstrct A

More information

Definition of Regular Expression

Definition of Regular Expression Definition of Regulr Expression After the definition of the string nd lnguges, we re redy to descrie regulr expressions, the nottion we shll use to define the clss of lnguges known s regulr sets. Recll

More information

Agilent Mass Hunter Software

Agilent Mass Hunter Software Agilent Mss Hunter Softwre Quick Strt Guide Use this guide to get strted with the Mss Hunter softwre. Wht is Mss Hunter Softwre? Mss Hunter is n integrl prt of Agilent TOF softwre (version A.02.00). Mss

More information

Grade 7/8 Math Circles Geometric Arithmetic October 31, 2012

Grade 7/8 Math Circles Geometric Arithmetic October 31, 2012 Fculty of Mthemtics Wterloo, Ontrio N2L 3G1 Grde 7/8 Mth Circles Geometric Arithmetic Octoer 31, 2012 Centre for Eduction in Mthemtics nd Computing Ancient Greece hs given irth to some of the most importnt

More information

From Dependencies to Evaluation Strategies

From Dependencies to Evaluation Strategies From Dependencies to Evlution Strtegies Possile strtegies: 1 let the user define the evlution order 2 utomtic strtegy sed on the dependencies: use locl dependencies to determine which ttriutes to compute

More information

Graphs with at most two trees in a forest building process

Graphs with at most two trees in a forest building process Grphs with t most two trees in forest uilding process rxiv:802.0533v [mth.co] 4 Fe 208 Steve Butler Mis Hmnk Mrie Hrdt Astrct Given grph, we cn form spnning forest y first sorting the edges in some order,

More information

COLOUR IMAGE MATCHING FOR DTM GENERATION AND HOUSE EXTRACTION

COLOUR IMAGE MATCHING FOR DTM GENERATION AND HOUSE EXTRACTION Hee Ju Prk OLOUR IMAGE MATHING FOR DTM GENERATION AND HOUSE EXTRATION Hee Ju PARK, Petr ZINMMERMANN * Swiss Federl Institute of Technology, Zuric Switzerlnd Institute for Geodesy nd Photogrmmetry heeju@ns.shingu-c.c.kr

More information

Unit #9 : Definite Integral Properties, Fundamental Theorem of Calculus

Unit #9 : Definite Integral Properties, Fundamental Theorem of Calculus Unit #9 : Definite Integrl Properties, Fundmentl Theorem of Clculus Gols: Identify properties of definite integrls Define odd nd even functions, nd reltionship to integrl vlues Introduce the Fundmentl

More information

SUPPLEMENTARY INFORMATION

SUPPLEMENTARY INFORMATION Supplementry Figure y (m) x (m) prllel perpendiculr Distnce (m) Bird Stndrd devition for distnce (m) c 6 prllel perpendiculr 4 doi:.8/nture99 SUPPLEMENTARY FIGURE Confirmtion tht movement within the flock

More information

12-B FRACTIONS AND DECIMALS

12-B FRACTIONS AND DECIMALS -B Frctions nd Decimls. () If ll four integers were negtive, their product would be positive, nd so could not equl one of them. If ll four integers were positive, their product would be much greter thn

More information

The Math Learning Center PO Box 12929, Salem, Oregon Math Learning Center

The Math Learning Center PO Box 12929, Salem, Oregon Math Learning Center Resource Overview Quntile Mesure: Skill or Concept: 80Q Multiply two frctions or frction nd whole numer. (QT N ) Excerpted from: The Mth Lerning Center PO Box 99, Slem, Oregon 9709 099 www.mthlerningcenter.org

More information

Class-XI Mathematics Conic Sections Chapter-11 Chapter Notes Key Concepts

Class-XI Mathematics Conic Sections Chapter-11 Chapter Notes Key Concepts Clss-XI Mthemtics Conic Sections Chpter-11 Chpter Notes Key Concepts 1. Let be fixed verticl line nd m be nother line intersecting it t fixed point V nd inclined to it t nd ngle On rotting the line m round

More information

Chapter 2 Capacitive Sensing Electrodes

Chapter 2 Capacitive Sensing Electrodes Chpter 2 Cpcitive Sensing Electrodes The cpcitive sensing electrodes on the top of CMOS chip serve s n interfce etween the microelectronic redout system nd the iologicl/chemicl nlyte. These electrodes

More information

INTRODUCTION TO SIMPLICIAL COMPLEXES

INTRODUCTION TO SIMPLICIAL COMPLEXES INTRODUCTION TO SIMPLICIAL COMPLEXES CASEY KELLEHER AND ALESSANDRA PANTANO 0.1. Introduction. In this ctivity set we re going to introduce notion from Algebric Topology clled simplicil homology. The min

More information

ZZ - Advanced Math Review 2017

ZZ - Advanced Math Review 2017 ZZ - Advnced Mth Review Mtrix Multipliction Given! nd! find the sum of the elements of the product BA First, rewrite the mtrices in the correct order to multiply The product is BA hs order x since B is

More information

Representation of Numbers. Number Representation. Representation of Numbers. 32-bit Unsigned Integers 3/24/2014. Fixed point Integer Representation

Representation of Numbers. Number Representation. Representation of Numbers. 32-bit Unsigned Integers 3/24/2014. Fixed point Integer Representation Representtion of Numbers Number Representtion Computer represent ll numbers, other thn integers nd some frctions with imprecision. Numbers re stored in some pproximtion which cn be represented by fixed

More information

Algorithm Design (5) Text Search

Algorithm Design (5) Text Search Algorithm Design (5) Text Serch Tkshi Chikym School of Engineering The University of Tokyo Text Serch Find sustring tht mtches the given key string in text dt of lrge mount Key string: chr x[m] Text Dt:

More information

Unit 5 Vocabulary. A function is a special relationship where each input has a single output.

Unit 5 Vocabulary. A function is a special relationship where each input has a single output. MODULE 3 Terms Definition Picture/Exmple/Nottion 1 Function Nottion Function nottion is n efficient nd effective wy to write functions of ll types. This nottion llows you to identify the input vlue with

More information

A Sparse Grid Representation for Dynamic Three-Dimensional Worlds

A Sparse Grid Representation for Dynamic Three-Dimensional Worlds A Sprse Grid Representtion for Dynmic Three-Dimensionl Worlds Nthn R. Sturtevnt Deprtment of Computer Science University of Denver Denver, CO, 80208 sturtevnt@cs.du.edu Astrct Grid representtions offer

More information

USING HOUGH TRANSFORM IN LINE EXTRACTION

USING HOUGH TRANSFORM IN LINE EXTRACTION Stylinidis, Efstrtios USING HOUGH TRANSFORM IN LINE EXTRACTION Efstrtios STYLIANIDIS, Petros PATIAS The Aristotle University of Thessloniki, Deprtment of Cdstre Photogrmmetry nd Crtogrphy Univ. Box 473,

More information

this grammar generates the following language: Because this symbol will also be used in a later step, it receives the

this grammar generates the following language: Because this symbol will also be used in a later step, it receives the LR() nlysis Drwcks of LR(). Look-hed symols s eplined efore, concerning LR(), it is possile to consult the net set to determine, in the reduction sttes, for which symols it would e possile to perform reductions.

More information

ON THE DEHN COMPLEX OF VIRTUAL LINKS

ON THE DEHN COMPLEX OF VIRTUAL LINKS ON THE DEHN COMPLEX OF VIRTUAL LINKS RACHEL BYRD, JENS HARLANDER Astrct. A virtul link comes with vriety of link complements. This rticle is concerned with the Dehn spce, pseudo mnifold with oundry, nd

More information

On the Detection of Step Edges in Algorithms Based on Gradient Vector Analysis

On the Detection of Step Edges in Algorithms Based on Gradient Vector Analysis On the Detection of Step Edges in Algorithms Bsed on Grdient Vector Anlysis A. Lrr6, E. Montseny Computer Engineering Dept. Universitt Rovir i Virgili Crreter de Slou sin 43006 Trrgon, Spin Emil: lrre@etse.urv.es

More information

CS380: Computer Graphics Modeling Transformations. Sung-Eui Yoon ( 윤성의 ) Course URL:

CS380: Computer Graphics Modeling Transformations. Sung-Eui Yoon ( 윤성의 ) Course URL: CS38: Computer Grphics Modeling Trnsformtions Sung-Eui Yoon ( 윤성의 ) Course URL: http://sgl.kist.c.kr/~sungeui/cg/ Clss Ojectives (Ch. 3.5) Know the clssic dt processing steps, rendering pipeline, for rendering

More information

EECS150 - Digital Design Lecture 23 - High-level Design and Optimization 3, Parallelism and Pipelining

EECS150 - Digital Design Lecture 23 - High-level Design and Optimization 3, Parallelism and Pipelining EECS150 - Digitl Design Lecture 23 - High-level Design nd Optimiztion 3, Prllelism nd Pipelining Nov 12, 2002 John Wwrzynek Fll 2002 EECS150 - Lec23-HL3 Pge 1 Prllelism Prllelism is the ct of doing more

More information

Mathematics Background

Mathematics Background For more roust techer experience, plese visit Techer Plce t mthdshord.com/cmp3 Mthemtics Bckground Extending Understnding of Two-Dimensionl Geometry In Grde 6, re nd perimeter were introduced to develop

More information

L. Yaroslavsky. Fundamentals of Digital Image Processing. Course

L. Yaroslavsky. Fundamentals of Digital Image Processing. Course L. Yroslvsky. Fundmentls of Digitl Imge Processing. Course 0555.330 Lecture. Imge enhncement.. Imge enhncement s n imge processing tsk. Clssifiction of imge enhncement methods Imge enhncement is processing

More information

Lab 1 - Counter. Create a project. Add files to the project. Compile design files. Run simulation. Debug results

Lab 1 - Counter. Create a project. Add files to the project. Compile design files. Run simulation. Debug results 1 L 1 - Counter A project is collection mechnism for n HDL design under specifiction or test. Projects in ModelSim ese interction nd re useful for orgnizing files nd specifying simultion settings. The

More information

Tries. Yufei Tao KAIST. April 9, Y. Tao, April 9, 2013 Tries

Tries. Yufei Tao KAIST. April 9, Y. Tao, April 9, 2013 Tries Tries Yufei To KAIST April 9, 2013 Y. To, April 9, 2013 Tries In this lecture, we will discuss the following exct mtching prolem on strings. Prolem Let S e set of strings, ech of which hs unique integer

More information

MTH 146 Conics Supplement

MTH 146 Conics Supplement 105- Review of Conics MTH 146 Conics Supplement In this section we review conics If ou ne more detils thn re present in the notes, r through section 105 of the ook Definition: A prol is the set of points

More information

Chapter44. Polygons and solids. Contents: A Polygons B Triangles C Quadrilaterals D Solids E Constructing solids

Chapter44. Polygons and solids. Contents: A Polygons B Triangles C Quadrilaterals D Solids E Constructing solids Chpter44 Polygons nd solids Contents: A Polygons B Tringles C Qudrilterls D Solids E Constructing solids 74 POLYGONS AND SOLIDS (Chpter 4) Opening prolem Things to think out: c Wht different shpes cn you

More information

Distributed Systems Principles and Paradigms

Distributed Systems Principles and Paradigms Distriuted Systems Principles nd Prdigms Chpter 11 (version April 7, 2008) Mrten vn Steen Vrije Universiteit Amsterdm, Fculty of Science Dept. Mthemtics nd Computer Science Room R4.20. Tel: (020) 598 7784

More information

George Boole. IT 3123 Hardware and Software Concepts. Switching Algebra. Boolean Functions. Boolean Functions. Truth Tables

George Boole. IT 3123 Hardware and Software Concepts. Switching Algebra. Boolean Functions. Boolean Functions. Truth Tables George Boole IT 3123 Hrdwre nd Softwre Concepts My 28 Digitl Logic The Little Mn Computer 1815 1864 British mthemticin nd philosopher Mny contriutions to mthemtics. Boolen lger: n lger over finite sets

More information

Tilt-Sensing with Kionix MEMS Accelerometers

Tilt-Sensing with Kionix MEMS Accelerometers Tilt-Sensing with Kionix MEMS Accelerometers Introduction Tilt/Inclintion sensing is common ppliction for low-g ccelerometers. This ppliction note describes how to use Kionix MEMS low-g ccelerometers to

More information

Systems I. Logic Design I. Topics Digital logic Logic gates Simple combinational logic circuits

Systems I. Logic Design I. Topics Digital logic Logic gates Simple combinational logic circuits Systems I Logic Design I Topics Digitl logic Logic gtes Simple comintionl logic circuits Simple C sttement.. C = + ; Wht pieces of hrdwre do you think you might need? Storge - for vlues,, C Computtion

More information

MA1008. Calculus and Linear Algebra for Engineers. Course Notes for Section B. Stephen Wills. Department of Mathematics. University College Cork

MA1008. Calculus and Linear Algebra for Engineers. Course Notes for Section B. Stephen Wills. Department of Mathematics. University College Cork MA1008 Clculus nd Liner Algebr for Engineers Course Notes for Section B Stephen Wills Deprtment of Mthemtics University College Cork s.wills@ucc.ie http://euclid.ucc.ie/pges/stff/wills/teching/m1008/ma1008.html

More information

An Expressive Hybrid Model for the Composition of Cardinal Directions

An Expressive Hybrid Model for the Composition of Cardinal Directions An Expressive Hyrid Model for the Composition of Crdinl Directions Ah Lin Kor nd Brndon Bennett School of Computing, University of Leeds, Leeds LS2 9JT, UK e-mil:{lin,brndon}@comp.leeds.c.uk Astrct In

More information

TOWARDS GRADIENT BASED AERODYNAMIC OPTIMIZATION OF WIND TURBINE BLADES USING OVERSET GRIDS

TOWARDS GRADIENT BASED AERODYNAMIC OPTIMIZATION OF WIND TURBINE BLADES USING OVERSET GRIDS TOWARDS GRADIENT BASED AERODYNAMIC OPTIMIZATION OF WIND TURBINE BLADES USING OVERSET GRIDS S. H. Jongsm E. T. A. vn de Weide H. W. M. Hoeijmkers Overset symposium 10-18-2012 Deprtment of mechnicl engineering

More information

a < a+ x < a+2 x < < a+n x = b, n A i n f(x i ) x. i=1 i=1

a < a+ x < a+2 x < < a+n x = b, n A i n f(x i ) x. i=1 i=1 Mth 33 Volume Stewrt 5.2 Geometry of integrls. In this section, we will lern how to compute volumes using integrls defined by slice nlysis. First, we recll from Clculus I how to compute res. Given the

More information

OPTICS. (b) 3 3. (d) (c) , A small piece

OPTICS. (b) 3 3. (d) (c) , A small piece AQB-07-P-106 641. If the refrctive indices of crown glss for red, yellow nd violet colours re 1.5140, 1.5170 nd 1.518 respectively nd for flint glss re 1.644, 1.6499 nd 1.685 respectively, then the dispersive

More information

CS311H: Discrete Mathematics. Graph Theory IV. A Non-planar Graph. Regions of a Planar Graph. Euler s Formula. Instructor: Işıl Dillig

CS311H: Discrete Mathematics. Graph Theory IV. A Non-planar Graph. Regions of a Planar Graph. Euler s Formula. Instructor: Işıl Dillig CS311H: Discrete Mthemtics Grph Theory IV Instructor: Işıl Dillig Instructor: Işıl Dillig, CS311H: Discrete Mthemtics Grph Theory IV 1/25 A Non-plnr Grph Regions of Plnr Grph The plnr representtion of

More information

File Manager Quick Reference Guide. June Prepared for the Mayo Clinic Enterprise Kahua Deployment

File Manager Quick Reference Guide. June Prepared for the Mayo Clinic Enterprise Kahua Deployment File Mnger Quick Reference Guide June 2018 Prepred for the Myo Clinic Enterprise Khu Deployment NVIGTION IN FILE MNGER To nvigte in File Mnger, users will mke use of the left pne to nvigte nd further pnes

More information

HW Stereotactic Targeting

HW Stereotactic Targeting HW Stereotctic Trgeting We re bout to perform stereotctic rdiosurgery with the Gmm Knife under CT guidnce. We instrument the ptient with bse ring nd for CT scnning we ttch fiducil cge (FC). Above: bse

More information

What do all those bits mean now? Number Systems and Arithmetic. Introduction to Binary Numbers. Questions About Numbers

What do all those bits mean now? Number Systems and Arithmetic. Introduction to Binary Numbers. Questions About Numbers Wht do ll those bits men now? bits (...) Number Systems nd Arithmetic or Computers go to elementry school instruction R-formt I-formt... integer dt number text chrs... floting point signed unsigned single

More information

Stained Glass Design. Teaching Goals:

Stained Glass Design. Teaching Goals: Stined Glss Design Time required 45-90 minutes Teching Gols: 1. Students pply grphic methods to design vrious shpes on the plne.. Students pply geometric trnsformtions of grphs of functions in order to

More information

PNC NC code PROGRAMMER'S MANUAL

PNC NC code PROGRAMMER'S MANUAL PNC-3200 NC code PROGRAMMER'S MANUAL Thnk you very much for purchsing the PNC-3200. To ensure correct nd sfe usge with full understnding of this product's performnce, plese be sure to red through this

More information

Intermediate Information Structures

Intermediate Information Structures CPSC 335 Intermedite Informtion Structures LECTURE 13 Suffix Trees Jon Rokne Computer Science University of Clgry Cnd Modified from CMSC 423 - Todd Trengen UMD upd Preprocessing Strings We will look t

More information

COMBINATORIAL PATTERN MATCHING

COMBINATORIAL PATTERN MATCHING COMBINATORIAL PATTERN MATCHING Genomic Repets Exmple of repets: ATGGTCTAGGTCCTAGTGGTC Motivtion to find them: Genomic rerrngements re often ssocited with repets Trce evolutionry secrets Mny tumors re chrcterized

More information

Analysis of Computed Diffraction Pattern Diagram for Measuring Yarn Twist Angle

Analysis of Computed Diffraction Pattern Diagram for Measuring Yarn Twist Angle Textiles nd Light ndustril Science nd Technology (TLST) Volume 3, 2014 DO: 10.14355/tlist.2014.0301.01 http://www.tlist-journl.org Anlysis of Computed Diffrction Pttern Digrm for Mesuring Yrn Twist Angle

More information

YMCA Your Mesh Comparison Application

YMCA Your Mesh Comparison Application YMCA Your Mesh Comprison Appliction Johnn Schmidt, Reinhold Preiner, Thoms Auzinger, Michel Wimmer, M. Edurd Gröller, Memer, IEEE CS, nd Stefn Bruckner Memer, IEEE CS Alg. 01 Alg. 02 Alg. 03 Alg. 01 Alg.

More information

3.5.1 Single slit diffraction

3.5.1 Single slit diffraction 3..1 Single slit diffrction ves pssing through single slit will lso diffrct nd produce n interference pttern. The reson for this is to do with the finite width of the slit. e will consider this lter. Tke

More information

3.5.1 Single slit diffraction

3.5.1 Single slit diffraction 3.5.1 Single slit diffrction Wves pssing through single slit will lso diffrct nd produce n interference pttern. The reson for this is to do with the finite width of the slit. We will consider this lter.

More information

8.2 Areas in the Plane

8.2 Areas in the Plane 39 Chpter 8 Applictions of Definite Integrls 8. Ares in the Plne Wht ou will lern out... Are Between Curves Are Enclosed Intersecting Curves Boundries with Chnging Functions Integrting with Respect to

More information

1 Drawing 3D Objects in Adobe Illustrator

1 Drawing 3D Objects in Adobe Illustrator Drwing 3D Objects in Adobe Illustrtor 1 1 Drwing 3D Objects in Adobe Illustrtor This Tutoril will show you how to drw simple objects with three-dimensionl ppernce. At first we will drw rrows indicting

More information

such that the S i cover S, or equivalently S

such that the S i cover S, or equivalently S MATH 55 Triple Integrls Fll 16 1. Definition Given solid in spce, prtition of consists of finite set of solis = { 1,, n } such tht the i cover, or equivlently n i. Furthermore, for ech i, intersects i

More information

UT1553B BCRT True Dual-port Memory Interface

UT1553B BCRT True Dual-port Memory Interface UTMC APPICATION NOTE UT553B BCRT True Dul-port Memory Interfce INTRODUCTION The UTMC UT553B BCRT is monolithic CMOS integrted circuit tht provides comprehensive MI-STD- 553B Bus Controller nd Remote Terminl

More information

Math 35 Review Sheet, Spring 2014

Math 35 Review Sheet, Spring 2014 Mth 35 Review heet, pring 2014 For the finl exm, do ny 12 of the 15 questions in 3 hours. They re worth 8 points ech, mking 96, with 4 more points for netness! Put ll your work nd nswers in the provided

More information

Video-rate Image Segmentation by means of Region Splitting and Merging

Video-rate Image Segmentation by means of Region Splitting and Merging Video-rte Imge Segmenttion y mens of Region Splitting nd Merging Knur Anej, Florence Lguzet, Lionel Lcssgne, Alin Merigot Institute for Fundmentl Electronics, University of Pris South Orsy, Frnce knur.nej@gmil.com,

More information

9 4. CISC - Curriculum & Instruction Steering Committee. California County Superintendents Educational Services Association

9 4. CISC - Curriculum & Instruction Steering Committee. California County Superintendents Educational Services Association 9. CISC - Curriculum & Instruction Steering Committee The Winning EQUATION A HIGH QUALITY MATHEMATICS PROFESSIONAL DEVELOPMENT PROGRAM FOR TEACHERS IN GRADES THROUGH ALGEBRA II STRAND: NUMBER SENSE: Rtionl

More information

9 Graph Cutting Procedures

9 Graph Cutting Procedures 9 Grph Cutting Procedures Lst clss we begn looking t how to embed rbitrry metrics into distributions of trees, nd proved the following theorem due to Brtl (1996): Theorem 9.1 (Brtl (1996)) Given metric

More information

Inference of node replacement graph grammars

Inference of node replacement graph grammars Glley Proof 22/6/27; :6 File: id293.tex; BOKCTP/Hin p. Intelligent Dt Anlysis (27) 24 IOS Press Inference of node replcement grph grmmrs Jcek P. Kukluk, Lwrence B. Holder nd Dine J. Cook Deprtment of Computer

More information

UNIVERSITY OF EDINBURGH COLLEGE OF SCIENCE AND ENGINEERING SCHOOL OF INFORMATICS INFORMATICS 1 COMPUTATION & LOGIC INSTRUCTIONS TO CANDIDATES

UNIVERSITY OF EDINBURGH COLLEGE OF SCIENCE AND ENGINEERING SCHOOL OF INFORMATICS INFORMATICS 1 COMPUTATION & LOGIC INSTRUCTIONS TO CANDIDATES UNIVERSITY OF EDINBURGH COLLEGE OF SCIENCE AND ENGINEERING SCHOOL OF INFORMATICS INFORMATICS COMPUTATION & LOGIC Sturdy st April 7 : to : INSTRUCTIONS TO CANDIDATES This is tke-home exercise. It will not

More information

The gamuts of input and output colour imaging media

The gamuts of input and output colour imaging media In Proceedings of IS&T/SPIE Electronic Imging 1 The gmuts of input nd output colour imging medi án Morovic,* Pei Li Sun* nd Peter Morovic * Colour & Imging Institute, University of Dery, UK School of Informtion

More information

Epson Projector Content Manager Operation Guide

Epson Projector Content Manager Operation Guide Epson Projector Content Mnger Opertion Guide Contents 2 Introduction to the Epson Projector Content Mnger Softwre 3 Epson Projector Content Mnger Fetures... 4 Setting Up the Softwre for the First Time

More information

Notes for Graph Theory

Notes for Graph Theory Notes for Grph Theory These re notes I wrote up for my grph theory clss in 06. They contin most of the topics typiclly found in grph theory course. There re proofs of lot of the results, ut not of everything.

More information

Image Segmentation Using Wavelet and watershed transform

Image Segmentation Using Wavelet and watershed transform Imge Segmenttion Using Wvelet nd wtershed trnsform Atollh Hdddi, Mhmod R. Shei, Mohmmd J. Vldn Zoej, Ali mohmmdzdeh Fculty of Geodesy nd Geomtics Engineering, K. N. Toosi University of Technology, Vli_Asr

More information

Lexical Analysis. Amitabha Sanyal. (www.cse.iitb.ac.in/ as) Department of Computer Science and Engineering, Indian Institute of Technology, Bombay

Lexical Analysis. Amitabha Sanyal. (www.cse.iitb.ac.in/ as) Department of Computer Science and Engineering, Indian Institute of Technology, Bombay Lexicl Anlysis Amith Snyl (www.cse.iit.c.in/ s) Deprtment of Computer Science nd Engineering, Indin Institute of Technology, Bomy Septemer 27 College of Engineering, Pune Lexicl Anlysis: 2/6 Recp The input

More information

ΕΠΛ323 - Θεωρία και Πρακτική Μεταγλωττιστών

ΕΠΛ323 - Θεωρία και Πρακτική Μεταγλωττιστών ΕΠΛ323 - Θωρία και Πρακτική Μταγλωττιστών Lecture 3 Lexicl Anlysis Elis Athnsopoulos elisthn@cs.ucy.c.cy Recognition of Tokens if expressions nd reltionl opertors if è if then è then else è else relop

More information

The Nature of Light. Light is a propagating electromagnetic waves

The Nature of Light. Light is a propagating electromagnetic waves The Nture of Light Light is propgting electromgnetic wves Index of Refrction n: In mterils, light intercts with toms/molecules nd trvels slower thn it cn in vcuum, e.g., vwter The opticl property of trnsprent

More information

M-Historian and M-Trend

M-Historian and M-Trend Product Bulletin Issue Dte June 18, 2004 M-Historin nd The M-Historin mnges the collection nd rchiving of trend dt, nd enles the presenttion of rchived trend dt in the ssocited softwre component. M-Historin

More information

Reducing a DFA to a Minimal DFA

Reducing a DFA to a Minimal DFA Lexicl Anlysis - Prt 4 Reducing DFA to Miniml DFA Input: DFA IN Assume DFA IN never gets stuck (dd ded stte if necessry) Output: DFA MIN An equivlent DFA with the minimum numer of sttes. Hrry H. Porter,

More information