• No results found

Design Patterns for Parallel Vision Applications

N/A
N/A
Protected

Academic year: 2020

Share "Design Patterns for Parallel Vision Applications"

Copied!
193
0
0

Loading.... (view fulltext now)

Full text

(1)

S a n ja y S. K a d a m

A t h e s is s u b m it t e d fo r t h e d e g r e e o f

D o c t o r o f P h ilo s o p h y

in t h e U n iv e r s it y o f L o n d o n

UCL

U n iv e r s it y C o lle g e L o n d o n

D e p a r t m e n t o f C o m p u t e r S c ie n c e

(2)

All rights reserved

INFORMATION TO ALL USERS

The quality of this reproduction is dependent upon the quality of the copy submitted.

In the unlikely event that the author did not send a complete manuscript

and there are missing pages, these will be noted. Also, if material had to be removed,

a note will indicate the deletion.

uest.

ProQuest 10010623

Published by ProQuest LLC(2016). Copyright of the Dissertation is held by the Author.

All rights reserved.

This work is protected against unauthorized copying under Title 17, United States Code.

Microform Edition © ProQuest LLC.

ProQuest LLC

789 East Eisenhower Parkway

P.O. Box 1346

(3)

C o m p u te r vision is a challenging ap p lica tio n for high p e rfo rm a n c e c o m p u tin g . To m eet

its c o m p u ta tio n a l d e m a n d s, a n u m b er o f SIM D an d M IM D b ased p arallel m ach in es have

been p ro p o se d an d developed. H ow ever, d ue to high co sts an d long te rm design tim e s

th e se m ach in es have n o t been w idely used. R ecently, n etw o rk b ased en v iro n m e n ts, such

as a c lu ste r of w o rk sta tio n s, have provided effective and econom ical p la tfo rm s fo r high

p e rfo rm a n c e c o m p u tin g . B u t developing parallel a p p lic a tio n s on such m achines involves

co m plex decisions a b o u t d is trib u tio n of processes over th e p ro cesso rs, sched u lin g o f p ro c es­

sor tim e betw een c o m p e tin g processes, co m m u n icatio n p a tte r n s , etc. W ritin g ex p licit code

to co n tro l th e se decisions increases p ro g ram com p lex ity an d reduces p ro g ra m re liab ility

an d code re-usability.

W e p ro p o se a design m eth o d o lo g y b ased on design p a tte r n s w hich is in te n d e d to su p ­

p o rt p a ra lle liz a tio n of vision a p p lic a tio n s on a clu ste r o f w o rk sta tio n s. W e id en tify com m o n

a lg o rith m ic fo rm s o cc u rrin g re p e a te d ly in parallel vision alg o rith m s a n d fo rm u la te th e se as

design p a tte r n s . W e specify v arious a sp e c ts of p arallel b e h a v io u r of a design p a tte r n , such

as p rocess p lace m en t or c o m m u n icatio n p a tte r n s , in its d efinition or se p a ra te ly as issues

to be ad d ressed ex plicitly d u rin g its im p le m e n ta tio n . D esign p a tte r n s en su re p ro g ra m

re lia b ility an d code re -u sab ility since th e y c a p tu r e th e essence o f w orking d esigns in a

form t h a t m akes th e m u sable in different s itu a tio n s an d in fu tu re w ork.

T h e research w ork is co ncerned w ith p re sen tin g a c a ta lo g u e of design p a tte r n s to

im p le m e n t v arious form s of parallelism in vision a p p lic a tio n s on a c lu ste r of w o rk sta tio n s.

U sing re lev an t design p a tte r n s , we im p le m e n t re p re se n ta tiv e vision a lg o rith m s in low, in­

te rm e d ia te an d high level vision ta sk s. M a jo rity o f th ese im p le m e n ta tio n s show p ro m isin g

re su lts. F or ex am p le, given a 512x512 im age, th e im age re s to ra tio n a lg o rith m b ased on

M ark o v ra n d o m field m odel can be co m p leted in less th a n 45 seconds on a n e tw o rk o f 16

w o rk sta tio n s (Sun S P A R C sta tio n 5). T h e sam e ta s k ta k e s m ore th a n 10 m in u te s on a

(4)

I th a n k m y su p e rv iso rs D r. G ra h a m R o b e rts a n d P ro f. B e rn a rd B u x to n for p roviding

in v alu ab le su g g estio n s, m o ral s u p p o rt an d cord ial a tm o sp h e re for c o n d u c tin g th is research

w ork a t D e p a rtm e n t of C o m p u te r Science, U n iv ersity C ollege L ondon.

I am obliged to th e A sso cia tio n of C o m m o n w ealth U niv ersities for fin an cin g m y re­

sea rch w ork th ro u g h th e B ritish C ouncil in th e fo rm of C o m m o n w ealth S cholarsh ip . I

also th a n k D r. V ijay P. B h a tk a r, E x ec u tiv e D ire c to r, C -D A C (C e n te r for D ev elo p m e n t

of A dv an ced C o m p u tin g ), P u n e , In d ia, for ap p ro v in g th e re q u ired s tu d y leave (from my

c u r re n t em p lo y m en t) for co m p letio n of m y P h .D w ork.

I am g ra te fu l to m an y colleagues an d friends w ith w hom I h ad b o th ac ad em ic and

no n -a cad e m ic in te ra c tio n s. M y special th a n k s go to J o n a th a n P oole for in tro d u c in g m e to

th e c o n c e p ts in parallel an d d is trib u te d c o m p u tin g using U C -f-f (a c o n c u rre n t ex ten sio n

of C -f-|-). I also th a n k D r. J u lia S chnabel for pro v id in g m e w ith an a p p lic a tio n in m edical

im ag in g w hich served as an excellent ex am p le for p ara lle liz a tio n as discussed in c h a p te r 6.

I am also th a n k fu l to D r. N iladri C h a tte rje e for review ing th e ea rly d ra fts o f th is th esis and

p ro v id in g n u m ero u s su g g estio n s to w a rd s en h a n cin g th e tech n ical q u a lity of th e m a te ria l

p re se n te d . M an y th a n k s to K a m a le n d u P al, A rif Iqbal, A dil Q u re sh i, Ih san K h a n , C ia n n is

K oufakis, D r. Bill L an gdon an d o th e r researc h ers in th e d e p a rtm e n t for several discussions

on b o th tech n ical an d social a sp e c ts o f s tu d e n t life in L ondon.

I ex p ress u tm o s t g ra titu d e to m y p a re n ts an d re la tiv e s for all th e ir good w ishes an d

blessings. I am also in d e b te d to m y wife D r. P r a tim a for h er co n tin u o u s s u p p o rt,

en c o u ra g e m e n t an d concern for th e co m pletion o f th is research w ork. H er a d ju s tm e n ts

to th e seclusion an d fre q u e n t d isru p tio n s to th e fam ily life d u rin g th e course o f th is s tu d y

w ere highly ap p reciab le . A n d finally, th a n k s to o u r little sons K irtiR a j an d P ra n a v w ho

w ith th e ir ever cheerful a p p e a ra n c e an d in n o cen t b u t in v ig o ra tin g sm iles h elped m e to

(5)

1 In tro d u ctio n 16

1.1 O verview ... 16

1.2 A im s of th is R esearch W o r k ... 20

1.3 C o n trib u tio n s o f th e D i s s e r t a t i o n ...21

1.4 O rg a n iz a tio n of th e t h e s i s ... 22

2 P a rallelism in C o m p u ter V isio n 24 2.1 P ara lle l C o m p u t i n g ... 25

2.1.1 P ara lle l c o m p u tin g s y s t e m s ... 25

2.1.2 A lg o rith m ic c l a s s e s ... 27

2.1.3 P e rfo rm a n c e of parallel p r o g r a m s ... 28

2.2 A n O verview of C o m p u te r V i s i o n ... 29

2.2.1 O b je c t recognition in 2D s c e n e s ... 30

(6)

2.2.3 S e g m e n t a t i o n ...33

2.2.4 R e s e g m e n ta tio n ... 35

2.2.5 P ro p e rtie s an d R e la t io n s ... 35

2.2.6 O b je c t R e c o g n itio n ... 36

2.3 C o m p u ta tio n a l C h a ra c te ris tic s ...36

2.3.1 Low level p r o c e s s i n g ... 37

2.3.2 In te rm e d ia te level p r o c e s s i n g ...37

2.3.3 H igh level p r o c e s s in g ... 38

2.4 P ara lle l sy stem s for v i s i o n ... 39

2.4.1 M esh con n ected s y s t e m s ... 39

2.4.2 P y r a m i d s ...40

2.4.3 H y p e r c u b e s ...40

2.4.4 S h ared m em o ry m a c h i n e s ... 41

2.4.5 P ipelined S y stem s an d S ystolic a r r a y s ... 42

