Given a surveillance system with many cameras, which cover a wide and complex area, it is important to know the camera network topology. I.e., which cameras have overlapping fields of view. This is useful for inferring 3D structure and tracking. The computational model assumed in this paper is that each camera has its own computing unit able to perform simple processing operations and is connected via a communication network to all the other cameras. Due to the similar nature of the scenes photographed by the cameras, it might be hard to compute the overlap by matching features. This paper therefore suggests to accomplish the task automatically, using a distributed algorithm. Each camera detects motion locally and transmits the detected motion position to the other cameras. The overlap is detected by searching for correlations defined by simultaneous activity in image regions. The areas of these regions are chosen so that they optimize the number of frames required to determine whether there is an overlap and to reduce the number of false decisions. Each camera determines the number of regions based on the amount of motion detected in its field of view. The algorithm has been implemented and tested both in simulated and real multi-camera image sequences.