This paper proposes a real-time distributed algorithm for a team of smart cameras to self-organize and perform video surveillance of an open boundary. In particular, our algorithm simultaneously partitions the boundary among the cameras, and synchronizes the motion of the cameras to optimize the surveillance performance. We focus on the detection of smart intruders, who are aware of the cameras configuration at each time instant, and who schedule their motion to avoid detection for as long as possible. We consider both the worst-case and the average detection times of smart intruders. Our algorithm achieves minimum worst-case detection time, and, under some reasonable assumptions, constant-factor optimal average detection time.