2.4.6 P a rtitio n a b le S y s t e m s ... 42

2.4.7 G e n eral p u rp o se p arallel s y s t e m s ...43

2.5 C o m p u tin g on w o rk sta tio n c l u s t e r s ...44

2.5.1 C lu ste r C o n f i g u r a t i o n ... 44

(7)

2.5.3 Use of c l u s t e r s ... 47

2.5.4 P ara lle l co m p u tin g using C lu ste rs ... 48

2.6 P a ra lle liz a tio n using D esign P a t t e r n s ...50

2.6.1 D esign p a t t e r n s ... 50

2.6.2 F o rm s of P arallelism in V ision ... 52

2.6.3 D esign p a tte r n s for parallel vision ... 55

2.7 R e la te d w o r k ... 56

2.8 S u m m a r y ... 58

3 D esig n p a ttern s for p arallelizing v ision ap p lication s 60 3.1 O rg a n iz a tio n of p a t t e r n s ... 61

3.2 D esc rip tio n o f design p a tte r n s - a te m p la te ... 63

3.3 F arm er-W o rk er P a tte r n ...65

3.4 M a ste r-W o rk e r P a t t e r n ... 70

3.5 C o n tro lle r-W o rk er P a tte r n . ...76

3.6 D iv id e-a n d -C o n q u er P a t t e r n ... 82

3.7 T em p o ra l M u ltip lex in g P a t t e r n ... 87

3.8 P ip elin e P a tt e r n ... 91

3.9 C o m p o site P ip elin e P a t t e r n ... 98

(8)

4 Low lev el alg o rith m s 106

4.1 P ara lle liz a tio n o f low level a lg o rith m s ... 109

4.2 P a rtitio n in g th e im age d a t a ...110

4.3 G re y scale t r a n s f o r m a tio n s ... 112

4.4 Im ag e filtering ...113

4.4.1 C o n v o l u tio n ... 114

4.4.2 R a n k f i l t e r i n g ... 119

4.4.3 S p a tia l f i l t e r s ... 120

4.5 F a s t F o u rier t r a n s f o r m s ... 122

4.6 Im ag e r e s t o r a t i o n ...124

4.6.1 M arkov ra n d o m field m odels for im age r e c o v e r y ...124

4.7 S u m m a r y ... 128

5 In te rm ed ia te lev el p ro cessin g 130 5.1 R egion b ased se g m e n ta tio n ... 132

5.2 P ara lle l R egion-based s e g m e n ta tio n ...134

5.3 S e g m e n ta tio n using P e rc e p tu a l O r g a n iz a tio n ...138

5.3.1 S eq u en tial Line g ro u p in g a l g o r i t h m ... 139

5.3.2 P ara lle l Line g ro u p in g a l g o r i t h m ...143

(9)

6 H igh lev el p ro cessin g 147

6.1 S eq u en tial g eo m etric h ash in g alg o rith m ... 148

6.1.1 P rep ro cessin g P h a s e ...149

6.1.2 R ecognition p h a s e ... 150

6.2 P a ra lle l g eo m etric hash in g a l g o r i t h m ... 152

6.3 M u lti-scale active sh a p e d esc rip tio n - an a p p l i c a t i o n ...157

6.3.1 A n overview of th e sh a p e d esc rip tio n p r o c e s s ... 158

6.4 P a ra lle liz a tio n of th e sh a p e d esc rip tio n p r o c e s s ... 161

6.4.1 P a ra lle liz a tio n using T em p o ra l M u ltip lex in g p a t t e r n ...162

6.4.2 P a ra lle liz a tio n using P ipeline p a t t e r n ...164

6.4.3 P a ra lle liz a tio n using C o m p o site P ip elin e p a t t e r n ... 166

6.5 S u m m a r y ... 168

7 C on clu sion 170 7.1 A im s an d M o t i v a t i o n ... 170

7.2 R esearch R e v i e w ... 172

7.3 C o n trib u tio n s of th e R esearch w o r k ... 175

7.4 C o m p a riso n w ith re la ted w o r k ... 176

7.5 F u tu re w o r k ...177

(10)

A .l P a t te r n D i a g r a m ... 180

A .2 O b je c t In te ra c tio n C h a r t s ... 181

(11)

2.1 A n overview o f a ty p ical vision based a p p l i c a t i o n ... 31

2.2 P ro c e ssin g levels in a ty p ical vision b ased a p p l i c a ti o n ... 37

2.3 A 4 -c o n n ected m esh, p y ra m id an d a 3-dim ensional h y p e rc u b e of processing e l e m e n t s ...40

2.4 S h a re d m em ory m achines (in terc o n n ecte d by a bus an d sw itch in g netw o rk ) a n d sy sto lic /p ip e lin e s y s t e m s ...43

2.5 C o m m o n clu ste r co n fig u ratio n s: bus, s ta r an d a r i n g ... 45

3.1 F a rm e r-W o rk e r P a tte r n ... 66

3.2 O b je c t In te ra c tio n in th e F arm er-W o rk er P a t t e r n ... 67

3.3 M a ste r-W o rk e r P a t t e r n ... 72

3.4 O b je c t In te ra c tio n in th e M aster-W o rk e r P a t t e r n ... 73

3.5 C o n tro lle r-W o rk er P a t t e r n ...77

3.6 O b je c t In te ra c tio n in th e C o n tro lle r-W o rk er P a t t e r n ... 78

3.7 C o n v o lu tio n m asks for finding a) h o rizo n ta l edges an d b) v ertical edges . . . 82

3.8 D C P a t t e r n ... 83

(12)

3.9 O b je c t In te ra c tio n in th e D C P a tte r n ... 84

3.10 T M P a t t e r n ...88

3.11 O b je c t In te ra c tio n in th e T M P a t t e r n ...89

3.12 Vehicle id en tificatio n s y s t e m ...92

3.13 P ip elin e P a t te r n ... 93

3.14 O b je c t In te ra c tio n in th e P ip elin e P a t t e r n ... 94

3.15 Vehicle id en tificatio n s y s t e m ...99

3.16 C o m p o site P ip e lin e P a t t e r n ... 100

3.17 O b je c t In te ra c tio n in th e C o m p o site P ip elin e P a tte r n ... 101

4.1 P a rtitio n in g of an im age, a) Row p a rtitio n in g b) Row p a rtitio n in g w ith d a t a t h a t is to be overlap p ed a n d /o r c o m m u n ic a te d ... I l l 4.2 P e rfo rm a n c e of h isto g ra m e q u a l i z a t i o n ...113

4.3 P e rfo rm a n c e of th e convolution o p e ra tio n using a 3x3 w i n d o w ...115

4.4 P e rfo rm a n c e of th e convolution o p e ra tio n using a 15x15 w indow ...116

4.5 P e rfo rm a n c e of th e convolution o p e ra tio n on a I K x lK i m a g e ...117

4.6 P e rfo rm a n c e of th e F arm er-W o rk er p a tte r n in co n v o lu tio n o p e ra tio n on vary in g th e pro cesso r load an d n u m b er of s u b ta s k s (w indow size 15x15) . . 118

4.7 P e rfo rm a n c e of th e sh a rp e n in g o p e ra tio n using sp a tia l filters (w indow size 1 1 x 1 1 ) ... 121

(13)

4.9 P e rfo rm a n c e of th e im age re s to ra tio n a lg o rith m using M R F m odel (w indow

size 3 x 3 ) ... 126

4.10 P e rfo rm a n c e o f th e M aster-W o rk e r p a tte r n (in im age recovery o p e ra tio n

using th e M R F m odel on a 512x512 im age) s u b je c t to th e e x te rn a l load

an d load d i s t r i b u t i o n ... 128

5.1 a) P a rtitio n e d im age b) C o rre sp o n d in g q u a d tre e ...133

5.2 a) D is trib u tio n of su b im ag es b) M erging of s u b i m a g e s ... 135

5.3 P e rfo rm a n c e of th e parallel sp lit an d m erge se g m e n ta tio n alg o rith m . . . . 136

5.4 Line G ro u p in g ...139

5.5 R e la tio n a l c o n s tra in ts in th e line g ro u p in g a lg o rith m a) p ro x im ity b)

collinear-ity an d c) c o n t i n u a t i o n ...141

5.6 In d ex in g tech n iq u e used in th e line g ro u p in g process, a) search a re a for th e

base line b) th e in d ex a r r a y ... 142

6.1 P re p ro c e ssin g p h ase in th e g eo m etric h ash in g a lg o rith m a) O rth o g o n a l co­

o rd in a te sy stem defined by th e basis se t b) A d d in g (m o d e l, b a sis) p a irs in

th e h ash t a b l e ...150

6.2 R ecog n itio n p h ase in th e g eo m etric hash in g a lg o rith m a) O rth o g o n a l co o rd i­

