• Aucun résultat trouvé

MASSIVE MARCHING: A PARALLEL COMPUTATION OF DISTANCE FUNCTION

N/A
N/A
Protected

Academic year: 2021

Partager "MASSIVE MARCHING: A PARALLEL COMPUTATION OF DISTANCE FUNCTION"

Copied!
7
0
0

Texte intégral

(1)

HAL Id: hal-01510914

https://hal-enpc.archives-ouvertes.fr/hal-01510914

Submitted on 20 Apr 2017

HAL is a multi-disciplinary open access archive for the deposit and dissemination of sci- entific research documents, whether they are pub- lished or not. The documents may come from teaching and research institutions in France or abroad, or from public or private research centers.

L’archive ouverte pluridisciplinaire HAL, est destinée au dépôt et à la diffusion de documents scientifiques de niveau recherche, publiés ou non, émanant des établissements d’enseignement et de recherche français ou étrangers, des laboratoires publics ou privés.

MASSIVE MARCHING: A PARALLEL COMPUTATION OF DISTANCE FUNCTION

Eva Dejnozkova Dokládova, Petr Dokládal, Jean-Claude Klein

To cite this version:

Eva Dejnozkova Dokládova, Petr Dokládal, Jean-Claude Klein. MASSIVE MARCHING: A PAR- ALLEL COMPUTATION OF DISTANCE FUNCTION. the 9th International Workshop on Sys- tems, Signals and Image Processing (IWSSIP’02), Nov 2002, Manchester, United Kingdom. pp.71-76,

�10.1142/9789812776266_0009�. �hal-01510914�

(2)

EVADEJNO

ZKOV

A,PETRDOKL

ADALANDJEAN-CLAUDEKLEIN

CentredeMorphologieMathematique,ENSMP

35,RueSaintHonore

77305Fontainebleau,Frane

E-mail: dejnozkemm.ensmp.fr

Themethods basedonthe evolutionofa urveontrolledbypartialdierential

equations (PDE), representan eÆient and exibletoolof imagesegmentation,

reognitionorobjettraking. Forthesemethods,anaurateandrapidompu-

tationofthedistanefuntionisofakeyimportane. Weproposeanew,entirely

parallelalgorithmyieldingthedistanefuntionanditshardwareimplementation.

1. Introdution

ThePDE-basedmethodsofimagesegmentation,objettrakingorreog-

nitionbasedontheurveevolutionuseanimpliitdesriptionoftheurve.

Thisdesriptionisrealizedbyasigneddistanefuntiontotheurve. The

urveevolutionontrolled bythePDEgeneratesadeformationofthedis-

tane. Therefore, during theevolutionof theurve, thedistane funtion

needstobeperiodiallyrealulated.

Below, we disussthe omputationaldiÆulties ofexisting algorithms

exluding any eÆient hardware implementation. In the Setion 3.2 we

proposeanoriginalparallelalgorithmtoalulatethedistanefuntionto

tthePDE-basedappliationneeds,and,inSetion4,itsimplementation

onaspeializedarhiteture.

1.1. Level Set

TheevolutionoftheurveC isrepresentedbytheevolutionof itsimpliit

