This work proposes a complete sensor-independent visual system that provides robust target motion detection. First, the way sensors obtain images, in terms of resolution distribution and pixel neighbourhood, is studied. This allows a spatial analysis of motion to be carried out. Then, a novel background maintenance approach for robust target motion detection is implemented. Two different situations are considered: a fixed camera observing a constant background where objects are moving; and a still camera observing objects in movement within a dynamic background. This distinction lies on developing a surveillance mechanism without the constraint of observing a scene free of foreground elements for several seconds when a reliable initial background model is obtained, as that situation cannot be guaranteed when a robotic system works in an unknown environment. Other problems are also addressed to successfully deal with changes in illumination, and the distinction between foreground and background elements.