n a te sy ste m defined by th e basis set b) A ccessing a n d collecting (m o d e l, b a sis)

p a irs from th e h ash bins in h ash t a b l e ...151

6.3 H ash ta b le d a ta s tru c tu r e a) sy m m etric ind ex in g in h a sh ta b le b) h ash

en trie s in n o rm al h ash ta b le c) re d u ctio n in h a sh e n trie s using sy m m e trie s . 154

(14)

6.5 M u lti-scale sh a p e d esc rip tio n process a) p ro p a g a tio n s te p ap p lied on a se t

o f five im age slices b) m u lti-scale sh a p e sta c k of an im ag e slice c o m p u te d

in th e sh a p e focusing s te p (F ig u re (b) a d a p te d from (S chnabel, 1997)). . . . 160

6.6 S h ap e focusing p erfo rm ed a t different scales in th e im ag e scale-space of an

im age slice using activ e c o n to u r m odels: (a) cr = 8 (b) a = 4 (c) a = 2 (d)

(7 = 1. Im age (a) also c o n ta in s th e in itial c o n to u r su p e rim p o se d in black.

All im ages are ta k e n from (S chnabel, 19 9 7 )... 160

6.7 V isu aliza tio n o f th e sta c k c o n to u rs (th o se displayed in F ig u re 6.6) stack e d

using tria n g u la tio n . Im age ta k e n from (S chnabel, 1 9 9 7 )... 161

6.8 P a ra lle liz a tio n of th e sh a p e d esc rip tio n process using a P ip e lin e p a tte r n .

T h e in te g e r values d e n o te seq u e n tia l tim e (in seconds) re q u ired for e x e cu tin g

c o rresp o n d in g co m p o n en ts of th e P ipeline p a t t e r n ... 164

6.9 P a ra lle liz a tio n of th e m ulti-scale sh a p e d esc rip tio n pro cess using a C o m ­

(15)

4.1 E x e c u tio n tim e in (m in :se c) foT h isto g ram e q u a li z a t io n ... 113

4.2 E x ec u tio n tim e in (m in :sec) for th e convolution o p e r a t i o n ... 114

4.3 P e rfo rm a n c e of th e F arm er-W o rk er p a tte r n on v ary in g th e e x te rn a l load an d n u m b e r of su b ta sk s. T h e execution tim e (m in ise c ) d isplayed are for th e convolution o p e ra tio n (w indow size 1 5 x15)... 118

4.4 E x e c u tio n tim e in (m in ise c ) for th e ra n k filterin g o p e r a t i o n ... 120

4.5 E x ec u tio n tim e in (m in :se c) ï o t th e sh a rp e n in g o p e ra tio n ... 121

4.6 E x ec u tio n tim e in (m in :se c) fov F F T o p e r a t i o n ...123

4.7 E x ec u tio n tim e in (m in :sec) fo i im age re s to ra tio n using M R F m odel . . . . 125

4.8 P e rfo rm a n c e of th e M aster-W o rk e r p a tte r n w hen su b je c te d to th e e x te rn a l load. T h e ex e cu tio n tim es (m in :se c) displayed are for th e im age re s to ra tio n o p e ra tio n using th e M R F m odel on a 512x512 im a g e ... 127

5.1 E x ec u tio n tim e in (m in :se c) for th e p arallel sp lit an d m erge se g m e n ta tio n a l g o r i t h m ... 136

5.2 E x ec u tio n tim e in (m in isec ) for various o p e ra tio n s in th e p arallel sp lit an d m erge se g m e n ta tio n alg o rith m applied on a 5 12X 512 i m a g e ...137

(16)

5.3 E x ec u tio n tim e in (m in ise c ) for th e line g ro u p in g process ...144

6.1 E x e c u tio n tim e in (m in :se c) for th e g eo m etric h ash in g a l g o r i t h m ... 156

6.2 E x ec u tio n tim e s in (seconds) iov different im p le m e n ta tio n s an d in d iv id u a l

(17)

In tr o d u c tio n

1.1

O v e r v ie w

C o m p u te r V ision d eals w ith th e principles and tech n iq u e s to e x tr a c t an d in te rp re t useful

in fo rm a tio n in a scene by c a p tu rin g an d analyzing im ages o f t h a t scene. It h as ap p lic a tio n s

in several a re a s such as re m o te sensing, au to n o m o u s vehicle g u id an ce , in d u s tria l in sp ectio n ,

an d m edical im aging. Som e of th ese ap p lica tio n s, such as a u to n o m o u s vehicle g u id an ce ,

are real-tim e an d involve a lg o rith m s w hich m u st co m p lete th e ir c o m p u ta tio n s w ith in a

fra c tio n of a second. Som e ap p lica tio n s req u irin g h u m an in te ra c tio n are in te ra c tiv e and

m u st co m p lete w ith in few seconds or less, d ep e n d in g on th e ty p e o f in te ra c tio n re q u ired .

O th e r ap p lic a tio n s are batch ap p lica tio n s which can to le ra te m ax im u m la te n c y o f few

h o u rs or even d ay s. T h e n a tu re of th e a lg o rith m s involved in th e se ap p lic a tio n s is th u s

v aried. B u t m o st of th e se a lg o rith m s are c o m p u ta tio n a lly in ten siv e an d re q u ire en o rm o u s

c o m p u tin g pow er for th e ir p ra c tic a l im p le m e n ta tio n .

C o m p u te r vision uses a b ro a d sp e c tru m of alg o rith m s covering different a re a s such as

im ag e a n d signal processing, g ra p h th eo ry , m a th e m a tic s, a n d artific ia l intelligence. F ro m

a c o m p u ta tio n a l p ersp ectiv e, vision processing is co n veniently classified in to th re e levels:

low, in te rm e d ia te , and high. Low level processing involves pixel-based tra n s f o rm a tio n s

w here uniform c o m p u ta tio n s are applied a t each pixel or a n e ig h b o rh o o d a ro u n d each

(18)

pixel in th e im ag e d a ta . T h ese c o m p u ta tio n s are m ain ly n u m eric an d well s tr u c tu r e d .

In te rm e d ia te level p rocessing involves b o th num eric an d sym bolic c o m p u ta tio n s . It com ­

prises a lg o rith m s to form regions of in te re st in th e im age d a ta , such as g ro u p in g of low level

fe a tu re s (e.g. edges) in to lines, arcs, o r re c ta n g u la r b o rd e rs of an o b je c t. H igh level pro cess­

ing involves sym bolic c o m p u ta tio n s w here d a t a p rovided by th e low a n d in te rm e d ia te level

a lg o rith m s is used for te s tin g an d g e n e ra tin g h y p o th eses for o b je c t reco g n itio n . A ty p ic a l

vision a p p lic a tio n com prises low, in te rm e d ia te a n d high level vision ta s k s /a lg o r ith m s an d

th u s involves b o th num eric an d sym bolic c o m p u ta tio n s. T h erefo re, a lth o u g h vision has

been identified as a grand challenge ap p lica tio n for high p e rfo rm a n c e co m p u tin g , com ­

p u ta tio n a l c h a ra c te ristic s o f vision ap p lica tio n s are differen t fro m th e s tru c tu r e d n u m b e r

c ru n ch in g c o m p u ta tio n s arising in m o st o th e r g ra n d challenge a p p lic a tio n s (W ang e t al.,

1996).

To m eet th e c o m p u ta tio n a l d e m a n d s of vision ta sk s, several effo rts have been d ire c te d

to w a rd s p roviding a high p erfo rm an c e c o m p u tin g s u p p o rt for th e ir p ra c tic a l im p le m e n ­

ta tio n . A b rief su rv ey of th e research efforts in high p e rfo rm a n c e parallel c o m p u tin g for

vision can be fo u n d in (W ebb, 1994). T h ese efforts can b ro a d ly be g ro u p e d in to follow ­

ing ca te g o ries, based on th e ty p e of co m p u tin g p la tfo rm s th e y utilize: sp ec ia l-p u rp o se

h a rd w a re chips, SIM D b ased m achines, specialized vision sy ste m s an d g en e ral p u rp o se

p arallel m achines. S p ecial-p u rp o se h a rd w a re chips serve as a c c e le ra to rs to specific vision

alg o rith m s since th e y im p le m e n t th e c o m p u ta tio n s in h a rd w a re . H ow ever, th e y are s u ita b le

only for specific w e ll-stru c tu re d low level vision a lg o rith m s, such as im age co n v o lu tio n .

S IM D based m u ltip ro c esso r m achines such as m eshes, a rra y p ro cesso rs, h y p e rc u b e s,

an d p y ra m id s, co n sist of sim ple processing elem en ts co n n e cted by a c o m m u n ic a tio n n e t­

w ork. T h e se m achines p erfo rm well for im p le m e n tin g m o st of th e low level vision algo­

rith m s . B u t th e y a re n o t well su ited for high level vision a lg o rith m s since th e se a lg o rith m s

involve n o n u n ifo rm processing an d com plex d a t a s tru c tu re s . S pecialized vision sy ste m s are

special p u rp o se p arallel m achines designed to su it th e re q u ire m e n ts o f vision ta sk s. T h e y

are c a p a b le of bein g p a rtitio n e d in to one or m ore in d e p e n d e n t S IM D an d M IM D s u b ­

sy ste m s to m a tc h th e c o m p u ta tio n a l c h a ra c te ristic s o f vision a lg o rith m s a t v ario u s levels.

F o r ex am p le, th e im age u n d e rsta n d in g a rc h ite c tu re (lU A ) (W eem s e t al., 1989) h as th re e

(19)

high level vision ta sk s. Specialized vision sy stem s, how ever, have co m plex a rc h ite c tu re s

w hich involve significant design an d d ev elo p m en t effort. T h e need to develop new sy stem

s o ftw a re fo r such m achines re su lts in huge sy stem d ev e lo p m e n t costs.

G e n e ra l p u rp o se parallel m achines such as IB M S P -2, M eiko C S-2, In tel P a ra g o n ,

C ra y T 3 D , an d S G I P ow er C hallenge, have been used successfully for a v arie ty o f high

p e rfo rm a n c e c o m p u tin g ap p lica tio n s. T h ese com m ercial m achines have n o t been developed

fo r a n y specific ap p lica tio n s, b u t are m e a n t to be gen eral p u rp o se sy stem s. M o st of th e m

h av e a sim ila r a rc h ite c tu re co n sistin g of p rocessors in te rc o n n e c te d by a high speed n etw o rk .

T h e se p ro c esso rs are th o se t h a t are used in larg e u n ip ro ce sso r w o rk sta tio n s. T h ese m a ­

ch in es a re ty p ically org an ized as a single box t h a t c o n ta in s all th e p ro cesso r an d m em o ry

m o d u le s in te rc o n n e c te d by a special p u rp o se in te rc o n n e c tio n n etw o rk . A lth o u g h th e re

h av e b een som e a tte m p ts to use th e se m achines for p arallel vision a p p lic a tio n s (W ang,

1995), th e y are still n o t very p o p u la r w ith m an y o rg a n iz a tio n a l se tu p s.

R ecen tly , n etw o rk -b ased c o m p u tin g en v iro n m e n ts, such as a c lu ste r of w o rk sta tio n s,

hav e p ro v id ed effective an d econom ical p la tfo rm s for high p e rfo rm a n c e c o m p u tin g . A

c lu s te r o f w o rk sta tio n s offers several ad v a n ta g e s for parallelizin g an d e x e cu tin g larg e a p ­

p lic a tio n s on a relativ ely low -priced and readily available pool of m achines. It p rovides

m u ltip le C P U s for parallel c o m p u tin g and d ra m a tic a lly im p ro v es v irtu a l m em o ry a n d file

s y ste m p erfo rm an c e. It can ap p ro ach or exceed s u p e rc o m p u te r p e rfo rm a n c e for som e

a p p lic a tio n s and can easily be tu n e d to advances in p ro c esso r an d n etw o rk tech n o lo g y

(A n d e rso n e t al., 1995), (T u rc o tte , 1996). A c lu ste r o f w o rk s ta tio n s can in c o rp o ra te h e t­

ero g e n e o u s a rc h ite c tu re s, so ap p lica tio n s can select th e m o st su ita b le c o m p u tin g reso u rces

fo r each c o m p u ta tio n .

B u t developing parallel ap p lica tio n s on such m achines involves com plex decisions a b o u t

d is trib u tio n o f processes over th e processors, process sy n c h ro n iz a tio n , scheduling of p ro c es­

so r tim e b etw een c o m p e tin g processes, co m m u n icatio n p a tte r n s , e tc . W ritin g ex p licit code

to c o n tro l th ese decisions increases p ro g ram co m p lex ity a n d , red u ces p ro g ra m reliab ility

a n d co d e reusability. Also, th e available m achines a n d th e ir ca p ab ilities can vary from

o ne ex e c u tio n to a n o th e r, an d high co m m u n icatio n co sts can d e g ra d e th e p e rfo rm a n c e in

(20)

p ro g ra m m in g in o rd e r to gain th e ad v a n ta g e s of p o te n tia l p arallelism in an ap p lic a tio n .

M o st of th e m use or m odify existin g parallel code to im p le m e n t p arallelism fo r th e ir

ap p lic a tio n s. In fa c t, som e recen t surveys of experienced p arallel p ro g ra m m e rs have show n

t h a t a b o u t 69% m odify ex istin g p ro g ra m s or com pose p ro g ra m s fro m ex istin g blocks of

code. T h e re m a in in g 31% w ho s t a r t from sc ra tc h are ty p ically c o m p u te r sc ie n tists an d

ap p lied m a th e m a tic ia n s (P an c ak e, 1996),

T h e m ain goal o f th is th esis is to p re sen t a design m eth o d o lo g y b ase d on design p a tte rn s

in te n d e d to s u p p o rt p aralleliz atio n of vision ap p lica tio n s on a c lu ste r of w o rk s ta tio n s . M o st

of th e p arallel alg o rith m s used in im p lem en tin g vision ta s k s re p e a te d ly use only a U nite se t

of a lg o rith m ic form s. W e identify th e se com m on alg o rith m ic fo rm s a n d fo rm u la te th e s e as

design p a tte r n s . W e specify various a sp e c ts of parallel b eh a v io r o f a d esign p a tte r n , such

as process p la c e m e n t an d co m m u n icatio n p a tte r n s , in its defin itio n or s e p a ra te ly as issues

to be ad d re sse d ex plicitly d u rin g its im p le m e n ta tio n . D esign p a tte r n s en su re p ro g ra m

re liab ility an d code re u sab ility since th e y c a p tu re th e essence of w o rk in g d esigns in a form

t h a t m akes th e m usab le in different situ a tio n s an d in fu tu re w ork (C oplien & S c h m id t,

1995), T h e use of th e design p a tte r n s w ould enable d ev e lo p m e n t o f d is trib u te d so ftw a re

quickly, econom ically an d reliably. Using a clu ste r of w o rk sta tio n s, re se a rc h e rs can use th e

design p a tte r n s to im p le m e n t m an y in te ra c tiv e an d b a tc h a p p lic a tio n s in c o m p u te r vision,

A c lu s te r of w o rk sta tio n s is c h a rac te rized by high c o m m u n ic a tio n c o sts an d a v a ria ­

tio n in speed fa c to rs of individual m achines in th e n etw o rk . W e need to ad d re ss th e se

issues w hile fo rm u la tin g th e design p a tte r n s . O ne fa c to r t h a t m inim izes th e effect of high

co m m u n ic a tio n co sts on p erfo rm an c e is granularity. G ra n u la rity o f an a lg o rith m d esc rib es

th e a m o u n t o f w ork asso c ia te d w ith each ta s k re la tiv e to c o m m u n ic a tio n . A n a lg o rith m

t h a t ex c h an g es d a t a betw een its processes a fte r a sm all n u m b e r o f c o m p u ta tio n s is called

fin e -g ra in e d w hile an alg o rith m w here th e c o m p u ta tio n s c o n tin u e for a long tim e befo re

th e c o m m u n ic a tio n is req u ired is te rm e d as coarse-grained. Since a c lu s te r of w o rk s ta tio n s

is in h e re n tly co a rse-g rain ed , we need to fo rm u la te design p a tte r n s so t h a t th e y im p le m e n t

co a rse g ra in e d parallelism . Also, th e design p a tte r n s sho u ld d is tr ib u te th e w ork lo ad

ac co rd in g to th e speed fa c to rs of in d iv id u al m achines in th e n etw o rk .

(21)

of vision a lg o rith m s. We id en tify v arious form s of parallelism in vision a lg o rith m s an d

fo rm u la te design p a tte r n s to im p le m e n t th e m . E ach design p a tte r n c a p tu re s co m m o n

designs used by d ev elopers to parallelize th e ir a p p lic a tio n s. W e p re se n t a c a ta lo g u e of

design p a tte r n s to im p le m e n t various form s of parallelism in vision a p p lic a tio n s on a

c lu ste r o f w o rk sta tio n s. U sing relev an t design p a tte r n s , we im p le m e n t re p re s e n ta tiv e vision

a lg o rith m s in low, in te rm e d ia te an d high level vision ta sk s, an d p re se n t th e e x p e rim e n ta l

re su lts o f th e c o rresp o n d in g parallel im p le m e n ta tio n s.

In low level, we im p le m e n t a lg o rith m s such as h isto g ra m eq u a liz a tio n , co n v o lu tio n ,

im age filterin g using s p a tia l filters, an d im age re s to ra tio n using M ark o v ra n d o m field

m odels. In in te rm e d ia te level, we im p le m e n t reg io n -b ased sp lit a n d m erge se g m e n ta tio n

a lg o rith m an d line g ro u p in g alg o rith m based on p rinciples of p e rc e p tu a l g ro u p in g . In

high level, we im p le m e n t g eo m etric hash in g a lg o rith m for o b je c t reco g n itio n . W e also

discuss p aralleliz atio n of an ap p lica tio n in m edical im aging, nam ely, m u lti-scale ac tiv e

s h a p e d e sc rip tio n o f M R (m ag n e tic resonance) b ra in im ag es using ac tiv e c o n to u r m odels.

1.2

A im s o f th is R e se a r c h W ork

T h e focus of th e w ork in th is th esis is to develop m eth o d o lo g ies to s u p p o rt p ara lle liz a tio n

of vision ap p lic a tio n s on a clu ste r of w o rk sta tio n s. T h e m ain goals of th is th esis w ork are:

• To an aly ze c o m p u ta tio n a l ch a ra c te ristic s o f vision ta s k s a n d identify com m o n algo­

rith m ic s tru c tu re s in th e ir parallel im p le m e n ta tio n s.

• To c a p tu r e an d a rtic u la te th ese alg o rith m ic s tru c tu re s as design p a tte r n s in a form

t h a t m akes th e m usable in different situ a tio n s an d in fu tu re w ork.

• To use th e se design p a tte r n s for im p lem en tin g som e re p re s e n ta tiv e vision a lg o rith m s

in low, in te rm e d ia te an d high level vision processing.

• To ev a lu a te th e v iab ility o f using a clu ste r of w o rk s ta tio n s to parallelize vision

(22)

1 .3

C o n tr ib u tio n s o f th e D is s e r ta tio n

T h e c o n trib u tio n s o f th is d isse rta tio n are three fold. F irstly , we p ro p o se a design m e th o d ­

ology based on design p a tte r n s in ten d ed to s u p p o rt p aralleliz atio n of vision a p p lic a tio n s

on a c lu ste r of w o rk sta tio n s. Secondly, we p re sen t co arse-g rain ed p arallel a lg o rith m s for

so m e re p re se n ta tiv e vision a lg o rith m s in low, in te rm e d ia te a n d high level vision pro cess­

ing. T h ird ly , we use re le v an t design p a tte r n s to im p le m e n t th e se p arallel a lg o rith m s on

w o rk s ta tio n c lu ste rs. T h ese c o n trib u tio n s are su m m arize d as follows:

• D esign p a tte r n s : W e identify com m on a lg o rith m ic s tru c tu re s o cc u rrin g re p e a te d ly

in p arallel vision ta s k s / ap p lica tio n s an d fo rm u la te th e se as design p a tte r n s . We

d esc rib e each design p a tte r n using a tem p la te w hich o u tlin e s in te n t, m o tiv a tio n ,

s tru c tu re , in te ra c tio n a m o n g st th e c o m p o n e n ts an d ap p lic a b ility of th e design p a t­

te rn . T h is d esc rip tio n en ables selection an d use of a design p a tte r n in different

s itu a tio n s a n d in fu tu re work.

• C o arse -g rain e d parallel a lg o rith m s: We p re se n t co a rse-g rain ed parallel a lg o rith m s

an d im p le m e n ta tio n s for several vision ta s k s such as co n v o lu tio n , im ag e filterin g ,

im age re s to ra tio n , region-based se g m e n ta tio n , line g ro u p in g , a n d g eo m etric h ash in g

a lg o rith m for o b je c t recognition. W e also p re se n t different p arallel im p le m e n ta tio n s

of th e m ulti-scale activ e sh a p e d esc rip tio n process (an a p p lic a tio n in m edical im ag ­

ing) using different design p a tte rn s .

• Im p le m e n ta tio n on a c lu ste r of w o rk sta tio n s: U sing re le v an t design p a tte r n s , we

p erfo rm parallel im p le m e n ta tio n s of th e selected re p re se n ta tiv e vision ta s k s s ta te d

above. T h e re su lts of th e se im p le m e n ta tio n s en ab le critica l asse ssm e n t o f th e design

p a tte r n s for achieving im p ro v em en ts in a p p lic a tio n p erfo rm an c e. It also en ab les

e v a lu a tin g th e v iab ility of using w o rk sta tio n clu ste rs for im p le m e n tin g p arallel vision

(23)

1 .4

O r g a n iz a tio n o f th e th e s is

T h e re m a in d e r of th e th esis is org an ized as follows:

• C h a p te r 2 review s co n c ep ts an d m e th o d s in several d ifferen t a re a s re la te d to th e

p arallel vision sy stem s. W e begin w ith a brief in tro d u c tio n to p arallel c o m p u tin g

sy ste m s a n d parallel a lg o rith m s. W e th e n describe g en e ral principles an d m e th o d s

used in th e field of c o m p u te r vision, giving specific e m p h a sis on a p p lic a tio n s in­

volving an a ly sis of 2D scenes. W e also describ e th e c o m p u ta tio n a l c h a ra c te ris tic s

o f vision a lg o rith m s an d o u tlin e SIM D an d M IM D b ased p arallel m ach in es used for

p arallelizin g th e se a lg o rith m s. W e th e n describe parallel c o m p u tin g on w o rk sta tio n

c lu ste rs an d discuss th e ir ad v a n ta g e s over th e co n v e n tio n a l parallel m ach in es. We

p re se n t vario u s form s of p arallelism in vision a lg o rith m s a n d in tro d u c e th e co n c e p t of

design p a tte r n s in te n d e d to s u p p o rt p aralleliz atio n of vision a p p lic a tio n s on a c lu ste r

o f w o rk sta tio n s. F inally, we o u tlin e som e of th e leading research efforts re la te d to

th e w ork p re sen ted in th is thesis.

• C h a p te r 3 p re se n ts a d etailed d esc rip tio n of each design p a tte r n . W e use a te m ­

p la te to specify v arious a sp e cts o f parallel beh av io r (such as process p lace m en t

an d c o m m u n icatio n p a tte r n s ) of each design p a tte r n . T h e te m p la te s o u tlin e in te n t,

m o tiv a tio n , s tru c tu re , in te ra c tio n a m o n g st th e c o m p o n e n ts a n d a p p lic a b ility of th e

design p a tte r n s .

• C h a p te r 4 discusses p aralleliz atio n of som e low level vision a lg o rith m s such as his­

to g ra m eq u a liz atio n , co nvolution, im age sh a rp e n in g using s p a tia l filters, fa s t fo u rie r

tra n sfo rm s, an d im age re sto ra tio n using M arkov ra n d o m field m odels. E ach algo­

rith m is p arallelized by using e ith e r F arm er-W o rk er, M aste r-W o rk e r o r C o n tro lle r-

W o rk er p a tte r n .

• C h a p te r 5 p re se n ts re su lts of p aralleliz atio n of som e in te rm e d ia te level a lg o rith m s

such as regio n -b ased se g m e n ta tio n , and line g ro u p in g a lg o rith m based on th e p rin ci­

ples of p e rc e p tu a l o rg a n iz a tio n . W e use D iv id e -a n d -C o n q u e r p a tte r n for im p le m e n t­

ing th e parallel region-based se g m e n ta tio n a lg o rith m . T h e line g ro u p in g a lg o rith m

(24)

• C h a p te r 6 p re se n ts re su lts o f p a ralleliz atio n of a high level vision a lg o rith m , nam ely,

g eo m etric h ash in g for o b je c t recognition. W e use a F a rm e r-W o rk e r p a tte r n to p e r­

form m u ltip le m a tc h in g o p e ra tio n s (probes) for id en tify in g each o b je c t in an im age.

In th e la s t section o f th is c h a p te r, we discuss p a ra lle liz a tio n o f an a p p lic a tio n in

m edical im aging, nam ely, m ulti-scale ac tiv e sh a p e d e sc rip tio n of M R (m a g n e tic

resonance) b ra in im ages using activ e c o n to u r m odels. W e d iscuss th re e differen t

ap p ro a c h e s of p arallelizing th e sh a p e d esc rip tio n process. E ach a p p ro a c h uses a

different design p a tte r n , nam ely. T em p o ra l M u ltip lex in g , P ip elin e or C o m p o site

P ipeline.

(25)

P a ra llelism in C o m p u ter V isio n

C o m p u te r vision is a challenging a p p lica tio n for high p e rfo rm a n c e co m p u tin g . M an y

vision a p p lic a tio n s are c o m p u ta tio n a lly intensive an d involve co m p lex processing. F o r a

p ra c tic a l an d re a l-tim e im p le m e n ta tio n of vision a p p lica tio n s, h ig h -p e rfo rm a n c e c o m p u tin g

s u p p o rt is essen tial. O ver th e p a s t several years, parallel p rocessing h as been perceived to

be an a ttr a c tiv e an d econom ical way to achieve th e required level of p e rfo rm a n c e in vision

ap p lic a tio n s. C o m p u ta tio n a l d e m a n d s an d re al-tim e c o n s tra in ts asso c ia te d w ith th e vision

ap p lic a tio n s have induced several research efforts to explore th e use of parallel c o m p u tin g

reso u rces for p arallelizing vision a p p lica tio n s (W ebb, 1994). M o st vision a p p lic a tio n s

co n sist of im age p re p ro ce ssin g followed by o b je c t id en tificatio n . A lth o u g h b o th th e se ta s k s

involve larg e n u m b e r of c o m p u ta tio n s, th e y em b o d y d ifferent c o m p u ta tio n a l p a ra d ig m s.

A s a re su lt, sev eral special an d gen eral p u rp o se parallel m ach in e s have been p ro p o se d ,

developed an d used in im p le m e n tin g parallel so lu tio n s to m an y vision a lg o rith m s.

T h is c h a p te r gives an overview of th e a lg o rith m s in c o m p u te r vision a n d p re se n ts

parallel sy stem s an d m ethodologies used in parallelizing vision a p p lic a tio n s. T h e c h a p te r

is o rg an ized as follows. Section 2.1 in tro d u c e s som e co n c ep ts in p arallel co m p u tin g . Sec­

tio n 2.2 gives an overview of th e principles and m e th o d s involved in th e field o f c o m p u te r

vision. Section 2.3 discusses c o m p u ta tio n a l c h a ra c te ristic s of vision a p p lic a tio n s and th e ir

classification in to th re e levels, low, in te rm e d ia te an d high. S ection 2.4 o u tlin e s different

p arallel sy ste m s used for parallelizing vision a p p lica tio n s. S ectio n 2.5 d escrib es p arallel

(26)

co m p u tin g on a c lu ste r of w o rk sta tio n s. Section 2.6 p ro p o se s a m eth o d o lo g y , b ased on

design p a tte r n s , w hich can be used to parallelize a m a jo rity o f th e vision a p p lic a tio n s on

n e tw o rk -b ased m achines, such as a clu ste r of w o rk sta tio n s. W e also d esc rib e v ario u s form s

of p arallelism t h a t can be applied to parallelize vision a p p lic a tio n s. F inally, sec tio n 2.7

o u tlin e s som e o f th e lead in g research efforts w hich hav e been in sp ira tio n a l to th e w ork

p re se n te d in th is thesis.

2.1

P a r a lle l C o m p u tin g

P a ra lle l c o m p u tin g is concerned w ith apply in g m u ltip le p ro c esso rs to solve a single com ­

p u ta tio n a l p roblem for achieving b e tte r p erfo rm an ce. T h is sectio n begins w ith an in­

tro d u c tio n to p arallel co m p u tin g sy stem s. It is followed by a d esc rip tio n o f a b s tr a c t

a lg o rith m ic classes c h a ra c te riz in g d ifferent parallel alg o rith m s. T h ese classes are useful

w hen d iscussing alg o rith m s a t a higher level.

2 .1 .1 P a r a lle l c o m p u t in g s y s t e m s

A parallel c o m p u te r is a collection of processors an d m em o ry c o n n e cted by som e ty p e of

co m m u n ic a tio n n etw o rk . P ara lle l co m p u tin g sy ste m s in clu d e a full s p e c tru m o f sizes an d

prices, from a collection of w o rk sta tio n s a tta c h e d to a lo c a l-a re a n etw o rk , to an expensive

h ig h -p erfo rm an c e m achine w ith th o u sa n d s of p ro cessors c o n n e cted by h igh-speed sw itches

(D u n c a n , 1992).

T h e a rc h ite c tu re s of th e co m p u tin g sy stem s are co m m o n ly o rg a n iz ed in te rm s of in­

s tru c tio n s tre a m s an d d a t a s tre a m s (F lynn, 1972). T h e th re e cases t h a t hav e becom e

fa m iliar te rm s to th e parallel p ro g ra m m e r are SISD (single in s tru c tio n , single d a ta ) , S IM D

(single in s tru c tio n , m u ltip le d a ta ) an d M IM D (m u ltip le in s tru c tio n , m u ltip le d a ta ) . SISD

c o m p u te rs are th e tra d itio n a l von N eum ann c o m p u te rs t h a t have a single in s tru c tio n

stre a m a n d a single d a ta s tre a m . All o p e ra tio n s on th ese c o m p u te rs are logically seq u e n ­

tial. In a SIM D parallel c o m p u te r a single in stru c tio n s tre a m is ap p lied to m u ltip le d a t a

(27)

c o n n e cted by an in te rc o n n e c tio n netw o rk . T h e M IM D d a t a m odel is th e m o st g en e ral

m odel of a p arallel c o m p u te r. A M IM D c o m p u te r h as m u ltip le pro cessin g elem e n ts each

of w hich is a co m p lete c o m p u te r in its own rig h t.

A lth o u g h SIM D sy ste m s are easy to p ro g ram , o p tim izin g S IM D p ro g ra m s to yield

a c c e p ta b le p erfo rm an c e is very difficult. As a re su lt, SIM D c o m p u te rs have n o t been very

p o p u la r for scientific c o m p u tin g . T h is m akes M IM D sy stem s th e overw helm ing m a jo rity

o f p arallel sy stem s, especially w hen a clu ste r o f w o rk sta tio n s is view ed as a single M IM D

c o m p u te r. A M IM D c o m p u te r co n sists o f p ro cessors an d m em ory. T h e m em o ry can be

e ith e r sh a re d or d is trib u te d am ong th e processors. W e can th e re fo re con sid er tw o d is tin c t

p ro g ra m m in g m odels: sh a re d m em ory M IM D and d is trib u te d m em o ry M IM D . H ow ever,

since th e sam e issues of d a t a locality an d co n c u rre n cy arise in b o th th e cases, we can

view M IM D c o m p u te r in te rm s of a com m on p ro g ra m m in g m odel. O ne such m odel is

th e coordination m odel (M a ttso n , 1996), (F o ster, 1995), w here a p arallel c o m p u ta tio n is

viewed as a collection of d is tin c t processes w hich in te ra c t a t d isc re te p o in ts th ro u g h a

c o o rd in a tio n o p e ra tio n . T h e te rm coordination refers to th e b asic o p e ra tio n s to c o n tro l a

parallel c o m p u te r. It includes c o o rd in a tio n o p e ra tio n s for in fo rm a tio n exch an g e, process

sy n c h ro n iz a tio n an d process m a n a g e m e n t. T h ese c o o rd in a tio n o p e ra tio n s m ay v ary in

speed a n d s tru c tu re , how ever, th e overall m odel is essen tially th e sam e.

B u t describ in g parallel an d d is trib u te d c o m p u te rs in te rm s o f a c o o rd in a tio n m odel

is n o t u n iversally accep ted like th e von N e u m an n m odel (M a tts o n , 1996). H ow ever, such

a m odel can be s ta te d and used for p ro g ram m in g parallel c o m p u te rs w ith in a un iv ersal

p ro g ra m m in g m odel. A lth o u g h th e c o m p u te r sy stem s differ, th e difference is g ra n u la rity

(ra tio o f c o m p u ta tio n to co m m u n icatio n ), and n o t th e fu n d a m e n ta l p ro g ra m m in g m odel

(M a tts o n , 1996).

T h e p ro g ra m m in g m odel, in o rd e r to be useful, m u st be im p le m e n te d as a p ro g ra m m in g

en v iro n m e n t. T h e re are several p ro g ram m in g e n v iro n m e n ts s u p p o rtin g v ario u s in c a rn a ­

tio n s of th e c o o rd in a tio n m odel which ru n well on parallel c o m p u te rs as well as a c lu ste r of

w o rk sta tio n s (T u rc o tte , 1993), (C heng, 1993). O ne can develop a p arallel code using som e

high level lan g u ag e designed specifically to s u p p o rt parallel an d d is trib u te d c o m p u tin g .

(28)

(often called as m essage-passing lib ra ry ), such as P V M (S u n d eram , 1990).

P ro g ra m s w ritte n for parallel M IM D sy stem s fall in to tw o ca te g o ries: S P M D (single

p ro g ra m m u ltip le d a ta ) an d M P M D (m ultiple p ro g ra m m u ltip le d a ta ) . F o r S P M D p ro ­

g ra m s, each p ro cesso r ex ecu tes th e sam e o b je c t code. S P M D sty le o f p ro g ra m m in g is easy

to code since th e p ro g ra m m e r needs to m a in ta in a single so u rce code. In c o n tra s t, M P M D

p ro g ra m s allow each pro cesso r to have a d istin c t ex e cu tab le code. A p ro g ra m m e r can sp lit

th e p ro g ra m in to different m odules w hich can be developed an d deb u g g ed in d e p e n d e n tly

or reu sed as c o m p o n e n ts o f o th e r p ro g ram s. A M P M D p ro g ra m re q u ires less m em o ry

co m p a re d to its equ iv alen t S P M D version (M a ttso n , 1996).

2 .1 .2 A lg o r it h m ic c la ss e s

M o st of th e parallel a lg o rith m s can be classified in te rm s of th e re g u la rity of th e u n d e r­

lying d a t a s tru c tu re s (space) an d th e sy n ch ro n iz atio n req u ired as th e se d a t a elem e n ts are

u p d a te d (tim e) (A ngus e t ah , 1989), (M a ttso n , 1996). B ased on th is classification schem e

th e re are fo u r g en e ral classes of parallel alg o rith m s:

1. S y n ch ro n o u s

S y n ch ro n o u s alg o rith m s are th o se in w hich re g u la r d a t a elem e n ts a re u p d a te d a t

re g u la r in terv a ls of tim e . T h ey are re g u la r in sp ace an d re g u la r in tim e . T h e y involve

tig h tly coupled m an ip u la tio n of identical d a t a elem en ts. S y n ch ro n o u s a lg o rith m s

can b e expressed in te rm s of a single in stru c tio n s tre a m , an d are th e re fo re easily m a p p e d o n to SIM D c o m p u te rs. T h e p arallelism is u su ally ex p ressed in te rm s of th e

dec o m p o sitio n of th e d a ta . In fa c t, th e d a t a drives th e p arallelism , hence th e n a m e

data parallelism . H ow ever, d a t a parallelism is m ore g en e ral th a n SIM D p arallelism ,

since d a t a parallelism does n o t in sist on a single in s tru c tio n s tre a m .

2. Loosely sy n ch ro n o u s

A loosely sy n ch ro n o u s alg o rith m sy n ch ro n o u sly u p d a te s d a t a elem e n ts w hich differ

from one p ro cesso r to a n o th e r. Loosely sy n ch ro n o u s a lg o rith m s are re g u la r in tim e

(29)

ch ro n o u s case. H ow ever, d u e to v a ria tio n in th e d a t a elem e n ts across th e processo rs,

th e w ork loads can v ary from pro cesso r to processor. H ence, loosely sy n ch ro n o u s

alg o rith m s need som e m echanism to b alan ce th e c o m p u ta tio n a l load a m o n g th e

pro cesso rs of th e parallel c o m p u te r.

3. A sy n ch ro n o u s

A sy n ch ro n o u s a lg o rith m s do n o t have re g u la r d a t a u p d a te s , so th e sy ste m p ro ceed s

w ith no n u n ifo rm an d so m etim e s ra n d o m sy n c h ro n iz a tio n . T h ese a lg o rith m s are

irre g u la r in tim e an d usually irre g u la r in space w ith u n p re d ic ta b le or n o n e x iste n t

coupling b etw een th e ta sk s. T h is class o f problem s, o th e r th a n th e e m b a rra ssin g ly

p arallel s u b se t described n ex t, is m o st ra re. T h is is b ecau se p ro g ra m s for im p le­

m e n tin g a sy n c h ro n o u s a lg o rith m s are difficult to c o n s tru c t. W hile sy n ch ro n o u s

a n d loosely sy n ch ro n o u s alg o rith m s are usually p arallelized by focusing on d a t a

dec o m p o sitio n , asy n c h ro n o u s a lg o rith m s are usu ally parallelized by d e c o m p o sitio n

of th e co n tro l, w hich is referred to as fu n c tio n a l or control parallelism .

4. E m b a rra ssin g ly parallel

E m b a rra ssin g ly parallel a lg o rith m s are th o se asy n c h ro n o u s a lg o rith m s for w hich th e

ta s k s are co m p letely in d e p e n d e n t and uncoupled. T h e parallelism in th is case is

triv ia l an d th e p ro g ra m s are am o n g th e sim p le st p arallel p ro g ra m s to c o n s tru c t.

P ro b le m s in th is class are very com m on in p arallel c o m p u tin g since th e ir c o m p u ­

ta tio n s easily m a p in to th is m odel. In fa c t, any p ro g ra m co n sistin g of a loop w ith

co m p u te -in te n siv e a n d in d e p e n d e n t ite ra tio n s can be p arallelized using th is m odel.

E m b a rra ssin g ly parallel p ro g ra m s usually utilize an S P M D sty le o f p ro g ra m m in g

com bined w ith som e m echanism for load b alan cin g . L oad b alan c in g schem es can

e ith e r be s ta tic o r d y n am ic.

2 .1 .3 P e r fo r m a n c e o f p a r a lle l p r o g r a m s

T h e m ain goal of parallelism is to reduce th e ex ecu tio n tim e of th e w hole p ro g ra m in o rd e r

to p ro d u c e th e re su lts fa ste r. T h e p erfo rm an c e e s tim a te s o f a p arallel p ro g ra m are b ased

on th e tim in g s of its co m p lete seq u e n tia l code. T h e se q u e n tia l p ro g ra m ty p ically co m p rises

(30)

T h e p arallel c o n te n t p o f th e p ro g ram is defined as th e ra tio of th e tim e ta k e n to e x e c u te th e

p o te n tia lly parallel code u p o n th e tim e ta k e n to ex ecu te th e w hole code. T h e m ax im u m

th e o re tic a l sp ee d u p t h a t can be achieved for a given p ro g ra m is a fu n c tio n of th e parallel

c o n te n t p an d th e n u m b er of processo rs t h a t will be used {N). It is given by A m d a h l’s law

(A m d a h l, 1988) w hich is s ta te d as follows

Theoretical speedup = —— . ^ (2.1)

T h e th e o re tic a l sp ee d u p is lower th a n th e ideal speedup^ w hich reflects th e ideal t h a t

ap p ly in g N p ro cesso rs to a p ro g ra m should cause it to co m p lete N tim e s fa s te r. T h e size

of th e g a p b etw een th e ideal an d th e o re tic a l sp ee d u p is a fu n c tio n of th e serial c o n te n t of

th e p ro g ra m . T h is su g g ests t h a t th e a m o u n t of sp ee d u p t h a t can be achieved for every

p ro g ra m is lim ited beyond a c e rta in n u m b e r of processors. T h e g a p b etw een th e th e o re tic a l

an d ideal sp e e d u p m ay ch ange d ue to th e increase in problem size (e.g. w hen n u m b e r of

ite ra tio n s are in cre ased in a sim u la tio n ). T h e g ap n arro w s dow n w hen th e p arallel c o n te n t

o f th e p ro g ra m increases d u e to increase in problem size, while th e g a p m ay a c tu a lly w iden

if th e le n g th of th e serial b o ttle n eck s also increase upo n increase in p roblem size. H ow ever,

th e th e o re tic a l sp ee d u p is ra rely achievable by a parallel a p p lic a tio n . T h e re will a c tu a lly

be an observed speedup w hich is m uch lower th a n th e th e o re tic a l sp ee d u p , reflecting th e

effect o f e x te rn a l o verhead on th e to ta l execu tio n . T h is o v erh ead com es from tw o so u rces

a) th e a d d itio n a l processor cycles exp en d ed in sim ply m an ag in g th e parallelism b) w a ste d