desription(level set) [5℄. Aordingto [1℄the signeddistane funtion u

(to theurve)isequivalentto theparametridesriptionoftheurveand

isitsuniquedesription. Theinitialurveisthenthezero-levelset inu:

C

0

=

(x;y;t)2R 2

ju(x;y;t)=0 (1)

(3)

It has been proved that every funtion u satisfying the Eq. (2) is a

signeddistane funtionplusaonstant[1℄.

jruj=1 (2)

In general, the alulation of the distane funtion omprises three

stages: initialization, approximation and propagation. The initialization

detetsbyinterpolationtheinitialpositionC

0

(Eq. (1)). Itisloatedwith

asub-pixelpreision. Ifthe linearinterpolation isused, itshardwareim-

plementationdoesnotrisemajorproblems[7℄. Therefore,inthefollowing,

wefousonlyontheapproximationandthepropagation.

Throughoutthis paperweusethefollowingnotations. Letp=[x

p

;y

p

beapointofanisotrope,squareunitgrid. V(p)denotestheneighborhood

ofpdenedasV(p)=f[x

p

;y

p

1℄;[x

p 1;y

p

℄g. Thepointqisaneighbor

ofpifq2V(p). u(p)denotesthevalueof thedistanefuntion inp. The

minimumvaluesuoftheneighborsofpare:

u

x

(p)=minfu([x

p +1;y

p

℄);u([x

p 1;y

p

℄)g (3)

u

y

(p)=minfu([x

p

;y

p

+1℄);u([x

p

;y

p

1℄)g (4)

u

min

(p)=minfu

x (p);u

y

(p)g (5)

2. Approximation: Numerial Sheme

Themostoftenusedshemeis,inthedomainoftheLevelSet,theGodunov

sheme[5℄. Thisshemerequiresto determinethemaximumsolutionofa

quadratiequation, repeatedfor allpairs ofneighborsin thediretions x

andy. Othershemes[3℄or[6℄e.g.,yieldu 2

. Thisisextremelyunpleasant

forappliationswithsubpixelpreision,alulatedin realnumbers,where

uisneeded(andnotu 2

).

To derease the omputation omplexity, we propose to approximate

the distane funtion in the following way. In general, the value u(p) is

obtainedasafuntion oftheneighborhoodofpas:

u(p)=u

min (p)+f

di (ju

x (p) u

y

(p)j) (6)

where f

di

is the funtion to be approximated. It is an inreasing and

generallynonlinearfuntion denedon h0;1iandlimitedthere. As aon-

venientompromisebetweentheomputationomplexityandauraywe

havehosenapieewiselinearizationinnintervals. Theomputationom-

plexity isthenredued tothe searhof theappropriatedintervalandone

addition and onemultipliation. Other types of approximationsan also

be usedas look-up-tableoradditionofaonstant(seeexamplesgivenby

(4)

3. Propagation

3.1. Existing methods

The propagation phasedenes theorder in whih thepointsreeive their

values. TheFastMarhing[5℄isthemostoftenusedpropagationtehnique

in ombination with the PDE-based methods. It omputes the distane

funtion by propagating equidistant waves. For this, it uses an ordered

waiting list with a real-number priority. The need of the knowledge of

the maximum priority represents a global information whih makes this

algorithm sequential. Moreover, thehardware implementation of waiting

listsusingareal-numberpriorityisdiÆultbeauseofsuhoperationslike

insertion,readingandre-positioning.

Evenif other existing methods [6℄ or[3℄ e.g., do not use any ordered

struture they suer from other disadvantages asseveral obligatory sans

of the entire image in several diretions, where thefollowingsan annot

startbeforethepreedingoneterminates.

3.2. Massive Marhing

We proposean original and fully parallel algorithm Massive Marhing to

alulate the distane funtion permitting to ompute the distane in a

narrowband. It doesnotuseanywaiting lists. Consequently, thefrontof

thepropagationisnotequidistanttotheinitialurve.

Thealulation is done in twostepsalled aordingto their Markov

harateristis[2℄. The rst one, the Jaobi step, alulates the value of

thedistanefuntion att

n+1

giventhevaluesalulatedatt

n

. Theseond

one,theGauss-Seidlerstep,realulatesthedistanevalueatt

n+1

byusing

thevaluesobtainedatt

n+1

. (Thevaluesofpointsnotproessedin t

n are

automatially reportedinthenextiterationandnotedasvaluesatt

n+1 .)

Let Abe theset initializedby the interpolation. Let Q bethe set of

pointsmarkedasativeQ=fq

i jq

i

62AandV(q

i

)\A6=;g.

Initialisation

Initializetheneighborhoodoftheurvewithasigneddistane(A)

Initializetheotherpointsto 1,theneighborsofAmarkasative (Q)

Propagation(unlessQ6=fg,forallp2Qdoinparallel):

Jaobi step:

u n+1

(p)= 8

>

>

<

>

>

: u

n

min (p)+f

di (ju

n

x (p) u

n

y (p)j) if

ju n

x (p) u

n

y

(p)j2h0;1i

u n

(p)+1 otherwise

(7)

(5)

Gauss-Seidler step:

u n+1

(p)= 8

>

>

<

>

>

: u

n+1

min (p)+f

di (ju

n+1

x

(p) u n+1

y

(p)j) if

ju n+1

x

(p) u n+1

y

(p)j2h 0;1i

u n+1

(p)=u n+1

min

(p)+1 otherwise

(8)

Ativationof new pointstoproess:

?deletepfrom Q,insertpinA

?ifu(p)<NB

width

thenforallq

i

; q

i

2V(p)suhthat

u n+1

(q

i ) u

n+1

(p)>"; ">0; "=onst. (9)

insertq

i inQ

whereNB

width

isthedesiredwidth ofthenarrowband.

Theimpatofthetwo-stepbasedomputationonthehardwareimple-

mentation omplexity is negligeable. In fat, the sameoperation is only

omputedtwie(withentryvaluesfromdierentsteps).

Thepointsthatmayneedtoberealulatedaredetetedbyusingthe

onstant " (Eq. (9)). Given apixel p, every neighbor verifying Eq. (9)

isativated whilepitself is desativated (see [7℄ for demonstrationof the

algorithm). Toensuretheinreasingnessandmonotoniityofthedistane

funtion,thehoie of" veriesthefollowing:

"K

min

>0 where K

min

= min

l2h0;1i f

di

(l) (10)

K

min

is the predition of the minimum value of the distane inrement.

Bysetting">K

min

weanauthorizefewerreativations(lowerexeution

time) paid by some error in the result (proportional to " K

min ). The

Eq. (9) ensures that the algorithm marhes forward banning all useless

ativations.

4. Implementation

ThelowomplexityandstraightforwardnessoftheMassiveMarhingim-

pose few onstraintson the arhiteture and allowits full parallelisation.

Itanalso beexeutedin aquasi-parallel way, withmorethan onepoint

perproessingunit.

Theglobal arhiteture,wepropose, isof thedivide-and-onquertype

withoneproessingunit permemoryblok. The blok size,realizedasa

vertiallineoftheimage,isatradeobetweentheproessingtimeandthe

balanedativityofalltheproessingunits.

The input image is storedin the distributed Data Memory. The user

(6)

ProgramMemory ControlUnit

CommuniationNetwork

PU

1 M

1

M

2

M

n PU

n PU

2 :::

(a)GlobalArhiteture

PU

LoalControl

Addressing ALU

Ativation

Flags

Q Searh +; ;

j:j;<;>

Binary

Registers Point Fixed

DataMemory

(b)ArhitetureofProessingUnit

Figure1. ImplementationofMassiveMarhingAlgorithm

byspeifyingrespetivelynegativeand positivevaluesfor theinteriorand

exterioroftheurve. ThealgorithmisreadfromtheProgramMemoryby

theControlUnitandtheinstrutionsaresenttotheProessingUnits. The

ommuniationisensured attwolevels: 1)betweenthe ControlUnit and

theProessing Units(instrutionandreportoftheend ofthealgorithm),

and 2) parallel ommuniation between adjaent Proessing Units in the

neighborhood.

InordertolimitthenumberofonnetionsbetweenadjaentProessing

Units, thevaluesoftheeastandwestneighborsareread intwoyles. In

oneinstrutiontheunit readstheeastneighborandsimultaneouslysends

itsownvaluetothewest neighbor,andinverselyinthenextinstrution.

Theinitialization is doneby examination of the signof the neighbors

andassoiationofaonstantrepresentingthelinearinterpolation. During

thepropagation,everyativepointgivesbirth tooneproess,exeutedby

oneProessingUnit,alulatingthedistane valuefrom theneighbors.

The blok Ativation ontrols the ativation of the urrent point de-

pendingontheneighborsandsendstheativation ommandtotheneigh-

bors. Also,theAtivationblokreadstheativationagQtoprovidethe

instrutionifativethen:::else topreventuselessexeutionofthegiven

instrutionininativepoints.

Thevalue of theurrentpoint is omputed by axed-pointALU. Its

omplexitydependsonthehosenapproximation. Ifthepieewiselineari-

sationisused,theALUperformsabinarysearhtondtheorretvalues

to alulatethe piee-wiselinearization(see [4℄) ofthefuntion f

di . The

intermediateresultsandtheonstantsarestoredinFixedPointRegisters.

5. Conlusions

We presentan original and fully parallel algorithm for alulationof the

distane. Contrary to other methods, the Massive Marhing ompletely

(7)

(a) Piee-wise lineari-

sation:4intervals

(b) look-up-table, 10

intervales

() Addition ofa on-

stant,= p

0:5

Figure 2. Contours of distane obtained by various approximations; initial urves

(plaedonthesquaregrid)inheavylines.

information.

The proposed global arhiteture of Massive Marhing is the divide-

and-onquertypewithoneproessingunitpermemoryblok. Eahblok

represents a vertial line of the image in order to redue the adressing

omplexityandtobalanetheativityofalltheproessingunits.

The primaryontribution onsistsin alow-ost,embedded implemen-

tationoftraditionallyostlyalgorithms basedonpartial dierentialequa-

tions. The proposed arhiteture an evolve to integrate also the urve

deformationalgorithm.SameProessingUnitswillatuallybeusedtoim-

plement the non-linear riteriaas energy, urvature or optial ow. The

future work will inlude the implementation of MassiveMarhing with a

hosenappliationsuhas segmentationorobjettraking.

Referenes

[1℄ V. I. Arnold. Geometrial Methods in the Theory of Ordinary Dierential

Equations.Springer-Verlag,NewYork,1983.

[2℄ M.BoueandP.Dupuis.Markovhainapproximationsfordeterministion-

trol problemswithaÆne dynamisandquadrati ostintheontrol.SIAM

JournalonNum.Analysis,36:667{695,1999.

[3℄ P. Danielsson. Eulidian distane mapping. Computer graphis and image

proessing,14:227{248,1980.

[4℄ T.Gijbels,P.Six,andol.AVLSIarhitetureforparallelnon-lineardiusion

withappliationsinvision.IEEE,WorkshoponVLSISignalProessing,1994.

[5℄ J.Sethian.LevelSetMethods. CambridgeUniversityPress, 1996.

[6℄ R.Tsai.Rapidandaurateomputationofthedistanefuntionusinggrids.

TehnialReport00(36),UCLACAM,2000.

[7℄ E.Dejnozkova.Massivemarhing: AParallelComputationofDistaneFun-

tionfor PDE-based Appliations. Tehnial ReportN-17/02/MM, ENSMP,

2002.

Références

Documents relatifs

We present an implemen- tation of the pole ladder, an algorithm to compute parallel transport based on geodesic parallelograms and compare it to methods by integra- tion of the

The DS1410K Developer’s Kit contains all the software and hardware necessary to complete integration of the DS1410E Parallel Port Adapter and corresponding iButtons into

POO( A) (parallel optimistic optimization) is a meta-algorithm that uses any hierarchical optimiza- tion algorithm A that knows the smoothness as a subroutine, originally proposed

This proposed approach has been used to compute the natural frequencies of the NaVARo, which is a planar parallel manipulator with multiple actuation modes developed at IRCCyN..

Parallel Computation on Interval Graphs: Algorithms and Experiments Afonso Ferreira, Isabelle Guérin-Lassous, Karina Marcus, Andrew Rau-Chaplin.. To cite this version: Afonso

In this paper, we have presented a new parallel computation method for topological smoothing through combining parallel computation of Euclidean Distance Transform

We discuss massively parallel implementation issues of the following heuristic optimization methods: Evolution Strat- egy, Genetic Algorithms, Harmony Search, and Simulated

To solve this problem, we compare the he implementation of the traditional matrix algorithm, and the serial and parallel versions of the cyclic reduction algorithm using different