404 Motion Detection on Distributed-Memory Machines: a Case Study P. Cremonesi 1 , M. Pugassi 1 , N. Scarabottolo 2 1 Dipartimento di Elettronica e Informazione — Politecnico di Milano Piazza Leonardo da Vinci 32 — I20133 Milano — Italy ph. +39 2 2399 3400 — fax +39 2 2399 3411 — e-mail {cremones,pugassi}@elet.polimi.it 2 Dipartimento di Scienze dell’Ingegneria — Università degli Studi di Modena via Campi 213 — I41100 Modena — Italy ph. +39 59 367890 — fax +39 59 370040 — e-mail nello@c220.unimo.it Abstract The problem considered in this paper is the implementation of motion-detection on distributed- memory MIMD machines. The solution here proposed is based on pyramidal algorithms that, by iteratively discarding uninteresting details, allow to focus on the moving parts of an image stream. Different parallelisation methodologies have been evaluated and the most promising ones have been implemented on a Transputer-based parallel machine. Experimental results are here presented and compared with the theoretical ones. 1. Introduction The work here summarised belongs to a more general research framework, aimed at defining suitable policies for the implementation of image processing applications on general-purpose, programmable parallel MIMD machines, constituted by tens to thousands of processing nodes provided with local memory resources and communicating through a system-wide interconnection structure. Main rationale behind the choice of this kind of processing architectures — with respect to more performant, dedicated systems — is their growing availability (in forms ranging from add-on boards, to strictly interconnected CPU clusters, to unused processing power in networked workstations) and their intrinsic flexibility in adapting themselves to different application environments and to different processing steps. In particular, the project here presented deals with a smart surveillance system, where the aim of the image processing activity is the identification and recognition of moving objects, identified by suitably processing pairs/groups of subsequent images taken from the same scene. As it is well known, an effective parallelisation of algorithms on distributed-memory MIMD machines can be achieved by adopting a SPMD (Single Program Multiple Data) programming style, where each processing node performs the same computation upon a different subset of the input data. Simplicity of data distribution, rapidity of program coding and absence of (slow) inter- processor data exchanges are the main advantages of this approach. Main drawback of SPMD programming arises whenever the addressed algorithm needs to process non- local (or global ) data, since this implies inter-processor data exchanges, thus synchronisation and message passing overheads. The characteristics of the machine vision algorithms here considered — discussed in section 2 — require some form of global processing in order to identify and to focus onto the image parts where object movements took place. To effectively parallelise such algorithms, different approaches have been identified — as presented in section 3 — where the SPMD programming style is suitably tuned to the algorithms themselves in order to minimise communication overheads and to enhance final performances. A forecast of the performances of the approaches to parallelisation mentioned above has been obtained through a simple model of the behaviour of a distributed- memory MIMD machine, discussed in section 4. The most promising parallelisation schemes have then been actually implemented, evaluated and integrated with the subsequent machine vision processing steps, as shown in section 5.