tim e s p e n t w a itin g for I /O , co m m u n icatio n am o n g processors, a n d , c o m p e titio n from th e

o p e ra tin g sy ste m an d o th e r users (P an c ak e, 1996). T h e o re tic a l sp e e d u p d o es n o t ta k e

th e se fa c to rs in to ac co u n t.

2 .2

A n O v e r v ie w o f C o m p u te r V isio n

T h e basic in p u t in c o m p u te r vision is a se t of one or m ore im ag e(s) o f som e scene, w hile

th e o u tp u t is a d esc rip tio n o f th e o b je c ts in t h a t scene. A n im ag e, c a p tu re d by a sensor,

is an a rra y of n u m b e rs called pixels t h a t re p re se n t averag e b rig h tn e ss (gray level) or color

(31)

in te g e r h av in g 256 d is tin c t values, w hile each color value is re p re se n te d by a n-valued tu p le

m easu rin g b rig h tn e ss in a se t of n -sp e c tra l b an d s (e.g., red, blue an d g reen ).

W e can view im age processing as a prelude to c o m p u te r vision. Im ag e p ro cessing

a lg o rith m s o p e ra te on im ages to e x tra c t an d re p re se n t scene in fo rm a tio n . H igher level

vision a lg o rith m s use scene in fo rm a tio n for o b je c t reco g n itio n an d scene in te rp re ta tio n .

C o m p u te r vision th e re fo re encom passes processing from sensing to scene in te rp re ta tio n .

T h e m ain a re a s of im age processing include im age e n h a n c e m e n t a n d resto ra tio n (to im ­

prove a p p e a ra n c e of an im age or to u n d o effects of im age d e g ra d a tio n s such as b lu rrin g

o r noise), im age com pressio n (to reduce an im age to sm aller se ts o f d a t a w hich can

be used for re c o n stru c tio n of an ac c e p ta b le a p p ro x im a tio n to th e original im ag e), an d

im age rec o n stru c tio n fr o m p ro jectio n s (to c o n s tru c t im ages of cross-section of an o b je c t

by an a ly z in g a se t of p ro je c tio n s ta k e n from d ifferent d ire c tio n s, as in to m o g ra p h y ).

Since m a jo rity of th e ap p lica tio n s in c o m p u te r vision involve tw o d im en sio n al (2D)

scenes a n d th e gen eral goal is to recognize o b je c ts o f in te re st in th e im ages of th e se

scenes, we will re s tric t o u r discussion to analysis of 2D scenes. T h e follow ing su b se c tio n s

o u tlin e g en eral tech n iq u e s involved in 2D o b je c t re co g n itio n . A d e ta ile d discussion dealin g

p rim a rily w ith 2D vision can be found in (B allard & B ro w n , 1982), (R osenfeld & K ak,

1982), (S onka e t al., 1993), w hile an o u tlin e of b o th 2D a n d 3D vision is given in (R osenfeld,

1988).

2 .2 .1 O b j e c t r e c o g n it io n in 2 D s c e n e s

S om e ex a m p les of a p p lic a tio n s involving 2D scenes are: re co g n itio n o f a lp h a n u m e ric c h a r­

a c te rs from an im age of a d o c u m e n t, recognition of blood cells from an im age of a specim en

seen th ro u g h a m icroscope, an d iden tificatio n of houses a n d ro a d s fro m high a ltitu d e ae rial

p h o to g ra p h s. A g en eral fram ew o rk describing m a jo r tech n iq u e s used in o b je c t reco g n itio n

is show n in F ig u re 2.1. F e a tu re d e te c tio n tech n iq u e s a re used for d e te c tin g local fe a tu re s

such as edges (a t w hich th e g ray level changes a b r u p tly ), lines, curves, sp o ts, a n d co rn ers.

S e g m e n ta tio n p a r titio n s th e im age pixels in to h o m o geneous regions. B o th se g m e n ta tio n

(32)

th e pixels belong.

Recognition/Generic Description

^ M odel M atching/Object R ecognition

Relational structure

A Segm entation/Resegm entation Property Measurement

Scene Features

A Feature Detection

Image enhancement/restoration

Digitized Image o f the Scene

^ Imaging device

Real-World scene

t

Illumination

F ig u re 2.1: A n overview o f a ty p ical vision based a p p lic a tio n

R e se g m e n ta tio n tech n iq u e s g ro u p th e seg m en ted regions in th e im ag e in to g ro u p s

o r p a r ts t h a t satisfy c e rta in g eo m etric c o n s tra in ts . P ro p e r ty m e a su re m e n t a lg o rith m s

c o m p u te various p ro p e rtie s such as a rea, p e rim e te r, an d av erag e g ra y level, for such p a r ts .

M o d el m a tc h in g or o b je c t recognition is th e n re g a rd e d as id en tificatio n of im ag e p a r ts

t h a t c o rre sp o n d to th e o b je c t p a r ts and satisfy th e a p p r o p ria te c o n s tra in ts .

2 .2 .2 F e a tu r e D e t e c t io n

W e d esc rib e basic fe a tu re d e te c tio n tech n iq u es used for d e te c tin g v ario u s local fe a tu re s in

th e im age.

1. T e m p la tin g

A su b im ag e of a local fe a tu re t h a t is to be d e te c te d is re g a rd e d as a te m p la te an d

m a tc h e d a t every possible po sitio n in th e im age for b e st fit. T h e deg ree o f m a tc h or

m ism a tc h identifies th e fe a tu re a t th e c o rre sp o n d in g pixels. T h u s if an d t ( z , j )

re p re se n t pixel in ten sitie s in th e im age an d th e te m p la te , respectively, a m e a su re of

th e m ism a tc h betw een th em can be expressed by (R osenfeld, 1988) D (a,6)(/)^} =

(33)

re la tiv e to t h a t of /. T h e value of (a, b) t h a t m inim izes D re p re se n ts th e m o st likely

p o sitio n o f th e te m p la te in th e im age. T h is m e th o d is c o m p u ta tio n a lly in ten siv e an d

does n o t give c o rre c t re su lts if th e im age in te n sity varies sign ifican tly over a re a s of

th e size of th e te m p la te .

2. E d g e d e te c tio n

E d g e d e te c tio n tech n iq u es a tte m p t to find pixels t h a t lie on th e b o rd e rs betw een

d ifferen t o b je c ts in th e im age. Som e s ta n d a r d a p p ro a c h e s used a re (R osenfeld, 1988):

• M ask m atch in g : A te m p la te re p resen tin g ideal edges in v ario u s o rie n ta tio n s is

m a tc h e d in th e n eig h b o rh o o d o f each pixel in th e im age. A pixel is classified as

an edge pixel if th e degree o f such a m a tc h is sufficiently high. S h a rp m a tc h e s

are o b ta in e d by using m asks which are second differences of ideal s te p (or ra m p )

edges. T h is tech n iq u e is also used for d e te c tin g lines, curves, s p o ts a n d co rn ers.

• G ra d ie n t m ag n itu d e: If Aa; an d A y d e n o te th e first differences o f th e im age g ra y

level in th e x and y d irectio n s, th e n th e d ire c tio n of m ax im u m r a te o f ch an g e of

g ray level is ta n ~ ^ [ A y / A ^ ) ^ and th e g ra d ie n t m a g n itu d e o f th is m ax im u m ra te

of ch an g e is s q r t [ A l + A ^). A pixel lies on an edge if th e g ra d ie n t m a g n itu d e

a t t h a t pixel is sufficiently high. T h e differences A a; an d A y can be re g a rd e d

as good a p p ro x im a tio n s to th e p a rtia l d eriv a tiv e s a n d th e d ig ita l im age as a

good a p p ro x im a tio n to a sm o o th ly vary in g b rig h tn e ss fu n c tio n . T h e g ra d ie n t

m a g n itu d e ap p ro ach has several re fin em en ts (e.g. local m a x im u m selection,

differences of averages, etc.) to overcom e th e effect of noise in th e im age. A

d e ta ile d d esc rip tio n of th e se can be fo u n d in (R osenfeld, 1988).

• L ap la cian Z ero-crossing

In th is a p p ro a c h , a L aplacian of th e im ag e g ra y level i.e. th e su m o f th e second

differences in th e x an d y d irec tio n s in th e n eig h b o rh o o d o f a given pixel is

c o m p u te d . T h is sum is positive on one side of an edge a n d n eg a tiv e on th e

o th e r, hence its zero-crossings define th e lo c a tio n of th e edges.

• H ough tra n sfo rm s

T h e H ough tra n sfo rm a tte m p ts to d e te c t fe a tu re s such as lines, circles, or

curves, t h a t have e q u a tio n s of a p a rtic u la r ty p e by w orking in a s u ita b le p a ­

Figure

Figure 2.1: An overview of a typical vision based application
Figure 3.2; O bject Interaction in the Fanner-W orker Pattern
Figure 3.4: O bject interaction in the M aster-W orker P attern
Figure 3.5: Controller-W orker P attern
+7

References

Related documents

With the rise of powerful national commercial interests, macroeconomic stability was lost in 2007 when large SOEs refused to comply with State Bank technical measures that required

The political orientation has been towards the celebration of different identities as well as the development of a diverse participatory democracy in the organisation and

With the aging of the population and the development of the economy, ischemic stroke has become a disease with a high morbidity and mortality that seriously affects health.

Methods: A newly designed multiplex PCR assay was used to assess whether the virulence- associated genes sasX and pvl and the chlorhexidine tolerance gene qacA/B were present

Single-pill amlodipine/ atorvastatin versus usual care for cardiovascular risk factor management in patients aged 65 years or more with hypertension and additional risk factors—a

Baseline characteristics in the Avoiding Cardiovascular Events Through Combination therapy in Patients Living with Systolic Hypertension (ACCOMPLISH) trial: a hypertensive

of mental health patients found that patients believe medica- tion education is a more important role for pharmacists than providing medication recommendations, and they perceived

Abstract: We describe a 73-year-old male patient with left ventricular noncompaction (LVNC) who was diagnosed with acute myocardial infarction (MI), three-vessel coronary